@nuasite/cms 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor.js +35991 -0
- package/package.json +12 -11
- package/src/dev-middleware.ts +82 -2
- package/src/editor/components/block-editor.tsx +48 -57
- package/src/editor/components/outline.tsx +42 -35
- package/src/editor/components/toolbar.tsx +7 -4
- package/src/editor/hooks/useBlockEditorHandlers.ts +5 -5
- package/src/editor/hooks/useElementDetection.ts +2 -2
- package/src/editor/index.tsx +3 -2
- package/src/handlers/array-ops.ts +4 -4
- package/src/index.ts +54 -28
- package/dist/src/build-processor.d.ts +0 -20
- package/dist/src/build-processor.d.ts.map +0 -1
- package/dist/src/collection-scanner.d.ts +0 -6
- package/dist/src/collection-scanner.d.ts.map +0 -1
- package/dist/src/component-registry.d.ts +0 -67
- package/dist/src/component-registry.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -24
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/dev-middleware.d.ts +0 -20
- package/dist/src/dev-middleware.d.ts.map +0 -1
- package/dist/src/editor/ai.d.ts +0 -60
- package/dist/src/editor/ai.d.ts.map +0 -1
- package/dist/src/editor/api.d.ts +0 -154
- package/dist/src/editor/api.d.ts.map +0 -1
- package/dist/src/editor/color-utils.d.ts +0 -106
- package/dist/src/editor/color-utils.d.ts.map +0 -1
- package/dist/src/editor/components/ai-chat.d.ts +0 -11
- package/dist/src/editor/components/ai-chat.d.ts.map +0 -1
- package/dist/src/editor/components/ai-tooltip.d.ts +0 -12
- package/dist/src/editor/components/ai-tooltip.d.ts.map +0 -1
- package/dist/src/editor/components/attribute-editor.d.ts +0 -5
- package/dist/src/editor/components/attribute-editor.d.ts.map +0 -1
- package/dist/src/editor/components/block-editor.d.ts +0 -12
- package/dist/src/editor/components/block-editor.d.ts.map +0 -1
- package/dist/src/editor/components/collections-browser.d.ts +0 -2
- package/dist/src/editor/components/collections-browser.d.ts.map +0 -1
- package/dist/src/editor/components/color-toolbar.d.ts +0 -12
- package/dist/src/editor/components/color-toolbar.d.ts.map +0 -1
- package/dist/src/editor/components/confirm-dialog.d.ts +0 -2
- package/dist/src/editor/components/confirm-dialog.d.ts.map +0 -1
- package/dist/src/editor/components/create-page-modal.d.ts +0 -2
- package/dist/src/editor/components/create-page-modal.d.ts.map +0 -1
- package/dist/src/editor/components/editable-highlights.d.ts +0 -9
- package/dist/src/editor/components/editable-highlights.d.ts.map +0 -1
- package/dist/src/editor/components/error-boundary.d.ts +0 -32
- package/dist/src/editor/components/error-boundary.d.ts.map +0 -1
- package/dist/src/editor/components/fields.d.ts +0 -75
- package/dist/src/editor/components/fields.d.ts.map +0 -1
- package/dist/src/editor/components/frontmatter-fields.d.ts +0 -29
- package/dist/src/editor/components/frontmatter-fields.d.ts.map +0 -1
- package/dist/src/editor/components/highlight-overlay.d.ts +0 -64
- package/dist/src/editor/components/highlight-overlay.d.ts.map +0 -1
- package/dist/src/editor/components/image-overlay.d.ts +0 -12
- package/dist/src/editor/components/image-overlay.d.ts.map +0 -1
- package/dist/src/editor/components/markdown-editor-overlay.d.ts +0 -6
- package/dist/src/editor/components/markdown-editor-overlay.d.ts.map +0 -1
- package/dist/src/editor/components/markdown-inline-editor.d.ts +0 -10
- package/dist/src/editor/components/markdown-inline-editor.d.ts.map +0 -1
- package/dist/src/editor/components/media-library.d.ts +0 -2
- package/dist/src/editor/components/media-library.d.ts.map +0 -1
- package/dist/src/editor/components/outline.d.ts +0 -21
- package/dist/src/editor/components/outline.d.ts.map +0 -1
- package/dist/src/editor/components/redirect-countdown.d.ts +0 -2
- package/dist/src/editor/components/redirect-countdown.d.ts.map +0 -1
- package/dist/src/editor/components/seo-editor.d.ts +0 -2
- package/dist/src/editor/components/seo-editor.d.ts.map +0 -1
- package/dist/src/editor/components/text-style-toolbar.d.ts +0 -8
- package/dist/src/editor/components/text-style-toolbar.d.ts.map +0 -1
- package/dist/src/editor/components/toast/toast-container.d.ts +0 -7
- package/dist/src/editor/components/toast/toast-container.d.ts.map +0 -1
- package/dist/src/editor/components/toast/toast.d.ts +0 -7
- package/dist/src/editor/components/toast/toast.d.ts.map +0 -1
- package/dist/src/editor/components/toast/types.d.ts +0 -7
- package/dist/src/editor/components/toast/types.d.ts.map +0 -1
- package/dist/src/editor/components/toolbar.d.ts +0 -21
- package/dist/src/editor/components/toolbar.d.ts.map +0 -1
- package/dist/src/editor/config.d.ts +0 -4
- package/dist/src/editor/config.d.ts.map +0 -1
- package/dist/src/editor/constants.d.ts +0 -102
- package/dist/src/editor/constants.d.ts.map +0 -1
- package/dist/src/editor/context.d.ts +0 -14
- package/dist/src/editor/context.d.ts.map +0 -1
- package/dist/src/editor/dom.d.ts +0 -86
- package/dist/src/editor/dom.d.ts.map +0 -1
- package/dist/src/editor/editor.d.ts +0 -64
- package/dist/src/editor/editor.d.ts.map +0 -1
- package/dist/src/editor/history.d.ts +0 -20
- package/dist/src/editor/history.d.ts.map +0 -1
- package/dist/src/editor/hooks/index.d.ts +0 -14
- package/dist/src/editor/hooks/index.d.ts.map +0 -1
- package/dist/src/editor/hooks/useAIHandlers.d.ts +0 -22
- package/dist/src/editor/hooks/useAIHandlers.d.ts.map +0 -1
- package/dist/src/editor/hooks/useBlockEditorHandlers.d.ts +0 -18
- package/dist/src/editor/hooks/useBlockEditorHandlers.d.ts.map +0 -1
- package/dist/src/editor/hooks/useElementDetection.d.ts +0 -26
- package/dist/src/editor/hooks/useElementDetection.d.ts.map +0 -1
- package/dist/src/editor/hooks/useImageHoverDetection.d.ts +0 -12
- package/dist/src/editor/hooks/useImageHoverDetection.d.ts.map +0 -1
- package/dist/src/editor/hooks/useTextSelection.d.ts +0 -23
- package/dist/src/editor/hooks/useTextSelection.d.ts.map +0 -1
- package/dist/src/editor/hooks/useTooltipState.d.ts +0 -19
- package/dist/src/editor/hooks/useTooltipState.d.ts.map +0 -1
- package/dist/src/editor/hooks/utils.d.ts +0 -32
- package/dist/src/editor/hooks/utils.d.ts.map +0 -1
- package/dist/src/editor/index.d.ts +0 -12
- package/dist/src/editor/index.d.ts.map +0 -1
- package/dist/src/editor/lib/cn.d.ts +0 -3
- package/dist/src/editor/lib/cn.d.ts.map +0 -1
- package/dist/src/editor/manifest.d.ts +0 -19
- package/dist/src/editor/manifest.d.ts.map +0 -1
- package/dist/src/editor/markdown-api.d.ts +0 -36
- package/dist/src/editor/markdown-api.d.ts.map +0 -1
- package/dist/src/editor/signals.d.ts +0 -242
- package/dist/src/editor/signals.d.ts.map +0 -1
- package/dist/src/editor/storage.d.ts +0 -29
- package/dist/src/editor/storage.d.ts.map +0 -1
- package/dist/src/editor/text-styling.d.ts +0 -350
- package/dist/src/editor/text-styling.d.ts.map +0 -1
- package/dist/src/editor/themes.d.ts +0 -38
- package/dist/src/editor/themes.d.ts.map +0 -1
- package/dist/src/editor/types.d.ts +0 -454
- package/dist/src/editor/types.d.ts.map +0 -1
- package/dist/src/error-collector.d.ts +0 -56
- package/dist/src/error-collector.d.ts.map +0 -1
- package/dist/src/handlers/array-ops.d.ts +0 -59
- package/dist/src/handlers/array-ops.d.ts.map +0 -1
- package/dist/src/handlers/component-ops.d.ts +0 -60
- package/dist/src/handlers/component-ops.d.ts.map +0 -1
- package/dist/src/handlers/markdown-ops.d.ts +0 -41
- package/dist/src/handlers/markdown-ops.d.ts.map +0 -1
- package/dist/src/handlers/request-utils.d.ts +0 -20
- package/dist/src/handlers/request-utils.d.ts.map +0 -1
- package/dist/src/handlers/source-writer.d.ts +0 -51
- package/dist/src/handlers/source-writer.d.ts.map +0 -1
- package/dist/src/html-processor.d.ts +0 -63
- package/dist/src/html-processor.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -41
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/manifest-writer.d.ts +0 -111
- package/dist/src/manifest-writer.d.ts.map +0 -1
- package/dist/src/media/contember.d.ts +0 -15
- package/dist/src/media/contember.d.ts.map +0 -1
- package/dist/src/media/local.d.ts +0 -9
- package/dist/src/media/local.d.ts.map +0 -1
- package/dist/src/media/s3.d.ts +0 -12
- package/dist/src/media/s3.d.ts.map +0 -1
- package/dist/src/media/types.d.ts +0 -40
- package/dist/src/media/types.d.ts.map +0 -1
- package/dist/src/preview-generator.d.ts +0 -19
- package/dist/src/preview-generator.d.ts.map +0 -1
- package/dist/src/seo-processor.d.ts +0 -23
- package/dist/src/seo-processor.d.ts.map +0 -1
- package/dist/src/source-finder/ast-extractors.d.ts +0 -35
- package/dist/src/source-finder/ast-extractors.d.ts.map +0 -1
- package/dist/src/source-finder/ast-parser.d.ts +0 -18
- package/dist/src/source-finder/ast-parser.d.ts.map +0 -1
- package/dist/src/source-finder/cache.d.ts +0 -18
- package/dist/src/source-finder/cache.d.ts.map +0 -1
- package/dist/src/source-finder/collection-finder.d.ts +0 -29
- package/dist/src/source-finder/collection-finder.d.ts.map +0 -1
- package/dist/src/source-finder/cross-file-tracker.d.ts +0 -39
- package/dist/src/source-finder/cross-file-tracker.d.ts.map +0 -1
- package/dist/src/source-finder/element-finder.d.ts +0 -42
- package/dist/src/source-finder/element-finder.d.ts.map +0 -1
- package/dist/src/source-finder/image-finder.d.ts +0 -24
- package/dist/src/source-finder/image-finder.d.ts.map +0 -1
- package/dist/src/source-finder/index.d.ts +0 -9
- package/dist/src/source-finder/index.d.ts.map +0 -1
- package/dist/src/source-finder/search-index.d.ts +0 -27
- package/dist/src/source-finder/search-index.d.ts.map +0 -1
- package/dist/src/source-finder/snippet-utils.d.ts +0 -96
- package/dist/src/source-finder/snippet-utils.d.ts.map +0 -1
- package/dist/src/source-finder/source-lookup.d.ts +0 -16
- package/dist/src/source-finder/source-lookup.d.ts.map +0 -1
- package/dist/src/source-finder/types.d.ts +0 -167
- package/dist/src/source-finder/types.d.ts.map +0 -1
- package/dist/src/source-finder/variable-extraction.d.ts +0 -37
- package/dist/src/source-finder/variable-extraction.d.ts.map +0 -1
- package/dist/src/tailwind-colors.d.ts +0 -54
- package/dist/src/tailwind-colors.d.ts.map +0 -1
- package/dist/src/tsconfig.tsbuildinfo +0 -1
- package/dist/src/types.d.ts +0 -367
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/utils.d.ts +0 -61
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/vite-plugin.d.ts +0 -14
- package/dist/src/vite-plugin.d.ts.map +0 -1
package/dist/src/editor/dom.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { ChildCmsElement } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Detect whether the page has a dark background by checking the computed
|
|
4
|
-
* background color of the body and html elements.
|
|
5
|
-
*/
|
|
6
|
-
export declare function isPageDark(): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Get an outline color that contrasts with the page background.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getOutlineColor(): string;
|
|
11
|
-
/**
|
|
12
|
-
* Get the best CMS element at a specific position using elementsFromPoint.
|
|
13
|
-
* This is more reliable than using event.target for nested elements.
|
|
14
|
-
*
|
|
15
|
-
* @param x - clientX position
|
|
16
|
-
* @param y - clientY position
|
|
17
|
-
* @param manifestEntries - Optional manifest entries to filter by
|
|
18
|
-
*/
|
|
19
|
-
export declare function getCmsElementAtPosition(x: number, y: number, manifestEntries?: Record<string, any>): HTMLElement | null;
|
|
20
|
-
/**
|
|
21
|
-
* Get a component element at a specific position.
|
|
22
|
-
* Only returns component roots (elements with data-cms-component-id).
|
|
23
|
-
*/
|
|
24
|
-
export declare function getComponentAtPosition(x: number, y: number): HTMLElement | null;
|
|
25
|
-
/**
|
|
26
|
-
* Check if a point is near the edge of an element's bounding rect.
|
|
27
|
-
* Used to only trigger component selection when hovering near borders.
|
|
28
|
-
*/
|
|
29
|
-
export declare function isNearElementEdge(x: number, y: number, rect: DOMRect, threshold?: number): boolean;
|
|
30
|
-
export declare function getCmsElementFromEvent(ev: MouseEvent): HTMLElement | null;
|
|
31
|
-
/**
|
|
32
|
-
* Check if an element is a CMS-styled span (inline text styling)
|
|
33
|
-
*/
|
|
34
|
-
export declare function isStyledSpan(element: HTMLElement): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Extract plain text content from a CMS element.
|
|
37
|
-
* Styled spans are reduced to their text content (not HTML).
|
|
38
|
-
* Nested CMS elements are replaced with {{cms:id}} placeholders.
|
|
39
|
-
*/
|
|
40
|
-
export declare function getEditableTextFromElement(el: HTMLElement): string;
|
|
41
|
-
/**
|
|
42
|
-
* Get the HTML content of a CMS element suitable for saving.
|
|
43
|
-
* Preserves styled spans but cleans up editing artifacts.
|
|
44
|
-
*/
|
|
45
|
-
export declare function getEditableHtmlFromElement(el: HTMLElement): string;
|
|
46
|
-
export declare function getChildCmsElements(el: HTMLElement): ChildCmsElement[];
|
|
47
|
-
export declare function findInnermostCmsElement(target: EventTarget | null): HTMLElement | null;
|
|
48
|
-
export declare function getAllCmsElements(): NodeListOf<HTMLElement>;
|
|
49
|
-
export declare function makeElementEditable(el: HTMLElement): void;
|
|
50
|
-
export declare function makeElementNonEditable(el: HTMLElement): void;
|
|
51
|
-
/**
|
|
52
|
-
* Set highlight outline on an element using Shadow DOM overlay.
|
|
53
|
-
* This doesn't modify the element's styles directly.
|
|
54
|
-
*/
|
|
55
|
-
export declare function setElementOutline(el: HTMLElement, color: string, style?: 'solid' | 'dashed'): void;
|
|
56
|
-
/**
|
|
57
|
-
* Clear highlight from an element
|
|
58
|
-
*/
|
|
59
|
-
export declare function clearElementOutline(el: HTMLElement): void;
|
|
60
|
-
/**
|
|
61
|
-
* Initialize the highlight system (call when starting edit mode)
|
|
62
|
-
*/
|
|
63
|
-
export declare function initHighlightSystem(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Clean up all highlights (call when stopping edit mode)
|
|
66
|
-
*/
|
|
67
|
-
export declare function cleanupHighlightSystem(): void;
|
|
68
|
-
export declare function logDebug(debug: boolean, ...args: any[]): void;
|
|
69
|
-
/**
|
|
70
|
-
* Disable all interactive elements (links, buttons, forms) to prevent
|
|
71
|
-
* accidental navigation or form submission while in edit mode.
|
|
72
|
-
*/
|
|
73
|
-
export declare function disableAllInteractiveElements(): void;
|
|
74
|
-
/**
|
|
75
|
-
* Re-enable all interactive elements that were disabled.
|
|
76
|
-
*/
|
|
77
|
-
export declare function enableAllInteractiveElements(): void;
|
|
78
|
-
/**
|
|
79
|
-
* @deprecated Use disableAllInteractiveElements instead
|
|
80
|
-
*/
|
|
81
|
-
export declare function disableAllLinks(): void;
|
|
82
|
-
/**
|
|
83
|
-
* @deprecated Use enableAllInteractiveElements instead
|
|
84
|
-
*/
|
|
85
|
-
export declare function enableAllLinks(): void;
|
|
86
|
-
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/editor/dom.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAsB9C;;;GAGG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAUpC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAKD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACtC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnC,WAAW,GAAG,IAAI,CAyCpB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAW/E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,GAAE,MAAW,GAAG,OAAO,CAatG;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAMzE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAE1D;AAsCD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAElE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAYlE;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,eAAe,EAAE,CAKtE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAatF;AAED,wBAAgB,iBAAiB,IAAI,UAAU,CAAC,WAAW,CAAC,CAE3D;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAEzD;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAE5D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,OAAO,GAAG,QAAkB,GAAG,IAAI,CAE3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAEzD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAI7C;AAiCD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAG7D;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAqBpD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAqBnD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { CmsConfig } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Start edit mode - enables inline editing on all CMS elements.
|
|
4
|
-
* Uses signals for state management.
|
|
5
|
-
*/
|
|
6
|
-
export declare function startEditMode(config: CmsConfig, onStateChange?: () => void): Promise<void>;
|
|
7
|
-
/**
|
|
8
|
-
* Stop edit mode - disables inline editing.
|
|
9
|
-
*/
|
|
10
|
-
export declare function stopEditMode(onStateChange?: () => void): void;
|
|
11
|
-
/**
|
|
12
|
-
* Handle element content change - tracks dirty state.
|
|
13
|
-
*/
|
|
14
|
-
export declare function handleElementChange(config: CmsConfig, cmsId: string, el: HTMLElement, onStateChange?: () => void): void;
|
|
15
|
-
/**
|
|
16
|
-
* Toggle showing original content vs edited content.
|
|
17
|
-
*/
|
|
18
|
-
export declare function toggleShowOriginal(config: CmsConfig, onStateChange?: () => void): void;
|
|
19
|
-
/**
|
|
20
|
-
* Discard all pending changes and restore original content.
|
|
21
|
-
* Note: Confirmation is handled by the caller (e.g., toolbar).
|
|
22
|
-
*/
|
|
23
|
-
export declare function discardAllChanges(onStateChange?: () => void): void;
|
|
24
|
-
/**
|
|
25
|
-
* Save all dirty changes to the server.
|
|
26
|
-
*/
|
|
27
|
-
export declare function saveAllChanges(config: CmsConfig, onStateChange?: () => void): Promise<{
|
|
28
|
-
success: boolean;
|
|
29
|
-
updated: number;
|
|
30
|
-
errors?: Array<{
|
|
31
|
-
cmsId: string;
|
|
32
|
-
error: string;
|
|
33
|
-
}>;
|
|
34
|
-
}>;
|
|
35
|
-
/**
|
|
36
|
-
* Handle color change from the color toolbar.
|
|
37
|
-
* Called when user selects a new color.
|
|
38
|
-
*/
|
|
39
|
-
export declare function handleColorChange(config: CmsConfig, cmsId: string, colorType: 'bg' | 'text' | 'border' | 'hoverBg' | 'hoverText', oldClass: string, newClass: string, onStateChange?: () => void, previousClassName?: string, previousStyleCssText?: string): void;
|
|
40
|
-
export interface DeploymentPollingOptions {
|
|
41
|
-
/** Called when deployment completes, fails, or times out */
|
|
42
|
-
onComplete?: (status: 'completed' | 'failed' | 'timeout') => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Start polling for deployment status after a save operation.
|
|
46
|
-
* Polls the API every 3 seconds until deployment completes or fails.
|
|
47
|
-
* Waits for deployment to appear for up to 30 seconds before giving up.
|
|
48
|
-
*/
|
|
49
|
-
export declare function startDeploymentPolling(config: CmsConfig, options?: DeploymentPollingOptions): void;
|
|
50
|
-
/**
|
|
51
|
-
* Stop polling for deployment status.
|
|
52
|
-
*/
|
|
53
|
-
export declare function stopDeploymentPolling(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Dismiss the deployment status indicator.
|
|
56
|
-
* Used when user clicks on a failed deployment status.
|
|
57
|
-
*/
|
|
58
|
-
export declare function dismissDeploymentStatus(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Handle attribute change from the attribute editor.
|
|
61
|
-
* Called when user modifies an attribute value.
|
|
62
|
-
*/
|
|
63
|
-
export declare function handleAttributeChange(config: CmsConfig, cmsId: string, attributeName: string, newValue: string | boolean | number | undefined, onStateChange?: () => void): void;
|
|
64
|
-
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/editor/editor.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAyC,SAAS,EAA+D,MAAM,SAAS,CAAA;AAqD5I;;;GAGG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,SAAS,EACjB,aAAa,CAAC,EAAE,MAAM,IAAI,GACxB,OAAO,CAAC,IAAI,CAAC,CAsNf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAmB7D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,WAAW,EACf,aAAa,CAAC,EAAE,MAAM,IAAI,GACxB,IAAI,CAkEN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,SAAS,EACjB,aAAa,CAAC,EAAE,MAAM,IAAI,GACxB,IAAI,CAkCN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAqDlE;AA8BD;;GAEG;AACH,wBAAsB,cAAc,CACnC,MAAM,EAAE,SAAS,EACjB,aAAa,CAAC,EAAE,MAAM,IAAI,GACxB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAqPlG;AA2OD;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,EAC7D,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,IAAI,EAC1B,iBAAiB,CAAC,EAAE,MAAM,EAC1B,oBAAoB,CAAC,EAAE,MAAM,GAC3B,IAAI,CA6DN;AAiBD,MAAM,WAAW,wBAAwB;IACxC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAA;CACjE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAgHlG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAO9C;AAkFD;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,EAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,GACxB,IAAI,CAuDN"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { UndoAction, UndoTextAction } from './types';
|
|
2
|
-
export declare const undoStack: import("@preact/signals-core").Signal<UndoAction[]>;
|
|
3
|
-
export declare const redoStack: import("@preact/signals-core").Signal<UndoAction[]>;
|
|
4
|
-
export declare const canUndo: import("@preact/signals-core").ReadonlySignal<boolean>;
|
|
5
|
-
export declare const canRedo: import("@preact/signals-core").ReadonlySignal<boolean>;
|
|
6
|
-
/** Guard flag to prevent re-recording during undo/redo application */
|
|
7
|
-
export declare let isApplyingUndoRedo: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Record a text change with debouncing.
|
|
10
|
-
* Rapid keystrokes to the same element are grouped into a single undo unit.
|
|
11
|
-
*/
|
|
12
|
-
export declare function recordTextChange(snapshot: UndoTextAction): void;
|
|
13
|
-
/**
|
|
14
|
-
* Record a non-text change immediately (color, image, attribute, seo).
|
|
15
|
-
*/
|
|
16
|
-
export declare function recordChange(action: UndoAction): void;
|
|
17
|
-
export declare function performUndo(): void;
|
|
18
|
-
export declare function performRedo(): void;
|
|
19
|
-
export declare function clearHistory(): void;
|
|
20
|
-
//# sourceMappingURL=history.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/editor/history.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAa,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AASpE,eAAO,MAAM,SAAS,qDAA2B,CAAA;AACjD,eAAO,MAAM,SAAS,qDAA2B,CAAA;AAEjD,eAAO,MAAM,OAAO,wDAA2E,CAAA;AAC/F,eAAO,MAAM,OAAO,wDAA6C,CAAA;AAEjE,sEAAsE;AACtE,eAAO,IAAI,kBAAkB,SAAQ,CAAA;AAoBrC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAwB/D;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAUrD;AA0BD,wBAAgB,WAAW,IAAI,IAAI,CAiBlC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAclC;AAwLD,wBAAgB,YAAY,IAAI,IAAI,CAQnC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { isEventOnCmsUI, useComponentClickHandler, useElementDetection } from './useElementDetection';
|
|
2
|
-
export type { ComponentClickHandlerOptions, OutlineState } from './useElementDetection';
|
|
3
|
-
export { isElementInCmsUI, usePositionTracking } from './utils';
|
|
4
|
-
export { useTooltipState } from './useTooltipState';
|
|
5
|
-
export type { TooltipState, UseTooltipStateOptions } from './useTooltipState';
|
|
6
|
-
export { useAIHandlers } from './useAIHandlers';
|
|
7
|
-
export type { AIHandlersOptions } from './useAIHandlers';
|
|
8
|
-
export { useBlockEditorHandlers } from './useBlockEditorHandlers';
|
|
9
|
-
export type { BlockEditorHandlersOptions } from './useBlockEditorHandlers';
|
|
10
|
-
export { clearTextSelection, restoreSelection, saveSelection, useTextSelection } from './useTextSelection';
|
|
11
|
-
export type { TextSelectionState } from './useTextSelection';
|
|
12
|
-
export { useImageHoverDetection } from './useImageHoverDetection';
|
|
13
|
-
export type { ImageHoverState } from './useImageHoverDetection';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACrG,YAAY,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,YAAY,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAA;AAE1E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1G,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AIService } from '../ai';
|
|
2
|
-
import type { CmsConfig } from '../types';
|
|
3
|
-
export interface AIHandlersOptions {
|
|
4
|
-
config: CmsConfig;
|
|
5
|
-
showToast: (message: string, type?: 'info' | 'success' | 'error') => void;
|
|
6
|
-
onTooltipHide: () => void;
|
|
7
|
-
onUIUpdate?: () => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Hook providing AI-related handlers for the CMS editor.
|
|
11
|
-
* Uses signals directly for state management.
|
|
12
|
-
*/
|
|
13
|
-
export declare function useAIHandlers({ config, showToast, onTooltipHide, onUIUpdate, }: AIHandlersOptions): {
|
|
14
|
-
aiService: AIService;
|
|
15
|
-
handleAIChatToggle: () => Promise<void>;
|
|
16
|
-
handleChatClose: () => void;
|
|
17
|
-
handleChatCancel: () => void;
|
|
18
|
-
handleTooltipPromptSubmit: (prompt: string, elementId: string) => Promise<void>;
|
|
19
|
-
handleChatSend: (message: string, elementId?: string) => Promise<void>;
|
|
20
|
-
handleApplyToElement: (content: string, elementId: string) => void;
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=useAIHandlers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAIHandlers.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/useAIHandlers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAA;AAMnD,OAAO,KAAK,EAA6B,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpE,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,SAAS,CAAA;IACjB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,KAAK,IAAI,CAAA;IACzE,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAQD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC7B,MAAM,EACN,SAAS,EACT,aAAa,EACb,UAAU,GACV,EAAE,iBAAiB;;;;;wCA6EH,MAAM,aAAa,MAAM;8BAiExB,MAAM,cAAc,MAAM;oCAoJhC,MAAM,aAAa,MAAM;EAuBpC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { CmsConfig, InsertPosition } from '../types';
|
|
2
|
-
export interface BlockEditorHandlersOptions {
|
|
3
|
-
config: CmsConfig;
|
|
4
|
-
showToast: (message: string, type?: 'info' | 'success' | 'error') => void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Hook providing block editor handlers for the CMS editor.
|
|
8
|
-
* Uses signals directly for state management.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useBlockEditorHandlers({ config, showToast, }: BlockEditorHandlersOptions): {
|
|
11
|
-
blockEditorRect: DOMRect | null;
|
|
12
|
-
handleComponentSelect: (componentId: string, rect: DOMRect) => void;
|
|
13
|
-
handleBlockEditorClose: () => void;
|
|
14
|
-
handleUpdateProps: (componentId: string, props: Record<string, any>) => void;
|
|
15
|
-
handleInsertComponent: (position: InsertPosition, referenceComponentId: string, componentName: string, props: Record<string, any>) => Promise<void>;
|
|
16
|
-
handleRemoveBlock: (componentId: string) => Promise<void>;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=useBlockEditorHandlers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockEditorHandlers.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/useBlockEditorHandlers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAkC,cAAc,EAAE,MAAM,UAAU,CAAA;AAkCzF,MAAM,WAAW,0BAA0B;IAC1C,MAAM,EAAE,SAAS,CAAA;IACjB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,KAAK,IAAI,CAAA;CACzE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,MAAM,EACN,SAAS,GACT,EAAE,0BAA0B;;yCAOb,MAAM,QAAQ,OAAO;;qCAqBrB,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;sCAarC,cAAc,wBACF,MAAM,iBACb,MAAM,SACd,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;qCAiGP,MAAM;EAsE3B"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { isEventOnCmsUI } from './utils';
|
|
2
|
-
export interface OutlineState {
|
|
3
|
-
visible: boolean;
|
|
4
|
-
rect: DOMRect | null;
|
|
5
|
-
isComponent: boolean;
|
|
6
|
-
componentName: string | undefined;
|
|
7
|
-
tagName: string | undefined;
|
|
8
|
-
element: HTMLElement | null;
|
|
9
|
-
/** CMS ID of the detected element */
|
|
10
|
-
cmsId: string | null;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Hook for detecting and tracking hovered CMS elements.
|
|
14
|
-
* Uses signals directly for state management.
|
|
15
|
-
*/
|
|
16
|
-
export declare function useElementDetection(): OutlineState;
|
|
17
|
-
export interface ComponentClickHandlerOptions {
|
|
18
|
-
onComponentSelect: (componentId: string, rect: DOMRect) => void;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Hook for handling component click selection.
|
|
22
|
-
* Uses signals directly for state management.
|
|
23
|
-
*/
|
|
24
|
-
export declare function useComponentClickHandler({ onComponentSelect, }: ComponentClickHandlerOptions): void;
|
|
25
|
-
export { isEventOnCmsUI };
|
|
26
|
-
//# sourceMappingURL=useElementDetection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useElementDetection.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/useElementDetection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAuB,MAAM,SAAS,CAAA;AAE7D,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,qCAAqC;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAYD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAgLlD;AAED,MAAM,WAAW,4BAA4B;IAC5C,iBAAiB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,EACxC,iBAAiB,GACjB,EAAE,4BAA4B,GAAG,IAAI,CA4DrC;AAGD,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface ImageHoverState {
|
|
2
|
-
visible: boolean;
|
|
3
|
-
rect: DOMRect | null;
|
|
4
|
-
element: HTMLImageElement | null;
|
|
5
|
-
cmsId: string | null;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Hook for detecting and tracking hovered CMS image elements.
|
|
9
|
-
* Shows a visual overlay when hovering over images marked with data-cms-img.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useImageHoverDetection(): ImageHoverState;
|
|
12
|
-
//# sourceMappingURL=useImageHoverDetection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useImageHoverDetection.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/useImageHoverDetection.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AASD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,CA8ExD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type TextSelection } from '../text-styling';
|
|
2
|
-
export interface TextSelectionState {
|
|
3
|
-
hasSelection: boolean;
|
|
4
|
-
selection: TextSelection | null;
|
|
5
|
-
rect: DOMRect | null;
|
|
6
|
-
element: HTMLElement | null;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Hook for managing text selection state within CMS elements.
|
|
10
|
-
* Tracks when the user has selected text and provides the selection details
|
|
11
|
-
* for the text styling toolbar.
|
|
12
|
-
*/
|
|
13
|
-
export declare function useTextSelection(): TextSelectionState;
|
|
14
|
-
/**
|
|
15
|
-
* Clear the current text selection
|
|
16
|
-
*/
|
|
17
|
-
export declare function clearTextSelection(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Save and restore selection - useful when applying styles
|
|
20
|
-
*/
|
|
21
|
-
export declare function saveSelection(): Range | null;
|
|
22
|
-
export declare function restoreSelection(range: Range | null): void;
|
|
23
|
-
//# sourceMappingURL=useTextSelection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTextSelection.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/useTextSelection.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGtE,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,aAAa,GAAG,IAAI,CAAA;IAC/B,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAC3B;AASD;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAkIrD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,KAAK,GAAG,IAAI,CAM5C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAQ1D"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface TooltipState {
|
|
2
|
-
elementId: string | null;
|
|
3
|
-
rect: DOMRect | null;
|
|
4
|
-
element: HTMLElement | null;
|
|
5
|
-
}
|
|
6
|
-
export interface UseTooltipStateOptions {
|
|
7
|
-
/** @deprecated No longer needed - signals are used directly */
|
|
8
|
-
isEditing?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Hook for managing tooltip visibility and positioning.
|
|
12
|
-
* Uses signals directly for state management.
|
|
13
|
-
*/
|
|
14
|
-
export declare function useTooltipState(_options?: UseTooltipStateOptions): {
|
|
15
|
-
tooltipState: TooltipState;
|
|
16
|
-
showTooltipForElement: () => void;
|
|
17
|
-
hideTooltip: () => void;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=useTooltipState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltipState.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/useTooltipState.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACtC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,sBAAsB;;;;EA0GhE"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'preact';
|
|
2
|
-
/**
|
|
3
|
-
* Check if a mouse event originates from CMS UI elements.
|
|
4
|
-
* This includes the toolbar, AI chat, color picker, and other CMS overlays.
|
|
5
|
-
*/
|
|
6
|
-
export declare function isEventOnCmsUI(ev: MouseEvent): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Check if a target element is part of CMS UI.
|
|
9
|
-
* Non-event based variant for direct element checks.
|
|
10
|
-
*/
|
|
11
|
-
export declare function isElementInCmsUI(target: HTMLElement | null): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Hook for tracking an element's position on scroll and resize.
|
|
14
|
-
* Returns a callback to get the latest rect, and automatically updates
|
|
15
|
-
* when the element scrolls or the window resizes.
|
|
16
|
-
*
|
|
17
|
-
* @param element - The element to track
|
|
18
|
-
* @param onPositionChange - Callback when position changes
|
|
19
|
-
* @param enabled - Whether tracking is enabled
|
|
20
|
-
*/
|
|
21
|
-
export declare function usePositionTracking(element: HTMLElement | null, onPositionChange: (rect: DOMRect | null) => void, enabled?: boolean): void;
|
|
22
|
-
/**
|
|
23
|
-
* Hook for throttling a callback function.
|
|
24
|
-
* Returns a throttled version that will only execute once per interval.
|
|
25
|
-
*/
|
|
26
|
-
export declare function useThrottle<T extends (...args: unknown[]) => void>(callback: T, intervalMs: number): T;
|
|
27
|
-
/**
|
|
28
|
-
* Creates a ref that always contains the latest value.
|
|
29
|
-
* Useful for accessing current values in event handlers without stale closures.
|
|
30
|
-
*/
|
|
31
|
-
export declare function useLatestRef<T>(value: T): RefObject<T>;
|
|
32
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/editor/hooks/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIvC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CActD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAGpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,EAChD,OAAO,GAAE,OAAc,GACrB,IAAI,CAuBN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,EACjE,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM,GAChB,CAAC,CAYH;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAItD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare class CmsEditor {
|
|
2
|
-
private appRoot;
|
|
3
|
-
private shadowRoot;
|
|
4
|
-
private config;
|
|
5
|
-
init(): Promise<void>;
|
|
6
|
-
private setupUI;
|
|
7
|
-
private injectThemeStyles;
|
|
8
|
-
private setupKeyboardShortcuts;
|
|
9
|
-
private toggleVisibility;
|
|
10
|
-
}
|
|
11
|
-
export { CmsEditor };
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/index.tsx"],"names":[],"mappings":"AAkYA,cAAM,SAAS;IACd,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,MAAM,CAAc;IAEtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B,OAAO,CAAC,OAAO;IA2Bf,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,sBAAsB;IAgC9B,OAAO,CAAC,gBAAgB;CASxB;AAgBD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../../src/editor/lib/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C,eAAO,MAAM,EAAE,GAAI,GAAG,QAAQ,UAAU,EAAE,WAA6B,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { CmsManifest, ComponentDefinition, ComponentInstance, ManifestEntry } from './types';
|
|
2
|
-
type GetManifestEntry = (manifest: CmsManifest, id: string) => ManifestEntry | undefined;
|
|
3
|
-
export declare const getManifestEntry: GetManifestEntry;
|
|
4
|
-
type HasManifestEntry = (manifest: CmsManifest, id: string) => boolean;
|
|
5
|
-
export declare const hasManifestEntry: HasManifestEntry;
|
|
6
|
-
type GetComponentInstances = (manifest: CmsManifest) => Record<string, ComponentInstance>;
|
|
7
|
-
export declare const getComponentInstances: GetComponentInstances;
|
|
8
|
-
type GetComponentInstance = (manifest: CmsManifest, id: string) => ComponentInstance | undefined;
|
|
9
|
-
export declare const getComponentInstance: GetComponentInstance;
|
|
10
|
-
type GetComponentDefinitions = (manifest: CmsManifest) => Record<string, ComponentDefinition>;
|
|
11
|
-
export declare const getComponentDefinitions: GetComponentDefinitions;
|
|
12
|
-
type GetComponentDefinition = (manifest: CmsManifest, name: string) => ComponentDefinition | undefined;
|
|
13
|
-
export declare const getComponentDefinition: GetComponentDefinition;
|
|
14
|
-
type GetManifestEntryCount = (manifest: CmsManifest) => number;
|
|
15
|
-
export declare const getManifestEntryCount: GetManifestEntryCount;
|
|
16
|
-
type GetAvailableComponentNames = (manifest: CmsManifest) => string[];
|
|
17
|
-
export declare const getAvailableComponentNames: GetAvailableComponentNames;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/editor/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEjG,KAAK,gBAAgB,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAA;AACxF,eAAO,MAAM,gBAAgB,EAAE,gBAAyD,CAAA;AAExF,KAAK,gBAAgB,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;AACtE,eAAO,MAAM,gBAAgB,EAAE,gBAA2D,CAAA;AAE1F,KAAK,qBAAqB,GAAG,CAAC,QAAQ,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AACzF,eAAO,MAAM,qBAAqB,EAAE,qBAA6D,CAAA;AAEjG,KAAK,oBAAoB,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAA;AAChG,eAAO,MAAM,oBAAoB,EAAE,oBAAkE,CAAA;AAErG,KAAK,uBAAuB,GAAG,CAAC,QAAQ,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;AAC7F,eAAO,MAAM,uBAAuB,EAAE,uBAAyE,CAAA;AAE/G,KAAK,sBAAsB,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,KAAK,mBAAmB,GAAG,SAAS,CAAA;AACtG,eAAO,MAAM,sBAAsB,EAAE,sBAAoF,CAAA;AAEzH,KAAK,qBAAqB,GAAG,CAAC,QAAQ,EAAE,WAAW,KAAK,MAAM,CAAA;AAC9D,eAAO,MAAM,qBAAqB,EAAE,qBAAuF,CAAA;AAE3H,KAAK,0BAA0B,GAAG,CAAC,QAAQ,EAAE,WAAW,KAAK,MAAM,EAAE,CAAA;AACrE,eAAO,MAAM,0BAA0B,EAAE,0BAAuF,CAAA"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { CmsConfig, CreateMarkdownPageRequest, CreateMarkdownPageResponse, MediaItem, MediaUploadResponse, UpdateMarkdownPageRequest, UpdateMarkdownPageResponse } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Create a new markdown page (blog post)
|
|
4
|
-
*/
|
|
5
|
-
export declare function createMarkdownPage(config: CmsConfig, request: CreateMarkdownPageRequest): Promise<CreateMarkdownPageResponse>;
|
|
6
|
-
/**
|
|
7
|
-
* Update an existing markdown page
|
|
8
|
-
*/
|
|
9
|
-
export declare function updateMarkdownPage(config: CmsConfig, request: UpdateMarkdownPageRequest): Promise<UpdateMarkdownPageResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Fetch markdown content from a file path
|
|
12
|
-
*/
|
|
13
|
-
export declare function fetchMarkdownContent(config: CmsConfig, filePath: string): Promise<{
|
|
14
|
-
content: string;
|
|
15
|
-
frontmatter: Record<string, unknown>;
|
|
16
|
-
} | null>;
|
|
17
|
-
/**
|
|
18
|
-
* Fetch media library items
|
|
19
|
-
*/
|
|
20
|
-
export declare function fetchMediaLibrary(config: CmsConfig, cursor?: string, limit?: number): Promise<{
|
|
21
|
-
items: MediaItem[];
|
|
22
|
-
hasMore: boolean;
|
|
23
|
-
cursor?: string;
|
|
24
|
-
}>;
|
|
25
|
-
/**
|
|
26
|
-
* Upload a media file
|
|
27
|
-
*/
|
|
28
|
-
export declare function uploadMedia(config: CmsConfig, file: File, onProgress?: (percent: number) => void): Promise<MediaUploadResponse>;
|
|
29
|
-
/**
|
|
30
|
-
* Delete a media item
|
|
31
|
-
*/
|
|
32
|
-
export declare function deleteMedia(config: CmsConfig, mediaId: string): Promise<{
|
|
33
|
-
success: boolean;
|
|
34
|
-
error?: string;
|
|
35
|
-
}>;
|
|
36
|
-
//# sourceMappingURL=markdown-api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-api.d.ts","sourceRoot":"","sources":["../../../src/editor/markdown-api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,SAAS,EACT,yBAAyB,EACzB,0BAA0B,EAC1B,SAAS,EACT,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,MAAM,SAAS,CAAA;AAwBhB;;GAEG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,yBAAyB,GAChC,OAAO,CAAC,0BAA0B,CAAC,CAmBrC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,yBAAyB,GAChC,OAAO,CAAC,0BAA0B,CAAC,CAmBrC;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAc3E;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,SAAK,GACR,OAAO,CAAC;IAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBpE;AAED;;GAEG;AACH,wBAAsB,WAAW,CAChC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,IAAI,EACV,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACpC,OAAO,CAAC,mBAAmB,CAAC,CA4C9B;AAED;;GAEG;AACH,wBAAsB,WAAW,CAChC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAe/C"}
|