@webiny/website-builder-sdk 0.0.0-unstable.e0bfc55d5a → 0.0.0-unstable.e2758ee1cf
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 +2 -1
- package/BindingsProcessor.test.js.map +1 -1
- package/BindingsResolver.d.ts +2 -2
- package/BindingsResolver.js +2 -2
- package/BindingsResolver.js.map +1 -1
- package/BindingsResolver.test.js +4 -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 +5 -5
- package/ContentSdk.js +9 -9
- 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 +4 -4
- package/EditingSdk.js +12 -15
- package/EditingSdk.js.map +1 -1
- package/ElementFactory.d.ts +3 -3
- package/ElementFactory.js +4 -4
- package/ElementFactory.js.map +1 -1
- package/HotkeyManager.js +1 -1
- package/HotkeyManager.js.map +1 -1
- package/IBindingsUpdater.d.ts +2 -2
- package/IBindingsUpdater.js.map +1 -1
- package/IRedirects.d.ts +1 -1
- package/IRedirects.js.map +1 -1
- package/InheritanceProcessor.d.ts +4 -4
- package/InheritanceProcessor.js.map +1 -1
- package/InheritanceProcessor.test.js +2 -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 +3 -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.d.ts +2 -2
- package/LiveSdk.js +1 -1
- package/LiveSdk.js.map +1 -1
- package/Logger.d.ts +2 -1
- package/NullSdk.d.ts +2 -2
- package/NullSdk.js +8 -1
- package/NullSdk.js.map +1 -1
- package/PreviewDocument.js +1 -1
- package/PreviewDocument.js.map +1 -1
- package/PreviewSdk.d.ts +2 -2
- package/PreviewSdk.js +3 -3
- package/PreviewSdk.js.map +1 -1
- package/PreviewViewport.d.ts +1 -2
- package/PreviewViewport.js +1 -21
- package/PreviewViewport.js.map +1 -1
- package/README.md +10 -2
- 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 +4 -11
- package/Theme.js.map +1 -1
- package/ViewportManager.d.ts +3 -1
- package/ViewportManager.js +5 -1
- package/ViewportManager.js.map +1 -1
- package/createElement.d.ts +1 -1
- package/createElement.js.map +1 -1
- package/createInput.d.ts +124 -16
- package/createInput.js +33 -1
- package/createInput.js.map +1 -1
- package/createTheme.d.ts +1 -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 +3 -3
- package/dataProviders/DefaultDataProvider.js +24 -6
- package/dataProviders/DefaultDataProvider.js.map +1 -1
- package/dataProviders/GET_PAGE_BY_ID.d.ts +1 -1
- package/dataProviders/GET_PAGE_BY_ID.js +1 -0
- package/dataProviders/GET_PAGE_BY_ID.js.map +1 -1
- package/dataProviders/GET_PAGE_BY_PATH.d.ts +1 -1
- package/dataProviders/GET_PAGE_BY_PATH.js +1 -0
- package/dataProviders/GET_PAGE_BY_PATH.js.map +1 -1
- package/dataProviders/LIST_PUBLISHED_PAGES.d.ts +1 -1
- package/dataProviders/LIST_PUBLISHED_PAGES.js +14 -2
- package/dataProviders/LIST_PUBLISHED_PAGES.js.map +1 -1
- package/dataProviders/NullDataProvider.d.ts +8 -1
- package/dataProviders/NullDataProvider.js +8 -1
- package/dataProviders/NullDataProvider.js.map +1 -1
- package/dataProviders/RedirectsProvider.d.ts +3 -3
- package/dataProviders/RedirectsProvider.js +6 -7
- package/dataProviders/RedirectsProvider.js.map +1 -1
- 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/generateElementId.d.ts +1 -1
- package/generateElementId.js +0 -1
- package/generateElementId.js.map +1 -1
- package/index.d.ts +2 -3
- package/index.js +1 -3
- package/index.js.map +1 -1
- package/jsonPatch.d.ts +1 -1
- package/messenger/Messenger.js +9 -7
- package/messenger/Messenger.js.map +1 -1
- package/package.json +14 -19
- package/registerComponentGroup.d.ts +1 -1
- package/registerComponentGroup.js +1 -1
- package/registerComponentGroup.js.map +1 -1
- package/types/WebsiteBuilderTheme.d.ts +42 -45
- package/types/WebsiteBuilderTheme.js.map +1 -1
- package/types.d.ts +49 -10
- package/types.js.map +1 -1
- package/dataProviders/GET_ACTIVE_REDIRECTS.d.ts +0 -1
- package/dataProviders/GET_ACTIVE_REDIRECTS.js +0 -21
- package/dataProviders/GET_ACTIVE_REDIRECTS.js.map +0 -1
- package/lexical/createDefaultLexicalTheme.d.ts +0 -2
- package/lexical/createDefaultLexicalTheme.js +0 -84
- package/lexical/createDefaultLexicalTheme.js.map +0 -1
- package/lexical/createLexicalTheme.d.ts +0 -2
- package/lexical/createLexicalTheme.js +0 -7
- package/lexical/createLexicalTheme.js.map +0 -1
- package/lexical/deepMerge.d.ts +0 -1
- package/lexical/deepMerge.js +0 -23
- package/lexical/deepMerge.js.map +0 -1
- package/types/LexicalEditorTheme.d.ts +0 -2
- package/types/LexicalEditorTheme.js +0 -3
- package/types/LexicalEditorTheme.js.map +0 -1
package/jsonPatch.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { Operation, Validator, PatchResult } from "fast-json-patch";
|
|
|
2
2
|
export type { Operation as JsonPatchOperation, PatchResult as JsonPatchResult };
|
|
3
3
|
export declare const jsonPatch: {
|
|
4
4
|
compare: (tree1: object | any[], tree2: object | any[], invertible?: boolean) => Operation[];
|
|
5
|
-
applyPatch: <T>(document: T, patch: Operation[], validateOperation?: boolean | Validator<T
|
|
5
|
+
applyPatch: <T>(document: T, patch: Operation[], validateOperation?: boolean | Validator<T>, mutateDocument?: boolean, banPrototypeModifications?: boolean) => PatchResult<T>;
|
|
6
6
|
};
|
package/messenger/Messenger.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { isMatch } from "matcher";
|
|
2
2
|
import { logger } from "../Logger.js";
|
|
3
|
-
const ignored = ["preview.mouse.move", "preview.component.register", "preview.scroll",
|
|
3
|
+
const ignored = ["preview.mouse.move", "preview.component.register", "preview.scroll",
|
|
4
|
+
// "preview.viewport",
|
|
5
|
+
"preview.viewport.change.start", "preview.viewport.change.end"];
|
|
4
6
|
export class Messenger {
|
|
5
7
|
listeners = new Map();
|
|
6
8
|
constructor(source, target,
|
|
@@ -21,15 +23,15 @@ export class Messenger {
|
|
|
21
23
|
if (!this.target.matches(event)) {
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
|
-
if (!type || !
|
|
26
|
+
if (!type || !isMatch(type, this.pattern)) {
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
29
|
const logicalType = this.stripPrefix(type);
|
|
28
30
|
if (!this.isIgnored(logicalType)) {
|
|
29
|
-
logger.debug(
|
|
31
|
+
logger.debug({
|
|
30
32
|
type,
|
|
31
33
|
payload
|
|
32
|
-
});
|
|
34
|
+
}, `${this.getTime()} --> [${this.source.origin}][${logicalType}]`);
|
|
33
35
|
}
|
|
34
36
|
const handlers = this.listeners.get(logicalType);
|
|
35
37
|
if (handlers) {
|
|
@@ -57,10 +59,10 @@ export class Messenger {
|
|
|
57
59
|
send(logicalType, payload) {
|
|
58
60
|
const fullType = this.prefixGlob + logicalType;
|
|
59
61
|
if (!this.isIgnored(logicalType)) {
|
|
60
|
-
logger.debug(
|
|
62
|
+
logger.debug({
|
|
61
63
|
type: fullType,
|
|
62
64
|
payload
|
|
63
|
-
});
|
|
65
|
+
}, `${this.getTime()} <-- [${this.source.origin}][${logicalType}]`);
|
|
64
66
|
}
|
|
65
67
|
this.target.window.postMessage({
|
|
66
68
|
type: fullType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["isMatch","logger","ignored","Messenger","listeners","Map","constructor","source","target","pattern","prefixGlob","replace","handleMessage","bind","window","addEventListener","event","type","payload","data","matches","logicalType","stripPrefix","isIgnored","debug","getTime","origin","handlers","get","forEach","fn","fullType","startsWith","slice","length","includes","on","handler","has","set","Set","add","delete","send","postMessage","dispose","removeEventListener","clear","date","Date","getHours","getMinutes","getSeconds","getMilliseconds"],"sources":["Messenger.ts"],"sourcesContent":["import { isMatch } from \"matcher\";\nimport type { MessageOrigin } from \"./MessageOrigin.js\";\nimport { logger } from \"../Logger.js\";\n\nexport type Message<T = any> = {\n type: string;\n payload: T;\n};\n\ntype Handler<T = any> = (payload: T, logicalType: string, wildcardMatch?: string) => void;\n\nconst ignored = [\n \"preview.mouse.move\",\n \"preview.component.register\",\n \"preview.scroll\",\n // \"preview.viewport\",\n \"preview.viewport.change.start\",\n \"preview.viewport.change.end\"\n];\n\nexport class Messenger {\n private listeners = new Map<string, Set<Handler>>();\n private readonly pattern: string;\n private readonly prefixGlob: string;\n\n constructor(\n private source: MessageOrigin,\n private target: MessageOrigin,\n // Pattern to filter events this Messenger handles.\n pattern: string\n ) {\n this.pattern = pattern;\n this.prefixGlob = pattern.replace(/\\*+$/, \"\");\n this.handleMessage = this.handleMessage.bind(this);\n this.source.window.addEventListener(\"message\", this.handleMessage);\n }\n\n private handleMessage(event: MessageEvent) {\n const { type, payload } = event.data || {};\n if (!this.target.matches(event)) {\n return;\n }\n\n if (!type || !isMatch(type, this.pattern)) {\n return;\n }\n\n const logicalType = this.stripPrefix(type);\n\n if (!this.isIgnored(logicalType)) {\n logger.debug(\n {\n type,\n payload\n },\n `${this.getTime()} --> [${this.source.origin}][${logicalType}]`\n );\n }\n\n const handlers = this.listeners.get(logicalType);\n if (handlers) {\n handlers.forEach(fn => fn(payload, logicalType));\n }\n }\n\n private stripPrefix(fullType: string): string {\n return fullType.startsWith(this.prefixGlob)\n ? fullType.slice(this.prefixGlob.length)\n : fullType;\n }\n\n private isIgnored(logicalType: string): boolean {\n return ignored.includes(logicalType);\n }\n\n on<T = any>(logicalType: string, handler: Handler<T>) {\n if (!this.listeners.has(logicalType)) {\n this.listeners.set(logicalType, new Set());\n }\n this.listeners.get(logicalType)!.add(handler);\n return () => {\n const listeners = this.listeners.get(logicalType);\n if (listeners) {\n listeners.delete(handler);\n }\n };\n }\n\n send<T = any>(logicalType: string, payload?: T) {\n const fullType = this.prefixGlob + logicalType;\n\n if (!this.isIgnored(logicalType)) {\n logger.debug(\n {\n type: fullType,\n payload\n },\n `${this.getTime()} <-- [${this.source.origin}][${logicalType}]`\n );\n }\n\n this.target.window.postMessage({ type: fullType, payload }, this.target.origin);\n }\n\n dispose() {\n this.source.window.removeEventListener(\"message\", this.handleMessage);\n this.listeners.clear();\n }\n\n getTime() {\n const date = new Date();\n return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}.${date.getMilliseconds()}`;\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/website-builder-sdk",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.e2758ee1cf",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -12,37 +13,31 @@
|
|
|
12
13
|
"author": "Pavel Denisjuk",
|
|
13
14
|
"license": "MIT",
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"csstype": "3.
|
|
16
|
+
"csstype": "3.2.3",
|
|
16
17
|
"deep-equal": "2.2.3",
|
|
17
18
|
"deepmerge": "4.3.1",
|
|
18
19
|
"fast-json-patch": "3.1.1",
|
|
19
20
|
"fast-json-stable-stringify": "2.1.0",
|
|
20
21
|
"is-hotkey": "0.2.0",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"nanoid": "
|
|
26
|
-
"
|
|
27
|
-
"pino": "
|
|
28
|
-
"pino-pretty": "9.4.0"
|
|
22
|
+
"lodash": "4.17.23",
|
|
23
|
+
"matcher": "5.0.0",
|
|
24
|
+
"mobx": "6.15.0",
|
|
25
|
+
"nanoid": "5.1.6",
|
|
26
|
+
"nanoid-dictionary": "5.0.0",
|
|
27
|
+
"pino": "9.14.0",
|
|
28
|
+
"pino-pretty": "9.4.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/deep-equal": "1.0.4",
|
|
32
32
|
"@types/is-hotkey": "0.1.10",
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"typescript": "5.3.3"
|
|
33
|
+
"@webiny/build-tools": "0.0.0-unstable.e2758ee1cf",
|
|
34
|
+
"typescript": "5.9.3",
|
|
35
|
+
"vitest": "4.0.18"
|
|
37
36
|
},
|
|
38
37
|
"publishConfig": {
|
|
39
38
|
"access": "public",
|
|
40
39
|
"directory": "dist"
|
|
41
40
|
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "yarn webiny run build",
|
|
44
|
-
"watch": "yarn webiny run watch"
|
|
45
|
-
},
|
|
46
41
|
"adio": {
|
|
47
42
|
"ignore": {
|
|
48
43
|
"dependencies": [
|
|
@@ -50,5 +45,5 @@
|
|
|
50
45
|
]
|
|
51
46
|
}
|
|
52
47
|
},
|
|
53
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e2758ee1cfa3b9a7152e9bb995a90ccabd33266f"
|
|
54
49
|
}
|
|
@@ -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,3 @@
|
|
|
1
|
-
import type { LexicalEditorTheme } from "./LexicalEditorTheme";
|
|
2
1
|
export type Breakpoint = {
|
|
3
2
|
name: string;
|
|
4
3
|
title: string;
|
|
@@ -9,14 +8,10 @@ export type Breakpoint = {
|
|
|
9
8
|
};
|
|
10
9
|
export type WebsiteBuilderTheme = {
|
|
11
10
|
css?: string;
|
|
12
|
-
cssVariables?: Record<string, string>;
|
|
13
11
|
fonts?: string[];
|
|
14
12
|
breakpoints: Breakpoint[];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
typography: Typography;
|
|
18
|
-
};
|
|
19
|
-
lexical: LexicalEditorTheme;
|
|
13
|
+
colors: ColorStyle[];
|
|
14
|
+
typography: Typography;
|
|
20
15
|
};
|
|
21
16
|
type KnownKeys = "desktop" | "tablet" | "mobile";
|
|
22
17
|
type BreakpointBase = Omit<Breakpoint, "name">;
|
|
@@ -26,23 +21,23 @@ type Breakpoints = KnownBreakpoints & {
|
|
|
26
21
|
[K in string as K extends KnownKeys ? never : K]: BreakpointBase;
|
|
27
22
|
};
|
|
28
23
|
};
|
|
29
|
-
export type
|
|
24
|
+
export type ColorStyle = {
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
};
|
|
30
29
|
export type TypographyStyle = {
|
|
31
30
|
id: string;
|
|
32
|
-
|
|
31
|
+
label: string;
|
|
33
32
|
tag: string;
|
|
34
33
|
className: string;
|
|
35
34
|
};
|
|
36
|
-
export type Typography =
|
|
35
|
+
export type Typography = Record<string, TypographyStyle[]>;
|
|
37
36
|
export type WebsiteBuilderThemeInput = {
|
|
38
37
|
/**
|
|
39
38
|
* CSS to include in the editor.
|
|
40
39
|
*/
|
|
41
40
|
css?: string;
|
|
42
|
-
/**
|
|
43
|
-
* CSS variables to define in the editor.
|
|
44
|
-
*/
|
|
45
|
-
cssVariables?: Record<string, string>;
|
|
46
41
|
/**
|
|
47
42
|
* Fonts to load when the editor loads.
|
|
48
43
|
*/
|
|
@@ -57,36 +52,38 @@ export type WebsiteBuilderThemeInput = {
|
|
|
57
52
|
* }
|
|
58
53
|
*/
|
|
59
54
|
breakpoints?: Breakpoints;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
55
|
+
/**
|
|
56
|
+
* [
|
|
57
|
+
* {
|
|
58
|
+
* id: "primary",
|
|
59
|
+
* label: "Primary",
|
|
60
|
+
* value: "#000000"
|
|
61
|
+
* },
|
|
62
|
+
* ]
|
|
63
|
+
*/
|
|
64
|
+
colors?: ColorStyle[];
|
|
65
|
+
/**
|
|
66
|
+
* headings: [
|
|
67
|
+
* {
|
|
68
|
+
* id: "heading1",
|
|
69
|
+
* name: "Heading 1",
|
|
70
|
+
* tag: "h1"
|
|
71
|
+
* },
|
|
72
|
+
* ],
|
|
73
|
+
* paragraphs: [
|
|
74
|
+
* {
|
|
75
|
+
* id: "paragraph1",
|
|
76
|
+
* name: "Paragraph 1",
|
|
77
|
+
* tag: "p",
|
|
78
|
+
* ],
|
|
79
|
+
* quotes: [
|
|
80
|
+
* {
|
|
81
|
+
* id: "quote",
|
|
82
|
+
* name: "Quote",
|
|
83
|
+
* tag: "blockquote"
|
|
84
|
+
* }
|
|
85
|
+
* ]
|
|
86
|
+
*/
|
|
87
|
+
typography?: Typography;
|
|
91
88
|
};
|
|
92
89
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["WebsiteBuilderTheme.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":[],"sources":["WebsiteBuilderTheme.ts"],"sourcesContent":["export 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 fonts?: string[];\n breakpoints: Breakpoint[];\n colors: ColorStyle[];\n typography: Typography;\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\nexport type ColorStyle = {\n id: string;\n label: string;\n value: string;\n};\n\nexport type TypographyStyle = {\n id: string;\n label: string;\n tag: string;\n className: string;\n};\n\nexport type Typography = Record<string, TypographyStyle[]>;\n\nexport type WebsiteBuilderThemeInput = {\n /**\n * CSS to include in the editor.\n */\n css?: 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 /**\n * [\n * {\n * id: \"primary\",\n * label: \"Primary\",\n * value: \"#000000\"\n * },\n * ]\n */\n colors?: ColorStyle[];\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"],"mappings":"","ignoreList":[]}
|
package/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as CSS from "csstype";
|
|
2
|
-
import type { BindingsApi } from "./BindingsApi";
|
|
3
|
-
import type { ShorthandCssProperties } from "./types/ShorthandCssProperties";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import type { BindingsApi } from "./BindingsApi.js";
|
|
3
|
+
import type { ShorthandCssProperties } from "./types/ShorthandCssProperties.js";
|
|
4
|
+
import type { InputFactory } from "./createInput.js";
|
|
5
|
+
export type { WebsiteBuilderTheme, Breakpoint } from "./types/WebsiteBuilderTheme.js";
|
|
6
|
+
type CSSProperties = CSS.Properties<string | number>;
|
|
7
7
|
export type ElementMap = Record<string, DocumentElement>;
|
|
8
8
|
export type DocumentState = Record<string, any>;
|
|
9
9
|
export type InputValueBinding<T = any> = ValueBinding<T> & {
|
|
@@ -57,6 +57,10 @@ export type Component = {
|
|
|
57
57
|
component: any;
|
|
58
58
|
manifest: ComponentManifest;
|
|
59
59
|
};
|
|
60
|
+
export type ComponentBlueprint<TComponent = any, TManifest = any> = {
|
|
61
|
+
component: TComponent;
|
|
62
|
+
manifest: TManifest;
|
|
63
|
+
};
|
|
60
64
|
export type ComponentGroupItem = {
|
|
61
65
|
name: string;
|
|
62
66
|
item?: DocumentElementTemplate;
|
|
@@ -81,7 +85,7 @@ export type ComponentManifest = {
|
|
|
81
85
|
group?: string;
|
|
82
86
|
label?: string;
|
|
83
87
|
image?: string;
|
|
84
|
-
inputs
|
|
88
|
+
inputs: ComponentInput[];
|
|
85
89
|
canDrag?: boolean;
|
|
86
90
|
canDelete?: boolean;
|
|
87
91
|
acceptsChildren?: boolean;
|
|
@@ -125,7 +129,7 @@ export type Document = {
|
|
|
125
129
|
bindings: DocumentBindings;
|
|
126
130
|
elements: ElementMap;
|
|
127
131
|
};
|
|
128
|
-
export type PublicPage = Pick<Page, "id" | "version" | "properties" | "bindings" | "elements" | "state">;
|
|
132
|
+
export type PublicPage = Pick<Page, "id" | "version" | "properties" | "bindings" | "elements" | "extensions" | "state">;
|
|
129
133
|
export type PublicRedirect = {
|
|
130
134
|
id: string;
|
|
131
135
|
from: string;
|
|
@@ -165,6 +169,7 @@ export type Page = Document & {
|
|
|
165
169
|
}>;
|
|
166
170
|
};
|
|
167
171
|
};
|
|
172
|
+
extensions: Record<string, any>;
|
|
168
173
|
};
|
|
169
174
|
export type Box = {
|
|
170
175
|
depth: number;
|
|
@@ -190,6 +195,8 @@ export type EditorViewportInfo = PreviewViewportInfo & {
|
|
|
190
195
|
export type PreviewViewportInfo = {
|
|
191
196
|
width: number;
|
|
192
197
|
height: number;
|
|
198
|
+
scrollWidth: number;
|
|
199
|
+
scrollHeight: number;
|
|
193
200
|
scrollX: number;
|
|
194
201
|
scrollY: number;
|
|
195
202
|
};
|
|
@@ -204,11 +211,26 @@ export type PreviewViewportData = {
|
|
|
204
211
|
};
|
|
205
212
|
export type ApiOptions = Record<string, any>;
|
|
206
213
|
export type GetPageOptions = ApiOptions;
|
|
207
|
-
export
|
|
214
|
+
export interface ListPagesOptions {
|
|
215
|
+
where?: Record<string, any>;
|
|
216
|
+
limit?: number;
|
|
217
|
+
after?: string;
|
|
218
|
+
sort?: string[];
|
|
219
|
+
search?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface ListPagesMeta {
|
|
222
|
+
hasMoreItems: boolean;
|
|
223
|
+
totalCount: number;
|
|
224
|
+
cursor: string | null;
|
|
225
|
+
}
|
|
226
|
+
export interface ListPagesResult {
|
|
227
|
+
data: PublicPage[];
|
|
228
|
+
meta: ListPagesMeta;
|
|
229
|
+
}
|
|
208
230
|
export interface IDataProvider {
|
|
209
231
|
getPageByPath(path: string, options?: GetPageOptions): Promise<PublicPage | null>;
|
|
210
232
|
getPageById(id: string, options?: GetPageOptions): Promise<PublicPage | null>;
|
|
211
|
-
listPages(options?: ListPagesOptions): Promise<
|
|
233
|
+
listPages(options?: ListPagesOptions): Promise<ListPagesResult>;
|
|
212
234
|
}
|
|
213
235
|
export interface IEnvironment {
|
|
214
236
|
isClient(): boolean;
|
|
@@ -217,7 +239,7 @@ export interface IEnvironment {
|
|
|
217
239
|
}
|
|
218
240
|
export interface IContentSdk {
|
|
219
241
|
getPage(path: string): Promise<PublicPage | null>;
|
|
220
|
-
listPages(options?: ListPagesOptions): Promise<
|
|
242
|
+
listPages(options?: ListPagesOptions): Promise<ListPagesResult>;
|
|
221
243
|
}
|
|
222
244
|
export type BaseInput<T = any> = {
|
|
223
245
|
name: string;
|
|
@@ -293,3 +315,20 @@ export type CustomInput = BaseInput<any> & {
|
|
|
293
315
|
fields: ComponentInput[];
|
|
294
316
|
};
|
|
295
317
|
export type ComponentInput = TextInput | LongTextInput | NumberInput | BooleanInput | ColorInput | FileInput | DateTimeInput | LexicalInput | SelectInput | RadioInput | TagsInput | ObjectInput | SlotInput | CustomInput;
|
|
318
|
+
export type ManifestInputsArray<TInputs, TAllowChildren extends boolean> = TAllowChildren extends true ? {
|
|
319
|
+
[K in Exclude<keyof TInputs, "children">]: InputFactory<K & string>;
|
|
320
|
+
}[Exclude<keyof TInputs, "children">][] : {
|
|
321
|
+
[K in keyof TInputs]: InputFactory<K & string>;
|
|
322
|
+
}[keyof TInputs][];
|
|
323
|
+
export type ManifestInputsObject<TInputs, TAllowChildren extends boolean> = TAllowChildren extends true ? {
|
|
324
|
+
[K in Exclude<keyof TInputs, "children">]: InputFactory<K & string>;
|
|
325
|
+
} : {
|
|
326
|
+
[K in keyof TInputs]: InputFactory<K & string>;
|
|
327
|
+
};
|
|
328
|
+
export type ComponentManifestInput<TInputs> = (Omit<ComponentManifest, "inputs" | "acceptsChildren"> & {
|
|
329
|
+
acceptsChildren: true;
|
|
330
|
+
inputs?: ManifestInputsArray<TInputs, true> | ManifestInputsObject<TInputs, true>;
|
|
331
|
+
}) | (Omit<ComponentManifest, "inputs" | "acceptsChildren"> & {
|
|
332
|
+
acceptsChildren?: false;
|
|
333
|
+
inputs: ManifestInputsArray<TInputs, false> | ManifestInputsObject<TInputs, false>;
|
|
334
|
+
});
|
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, Breakpoint } 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 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":[]}
|
|
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\";\nimport type { InputFactory } from \"~/createInput.js\";\nexport type { WebsiteBuilderTheme, Breakpoint } from \"./types/WebsiteBuilderTheme.js\";\n\ntype CSSProperties = 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 ComponentBlueprint<TComponent = any, TManifest = any> = {\n component: TComponent;\n manifest: TManifest;\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\" | \"extensions\" | \"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 extensions: Record<string, any>;\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 // Viewport width (only the visible part)\n width: number;\n // Viewport height (only the visible part)\n height: number;\n // Full iframe width\n scrollWidth: number;\n // Full iframe height\n scrollHeight: number;\n // Iframe horizontal scroll offset\n scrollX: number;\n // Iframe vertical scroll offest\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;\n\nexport interface ListPagesOptions {\n where?: Record<string, any>;\n limit?: number;\n after?: string;\n sort?: string[];\n search?: string;\n}\n\nexport interface ListPagesMeta {\n hasMoreItems: boolean;\n totalCount: number;\n cursor: string | null;\n}\n\nexport interface ListPagesResult {\n data: PublicPage[];\n meta: ListPagesMeta;\n}\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<ListPagesResult>;\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<ListPagesResult>;\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\nexport type ManifestInputsArray<\n TInputs,\n TAllowChildren extends boolean\n> = TAllowChildren extends true\n ? {\n [K in Exclude<keyof TInputs, \"children\">]: InputFactory<K & string>;\n }[Exclude<keyof TInputs, \"children\">][]\n : {\n [K in keyof TInputs]: InputFactory<K & string>;\n }[keyof TInputs][];\n\nexport type ManifestInputsObject<\n TInputs,\n TAllowChildren extends boolean\n> = TAllowChildren extends true\n ? { [K in Exclude<keyof TInputs, \"children\">]: InputFactory<K & string> }\n : { [K in keyof TInputs]: InputFactory<K & string> };\n\nexport type ComponentManifestInput<TInputs> =\n | (Omit<ComponentManifest, \"inputs\" | \"acceptsChildren\"> & {\n acceptsChildren: true;\n inputs?: ManifestInputsArray<TInputs, true> | ManifestInputsObject<TInputs, true>;\n })\n | (Omit<ComponentManifest, \"inputs\" | \"acceptsChildren\"> & {\n acceptsChildren?: false;\n inputs: ManifestInputsArray<TInputs, false> | ManifestInputsObject<TInputs, false>;\n });\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const GET_ACTIVE_REDIRECTS = "\n query GetActiveRedirects {\n websiteBuilder {\n getActiveRedirects {\n data {\n id\n from\n to\n permanent\n }\n error {\n code\n message\n data\n }\n }\n }\n }\n";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const GET_ACTIVE_REDIRECTS = /* GraphQL*/`
|
|
2
|
-
query GetActiveRedirects {
|
|
3
|
-
websiteBuilder {
|
|
4
|
-
getActiveRedirects {
|
|
5
|
-
data {
|
|
6
|
-
id
|
|
7
|
-
from
|
|
8
|
-
to
|
|
9
|
-
permanent
|
|
10
|
-
}
|
|
11
|
-
error {
|
|
12
|
-
code
|
|
13
|
-
message
|
|
14
|
-
data
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=GET_ACTIVE_REDIRECTS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["GET_ACTIVE_REDIRECTS"],"sources":["GET_ACTIVE_REDIRECTS.ts"],"sourcesContent":["export const GET_ACTIVE_REDIRECTS = /* GraphQL*/ `\n query GetActiveRedirects {\n websiteBuilder {\n getActiveRedirects {\n data {\n id\n from\n to\n permanent\n }\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n"],"mappings":"AAAA,OAAO,MAAMA,oBAAoB,GAAG,YAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export const createDefaultLexicalTheme = () => {
|
|
2
|
-
return {
|
|
3
|
-
characterLimit: "wb-lx-characterLimit",
|
|
4
|
-
code: "wb-lx-code",
|
|
5
|
-
codeHighlight: {
|
|
6
|
-
atrule: "wb-lx-tokenAttr",
|
|
7
|
-
attr: "wb-lx-tokenAttr",
|
|
8
|
-
boolean: "wb-lx-tokenProperty",
|
|
9
|
-
builtin: "wb-lx-tokenSelector",
|
|
10
|
-
cdata: "wb-lx-tokenComment",
|
|
11
|
-
char: "wb-lx-tokenSelector",
|
|
12
|
-
class: "wb-lx-tokenFunction",
|
|
13
|
-
"class-name": "wb-lx-tokenFunction",
|
|
14
|
-
comment: "wb-lx-tokenComment",
|
|
15
|
-
constant: "wb-lx-tokenProperty",
|
|
16
|
-
deleted: "wb-lx-tokenProperty",
|
|
17
|
-
doctype: "wb-lx-tokenComment",
|
|
18
|
-
entity: "wb-lx-tokenOperator",
|
|
19
|
-
function: "wb-lx-tokenFunction",
|
|
20
|
-
important: "wb-lx-tokenVariable",
|
|
21
|
-
inserted: "wb-lx-tokenSelector",
|
|
22
|
-
keyword: "wb-lx-tokenAttr",
|
|
23
|
-
namespace: "wb-lx-tokenVariable",
|
|
24
|
-
number: "wb-lx-tokenProperty",
|
|
25
|
-
operator: "wb-lx-tokenOperator",
|
|
26
|
-
prolog: "wb-lx-tokenComment",
|
|
27
|
-
property: "wb-lx-tokenProperty",
|
|
28
|
-
punctuation: "wb-lx-tokenPunctuation",
|
|
29
|
-
regex: "wb-lx-tokenVariable",
|
|
30
|
-
selector: "wb-lx-tokenSelector",
|
|
31
|
-
string: "wb-lx-tokenSelector",
|
|
32
|
-
symbol: "wb-lx-tokenProperty",
|
|
33
|
-
tag: "wb-lx-tokenProperty",
|
|
34
|
-
url: "wb-lx-tokenOperator",
|
|
35
|
-
variable: "wb-lx-tokenVariable"
|
|
36
|
-
},
|
|
37
|
-
embedBlock: {
|
|
38
|
-
base: "wb-lx-embedBlock",
|
|
39
|
-
focus: "wb-lx-embedBlockFocus"
|
|
40
|
-
},
|
|
41
|
-
hashtag: "wb-lx-hashtag",
|
|
42
|
-
heading: {
|
|
43
|
-
h1: "wb-lx-h1",
|
|
44
|
-
h2: "wb-lx-h2",
|
|
45
|
-
h3: "wb-lx-h3",
|
|
46
|
-
h4: "wb-lx-h4",
|
|
47
|
-
h5: "wb-lx-h5",
|
|
48
|
-
h6: "wb-lx-h6"
|
|
49
|
-
},
|
|
50
|
-
link: "wb-lx-link",
|
|
51
|
-
list: {
|
|
52
|
-
listitem: "wb-lx-listItem",
|
|
53
|
-
listitemChecked: "wb-lx-listItemChecked",
|
|
54
|
-
listitemUnchecked: "wb-lx-listItemUnchecked",
|
|
55
|
-
nested: {
|
|
56
|
-
listitem: "wb-lx-nestedListItem"
|
|
57
|
-
},
|
|
58
|
-
olDepth: ["wb-lx-ol1", "wb-lx-ol2", "wb-lx-ol3", "wb-lx-ol4", "wb-lx-ol5"],
|
|
59
|
-
ul: "wb-lx-ul"
|
|
60
|
-
},
|
|
61
|
-
ltr: "wb-lx-ltr",
|
|
62
|
-
mark: "wb-lx-mark",
|
|
63
|
-
markOverlap: "wb-lx-markOverlap",
|
|
64
|
-
paragraph: "wb-lx-paragraph",
|
|
65
|
-
quote: "wb-lx-quote",
|
|
66
|
-
rtl: "wb-lx-rtl",
|
|
67
|
-
text: {
|
|
68
|
-
bold: "wb-lx-textBold",
|
|
69
|
-
code: "wb-lx-textCode",
|
|
70
|
-
italic: "wb-lx-textItalic",
|
|
71
|
-
strikethrough: "wb-lx-textStrikethrough",
|
|
72
|
-
subscript: "wb-lx-textSubscript",
|
|
73
|
-
superscript: "wb-lx-textSuperscript",
|
|
74
|
-
underline: "wb-lx-textUnderline",
|
|
75
|
-
underlineStrikethrough: "wb-lx-textUnderlineStrikethrough"
|
|
76
|
-
},
|
|
77
|
-
fontColorText: "wb-lx-fontColorText",
|
|
78
|
-
image: "wb-lx-image",
|
|
79
|
-
indent: "wb-lx-indent",
|
|
80
|
-
inlineImage: "wb-lx-inline-image"
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=createDefaultLexicalTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,7 +0,0 @@
|
|
|
1
|
-
import { createDefaultLexicalTheme } from "./createDefaultLexicalTheme";
|
|
2
|
-
import { deepMerge } from "./deepMerge";
|
|
3
|
-
export const createLexicalTheme = (theme = {}) => {
|
|
4
|
-
return deepMerge(createDefaultLexicalTheme(), theme);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=createLexicalTheme.js.map
|