@webiny/website-builder-sdk 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.eb196ccd2f
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.
- package/BindingsApi.d.ts +4 -4
- package/BindingsApi.js +3 -3
- package/BindingsApi.js.map +1 -1
- package/BindingsProcessor.d.ts +1 -1
- package/BindingsProcessor.js.map +1 -1
- package/BindingsProcessor.test.js +1 -1
- package/BindingsProcessor.test.js.map +1 -1
- package/BindingsResolver.d.ts +2 -2
- package/BindingsResolver.js.map +1 -1
- package/BindingsResolver.test.js +3 -3
- package/BindingsResolver.test.js.map +1 -1
- package/ComponentInputTraverser.d.ts +1 -1
- package/ComponentInputTraverser.js.map +1 -1
- package/ComponentManifestToAstConverter.d.ts +1 -1
- package/ComponentManifestToAstConverter.js.map +1 -1
- package/ComponentResolver.d.ts +2 -2
- package/ComponentResolver.js +3 -3
- package/ComponentResolver.js.map +1 -1
- package/ContentSdk.d.ts +11 -5
- package/ContentSdk.js +22 -6
- package/ContentSdk.js.map +1 -1
- package/DocumentStore.d.ts +3 -3
- package/DocumentStore.js +1 -1
- package/DocumentStore.js.map +1 -1
- package/DocumentStoreManager.d.ts +2 -2
- package/DocumentStoreManager.js +1 -1
- package/DocumentStoreManager.js.map +1 -1
- package/EditingSdk.d.ts +2 -2
- package/EditingSdk.js +8 -8
- package/EditingSdk.js.map +1 -1
- package/ElementFactory.d.ts +3 -3
- package/ElementFactory.js +4 -4
- package/ElementFactory.js.map +1 -1
- package/IBindingsUpdater.d.ts +2 -2
- package/IBindingsUpdater.js.map +1 -1
- package/IRedirects.d.ts +5 -0
- package/IRedirects.js +3 -0
- package/IRedirects.js.map +1 -0
- package/InheritanceProcessor.d.ts +2 -2
- package/InheritanceProcessor.js.map +1 -1
- package/InheritanceProcessor.test.js +1 -1
- package/InheritanceProcessor.test.js.map +1 -1
- package/InheritedValueResolver.d.ts +1 -1
- package/InheritedValueResolver.js.map +1 -1
- package/InputBindingsProcessor.d.ts +4 -4
- package/InputBindingsProcessor.js +5 -5
- package/InputBindingsProcessor.js.map +1 -1
- package/InputsBindingsProcessor.test.js +2 -2
- package/InputsBindingsProcessor.test.js.map +1 -1
- package/InputsUpdater.d.ts +5 -5
- package/InputsUpdater.js +2 -2
- package/InputsUpdater.js.map +1 -1
- package/LiveSdk.js +1 -1
- package/LiveSdk.js.map +1 -1
- package/Logger.js +7 -4
- package/Logger.js.map +1 -1
- package/NullSdk.d.ts +2 -1
- package/NullSdk.js +3 -0
- package/NullSdk.js.map +1 -1
- package/PreviewDocument.js +1 -1
- package/PreviewDocument.js.map +1 -1
- package/PreviewSdk.js +1 -1
- package/PreviewSdk.js.map +1 -1
- package/PreviewViewport.d.ts +1 -1
- package/PreviewViewport.js +1 -1
- package/PreviewViewport.js.map +1 -1
- package/StylesBindingsProcessor.d.ts +2 -2
- package/StylesBindingsProcessor.js +4 -4
- package/StylesBindingsProcessor.js.map +1 -1
- package/StylesUpdater.d.ts +4 -4
- package/StylesUpdater.js +2 -2
- package/StylesUpdater.js.map +1 -1
- package/Theme.d.ts +1 -1
- package/Theme.js +5 -3
- package/Theme.js.map +1 -1
- package/ViewportManager.d.ts +1 -1
- package/ViewportManager.js +4 -1
- package/ViewportManager.js.map +1 -1
- package/createElement.d.ts +1 -1
- package/createElement.js.map +1 -1
- package/createInput.d.ts +1 -1
- package/createInput.js +1 -1
- package/createInput.js.map +1 -1
- package/createTheme.d.ts +2 -1
- package/createTheme.js.map +1 -1
- package/dataProviders/ApiClient.d.ts +6 -1
- package/dataProviders/ApiClient.js +19 -8
- package/dataProviders/ApiClient.js.map +1 -1
- package/dataProviders/DefaultDataProvider.d.ts +2 -1
- package/dataProviders/DefaultDataProvider.js +16 -3
- package/dataProviders/DefaultDataProvider.js.map +1 -1
- package/dataProviders/NullDataProvider.d.ts +2 -1
- package/dataProviders/NullDataProvider.js +3 -0
- package/dataProviders/NullDataProvider.js.map +1 -1
- package/dataProviders/RedirectsProvider.d.ts +11 -0
- package/dataProviders/RedirectsProvider.js +32 -0
- package/dataProviders/RedirectsProvider.js.map +1 -0
- package/defaultBreakpoints.d.ts +1 -1
- package/defaultBreakpoints.js.map +1 -1
- package/documentOperations/$addElementReferenceToParent.js.map +1 -1
- package/documentOperations/AddElement.d.ts +1 -1
- package/documentOperations/AddElement.js.map +1 -1
- package/documentOperations/AddToParent.d.ts +1 -1
- package/documentOperations/AddToParent.js.map +1 -1
- package/documentOperations/RemoveElement.d.ts +1 -1
- package/documentOperations/RemoveElement.js.map +1 -1
- package/documentOperations/SetGlobalInputBinding.d.ts +1 -1
- package/documentOperations/SetGlobalInputBinding.js.map +1 -1
- package/documentOperations/SetGlobalStyleBinding.d.ts +1 -1
- package/documentOperations/SetGlobalStyleBinding.js.map +1 -1
- package/documentOperations/SetInputBindingOverride.d.ts +1 -1
- package/documentOperations/SetInputBindingOverride.js.map +1 -1
- package/documentOperations/SetStyleBindingOverride.d.ts +1 -1
- package/documentOperations/SetStyleBindingOverride.js.map +1 -1
- package/documentOperations/index.d.ts +8 -8
- package/documentOperations/index.js +7 -7
- package/documentOperations/index.js.map +1 -1
- package/findMatchingAstNode.d.ts +1 -1
- package/findMatchingAstNode.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/lexical/createDefaultLexicalTheme.d.ts +1 -1
- package/lexical/createDefaultLexicalTheme.js.map +1 -1
- package/lexical/createLexicalTheme.d.ts +1 -1
- package/lexical/createLexicalTheme.js +2 -2
- package/lexical/createLexicalTheme.js.map +1 -1
- package/package.json +4 -4
- package/registerComponentGroup.d.ts +1 -1
- package/registerComponentGroup.js +1 -1
- package/registerComponentGroup.js.map +1 -1
- package/types/WebsiteBuilderTheme.d.ts +17 -4
- package/types/WebsiteBuilderTheme.js.map +1 -1
- package/types.d.ts +9 -8
- package/types.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Document, StyleValueBinding } from "../types.js";
|
|
2
|
-
import type { IDocumentOperation } from "./IDocumentOperation";
|
|
2
|
+
import type { IDocumentOperation } from "./IDocumentOperation.js";
|
|
3
3
|
export declare class SetStyleBindingOverride implements IDocumentOperation {
|
|
4
4
|
private readonly elementId;
|
|
5
5
|
private breakpoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SetStyleBindingOverride","constructor","elementId","bindingPath","binding","breakpoint","apply","document","bindings","breakpointOverrides","overrides","styles"],"sources":["SetStyleBindingOverride.ts"],"sourcesContent":["import type { Document, StyleValueBinding } from \"~/types.js\";\nimport type { IDocumentOperation } from \"./IDocumentOperation\";\n\nexport class SetStyleBindingOverride implements IDocumentOperation {\n private readonly elementId: string;\n private breakpoint: string;\n private readonly bindingPath: string;\n private readonly binding: StyleValueBinding;\n\n constructor(\n elementId: string,\n bindingPath: string,\n binding: StyleValueBinding,\n breakpoint: string\n ) {\n this.elementId = elementId;\n this.bindingPath = bindingPath;\n this.binding = binding;\n this.breakpoint = breakpoint;\n }\n\n apply(document: Document) {\n const bindings = document.bindings[this.elementId] ?? {};\n const breakpointOverrides = bindings.overrides\n ? bindings.overrides[this.breakpoint] ?? {}\n : { styles: {} };\n\n const binding = breakpointOverrides.styles\n ? // @ts-expect-error String doesn't play well with CSSProperties.\n breakpointOverrides.styles[this.bindingPath]\n : {};\n\n document.bindings[this.elementId] = {\n ...bindings,\n overrides: {\n ...(bindings.overrides || {}),\n [this.breakpoint]: {\n ...breakpointOverrides,\n styles: {\n ...(breakpointOverrides.styles || {}),\n [this.bindingPath]: {\n ...binding,\n ...this.binding\n }\n }\n }\n }\n };\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,uBAAuB,CAA+B;EAM/DC,WAAWA,CACPC,SAAiB,EACjBC,WAAmB,EACnBC,OAA0B,EAC1BC,UAAkB,EACpB;IACE,IAAI,CAACH,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;EAChC;EAEAC,KAAKA,CAACC,QAAkB,EAAE;IACtB,MAAMC,QAAQ,GAAGD,QAAQ,CAACC,QAAQ,CAAC,IAAI,CAACN,SAAS,CAAC,IAAI,CAAC,CAAC;IACxD,MAAMO,mBAAmB,GAAGD,QAAQ,CAACE,SAAS,GACxCF,QAAQ,CAACE,SAAS,CAAC,IAAI,CAACL,UAAU,CAAC,IAAI,CAAC,CAAC,GACzC;MAAEM,MAAM,EAAE,CAAC;IAAE,CAAC;IAEpB,MAAMP,OAAO,GAAGK,mBAAmB,CAACE,MAAM;IACpC;IACAF,mBAAmB,CAACE,MAAM,CAAC,IAAI,CAACR,WAAW,CAAC,GAC5C,CAAC,CAAC;IAERI,QAAQ,CAACC,QAAQ,CAAC,IAAI,CAACN,SAAS,CAAC,GAAG;MAChC,GAAGM,QAAQ;MACXE,SAAS,EAAE;QACP,IAAIF,QAAQ,CAACE,SAAS,IAAI,CAAC,CAAC,CAAC;QAC7B,CAAC,IAAI,CAACL,UAAU,GAAG;UACf,GAAGI,mBAAmB;UACtBE,MAAM,EAAE;YACJ,IAAIF,mBAAmB,CAACE,MAAM,IAAI,CAAC,CAAC,CAAC;YACrC,CAAC,IAAI,CAACR,WAAW,GAAG;cAChB,GAAGC,OAAO;cACV,GAAG,IAAI,CAACA;YACZ;UACJ;QACJ;MACJ;IACJ,CAAC;EACL;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["SetStyleBindingOverride","constructor","elementId","bindingPath","binding","breakpoint","apply","document","bindings","breakpointOverrides","overrides","styles"],"sources":["SetStyleBindingOverride.ts"],"sourcesContent":["import type { Document, StyleValueBinding } from \"~/types.js\";\nimport type { IDocumentOperation } from \"./IDocumentOperation.js\";\n\nexport class SetStyleBindingOverride implements IDocumentOperation {\n private readonly elementId: string;\n private breakpoint: string;\n private readonly bindingPath: string;\n private readonly binding: StyleValueBinding;\n\n constructor(\n elementId: string,\n bindingPath: string,\n binding: StyleValueBinding,\n breakpoint: string\n ) {\n this.elementId = elementId;\n this.bindingPath = bindingPath;\n this.binding = binding;\n this.breakpoint = breakpoint;\n }\n\n apply(document: Document) {\n const bindings = document.bindings[this.elementId] ?? {};\n const breakpointOverrides = bindings.overrides\n ? bindings.overrides[this.breakpoint] ?? {}\n : { styles: {} };\n\n const binding = breakpointOverrides.styles\n ? // @ts-expect-error String doesn't play well with CSSProperties.\n breakpointOverrides.styles[this.bindingPath]\n : {};\n\n document.bindings[this.elementId] = {\n ...bindings,\n overrides: {\n ...(bindings.overrides || {}),\n [this.breakpoint]: {\n ...breakpointOverrides,\n styles: {\n ...(breakpointOverrides.styles || {}),\n [this.bindingPath]: {\n ...binding,\n ...this.binding\n }\n }\n }\n }\n };\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,uBAAuB,CAA+B;EAM/DC,WAAWA,CACPC,SAAiB,EACjBC,WAAmB,EACnBC,OAA0B,EAC1BC,UAAkB,EACpB;IACE,IAAI,CAACH,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;EAChC;EAEAC,KAAKA,CAACC,QAAkB,EAAE;IACtB,MAAMC,QAAQ,GAAGD,QAAQ,CAACC,QAAQ,CAAC,IAAI,CAACN,SAAS,CAAC,IAAI,CAAC,CAAC;IACxD,MAAMO,mBAAmB,GAAGD,QAAQ,CAACE,SAAS,GACxCF,QAAQ,CAACE,SAAS,CAAC,IAAI,CAACL,UAAU,CAAC,IAAI,CAAC,CAAC,GACzC;MAAEM,MAAM,EAAE,CAAC;IAAE,CAAC;IAEpB,MAAMP,OAAO,GAAGK,mBAAmB,CAACE,MAAM;IACpC;IACAF,mBAAmB,CAACE,MAAM,CAAC,IAAI,CAACR,WAAW,CAAC,GAC5C,CAAC,CAAC;IAERI,QAAQ,CAACC,QAAQ,CAAC,IAAI,CAACN,SAAS,CAAC,GAAG;MAChC,GAAGM,QAAQ;MACXE,SAAS,EAAE;QACP,IAAIF,QAAQ,CAACE,SAAS,IAAI,CAAC,CAAC,CAAC;QAC7B,CAAC,IAAI,CAACL,UAAU,GAAG;UACf,GAAGI,mBAAmB;UACtBE,MAAM,EAAE;YACJ,IAAIF,mBAAmB,CAACE,MAAM,IAAI,CAAC,CAAC,CAAC;YACrC,CAAC,IAAI,CAACR,WAAW,GAAG;cAChB,GAAGC,OAAO;cACV,GAAG,IAAI,CAACA;YACZ;UACJ;QACJ;MACJ;IACJ,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type { IDocumentOperation } from "./IDocumentOperation";
|
|
2
|
-
import { AddElement } from "./AddElement";
|
|
3
|
-
import { AddToParent } from "./AddToParent";
|
|
4
|
-
import { RemoveElement } from "./RemoveElement";
|
|
5
|
-
import { SetGlobalInputBinding } from "./SetGlobalInputBinding";
|
|
6
|
-
import { SetGlobalStyleBinding } from "./SetGlobalStyleBinding";
|
|
7
|
-
import { SetInputBindingOverride } from "./SetInputBindingOverride";
|
|
8
|
-
import { SetStyleBindingOverride } from "./SetStyleBindingOverride";
|
|
1
|
+
export type { IDocumentOperation } from "./IDocumentOperation.js";
|
|
2
|
+
import { AddElement } from "./AddElement.js";
|
|
3
|
+
import { AddToParent } from "./AddToParent.js";
|
|
4
|
+
import { RemoveElement } from "./RemoveElement.js";
|
|
5
|
+
import { SetGlobalInputBinding } from "./SetGlobalInputBinding.js";
|
|
6
|
+
import { SetGlobalStyleBinding } from "./SetGlobalStyleBinding.js";
|
|
7
|
+
import { SetInputBindingOverride } from "./SetInputBindingOverride.js";
|
|
8
|
+
import { SetStyleBindingOverride } from "./SetStyleBindingOverride.js";
|
|
9
9
|
export declare const DocumentOperations: {
|
|
10
10
|
AddElement: typeof AddElement;
|
|
11
11
|
AddToParent: typeof AddToParent;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AddElement } from "./AddElement";
|
|
2
|
-
import { AddToParent } from "./AddToParent";
|
|
3
|
-
import { RemoveElement } from "./RemoveElement";
|
|
4
|
-
import { SetGlobalInputBinding } from "./SetGlobalInputBinding";
|
|
5
|
-
import { SetGlobalStyleBinding } from "./SetGlobalStyleBinding";
|
|
6
|
-
import { SetInputBindingOverride } from "./SetInputBindingOverride";
|
|
7
|
-
import { SetStyleBindingOverride } from "./SetStyleBindingOverride";
|
|
1
|
+
import { AddElement } from "./AddElement.js";
|
|
2
|
+
import { AddToParent } from "./AddToParent.js";
|
|
3
|
+
import { RemoveElement } from "./RemoveElement.js";
|
|
4
|
+
import { SetGlobalInputBinding } from "./SetGlobalInputBinding.js";
|
|
5
|
+
import { SetGlobalStyleBinding } from "./SetGlobalStyleBinding.js";
|
|
6
|
+
import { SetInputBindingOverride } from "./SetInputBindingOverride.js";
|
|
7
|
+
import { SetStyleBindingOverride } from "./SetStyleBindingOverride.js";
|
|
8
8
|
export const DocumentOperations = {
|
|
9
9
|
AddElement,
|
|
10
10
|
AddToParent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AddElement","AddToParent","RemoveElement","SetGlobalInputBinding","SetGlobalStyleBinding","SetInputBindingOverride","SetStyleBindingOverride","DocumentOperations"],"sources":["index.ts"],"sourcesContent":["export type { IDocumentOperation } from \"./IDocumentOperation\";\nimport { AddElement } from \"./AddElement\";\nimport { AddToParent } from \"./AddToParent\";\nimport { RemoveElement } from \"./RemoveElement\";\nimport { SetGlobalInputBinding } from \"./SetGlobalInputBinding\";\nimport { SetGlobalStyleBinding } from \"./SetGlobalStyleBinding\";\nimport { SetInputBindingOverride } from \"./SetInputBindingOverride\";\nimport { SetStyleBindingOverride } from \"./SetStyleBindingOverride\";\n\nexport const DocumentOperations = {\n AddElement,\n AddToParent,\n RemoveElement,\n SetGlobalInputBinding,\n SetGlobalStyleBinding,\n SetInputBindingOverride,\n SetStyleBindingOverride\n};\n"],"mappings":"AACA,SAASA,UAAU;AACnB,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,qBAAqB;AAC9B,SAASC,qBAAqB;AAC9B,SAASC,uBAAuB;AAChC,SAASC,uBAAuB;AAEhC,OAAO,MAAMC,kBAAkB,GAAG;EAC9BP,UAAU;EACVC,WAAW;EACXC,aAAa;EACbC,qBAAqB;EACrBC,qBAAqB;EACrBC,uBAAuB;EACvBC;AACJ,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["AddElement","AddToParent","RemoveElement","SetGlobalInputBinding","SetGlobalStyleBinding","SetInputBindingOverride","SetStyleBindingOverride","DocumentOperations"],"sources":["index.ts"],"sourcesContent":["export type { IDocumentOperation } from \"./IDocumentOperation.js\";\nimport { AddElement } from \"./AddElement.js\";\nimport { AddToParent } from \"./AddToParent.js\";\nimport { RemoveElement } from \"./RemoveElement.js\";\nimport { SetGlobalInputBinding } from \"./SetGlobalInputBinding.js\";\nimport { SetGlobalStyleBinding } from \"./SetGlobalStyleBinding.js\";\nimport { SetInputBindingOverride } from \"./SetInputBindingOverride.js\";\nimport { SetStyleBindingOverride } from \"./SetStyleBindingOverride.js\";\n\nexport const DocumentOperations = {\n AddElement,\n AddToParent,\n RemoveElement,\n SetGlobalInputBinding,\n SetGlobalStyleBinding,\n SetInputBindingOverride,\n SetStyleBindingOverride\n};\n"],"mappings":"AACA,SAASA,UAAU;AACnB,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,qBAAqB;AAC9B,SAASC,qBAAqB;AAC9B,SAASC,uBAAuB;AAChC,SAASC,uBAAuB;AAEhC,OAAO,MAAMC,kBAAkB,GAAG;EAC9BP,UAAU;EACVC,WAAW;EACXC,aAAa;EACbC,qBAAqB;EACrBC,qBAAqB;EACrBC,uBAAuB;EACvBC;AACJ,CAAC","ignoreList":[]}
|
package/findMatchingAstNode.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { InputAstNode } from "./ComponentManifestToAstConverter";
|
|
1
|
+
import type { InputAstNode } from "./ComponentManifestToAstConverter.js";
|
|
2
2
|
export declare function findMatchingAstNode(path: string, ast: InputAstNode[]): InputAstNode | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["findMatchingAstNode","path","ast","cleanedPath","replace","pathParts","split","nodes","currentNode","part","find","n","name","undefined","children"],"sources":["findMatchingAstNode.ts"],"sourcesContent":["import type { InputAstNode } from \"~/ComponentManifestToAstConverter\";\n\nexport function findMatchingAstNode(path: string, ast: InputAstNode[]): InputAstNode | undefined {\n // Remove all array indices, e.g. columns[0].children → columns.children\n const cleanedPath = path.replace(/\\[\\d+\\]/g, \"\");\n const pathParts = cleanedPath.split(\".\");\n\n let nodes = ast;\n let currentNode: InputAstNode | undefined;\n\n for (const part of pathParts) {\n currentNode = nodes.find(n => n.name === part);\n if (!currentNode) {\n return undefined;\n }\n\n nodes = currentNode.children;\n }\n\n return currentNode;\n}\n"],"mappings":"AAEA,OAAO,SAASA,mBAAmBA,CAACC,IAAY,EAAEC,GAAmB,EAA4B;EAC7F;EACA,MAAMC,WAAW,GAAGF,IAAI,CAACG,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;EAChD,MAAMC,SAAS,GAAGF,WAAW,CAACG,KAAK,CAAC,GAAG,CAAC;EAExC,IAAIC,KAAK,GAAGL,GAAG;EACf,IAAIM,WAAqC;EAEzC,KAAK,MAAMC,IAAI,IAAIJ,SAAS,EAAE;IAC1BG,WAAW,GAAGD,KAAK,CAACG,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,KAAKH,IAAI,CAAC;IAC9C,IAAI,CAACD,WAAW,EAAE;MACd,OAAOK,SAAS;IACpB;IAEAN,KAAK,GAAGC,WAAW,CAACM,QAAQ;EAChC;EAEA,OAAON,WAAW;AACtB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["findMatchingAstNode","path","ast","cleanedPath","replace","pathParts","split","nodes","currentNode","part","find","n","name","undefined","children"],"sources":["findMatchingAstNode.ts"],"sourcesContent":["import type { InputAstNode } from \"~/ComponentManifestToAstConverter.js\";\n\nexport function findMatchingAstNode(path: string, ast: InputAstNode[]): InputAstNode | undefined {\n // Remove all array indices, e.g. columns[0].children → columns.children\n const cleanedPath = path.replace(/\\[\\d+\\]/g, \"\");\n const pathParts = cleanedPath.split(\".\");\n\n let nodes = ast;\n let currentNode: InputAstNode | undefined;\n\n for (const part of pathParts) {\n currentNode = nodes.find(n => n.name === part);\n if (!currentNode) {\n return undefined;\n }\n\n nodes = currentNode.children;\n }\n\n return currentNode;\n}\n"],"mappings":"AAEA,OAAO,SAASA,mBAAmBA,CAACC,IAAY,EAAEC,GAAmB,EAA4B;EAC7F;EACA,MAAMC,WAAW,GAAGF,IAAI,CAACG,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;EAChD,MAAMC,SAAS,GAAGF,WAAW,CAACG,KAAK,CAAC,GAAG,CAAC;EAExC,IAAIC,KAAK,GAAGL,GAAG;EACf,IAAIM,WAAqC;EAEzC,KAAK,MAAMC,IAAI,IAAIJ,SAAS,EAAE;IAC1BG,WAAW,GAAGD,KAAK,CAACG,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,KAAKH,IAAI,CAAC;IAC9C,IAAI,CAACD,WAAW,EAAE;MACd,OAAOK,SAAS;IACpB;IAEAN,KAAK,GAAGC,WAAW,CAACM,QAAQ;EAChC;EAEA,OAAON,WAAW;AACtB","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./createTheme";
|
|
1
|
+
export * from "./createTheme.js";
|
|
2
2
|
export * from "./EditingSdk.js";
|
|
3
3
|
export * from "./LiveSdk.js";
|
|
4
4
|
export * from "./NullSdk.js";
|
|
@@ -28,4 +28,3 @@ export * from "./InputBindingsProcessor.js";
|
|
|
28
28
|
export * from "./StylesBindingsProcessor.js";
|
|
29
29
|
export * from "./ElementFactory.js";
|
|
30
30
|
export { StyleSettings } from "./constants.js";
|
|
31
|
-
export * from "./constants";
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./createTheme";
|
|
1
|
+
export * from "./createTheme.js";
|
|
2
2
|
export * from "./EditingSdk.js";
|
|
3
3
|
export * from "./LiveSdk.js";
|
|
4
4
|
export * from "./NullSdk.js";
|
|
@@ -28,6 +28,5 @@ export * from "./InputBindingsProcessor.js";
|
|
|
28
28
|
export * from "./StylesBindingsProcessor.js";
|
|
29
29
|
export * from "./ElementFactory.js";
|
|
30
30
|
export { StyleSettings } from "./constants.js";
|
|
31
|
-
export * from "./constants";
|
|
32
31
|
|
|
33
32
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSettings"],"sources":["index.ts"],"sourcesContent":["export * from \"./createTheme\";\nexport * from \"./EditingSdk.js\";\nexport * from \"./LiveSdk.js\";\nexport * from \"./NullSdk.js\";\nexport * from \"./ContentSdk.js\";\nexport * from \"./Environment.js\";\nexport * from \"./DocumentStore.js\";\nexport * from \"./Logger.js\";\nexport * from \"./FunctionConverter.js\";\nexport * from \"./createInput.js\";\nexport * from \"./MouseTracker.js\";\nexport * from \"./ViewportManager.js\";\nexport * from \"./messenger/Messenger.js\";\nexport * from \"./messenger/MessageOrigin.js\";\nexport * from \"./types.js\";\nexport * from \"./DocumentStoreManager.js\";\nexport * from \"./BindingsProcessor.js\";\nexport * from \"./ResizeObserver.js\";\nexport * from \"./BindingsResolver.js\";\nexport * from \"./createElement.js\";\nexport * from \"./registerComponentGroup.js\";\nexport * from \"./jsonPatch.js\";\nexport * from \"./headersProvider.js\";\nexport * from \"./ComponentManifestToAstConverter.js\";\nexport * from \"./findMatchingAstNode.js\";\nexport * from \"./InheritanceProcessor.js\";\nexport * from \"./InputBindingsProcessor.js\";\nexport * from \"./StylesBindingsProcessor.js\";\nexport * from \"./ElementFactory.js\";\nexport { StyleSettings } from \"./constants.js\";\
|
|
1
|
+
{"version":3,"names":["StyleSettings"],"sources":["index.ts"],"sourcesContent":["export * from \"./createTheme.js\";\nexport * from \"./EditingSdk.js\";\nexport * from \"./LiveSdk.js\";\nexport * from \"./NullSdk.js\";\nexport * from \"./ContentSdk.js\";\nexport * from \"./Environment.js\";\nexport * from \"./DocumentStore.js\";\nexport * from \"./Logger.js\";\nexport * from \"./FunctionConverter.js\";\nexport * from \"./createInput.js\";\nexport * from \"./MouseTracker.js\";\nexport * from \"./ViewportManager.js\";\nexport * from \"./messenger/Messenger.js\";\nexport * from \"./messenger/MessageOrigin.js\";\nexport * from \"./types.js\";\nexport * from \"./DocumentStoreManager.js\";\nexport * from \"./BindingsProcessor.js\";\nexport * from \"./ResizeObserver.js\";\nexport * from \"./BindingsResolver.js\";\nexport * from \"./createElement.js\";\nexport * from \"./registerComponentGroup.js\";\nexport * from \"./jsonPatch.js\";\nexport * from \"./headersProvider.js\";\nexport * from \"./ComponentManifestToAstConverter.js\";\nexport * from \"./findMatchingAstNode.js\";\nexport * from \"./InheritanceProcessor.js\";\nexport * from \"./InputBindingsProcessor.js\";\nexport * from \"./StylesBindingsProcessor.js\";\nexport * from \"./ElementFactory.js\";\nexport { StyleSettings } from \"./constants.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { LexicalEditorTheme } from "../types/LexicalEditorTheme";
|
|
1
|
+
import type { LexicalEditorTheme } from "../types/LexicalEditorTheme.js";
|
|
2
2
|
export declare const createDefaultLexicalTheme: () => LexicalEditorTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createDefaultLexicalTheme","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","link","list","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","rtl","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","fontColorText","image","indent","inlineImage"],"sources":["createDefaultLexicalTheme.ts"],"sourcesContent":["import type { LexicalEditorTheme } from \"~/types/LexicalEditorTheme\";\n\nexport const createDefaultLexicalTheme = (): LexicalEditorTheme => {\n return {\n characterLimit: \"wb-lx-characterLimit\",\n code: \"wb-lx-code\",\n codeHighlight: {\n atrule: \"wb-lx-tokenAttr\",\n attr: \"wb-lx-tokenAttr\",\n boolean: \"wb-lx-tokenProperty\",\n builtin: \"wb-lx-tokenSelector\",\n cdata: \"wb-lx-tokenComment\",\n char: \"wb-lx-tokenSelector\",\n class: \"wb-lx-tokenFunction\",\n \"class-name\": \"wb-lx-tokenFunction\",\n comment: \"wb-lx-tokenComment\",\n constant: \"wb-lx-tokenProperty\",\n deleted: \"wb-lx-tokenProperty\",\n doctype: \"wb-lx-tokenComment\",\n entity: \"wb-lx-tokenOperator\",\n function: \"wb-lx-tokenFunction\",\n important: \"wb-lx-tokenVariable\",\n inserted: \"wb-lx-tokenSelector\",\n keyword: \"wb-lx-tokenAttr\",\n namespace: \"wb-lx-tokenVariable\",\n number: \"wb-lx-tokenProperty\",\n operator: \"wb-lx-tokenOperator\",\n prolog: \"wb-lx-tokenComment\",\n property: \"wb-lx-tokenProperty\",\n punctuation: \"wb-lx-tokenPunctuation\",\n regex: \"wb-lx-tokenVariable\",\n selector: \"wb-lx-tokenSelector\",\n string: \"wb-lx-tokenSelector\",\n symbol: \"wb-lx-tokenProperty\",\n tag: \"wb-lx-tokenProperty\",\n url: \"wb-lx-tokenOperator\",\n variable: \"wb-lx-tokenVariable\"\n },\n embedBlock: {\n base: \"wb-lx-embedBlock\",\n focus: \"wb-lx-embedBlockFocus\"\n },\n hashtag: \"wb-lx-hashtag\",\n heading: {\n h1: \"wb-lx-h1\",\n h2: \"wb-lx-h2\",\n h3: \"wb-lx-h3\",\n h4: \"wb-lx-h4\",\n h5: \"wb-lx-h5\",\n h6: \"wb-lx-h6\"\n },\n link: \"wb-lx-link\",\n list: {\n listitem: \"wb-lx-listItem\",\n listitemChecked: \"wb-lx-listItemChecked\",\n listitemUnchecked: \"wb-lx-listItemUnchecked\",\n nested: {\n listitem: \"wb-lx-nestedListItem\"\n },\n olDepth: [\"wb-lx-ol1\", \"wb-lx-ol2\", \"wb-lx-ol3\", \"wb-lx-ol4\", \"wb-lx-ol5\"],\n ul: \"wb-lx-ul\"\n },\n ltr: \"wb-lx-ltr\",\n mark: \"wb-lx-mark\",\n markOverlap: \"wb-lx-markOverlap\",\n paragraph: \"wb-lx-paragraph\",\n quote: \"wb-lx-quote\",\n rtl: \"wb-lx-rtl\",\n text: {\n bold: \"wb-lx-textBold\",\n code: \"wb-lx-textCode\",\n italic: \"wb-lx-textItalic\",\n strikethrough: \"wb-lx-textStrikethrough\",\n subscript: \"wb-lx-textSubscript\",\n superscript: \"wb-lx-textSuperscript\",\n underline: \"wb-lx-textUnderline\",\n underlineStrikethrough: \"wb-lx-textUnderlineStrikethrough\"\n },\n fontColorText: \"wb-lx-fontColorText\",\n image: \"wb-lx-image\",\n indent: \"wb-lx-indent\",\n inlineImage: \"wb-lx-inline-image\"\n };\n};\n"],"mappings":"AAEA,OAAO,MAAMA,yBAAyB,GAAGA,CAAA,KAA0B;EAC/D,OAAO;IACHC,cAAc,EAAE,sBAAsB;IACtCC,IAAI,EAAE,YAAY;IAClBC,aAAa,EAAE;MACXC,MAAM,EAAE,iBAAiB;MACzBC,IAAI,EAAE,iBAAiB;MACvBC,OAAO,EAAE,qBAAqB;MAC9BC,OAAO,EAAE,qBAAqB;MAC9BC,KAAK,EAAE,oBAAoB;MAC3BC,IAAI,EAAE,qBAAqB;MAC3BC,KAAK,EAAE,qBAAqB;MAC5B,YAAY,EAAE,qBAAqB;MACnCC,OAAO,EAAE,oBAAoB;MAC7BC,QAAQ,EAAE,qBAAqB;MAC/BC,OAAO,EAAE,qBAAqB;MAC9BC,OAAO,EAAE,oBAAoB;MAC7BC,MAAM,EAAE,qBAAqB;MAC7BC,QAAQ,EAAE,qBAAqB;MAC/BC,SAAS,EAAE,qBAAqB;MAChCC,QAAQ,EAAE,qBAAqB;MAC/BC,OAAO,EAAE,iBAAiB;MAC1BC,SAAS,EAAE,qBAAqB;MAChCC,MAAM,EAAE,qBAAqB;MAC7BC,QAAQ,EAAE,qBAAqB;MAC/BC,MAAM,EAAE,oBAAoB;MAC5BC,QAAQ,EAAE,qBAAqB;MAC/BC,WAAW,EAAE,wBAAwB;MACrCC,KAAK,EAAE,qBAAqB;MAC5BC,QAAQ,EAAE,qBAAqB;MAC/BC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE,qBAAqB;MAC7BC,GAAG,EAAE,qBAAqB;MAC1BC,GAAG,EAAE,qBAAqB;MAC1BC,QAAQ,EAAE;IACd,CAAC;IACDC,UAAU,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACX,CAAC;IACDC,OAAO,EAAE,eAAe;IACxBC,OAAO,EAAE;MACLC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE;IACR,CAAC;IACDC,IAAI,EAAE,YAAY;IAClBC,IAAI,EAAE;MACFC,QAAQ,EAAE,gBAAgB;MAC1BC,eAAe,EAAE,uBAAuB;MACxCC,iBAAiB,EAAE,yBAAyB;MAC5CC,MAAM,EAAE;QACJH,QAAQ,EAAE;MACd,CAAC;MACDI,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC;MAC1EC,EAAE,EAAE;IACR,CAAC;IACDC,GAAG,EAAE,WAAW;IAChBC,IAAI,EAAE,YAAY;IAClBC,WAAW,EAAE,mBAAmB;IAChCC,SAAS,EAAE,iBAAiB;IAC5BC,KAAK,EAAE,aAAa;IACpBC,GAAG,EAAE,WAAW;IAChBC,IAAI,EAAE;MACFC,IAAI,EAAE,gBAAgB;MACtBzD,IAAI,EAAE,gBAAgB;MACtB0D,MAAM,EAAE,kBAAkB;MAC1BC,aAAa,EAAE,yBAAyB;MACxCC,SAAS,EAAE,qBAAqB;MAChCC,WAAW,EAAE,uBAAuB;MACpCC,SAAS,EAAE,qBAAqB;MAChCC,sBAAsB,EAAE;IAC5B,CAAC;IACDC,aAAa,EAAE,qBAAqB;IACpCC,KAAK,EAAE,aAAa;IACpBC,MAAM,EAAE,cAAc;IACtBC,WAAW,EAAE;EACjB,CAAC;AACL,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createDefaultLexicalTheme","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","link","list","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","rtl","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","fontColorText","image","indent","inlineImage"],"sources":["createDefaultLexicalTheme.ts"],"sourcesContent":["import type { LexicalEditorTheme } from \"~/types/LexicalEditorTheme.js\";\n\nexport const createDefaultLexicalTheme = (): LexicalEditorTheme => {\n return {\n characterLimit: \"wb-lx-characterLimit\",\n code: \"wb-lx-code\",\n codeHighlight: {\n atrule: \"wb-lx-tokenAttr\",\n attr: \"wb-lx-tokenAttr\",\n boolean: \"wb-lx-tokenProperty\",\n builtin: \"wb-lx-tokenSelector\",\n cdata: \"wb-lx-tokenComment\",\n char: \"wb-lx-tokenSelector\",\n class: \"wb-lx-tokenFunction\",\n \"class-name\": \"wb-lx-tokenFunction\",\n comment: \"wb-lx-tokenComment\",\n constant: \"wb-lx-tokenProperty\",\n deleted: \"wb-lx-tokenProperty\",\n doctype: \"wb-lx-tokenComment\",\n entity: \"wb-lx-tokenOperator\",\n function: \"wb-lx-tokenFunction\",\n important: \"wb-lx-tokenVariable\",\n inserted: \"wb-lx-tokenSelector\",\n keyword: \"wb-lx-tokenAttr\",\n namespace: \"wb-lx-tokenVariable\",\n number: \"wb-lx-tokenProperty\",\n operator: \"wb-lx-tokenOperator\",\n prolog: \"wb-lx-tokenComment\",\n property: \"wb-lx-tokenProperty\",\n punctuation: \"wb-lx-tokenPunctuation\",\n regex: \"wb-lx-tokenVariable\",\n selector: \"wb-lx-tokenSelector\",\n string: \"wb-lx-tokenSelector\",\n symbol: \"wb-lx-tokenProperty\",\n tag: \"wb-lx-tokenProperty\",\n url: \"wb-lx-tokenOperator\",\n variable: \"wb-lx-tokenVariable\"\n },\n embedBlock: {\n base: \"wb-lx-embedBlock\",\n focus: \"wb-lx-embedBlockFocus\"\n },\n hashtag: \"wb-lx-hashtag\",\n heading: {\n h1: \"wb-lx-h1\",\n h2: \"wb-lx-h2\",\n h3: \"wb-lx-h3\",\n h4: \"wb-lx-h4\",\n h5: \"wb-lx-h5\",\n h6: \"wb-lx-h6\"\n },\n link: \"wb-lx-link\",\n list: {\n listitem: \"wb-lx-listItem\",\n listitemChecked: \"wb-lx-listItemChecked\",\n listitemUnchecked: \"wb-lx-listItemUnchecked\",\n nested: {\n listitem: \"wb-lx-nestedListItem\"\n },\n olDepth: [\"wb-lx-ol1\", \"wb-lx-ol2\", \"wb-lx-ol3\", \"wb-lx-ol4\", \"wb-lx-ol5\"],\n ul: \"wb-lx-ul\"\n },\n ltr: \"wb-lx-ltr\",\n mark: \"wb-lx-mark\",\n markOverlap: \"wb-lx-markOverlap\",\n paragraph: \"wb-lx-paragraph\",\n quote: \"wb-lx-quote\",\n rtl: \"wb-lx-rtl\",\n text: {\n bold: \"wb-lx-textBold\",\n code: \"wb-lx-textCode\",\n italic: \"wb-lx-textItalic\",\n strikethrough: \"wb-lx-textStrikethrough\",\n subscript: \"wb-lx-textSubscript\",\n superscript: \"wb-lx-textSuperscript\",\n underline: \"wb-lx-textUnderline\",\n underlineStrikethrough: \"wb-lx-textUnderlineStrikethrough\"\n },\n fontColorText: \"wb-lx-fontColorText\",\n image: \"wb-lx-image\",\n indent: \"wb-lx-indent\",\n inlineImage: \"wb-lx-inline-image\"\n };\n};\n"],"mappings":"AAEA,OAAO,MAAMA,yBAAyB,GAAGA,CAAA,KAA0B;EAC/D,OAAO;IACHC,cAAc,EAAE,sBAAsB;IACtCC,IAAI,EAAE,YAAY;IAClBC,aAAa,EAAE;MACXC,MAAM,EAAE,iBAAiB;MACzBC,IAAI,EAAE,iBAAiB;MACvBC,OAAO,EAAE,qBAAqB;MAC9BC,OAAO,EAAE,qBAAqB;MAC9BC,KAAK,EAAE,oBAAoB;MAC3BC,IAAI,EAAE,qBAAqB;MAC3BC,KAAK,EAAE,qBAAqB;MAC5B,YAAY,EAAE,qBAAqB;MACnCC,OAAO,EAAE,oBAAoB;MAC7BC,QAAQ,EAAE,qBAAqB;MAC/BC,OAAO,EAAE,qBAAqB;MAC9BC,OAAO,EAAE,oBAAoB;MAC7BC,MAAM,EAAE,qBAAqB;MAC7BC,QAAQ,EAAE,qBAAqB;MAC/BC,SAAS,EAAE,qBAAqB;MAChCC,QAAQ,EAAE,qBAAqB;MAC/BC,OAAO,EAAE,iBAAiB;MAC1BC,SAAS,EAAE,qBAAqB;MAChCC,MAAM,EAAE,qBAAqB;MAC7BC,QAAQ,EAAE,qBAAqB;MAC/BC,MAAM,EAAE,oBAAoB;MAC5BC,QAAQ,EAAE,qBAAqB;MAC/BC,WAAW,EAAE,wBAAwB;MACrCC,KAAK,EAAE,qBAAqB;MAC5BC,QAAQ,EAAE,qBAAqB;MAC/BC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE,qBAAqB;MAC7BC,GAAG,EAAE,qBAAqB;MAC1BC,GAAG,EAAE,qBAAqB;MAC1BC,QAAQ,EAAE;IACd,CAAC;IACDC,UAAU,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACX,CAAC;IACDC,OAAO,EAAE,eAAe;IACxBC,OAAO,EAAE;MACLC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE;IACR,CAAC;IACDC,IAAI,EAAE,YAAY;IAClBC,IAAI,EAAE;MACFC,QAAQ,EAAE,gBAAgB;MAC1BC,eAAe,EAAE,uBAAuB;MACxCC,iBAAiB,EAAE,yBAAyB;MAC5CC,MAAM,EAAE;QACJH,QAAQ,EAAE;MACd,CAAC;MACDI,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC;MAC1EC,EAAE,EAAE;IACR,CAAC;IACDC,GAAG,EAAE,WAAW;IAChBC,IAAI,EAAE,YAAY;IAClBC,WAAW,EAAE,mBAAmB;IAChCC,SAAS,EAAE,iBAAiB;IAC5BC,KAAK,EAAE,aAAa;IACpBC,GAAG,EAAE,WAAW;IAChBC,IAAI,EAAE;MACFC,IAAI,EAAE,gBAAgB;MACtBzD,IAAI,EAAE,gBAAgB;MACtB0D,MAAM,EAAE,kBAAkB;MAC1BC,aAAa,EAAE,yBAAyB;MACxCC,SAAS,EAAE,qBAAqB;MAChCC,WAAW,EAAE,uBAAuB;MACpCC,SAAS,EAAE,qBAAqB;MAChCC,sBAAsB,EAAE;IAC5B,CAAC;IACDC,aAAa,EAAE,qBAAqB;IACpCC,KAAK,EAAE,aAAa;IACpBC,MAAM,EAAE,cAAc;IACtBC,WAAW,EAAE;EACjB,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { LexicalEditorTheme } from "../types/LexicalEditorTheme";
|
|
1
|
+
import type { LexicalEditorTheme } from "../types/LexicalEditorTheme.js";
|
|
2
2
|
export declare const createLexicalTheme: (theme?: LexicalEditorTheme) => LexicalEditorTheme;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createDefaultLexicalTheme } from "./createDefaultLexicalTheme";
|
|
2
|
-
import { deepMerge } from "./deepMerge";
|
|
1
|
+
import { createDefaultLexicalTheme } from "./createDefaultLexicalTheme.js";
|
|
2
|
+
import { deepMerge } from "./deepMerge.js";
|
|
3
3
|
export const createLexicalTheme = (theme = {}) => {
|
|
4
4
|
return deepMerge(createDefaultLexicalTheme(), theme);
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createDefaultLexicalTheme","deepMerge","createLexicalTheme","theme"],"sources":["createLexicalTheme.ts"],"sourcesContent":["import type { LexicalEditorTheme } from \"~/types/LexicalEditorTheme\";\nimport { createDefaultLexicalTheme } from \"./createDefaultLexicalTheme\";\nimport { deepMerge } from \"./deepMerge\";\n\nexport const createLexicalTheme = (theme: LexicalEditorTheme = {}): LexicalEditorTheme => {\n return deepMerge(createDefaultLexicalTheme(), theme);\n};\n"],"mappings":"AACA,SAASA,yBAAyB;AAClC,SAASC,SAAS;AAElB,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAyB,GAAG,CAAC,CAAC,KAAyB;EACtF,OAAOF,SAAS,CAACD,yBAAyB,CAAC,CAAC,EAAEG,KAAK,CAAC;AACxD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createDefaultLexicalTheme","deepMerge","createLexicalTheme","theme"],"sources":["createLexicalTheme.ts"],"sourcesContent":["import type { LexicalEditorTheme } from \"~/types/LexicalEditorTheme.js\";\nimport { createDefaultLexicalTheme } from \"./createDefaultLexicalTheme.js\";\nimport { deepMerge } from \"./deepMerge.js\";\n\nexport const createLexicalTheme = (theme: LexicalEditorTheme = {}): LexicalEditorTheme => {\n return deepMerge(createDefaultLexicalTheme(), theme);\n};\n"],"mappings":"AACA,SAASA,yBAAyB;AAClC,SAASC,SAAS;AAElB,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAyB,GAAG,CAAC,CAAC,KAAyB;EACtF,OAAOF,SAAS,CAACD,yBAAyB,CAAC,CAAC,EAAEG,KAAK,CAAC;AACxD,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/website-builder-sdk",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.eb196ccd2f",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@types/deep-equal": "1.0.4",
|
|
32
32
|
"@types/is-hotkey": "0.1.10",
|
|
33
33
|
"@types/micromatch": "4.0.9",
|
|
34
|
-
"@webiny/cli": "0.0.0-unstable.
|
|
35
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
34
|
+
"@webiny/cli": "0.0.0-unstable.eb196ccd2f",
|
|
35
|
+
"@webiny/project-utils": "0.0.0-unstable.eb196ccd2f",
|
|
36
36
|
"typescript": "5.3.3"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "eb196ccd2f32296e10f7add6dd7220d4e3abece4"
|
|
54
54
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ComponentGroup } from "./types";
|
|
1
|
+
import type { ComponentGroup } from "./types.js";
|
|
2
2
|
export declare const registerComponentGroup: (group: ComponentGroup) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["contentSdk","registerComponentGroup","group","editingSdk","getEditingSdk"],"sources":["registerComponentGroup.ts"],"sourcesContent":["import type { ComponentGroup } from \"./types\";\nimport { contentSdk } from \"./ContentSdk\";\n\nexport const registerComponentGroup = (group: ComponentGroup) => {\n const editingSdk = contentSdk.getEditingSdk();\n\n if (!editingSdk) {\n return;\n }\n\n editingSdk.registerComponentGroup(group);\n};\n"],"mappings":"AACA,SAASA,UAAU;AAEnB,OAAO,MAAMC,sBAAsB,GAAIC,KAAqB,IAAK;EAC7D,MAAMC,UAAU,GAAGH,UAAU,CAACI,aAAa,CAAC,CAAC;EAE7C,IAAI,CAACD,UAAU,EAAE;IACb;EACJ;EAEAA,UAAU,CAACF,sBAAsB,CAACC,KAAK,CAAC;AAC5C,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["contentSdk","registerComponentGroup","group","editingSdk","getEditingSdk"],"sources":["registerComponentGroup.ts"],"sourcesContent":["import type { ComponentGroup } from \"./types.js\";\nimport { contentSdk } from \"./ContentSdk.js\";\n\nexport const registerComponentGroup = (group: ComponentGroup) => {\n const editingSdk = contentSdk.getEditingSdk();\n\n if (!editingSdk) {\n return;\n }\n\n editingSdk.registerComponentGroup(group);\n};\n"],"mappings":"AACA,SAASA,UAAU;AAEnB,OAAO,MAAMC,sBAAsB,GAAIC,KAAqB,IAAK;EAC7D,MAAMC,UAAU,GAAGH,UAAU,CAACI,aAAa,CAAC,CAAC;EAE7C,IAAI,CAACD,UAAU,EAAE;IACb;EACJ;EAEAA,UAAU,CAACF,sBAAsB,CAACC,KAAK,CAAC;AAC5C,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LexicalEditorTheme } from "./LexicalEditorTheme";
|
|
1
|
+
import type { LexicalEditorTheme } from "./LexicalEditorTheme.js";
|
|
2
2
|
export type Breakpoint = {
|
|
3
3
|
name: string;
|
|
4
4
|
title: string;
|
|
@@ -8,7 +8,9 @@ export type Breakpoint = {
|
|
|
8
8
|
maxWidth: number;
|
|
9
9
|
};
|
|
10
10
|
export type WebsiteBuilderTheme = {
|
|
11
|
-
|
|
11
|
+
css?: string;
|
|
12
|
+
cssVariables?: Record<string, string>;
|
|
13
|
+
fonts?: string[];
|
|
12
14
|
breakpoints: Breakpoint[];
|
|
13
15
|
styles: {
|
|
14
16
|
colors: Record<string, any>;
|
|
@@ -31,9 +33,20 @@ export type TypographyStyle = {
|
|
|
31
33
|
tag: string;
|
|
32
34
|
className: string;
|
|
33
35
|
};
|
|
34
|
-
export type Typography = Partial<Record<TypographyType,
|
|
36
|
+
export type Typography = Partial<Record<TypographyType, TypographyStyle[]>>;
|
|
35
37
|
export type WebsiteBuilderThemeInput = {
|
|
36
|
-
|
|
38
|
+
/**
|
|
39
|
+
* CSS to include in the editor.
|
|
40
|
+
*/
|
|
41
|
+
css?: string;
|
|
42
|
+
/**
|
|
43
|
+
* CSS variables to define in the editor.
|
|
44
|
+
*/
|
|
45
|
+
cssVariables?: Record<string, string>;
|
|
46
|
+
/**
|
|
47
|
+
* Fonts to load when the editor loads.
|
|
48
|
+
*/
|
|
49
|
+
fonts?: string[];
|
|
37
50
|
/**
|
|
38
51
|
* {
|
|
39
52
|
* title: "Desktop",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["WebsiteBuilderTheme.ts"],"sourcesContent":["import type { LexicalEditorTheme } from \"./LexicalEditorTheme\";\n\nexport type Breakpoint = {\n name: string;\n title: string;\n description: string;\n icon: string;\n minWidth: number;\n maxWidth: number;\n};\n\nexport type WebsiteBuilderTheme = {\n
|
|
1
|
+
{"version":3,"names":[],"sources":["WebsiteBuilderTheme.ts"],"sourcesContent":["import type { LexicalEditorTheme } from \"./LexicalEditorTheme.js\";\n\nexport type Breakpoint = {\n name: string;\n title: string;\n description: string;\n icon: string;\n minWidth: number;\n maxWidth: number;\n};\n\nexport type WebsiteBuilderTheme = {\n css?: string;\n cssVariables?: Record<string, string>;\n fonts?: string[];\n breakpoints: Breakpoint[];\n styles: {\n colors: Record<string, any>;\n typography: Typography;\n };\n lexical: LexicalEditorTheme;\n};\ntype KnownKeys = \"desktop\" | \"tablet\" | \"mobile\";\n\ntype BreakpointBase = Omit<Breakpoint, \"name\">;\n\ntype KnownBreakpoints = Partial<Record<KnownKeys, Partial<BreakpointBase>>>;\n\n// This merges both, while avoiding overlap issues\ntype Breakpoints = KnownBreakpoints & {\n custom?: {\n [K in string as K extends KnownKeys ? never : K]: BreakpointBase;\n };\n};\n\n// We want to allow custom strings as well, thus the (string & {}).\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyType = \"headings\" | \"paragraphs\" | \"quotes\" | \"lists\" | (string & {});\n\nexport type TypographyStyle = {\n id: string;\n name: string;\n tag: string;\n className: string;\n};\n\nexport type Typography = Partial<Record<TypographyType, TypographyStyle[]>>;\n\nexport type WebsiteBuilderThemeInput = {\n /**\n * CSS to include in the editor.\n */\n css?: string;\n /**\n * CSS variables to define in the editor.\n */\n cssVariables?: Record<string, string>;\n /**\n * Fonts to load when the editor loads.\n */\n fonts?: string[];\n /**\n * {\n * title: \"Desktop\",\n * description: `Desktop styles apply at all breakpoints, unless they're edited at a lower breakpoint. Start your styling here.`,\n * icon: \"Inline SVG or a link to an SVG.\",\n * minWidth: 0,\n * maxWidth: 4000\n * }\n */\n breakpoints?: Breakpoints;\n lexical?: LexicalEditorTheme;\n styles?: {\n /**\n * color1: \"#fa5723\",\n * color2: \"#00ccb0\",\n */\n colors?: Record<string, any>;\n /**\n * headings: [\n * {\n * id: \"heading1\",\n * name: \"Heading 1\",\n * tag: \"h1\"\n * },\n * ],\n * paragraphs: [\n * {\n * id: \"paragraph1\",\n * name: \"Paragraph 1\",\n * tag: \"p\",\n * ],\n * quotes: [\n * {\n * id: \"quote\",\n * name: \"Quote\",\n * tag: \"blockquote\"\n * }\n * ]\n */\n typography?: Typography;\n };\n};\n"],"mappings":"","ignoreList":[]}
|
package/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as CSS from "csstype";
|
|
2
|
-
import type { BindingsApi } from "./BindingsApi";
|
|
3
|
-
import type { ShorthandCssProperties } from "./types/ShorthandCssProperties";
|
|
4
|
-
export type { WebsiteBuilderTheme } from "./types/WebsiteBuilderTheme";
|
|
2
|
+
import type { BindingsApi } from "./BindingsApi.js";
|
|
3
|
+
import type { ShorthandCssProperties } from "./types/ShorthandCssProperties.js";
|
|
4
|
+
export type { WebsiteBuilderTheme, Breakpoint } from "./types/WebsiteBuilderTheme.js";
|
|
5
5
|
interface CSSProperties extends CSS.Properties<string | number> {
|
|
6
6
|
}
|
|
7
7
|
export type ElementMap = Record<string, DocumentElement>;
|
|
@@ -126,6 +126,12 @@ export type Document = {
|
|
|
126
126
|
elements: ElementMap;
|
|
127
127
|
};
|
|
128
128
|
export type PublicPage = Pick<Page, "id" | "version" | "properties" | "bindings" | "elements" | "state">;
|
|
129
|
+
export type PublicRedirect = {
|
|
130
|
+
id: string;
|
|
131
|
+
from: string;
|
|
132
|
+
to: string;
|
|
133
|
+
permanent: boolean;
|
|
134
|
+
};
|
|
129
135
|
export type EditorPage = EditorDocument & Pick<Page, "properties" | "status" | "location">;
|
|
130
136
|
export type EditorDocument = Document & {
|
|
131
137
|
metadata: Record<string, any>;
|
|
@@ -213,11 +219,6 @@ export interface IContentSdk {
|
|
|
213
219
|
getPage(path: string): Promise<PublicPage | null>;
|
|
214
220
|
listPages(options?: ListPagesOptions): Promise<PublicPage[]>;
|
|
215
221
|
}
|
|
216
|
-
export type Breakpoint = {
|
|
217
|
-
name: string;
|
|
218
|
-
minWidth: number;
|
|
219
|
-
maxWidth: number;
|
|
220
|
-
};
|
|
221
222
|
export type BaseInput<T = any> = {
|
|
222
223
|
name: string;
|
|
223
224
|
type: string;
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type * as CSS from \"csstype\";\nimport type { BindingsApi } from \"~/BindingsApi\";\nimport type { ShorthandCssProperties } from \"./types/ShorthandCssProperties\";\nexport type { WebsiteBuilderTheme } from \"./types/WebsiteBuilderTheme\";\n\ninterface CSSProperties extends CSS.Properties<string | number> {}\n\nexport type ElementMap = Record<string, DocumentElement>;\n\nexport type DocumentState = Record<string, any>;\n\nexport type InputValueBinding<T = any> = ValueBinding<T> & {\n id: string;\n type: string;\n translatable?: boolean;\n list?: boolean;\n};\n\nexport type StyleValueBinding<T = any> = ValueBinding<T>;\n\nexport type ValueBinding<T = any> = {\n static?: T;\n expression?: string;\n};\n\nexport type RepeatValueBinding = {\n expression: string;\n};\n\nexport type CssProperties = Omit<CSSProperties, ShorthandCssProperties>;\n\nexport type DocumentElementStyleBindings = Partial<{\n [K in keyof CssProperties]: StyleValueBinding<CssProperties[K]>;\n}>;\n\nexport type DocumentElementInputBindings = {\n [inputName: string]: InputValueBinding;\n};\n\nexport type DocumentElementBindings = {\n $repeat?: RepeatValueBinding;\n inputs?: DocumentElementInputBindings;\n styles?: DocumentElementStyleBindings;\n metadata?: Record<string, any>;\n overrides?: {\n [key: string]: {\n inputs?: DocumentElementInputBindings;\n styles?: DocumentElementStyleBindings;\n };\n };\n};\n\nexport type DocumentBindings = {\n [elementId: string]: DocumentElementBindings;\n};\n\nexport type ResolvedComponent<TComponent = any> = {\n component: TComponent;\n inputs: Record<string, any>;\n manifest: ComponentManifest;\n styles: SerializableCSSStyleDeclaration;\n};\n\nexport type ResolvedElement = {\n id: string;\n inputs: Record<string, any>;\n styles: SerializableCSSStyleDeclaration;\n};\n\nexport type Component = {\n component: any;\n manifest: ComponentManifest;\n};\n\nexport type ComponentGroupItem = {\n // Name of the component.\n name: string;\n // Optionally, define an exact element to insert.\n item?: DocumentElementTemplate;\n};\n\nexport type SerializedComponentGroup = ComponentGroup & {\n filter?: string;\n};\n\nexport type ComponentGroupFilterContext = {\n document: EditorDocument;\n};\n\nexport type ComponentGroup = {\n name: string;\n label: string;\n description?: string;\n filter?: (component: ComponentManifest, context: ComponentGroupFilterContext) => boolean;\n};\n\nexport type ResponsiveStyles = {\n [key: string]: SerializableCSSStyleDeclaration;\n};\n\nexport type ComponentManifest = {\n name: string;\n group?: string;\n label?: string;\n image?: string;\n inputs?: ComponentInput[];\n canDrag?: boolean;\n canDelete?: boolean;\n acceptsChildren?: boolean;\n hideFromToolbar?: boolean;\n hideStyleSettings?: string[];\n autoApplyStyles?: boolean;\n tags?: string[];\n defaults?: {\n inputs?: Record<string, any>;\n styles?: SerializableCSSStyleDeclaration;\n overrides?: {\n [breakpoint: string]: {\n inputs?: Record<string, any>;\n styles?: SerializableCSSStyleDeclaration;\n };\n };\n };\n};\n\nexport type DocumentElementTemplate = Omit<DocumentElement, \"id\">;\n\nexport type ElementComponent = {\n name: string;\n};\n\nexport type DocumentElement = {\n type: \"Webiny/Element\";\n id: string;\n component: ElementComponent;\n parent?: {\n id: string;\n slot: string;\n };\n styles?: ResponsiveStyles;\n};\n\nexport type SerializableCSSStyleDeclaration = {\n [K in keyof CssProperties]?: CssProperties[K];\n};\n\nexport type Document = {\n id: string;\n state: DocumentState;\n version: number;\n properties: Record<string, any>;\n bindings: DocumentBindings;\n elements: ElementMap;\n};\n\nexport type PublicPage = Pick<\n Page,\n \"id\" | \"version\" | \"properties\" | \"bindings\" | \"elements\" | \"state\"\n>;\n\nexport type EditorPage = EditorDocument & Pick<Page, \"properties\" | \"status\" | \"location\">;\n\nexport type EditorDocument = Document & {\n metadata: Record<string, any>;\n};\n\nexport type Page = Document & {\n id: string;\n status: string;\n version: number;\n location: {\n folderId: string;\n };\n properties: {\n title: string;\n snippet: string;\n /*image: {\n id: string;\n name: string;\n size: number;\n mimeType: string;\n src: string;\n };*/\n path: string;\n tags: string[];\n seo: {\n title: string;\n description: string;\n metaTags: Array<{ name: string; content: string }>;\n };\n social: {\n title: string;\n description: string;\n /*image: {\n id: string;\n name: string;\n size: number;\n mimeType: string;\n src: string;\n };*/\n metaTags: Array<{ property: string; content: string }>;\n };\n };\n};\n\nexport type Box = {\n depth: number;\n parentId: string;\n parentSlot: string;\n parentIndex: number;\n width: number;\n height: number;\n top: number;\n left: number;\n};\n\nexport type ElementBoxData = Box & {\n type: \"element\";\n};\n\nexport type ElementSlotBoxData = Box & {\n type: \"element-slot\";\n};\n\nexport type BoxData = ElementBoxData | ElementSlotBoxData;\n\nexport type EditorViewportInfo = PreviewViewportInfo & {\n top: number;\n left: number;\n};\n\nexport type PreviewViewportInfo = {\n width: number;\n height: number;\n scrollX: number;\n scrollY: number;\n};\n\nexport type BoxesData = Record<string, BoxData>;\n\nexport type EditorViewportData = {\n boxes: BoxesData;\n viewport: EditorViewportInfo;\n};\n\nexport type PreviewViewportData = {\n boxes: BoxesData;\n viewport: PreviewViewportInfo;\n};\n\nexport type ApiOptions = Record<string, any>;\n\nexport type GetPageOptions = ApiOptions;\nexport type ListPagesOptions = ApiOptions;\n\nexport interface IDataProvider {\n getPageByPath(path: string, options?: GetPageOptions): Promise<PublicPage | null>;\n getPageById(id: string, options?: GetPageOptions): Promise<PublicPage | null>;\n listPages(options?: ListPagesOptions): Promise<PublicPage[]>;\n}\n\nexport interface IEnvironment {\n isClient(): boolean;\n isServer(): boolean;\n isPreview(): boolean;\n}\n\nexport interface IContentSdk {\n getPage(path: string): Promise<PublicPage | null>;\n listPages(options?: ListPagesOptions): Promise<PublicPage[]>;\n}\n\
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type * as CSS from \"csstype\";\nimport type { BindingsApi } from \"~/BindingsApi.js\";\nimport type { ShorthandCssProperties } from \"./types/ShorthandCssProperties.js\";\nexport type { WebsiteBuilderTheme, Breakpoint } from \"./types/WebsiteBuilderTheme.js\";\n\ninterface CSSProperties extends CSS.Properties<string | number> {}\n\nexport type ElementMap = Record<string, DocumentElement>;\n\nexport type DocumentState = Record<string, any>;\n\nexport type InputValueBinding<T = any> = ValueBinding<T> & {\n id: string;\n type: string;\n translatable?: boolean;\n list?: boolean;\n};\n\nexport type StyleValueBinding<T = any> = ValueBinding<T>;\n\nexport type ValueBinding<T = any> = {\n static?: T;\n expression?: string;\n};\n\nexport type RepeatValueBinding = {\n expression: string;\n};\n\nexport type CssProperties = Omit<CSSProperties, ShorthandCssProperties>;\n\nexport type DocumentElementStyleBindings = Partial<{\n [K in keyof CssProperties]: StyleValueBinding<CssProperties[K]>;\n}>;\n\nexport type DocumentElementInputBindings = {\n [inputName: string]: InputValueBinding;\n};\n\nexport type DocumentElementBindings = {\n $repeat?: RepeatValueBinding;\n inputs?: DocumentElementInputBindings;\n styles?: DocumentElementStyleBindings;\n metadata?: Record<string, any>;\n overrides?: {\n [key: string]: {\n inputs?: DocumentElementInputBindings;\n styles?: DocumentElementStyleBindings;\n };\n };\n};\n\nexport type DocumentBindings = {\n [elementId: string]: DocumentElementBindings;\n};\n\nexport type ResolvedComponent<TComponent = any> = {\n component: TComponent;\n inputs: Record<string, any>;\n manifest: ComponentManifest;\n styles: SerializableCSSStyleDeclaration;\n};\n\nexport type ResolvedElement = {\n id: string;\n inputs: Record<string, any>;\n styles: SerializableCSSStyleDeclaration;\n};\n\nexport type Component = {\n component: any;\n manifest: ComponentManifest;\n};\n\nexport type ComponentGroupItem = {\n // Name of the component.\n name: string;\n // Optionally, define an exact element to insert.\n item?: DocumentElementTemplate;\n};\n\nexport type SerializedComponentGroup = ComponentGroup & {\n filter?: string;\n};\n\nexport type ComponentGroupFilterContext = {\n document: EditorDocument;\n};\n\nexport type ComponentGroup = {\n name: string;\n label: string;\n description?: string;\n filter?: (component: ComponentManifest, context: ComponentGroupFilterContext) => boolean;\n};\n\nexport type ResponsiveStyles = {\n [key: string]: SerializableCSSStyleDeclaration;\n};\n\nexport type ComponentManifest = {\n name: string;\n group?: string;\n label?: string;\n image?: string;\n inputs?: ComponentInput[];\n canDrag?: boolean;\n canDelete?: boolean;\n acceptsChildren?: boolean;\n hideFromToolbar?: boolean;\n hideStyleSettings?: string[];\n autoApplyStyles?: boolean;\n tags?: string[];\n defaults?: {\n inputs?: Record<string, any>;\n styles?: SerializableCSSStyleDeclaration;\n overrides?: {\n [breakpoint: string]: {\n inputs?: Record<string, any>;\n styles?: SerializableCSSStyleDeclaration;\n };\n };\n };\n};\n\nexport type DocumentElementTemplate = Omit<DocumentElement, \"id\">;\n\nexport type ElementComponent = {\n name: string;\n};\n\nexport type DocumentElement = {\n type: \"Webiny/Element\";\n id: string;\n component: ElementComponent;\n parent?: {\n id: string;\n slot: string;\n };\n styles?: ResponsiveStyles;\n};\n\nexport type SerializableCSSStyleDeclaration = {\n [K in keyof CssProperties]?: CssProperties[K];\n};\n\nexport type Document = {\n id: string;\n state: DocumentState;\n version: number;\n properties: Record<string, any>;\n bindings: DocumentBindings;\n elements: ElementMap;\n};\n\nexport type PublicPage = Pick<\n Page,\n \"id\" | \"version\" | \"properties\" | \"bindings\" | \"elements\" | \"state\"\n>;\n\nexport type PublicRedirect = {\n id: string;\n from: string;\n to: string;\n permanent: boolean;\n};\n\nexport type EditorPage = EditorDocument & Pick<Page, \"properties\" | \"status\" | \"location\">;\n\nexport type EditorDocument = Document & {\n metadata: Record<string, any>;\n};\n\nexport type Page = Document & {\n id: string;\n status: string;\n version: number;\n location: {\n folderId: string;\n };\n properties: {\n title: string;\n snippet: string;\n /*image: {\n id: string;\n name: string;\n size: number;\n mimeType: string;\n src: string;\n };*/\n path: string;\n tags: string[];\n seo: {\n title: string;\n description: string;\n metaTags: Array<{ name: string; content: string }>;\n };\n social: {\n title: string;\n description: string;\n /*image: {\n id: string;\n name: string;\n size: number;\n mimeType: string;\n src: string;\n };*/\n metaTags: Array<{ property: string; content: string }>;\n };\n };\n};\n\nexport type Box = {\n depth: number;\n parentId: string;\n parentSlot: string;\n parentIndex: number;\n width: number;\n height: number;\n top: number;\n left: number;\n};\n\nexport type ElementBoxData = Box & {\n type: \"element\";\n};\n\nexport type ElementSlotBoxData = Box & {\n type: \"element-slot\";\n};\n\nexport type BoxData = ElementBoxData | ElementSlotBoxData;\n\nexport type EditorViewportInfo = PreviewViewportInfo & {\n top: number;\n left: number;\n};\n\nexport type PreviewViewportInfo = {\n width: number;\n height: number;\n scrollX: number;\n scrollY: number;\n};\n\nexport type BoxesData = Record<string, BoxData>;\n\nexport type EditorViewportData = {\n boxes: BoxesData;\n viewport: EditorViewportInfo;\n};\n\nexport type PreviewViewportData = {\n boxes: BoxesData;\n viewport: PreviewViewportInfo;\n};\n\nexport type ApiOptions = Record<string, any>;\n\nexport type GetPageOptions = ApiOptions;\nexport type ListPagesOptions = ApiOptions;\n\nexport interface IDataProvider {\n getPageByPath(path: string, options?: GetPageOptions): Promise<PublicPage | null>;\n getPageById(id: string, options?: GetPageOptions): Promise<PublicPage | null>;\n listPages(options?: ListPagesOptions): Promise<PublicPage[]>;\n}\n\nexport interface IEnvironment {\n isClient(): boolean;\n isServer(): boolean;\n isPreview(): boolean;\n}\n\nexport interface IContentSdk {\n getPage(path: string): Promise<PublicPage | null>;\n listPages(options?: ListPagesOptions): Promise<PublicPage[]>;\n}\n\n// Input types\n\n// inputTypes.ts\nexport type BaseInput<T = any> = {\n name: string;\n type: string;\n onChange?: (\n bindings: ReturnType<BindingsApi[\"getPublicApi\"]>,\n context: { breakpoint: string }\n ) => void;\n label?: string;\n description?: string;\n helperText?: string;\n defaultValue?: T;\n responsive?: boolean;\n required?: boolean;\n hideFromUi?: boolean;\n renderer?: string;\n list?: boolean;\n translatable?: boolean;\n};\n\n// Discriminated union per input type\nexport type TextInput = BaseInput<string> & {\n type: \"text\";\n};\n\nexport type SlotInput = BaseInput<any> & {\n type: \"slot\";\n components?: string[];\n};\n\nexport type TagsInput = BaseInput<string[]> & {\n type: \"text\";\n};\n\nexport type LongTextInput = BaseInput<string> & {\n type: \"longText\";\n};\n\nexport type NumberInput = BaseInput<number> & {\n type: \"number\";\n minValue?: number;\n};\n\nexport type BooleanInput = BaseInput<boolean> & {\n type: \"boolean\";\n};\n\nexport type ColorInput = BaseInput<string> & {\n type: \"color\";\n};\n\nexport type FileInput = BaseInput<string> & {\n type: \"file\";\n allowedFileTypes: string[];\n};\n\nexport type DateTimeInput = BaseInput<string> & {\n type: \"datetime\";\n};\n\nexport type LexicalInput = BaseInput<string> & {\n type: \"lexical\";\n};\n\nexport type SelectInput = BaseInput<string> & {\n type: \"select\";\n options: { label: string; value: string }[];\n showResetAction?: boolean;\n};\n\nexport type RadioInput = BaseInput<string> & {\n type: \"radio\";\n options: { label: string; value: string }[];\n};\n\nexport type ObjectInput = BaseInput<Record<string, any>> & {\n type: \"object\";\n fields: ComponentInput[];\n};\n\nexport type CustomInput = BaseInput<any> & {\n type: string;\n fields: ComponentInput[];\n};\n\n// Union of all input types\nexport type ComponentInput =\n | TextInput\n | LongTextInput\n | NumberInput\n | BooleanInput\n | ColorInput\n | FileInput\n | DateTimeInput\n | LexicalInput\n | SelectInput\n | RadioInput\n | TagsInput\n | ObjectInput\n | SlotInput\n | CustomInput;\n"],"mappings":"","ignoreList":[]}
|