@superblocksteam/library-shared 2.0.17 → 2.0.18-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ export * from "./base-entity-manager.js";
4
4
  export * from "./binding-identifiers.js";
5
5
  export * from "./common.js";
6
6
  export * from "./edit-operations.js";
7
- export * from "./editor-template.js";
7
+ export * from "./register-component.js";
8
8
  export * from "./entities.js";
9
9
  export * from "./errors.js";
10
10
  export * from "./events.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -4,7 +4,7 @@ export * from "./base-entity-manager.js";
4
4
  export * from "./binding-identifiers.js";
5
5
  export * from "./common.js";
6
6
  export * from "./edit-operations.js";
7
- export * from "./editor-template.js";
7
+ export * from "./register-component.js";
8
8
  export * from "./entities.js";
9
9
  export * from "./errors.js";
10
10
  export * from "./events.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import type { Dim } from "../layout.js";
2
- import type { CatalogWithComponentDetails } from "./editor-template.js";
2
+ import type { CatalogWithInternalDetails, EditorConfig } from "./register-component.js";
3
3
  export type ComponentRegistryShareState = {
4
4
  customComponentList: string[];
5
- libraryComponentCatalogs: Record<string, CatalogWithComponentDetails[]>;
5
+ libraryComponentCatalogs: CatalogWithInternalDetails[];
6
+ libraryComponentEditorConfigs: Record<string, EditorConfig>;
6
7
  };
7
8
  export type DndShareState = {
8
9
  isDragging: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"mobx-shared-state.d.ts","sourceRoot":"","sources":["../../src/types/mobx-shared-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,MAAM,2BAA2B,GAAG;IACxC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,EAAE,CAAC,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,IAAI,GAAG;QACnB,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;QAClB,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,eAAe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Y,CAAC,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,oBAAoB,EAAE,2BAA2B,CAAC;IAClD,GAAG,EAAE,aAAa,CAAC;IACnB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAClD,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Public list of icon ids to be used by library or custom components.
3
+ * These icons are displayed in the editor UI to visually represent each component type
4
+ * in places like sidebars and panels.
5
+ */
6
+ export declare const ComponentIcons: {
7
+ readonly "date-picker": "date-picker";
8
+ readonly "file-picker": "file-picker";
9
+ readonly "key-value": "key-value";
10
+ readonly "pdf-viewer": "pdf-viewer";
11
+ readonly "radio-group": "radio-group";
12
+ readonly "rich-text-editor": "rich-text-editor";
13
+ readonly button: "button";
14
+ readonly callout: "callout";
15
+ readonly canvas: "canvas";
16
+ readonly chart: "chart";
17
+ readonly chat: "chat";
18
+ readonly checkbox: "checkbox";
19
+ readonly code: "code";
20
+ readonly collapse: "collapse";
21
+ readonly container: "container";
22
+ readonly custom: "custom";
23
+ readonly diff: "diff";
24
+ readonly dropdown: "dropdown";
25
+ readonly form: "form";
26
+ readonly grid: "grid";
27
+ readonly icon: "icon";
28
+ readonly iframe: "iframe";
29
+ readonly image: "image";
30
+ readonly input: "input";
31
+ readonly link: "link";
32
+ readonly map: "map";
33
+ readonly menu: "menu";
34
+ readonly modal: "modal";
35
+ readonly page: "page";
36
+ readonly section: "section";
37
+ readonly slideout: "slideout";
38
+ readonly spinner: "spinner";
39
+ readonly switch: "switch";
40
+ readonly table: "table";
41
+ readonly tabs: "tabs";
42
+ readonly text: "text";
43
+ readonly video: "video";
44
+ };
45
+ export type ComponentIcon = (typeof ComponentIcons)[keyof typeof ComponentIcons];
46
+ export type SvgDataUri = `data:image/svg+xml,${string}`;
47
+ export interface EditorConfig {
48
+ icon?: ComponentIcon | SvgDataUri;
49
+ }
50
+ /**
51
+ * Editor metadata shown for each component before users drag/add them to their applications.
52
+ */
53
+ export type Catalog = {
54
+ displayName: string;
55
+ category: "COMMON" | "FORMS" | "CONTAINERS" | "MEDIA" | "ADVANCED" | string;
56
+ description?: string;
57
+ };
58
+ export type CatalogWithInternalDetails = Catalog & {
59
+ componentType: string;
60
+ };
61
+ //# sourceMappingURL=register-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-component.d.ts","sourceRoot":"","sources":["../../src/types/register-component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCjB,CAAC;AAEX,MAAM,MAAM,aAAa,GACvB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,sBAAsB,MAAM,EAAE,CAAC;AACxD,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG;IACjD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Public list of icon ids to be used by library or custom components.
3
+ * These icons are displayed in the editor UI to visually represent each component type
4
+ * in places like sidebars and panels.
5
+ */
6
+ export const ComponentIcons = {
7
+ "date-picker": "date-picker",
8
+ "file-picker": "file-picker",
9
+ "key-value": "key-value",
10
+ "pdf-viewer": "pdf-viewer",
11
+ "radio-group": "radio-group",
12
+ "rich-text-editor": "rich-text-editor",
13
+ button: "button",
14
+ callout: "callout",
15
+ canvas: "canvas",
16
+ chart: "chart",
17
+ chat: "chat",
18
+ checkbox: "checkbox",
19
+ code: "code",
20
+ collapse: "collapse",
21
+ container: "container",
22
+ custom: "custom",
23
+ diff: "diff",
24
+ dropdown: "dropdown",
25
+ form: "form",
26
+ grid: "grid",
27
+ icon: "icon",
28
+ iframe: "iframe",
29
+ image: "image",
30
+ input: "input",
31
+ link: "link",
32
+ map: "map",
33
+ menu: "menu",
34
+ modal: "modal",
35
+ page: "page",
36
+ section: "section",
37
+ slideout: "slideout",
38
+ spinner: "spinner",
39
+ switch: "switch",
40
+ table: "table",
41
+ tabs: "tabs",
42
+ text: "text",
43
+ video: "video",
44
+ };
45
+ //# sourceMappingURL=register-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-component.js","sourceRoot":"","sources":["../../src/types/register-component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,kBAAkB,EAAE,kBAAkB;IACtC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superblocksteam/library-shared",
3
- "version": "2.0.17",
3
+ "version": "2.0.18-next.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,10 +0,0 @@
1
- export type Catalog = {
2
- displayName: string;
3
- category: "COMMON" | "FORMS" | "CONTAINERS" | "MEDIA" | "ADVANCED" | string;
4
- icon: string;
5
- description?: string;
6
- };
7
- export type CatalogWithComponentDetails = Catalog & {
8
- componentType: string;
9
- };
10
- //# sourceMappingURL=editor-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-template.d.ts","sourceRoot":"","sources":["../../src/types/editor-template.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG;IAClD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=editor-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-template.js","sourceRoot":"","sources":["../../src/types/editor-template.ts"],"names":[],"mappings":""}