@upstart.gg/sdk
Version:
You can test the CLI without recompiling by running:
38 lines (36 loc) • 1.03 kB
JavaScript
import { getSchemaDefaults } from "./utils/schema.js";
//#region src/shared/brick-manifest.ts
function defineBrickManifest({ props, defaultHeight, defaultWidth, category = "widgets", isContainer = false, hideInLibrary = false, isGlobalBrick = false, deletable = true, movable = true, resizable = true, duplicatable = true, defaultInspectorTab = "preset", icon,...rest }) {
return {
...rest,
icon,
props,
category,
defaultInspectorTab,
hideInLibrary,
deletable,
movable,
resizable,
duplicatable,
isContainer,
isGlobalBrick,
defaultWidth: {
mobile: defaultWidth?.mobile ?? "auto",
desktop: defaultWidth?.desktop ?? "auto"
},
defaultHeight: {
mobile: defaultHeight?.mobile ?? "auto",
desktop: defaultHeight?.desktop ?? "auto"
}
};
}
function getBrickManifestDefaults(manifest) {
return {
manifest,
props: getSchemaDefaults(manifest.props),
mobileProps: {}
};
}
//#endregion
export { defineBrickManifest, getBrickManifestDefaults };
//# sourceMappingURL=brick-manifest.js.map