@mandolop97/constructor-nexora 1.0.3 → 1.0.6
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/README.md +59 -3
- package/dist/NexoraBuilderApp.d.ts +13 -1
- package/dist/components/builder/BuilderEditorShell.d.ts +3 -1
- package/dist/components/builder/ExportDialog.d.ts +8 -0
- package/dist/components/builder/PreviewDialog.d.ts +8 -0
- package/dist/components/builder/PublishDialog.d.ts +7 -1
- package/dist/components/builder/TopBar.d.ts +1 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4619 -4229
- package/dist/lib/block-registry.d.ts +19 -0
- package/dist/lib/i18n.d.ts +55 -0
- package/package.json +1 -1
|
@@ -8,8 +8,27 @@ export interface BlockDefinition {
|
|
|
8
8
|
canHaveChildren: boolean;
|
|
9
9
|
defaultProps: NodeProps;
|
|
10
10
|
defaultStyle: NodeStyle;
|
|
11
|
+
/**
|
|
12
|
+
* Which parent node types this block can be dropped into.
|
|
13
|
+
* Empty array = can go anywhere (root or any container).
|
|
14
|
+
* undefined = can go anywhere.
|
|
15
|
+
*/
|
|
16
|
+
allowedParents?: NodeType[];
|
|
17
|
+
/**
|
|
18
|
+
* Which child node types this container accepts.
|
|
19
|
+
* undefined = accepts anything allowed.
|
|
20
|
+
* Only relevant for canHaveChildren=true blocks.
|
|
21
|
+
*/
|
|
22
|
+
allowedChildren?: NodeType[];
|
|
11
23
|
}
|
|
12
24
|
export declare const blockRegistry: BlockDefinition[];
|
|
13
25
|
export declare function getBlockDef(type: NodeType): BlockDefinition | undefined;
|
|
14
26
|
export declare function getCategories(): string[];
|
|
15
27
|
export declare function getBlocksByCategory(category: string): BlockDefinition[];
|
|
28
|
+
/**
|
|
29
|
+
* Check if a child node type can be placed inside a given parent node type.
|
|
30
|
+
* - If child has allowedParents defined, parent must be in that list OR be the root.
|
|
31
|
+
* - If parent has allowedChildren defined, child must be in that list.
|
|
32
|
+
* - Otherwise, parent must be a container (canHaveChildren).
|
|
33
|
+
*/
|
|
34
|
+
export declare function canDropInto(childType: NodeType, parentType: NodeType, isRoot: boolean): boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface BuilderLocale {
|
|
2
|
+
save: string;
|
|
3
|
+
saveDraft: string;
|
|
4
|
+
publish: string;
|
|
5
|
+
preview: string;
|
|
6
|
+
export: string;
|
|
7
|
+
undo: string;
|
|
8
|
+
redo: string;
|
|
9
|
+
unsavedChanges: string;
|
|
10
|
+
blocks: string;
|
|
11
|
+
layers: string;
|
|
12
|
+
pages: string;
|
|
13
|
+
props: string;
|
|
14
|
+
style: string;
|
|
15
|
+
deleteNode: string;
|
|
16
|
+
dropHere: string;
|
|
17
|
+
releaseToDrop: string;
|
|
18
|
+
selectElement: string;
|
|
19
|
+
publishPage: string;
|
|
20
|
+
saveDraftTitle: string;
|
|
21
|
+
targetDomain: string;
|
|
22
|
+
domainHint: string;
|
|
23
|
+
cancel: string;
|
|
24
|
+
publishing: string;
|
|
25
|
+
cannotPlaceHere: (nodeType: string) => string;
|
|
26
|
+
schemaSaved: string;
|
|
27
|
+
invalidDomain: string;
|
|
28
|
+
noPublishHandler: string;
|
|
29
|
+
publishSuccess: (domain: string) => string;
|
|
30
|
+
draftSuccess: (domain: string) => string;
|
|
31
|
+
publishError: (msg: string) => string;
|
|
32
|
+
categoryLayout: string;
|
|
33
|
+
categoryContent: string;
|
|
34
|
+
categoryUI: string;
|
|
35
|
+
categoryCommerce: string;
|
|
36
|
+
categorySite: string;
|
|
37
|
+
categoryTemplate: string;
|
|
38
|
+
spacing: string;
|
|
39
|
+
size: string;
|
|
40
|
+
typography: string;
|
|
41
|
+
appearance: string;
|
|
42
|
+
previewTitle: string;
|
|
43
|
+
previewDescription: string;
|
|
44
|
+
closePreview: string;
|
|
45
|
+
exportTitle: string;
|
|
46
|
+
exportDescription: string;
|
|
47
|
+
copyToClipboard: string;
|
|
48
|
+
copied: string;
|
|
49
|
+
}
|
|
50
|
+
export declare const es: BuilderLocale;
|
|
51
|
+
export declare const en: BuilderLocale;
|
|
52
|
+
export declare function setLocale(locale: BuilderLocale): void;
|
|
53
|
+
export declare function setLocaleByCode(code: 'es' | 'en'): void;
|
|
54
|
+
export declare function t(): BuilderLocale;
|
|
55
|
+
export declare function translateCategory(category: string): string;
|