@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-editor.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/attribute-editor.tsx"],"names":[],"mappings":"AAuXA,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,oBAAoB,uCAwNhE"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { InsertPosition } from '../types';
|
|
2
|
-
export interface BlockEditorProps {
|
|
3
|
-
visible: boolean;
|
|
4
|
-
componentId: string | null;
|
|
5
|
-
rect: DOMRect | null;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
onUpdateProps: (componentId: string, props: Record<string, any>) => void;
|
|
8
|
-
onInsertComponent: (position: InsertPosition, referenceComponentId: string, componentName: string, props: Record<string, any>) => void;
|
|
9
|
-
onRemoveBlock: (componentId: string) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function BlockEditor({ visible, componentId, rect, onClose, onUpdateProps, onInsertComponent, onRemoveBlock, }: BlockEditorProps): import("preact").JSX.Element | null;
|
|
12
|
-
//# sourceMappingURL=block-editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-editor.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/block-editor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,UAAU,CAAA;AAE7D,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IACxE,iBAAiB,EAAE,CAClB,QAAQ,EAAE,cAAc,EACxB,oBAAoB,EAAE,MAAM,EAC5B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACtB,IAAI,CAAA;IACT,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C;AAID,wBAAgB,WAAW,CAAC,EAC3B,OAAO,EACP,WAAW,EACX,IAAI,EACJ,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,aAAa,GACb,EAAE,gBAAgB,uCA0hBlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collections-browser.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/collections-browser.tsx"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,wCA4LjC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Attribute, AvailableColors } from '../types';
|
|
2
|
-
export interface ColorToolbarProps {
|
|
3
|
-
visible: boolean;
|
|
4
|
-
rect: DOMRect | null;
|
|
5
|
-
element: HTMLElement | null;
|
|
6
|
-
availableColors: AvailableColors | undefined;
|
|
7
|
-
currentClasses: Record<string, Attribute> | undefined;
|
|
8
|
-
onColorChange?: (type: 'bg' | 'text' | 'border' | 'hoverBg' | 'hoverText', oldClass: string, newClass: string, previousClassName: string, previousStyleCssText: string) => void;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function ColorToolbar({ visible, rect, element, availableColors, currentClasses, onColorChange, onClose, }: ColorToolbarProps): import("preact").JSX.Element | null;
|
|
12
|
-
//# sourceMappingURL=color-toolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-toolbar.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/color-toolbar.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,eAAe,EAAE,eAAe,GAAG,SAAS,CAAA;IAC5C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,CAAA;IACrD,aAAa,CAAC,EAAE,CACf,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,EACxD,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,oBAAoB,EAAE,MAAM,KACxB,IAAI,CAAA;IACT,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAyJD,wBAAgB,YAAY,CAAC,EAC5B,OAAO,EACP,IAAI,EACJ,OAAO,EACP,eAAe,EACf,cAAc,EACd,aAAa,EACb,OAAO,GACP,EAAE,iBAAiB,uCAiInB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/confirm-dialog.tsx"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,wCAiE5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-page-modal.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/create-page-modal.tsx"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,wCAuH9B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface EditableHighlightsProps {
|
|
2
|
-
visible: boolean;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Renders lightweight dashed outlines around all editable elements.
|
|
6
|
-
* Uses a single canvas-like approach with Shadow DOM for performance.
|
|
7
|
-
*/
|
|
8
|
-
export declare function EditableHighlights({ visible }: EditableHighlightsProps): import("preact").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=editable-highlights.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editable-highlights.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/editable-highlights.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACvC,OAAO,EAAE,OAAO,CAAA;CAChB;AAQD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,uBAAuB,gCA0ItE"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Component, type ComponentChildren } from 'preact';
|
|
2
|
-
interface ErrorBoundaryProps {
|
|
3
|
-
children: ComponentChildren;
|
|
4
|
-
fallback?: ComponentChildren;
|
|
5
|
-
onError?: (error: Error, errorInfo: {
|
|
6
|
-
componentStack: string;
|
|
7
|
-
}) => void;
|
|
8
|
-
componentName?: string;
|
|
9
|
-
}
|
|
10
|
-
interface ErrorBoundaryState {
|
|
11
|
-
hasError: boolean;
|
|
12
|
-
error: Error | null;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Error boundary component to catch and handle errors in CMS UI components.
|
|
16
|
-
* Prevents the entire CMS overlay from crashing when a component fails.
|
|
17
|
-
*/
|
|
18
|
-
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
19
|
-
constructor(props: ErrorBoundaryProps);
|
|
20
|
-
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
21
|
-
componentDidCatch(error: Error, errorInfo: {
|
|
22
|
-
componentStack: string;
|
|
23
|
-
}): void;
|
|
24
|
-
private handleRetry;
|
|
25
|
-
render(): ComponentChildren;
|
|
26
|
-
}
|
|
27
|
-
export declare const SilentErrorFallback: () => null;
|
|
28
|
-
export declare const CompactErrorFallback: ({ message }: {
|
|
29
|
-
message?: string;
|
|
30
|
-
}) => import("preact").JSX.Element;
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=error-boundary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAE1D,UAAU,kBAAkB;IAC3B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACvE,aAAa,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,UAAU,kBAAkB;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CACnB;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACvE,KAAK,EAAE,kBAAkB;WAKrB,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAMrF,OAAO,CAAC,WAAW,CAElB;IAED,MAAM;CAmCN;AAED,eAAO,MAAM,mBAAmB,YAAa,CAAA;AAE7C,eAAO,MAAM,oBAAoB,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,iCASrE,CAAA"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export declare function FieldLabel({ label, isDirty, onReset }: {
|
|
2
|
-
label: string;
|
|
3
|
-
isDirty?: boolean;
|
|
4
|
-
onReset?: () => void;
|
|
5
|
-
}): import("preact").JSX.Element;
|
|
6
|
-
export interface TextFieldProps {
|
|
7
|
-
label: string;
|
|
8
|
-
value: string | undefined;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
onChange: (value: string) => void;
|
|
11
|
-
isDirty?: boolean;
|
|
12
|
-
onReset?: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function TextField({ label, value, placeholder, onChange, isDirty, onReset }: TextFieldProps): import("preact").JSX.Element;
|
|
15
|
-
export interface ImageFieldProps {
|
|
16
|
-
label: string;
|
|
17
|
-
value: string | undefined;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
onChange: (value: string) => void;
|
|
20
|
-
onBrowse: () => void;
|
|
21
|
-
isDirty?: boolean;
|
|
22
|
-
onReset?: () => void;
|
|
23
|
-
}
|
|
24
|
-
export declare function ImageField({ label, value, placeholder, onChange, onBrowse, isDirty, onReset }: ImageFieldProps): import("preact").JSX.Element;
|
|
25
|
-
export interface SelectFieldProps {
|
|
26
|
-
label: string;
|
|
27
|
-
value: string | undefined;
|
|
28
|
-
options: Array<{
|
|
29
|
-
value: string;
|
|
30
|
-
label: string;
|
|
31
|
-
}>;
|
|
32
|
-
onChange: (value: string) => void;
|
|
33
|
-
isDirty?: boolean;
|
|
34
|
-
onReset?: () => void;
|
|
35
|
-
allowEmpty?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export declare function SelectField({ label, value, options, onChange, isDirty, onReset, allowEmpty }: SelectFieldProps): import("preact").JSX.Element;
|
|
38
|
-
export interface ToggleFieldProps {
|
|
39
|
-
label: string;
|
|
40
|
-
value: boolean | undefined;
|
|
41
|
-
onChange: (value: boolean) => void;
|
|
42
|
-
isDirty?: boolean;
|
|
43
|
-
onReset?: () => void;
|
|
44
|
-
}
|
|
45
|
-
export declare function ToggleField({ label, value, onChange, isDirty, onReset }: ToggleFieldProps): import("preact").JSX.Element;
|
|
46
|
-
export interface NumberFieldProps {
|
|
47
|
-
label: string;
|
|
48
|
-
value: number | undefined;
|
|
49
|
-
placeholder?: string;
|
|
50
|
-
min?: number;
|
|
51
|
-
max?: number;
|
|
52
|
-
onChange: (value: number | undefined) => void;
|
|
53
|
-
isDirty?: boolean;
|
|
54
|
-
onReset?: () => void;
|
|
55
|
-
}
|
|
56
|
-
export declare function NumberField({ label, value, placeholder, min, max, onChange, isDirty, onReset }: NumberFieldProps): import("preact").JSX.Element;
|
|
57
|
-
export declare function HighlightMatch({ text, query }: {
|
|
58
|
-
text: string;
|
|
59
|
-
query: string;
|
|
60
|
-
}): import("preact").JSX.Element;
|
|
61
|
-
export interface ComboBoxFieldProps {
|
|
62
|
-
label: string;
|
|
63
|
-
value: string | undefined;
|
|
64
|
-
placeholder?: string;
|
|
65
|
-
options: Array<{
|
|
66
|
-
value: string;
|
|
67
|
-
label: string;
|
|
68
|
-
description?: string;
|
|
69
|
-
}>;
|
|
70
|
-
onChange: (value: string) => void;
|
|
71
|
-
isDirty?: boolean;
|
|
72
|
-
onReset?: () => void;
|
|
73
|
-
}
|
|
74
|
-
export declare function ComboBoxField({ label, value, placeholder, options, onChange, isDirty, onReset }: ComboBoxFieldProps): import("preact").JSX.Element;
|
|
75
|
-
//# sourceMappingURL=fields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/fields.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CollectionDefinition, FieldDefinition, MarkdownPageEntry } from '../types';
|
|
2
|
-
interface FrontmatterFieldProps {
|
|
3
|
-
fieldKey: string;
|
|
4
|
-
value: unknown;
|
|
5
|
-
onChange: (value: unknown) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function FrontmatterField({ fieldKey, value, onChange, }: FrontmatterFieldProps): import("preact").JSX.Element;
|
|
8
|
-
interface CreateModeFrontmatterProps {
|
|
9
|
-
page: MarkdownPageEntry;
|
|
10
|
-
collectionDefinition: CollectionDefinition;
|
|
11
|
-
onSlugManualEdit: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function CreateModeFrontmatter({ page, collectionDefinition, onSlugManualEdit, }: CreateModeFrontmatterProps): import("preact").JSX.Element;
|
|
14
|
-
interface EditModeFrontmatterProps {
|
|
15
|
-
page: MarkdownPageEntry;
|
|
16
|
-
collectionDefinition?: CollectionDefinition;
|
|
17
|
-
}
|
|
18
|
-
export declare function EditModeFrontmatter({ page, collectionDefinition, }: EditModeFrontmatterProps): import("preact").JSX.Element;
|
|
19
|
-
interface SchemaFrontmatterFieldProps {
|
|
20
|
-
field: FieldDefinition;
|
|
21
|
-
value: unknown;
|
|
22
|
-
onChange: (value: unknown) => void;
|
|
23
|
-
}
|
|
24
|
-
export declare function SchemaFrontmatterField({ field, value, onChange, }: SchemaFrontmatterFieldProps): import("preact").JSX.Element;
|
|
25
|
-
export declare function formatFieldLabel(name: string): string;
|
|
26
|
-
export declare function getPlaceholder(field: FieldDefinition): string;
|
|
27
|
-
export declare function slugify(text: string): string;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=frontmatter-fields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatter-fields.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/frontmatter-fields.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAOxF,UAAU,qBAAqB;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAChC,QAAQ,EACR,KAAK,EACL,QAAQ,GACR,EAAE,qBAAqB,gCAwGvB;AAMD,UAAU,0BAA0B;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,wBAAgB,qBAAqB,CAAC,EACrC,IAAI,EACJ,oBAAoB,EACpB,gBAAgB,GAChB,EAAE,0BAA0B,gCA4C5B;AAMD,UAAU,wBAAwB;IACjC,IAAI,EAAE,iBAAiB,CAAA;IACvB,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;CAC3C;AAED,wBAAgB,mBAAmB,CAAC,EACnC,IAAI,EACJ,oBAAoB,GACpB,EAAE,wBAAwB,gCA+D1B;AAMD,UAAU,2BAA2B;IACpC,KAAK,EAAE,eAAe,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CAClC;AAED,wBAAgB,sBAAsB,CAAC,EACtC,KAAK,EACL,KAAK,EACL,QAAQ,GACR,EAAE,2BAA2B,gCA4J7B;AAMD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAc7D;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO5C"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shadow DOM-based highlight overlay for CMS elements.
|
|
3
|
-
* This component renders highlights without modifying the target element's styles.
|
|
4
|
-
*/
|
|
5
|
-
export interface HighlightState {
|
|
6
|
-
color: string;
|
|
7
|
-
style: 'solid' | 'dashed';
|
|
8
|
-
visible: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Custom element that renders a highlight overlay using Shadow DOM
|
|
12
|
-
*/
|
|
13
|
-
declare class CmsHighlightOverlay extends HTMLElement {
|
|
14
|
-
private shadow;
|
|
15
|
-
private overlayElement;
|
|
16
|
-
private resizeObserver;
|
|
17
|
-
private targetElement;
|
|
18
|
-
private animationFrameId;
|
|
19
|
-
constructor();
|
|
20
|
-
connectedCallback(): void;
|
|
21
|
-
disconnectedCallback(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Set the target element to highlight
|
|
24
|
-
*/
|
|
25
|
-
setTarget(element: HTMLElement): void;
|
|
26
|
-
/**
|
|
27
|
-
* Set the highlight style
|
|
28
|
-
*/
|
|
29
|
-
setHighlightStyle(color: string, style: 'solid' | 'dashed'): void;
|
|
30
|
-
/**
|
|
31
|
-
* Update position to match target element
|
|
32
|
-
*/
|
|
33
|
-
private updatePosition;
|
|
34
|
-
/**
|
|
35
|
-
* Start continuous position tracking for scroll/resize
|
|
36
|
-
*/
|
|
37
|
-
private startPositionTracking;
|
|
38
|
-
/**
|
|
39
|
-
* Stop position tracking
|
|
40
|
-
*/
|
|
41
|
-
private stopPositionTracking;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Initialize the highlight container
|
|
45
|
-
*/
|
|
46
|
-
export declare function initHighlightContainer(): void;
|
|
47
|
-
/**
|
|
48
|
-
* Clean up the highlight container
|
|
49
|
-
*/
|
|
50
|
-
export declare function destroyHighlightContainer(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Set highlight outline on an element using Shadow DOM overlay
|
|
53
|
-
*/
|
|
54
|
-
export declare function setElementHighlight(el: HTMLElement, color: string, style?: 'solid' | 'dashed'): void;
|
|
55
|
-
/**
|
|
56
|
-
* Clear highlight from an element
|
|
57
|
-
*/
|
|
58
|
-
export declare function clearElementHighlight(el: HTMLElement): void;
|
|
59
|
-
/**
|
|
60
|
-
* Clear all highlights
|
|
61
|
-
*/
|
|
62
|
-
export declare function clearAllHighlights(): void;
|
|
63
|
-
export { CmsHighlightOverlay };
|
|
64
|
-
//# sourceMappingURL=highlight-overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-overlay.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/highlight-overlay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CAChB;AAWD;;GAEG;AACH,cAAM,mBAAoB,SAAQ,WAAW;IAC5C,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,aAAa,CAA2B;IAChD,OAAO,CAAC,gBAAgB,CAAsB;;IAgC9C,iBAAiB;IAIjB,oBAAoB;IAIpB;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,WAAW;IAe9B;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,QAAQ;IAM1D;;OAEG;IACH,OAAO,CAAC,cAAc;IActB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAU5B;AAeD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAkB7C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAKhD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,OAAO,GAAG,QAAkB,GACjC,IAAI,CAaN;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAM3D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC;AAGD,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface ImageOverlayProps {
|
|
2
|
-
visible: boolean;
|
|
3
|
-
rect: DOMRect | null;
|
|
4
|
-
element: HTMLImageElement | null;
|
|
5
|
-
cmsId: string | null;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Shadow DOM-based image overlay component.
|
|
9
|
-
* Shows a clickable overlay on image elements to guide users to replace images.
|
|
10
|
-
*/
|
|
11
|
-
export declare function ImageOverlay({ visible, rect, element, cmsId }: ImageOverlayProps): import("preact").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=image-overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image-overlay.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/image-overlay.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IACjC,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;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,iBAAiB,gCAsNhF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wrapper component that renders the editor in place of markdown content.
|
|
3
|
-
* Supports both "edit" mode (existing page) and "create" mode (new page).
|
|
4
|
-
*/
|
|
5
|
-
export declare function MarkdownEditorOverlay(): import("preact").JSX.Element | null;
|
|
6
|
-
//# sourceMappingURL=markdown-editor-overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-editor-overlay.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/markdown-editor-overlay.tsx"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,wBAAgB,qBAAqB,wCAiepC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@milkdown/core';
|
|
2
|
-
export interface MarkdownInlineEditorProps {
|
|
3
|
-
elementId: string;
|
|
4
|
-
initialContent: string;
|
|
5
|
-
onSave: (content: string) => void;
|
|
6
|
-
onCancel: () => void;
|
|
7
|
-
onEditorReady?: (editor: Editor) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare function MarkdownInlineEditor({ elementId, initialContent, onSave, onCancel, onEditorReady, }: MarkdownInlineEditorProps): import("preact").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=markdown-inline-editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-inline-editor.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/markdown-inline-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,EAA0B,MAAM,gBAAgB,CAAA;AAkB7F,MAAM,WAAW,yBAAyB;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,wBAAgB,oBAAoB,CAAC,EACpC,SAAS,EACT,cAAc,EACd,MAAM,EACN,QAAQ,EACR,aAAa,GACb,EAAE,yBAAyB,gCA6sB3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-library.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/media-library.tsx"],"names":[],"mappings":"AAeA,wBAAgB,YAAY,wCAyR3B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface OutlineProps {
|
|
2
|
-
visible: boolean;
|
|
3
|
-
rect: DOMRect | null;
|
|
4
|
-
isComponent?: boolean;
|
|
5
|
-
componentName?: string;
|
|
6
|
-
tagName?: string;
|
|
7
|
-
/** The actual element being outlined - used for scroll tracking */
|
|
8
|
-
element?: HTMLElement | null;
|
|
9
|
-
/** CMS ID of the hovered element */
|
|
10
|
-
cmsId?: string | null;
|
|
11
|
-
/** Callback when a color swatch is clicked */
|
|
12
|
-
onColorClick?: (cmsId: string, rect: DOMRect) => void;
|
|
13
|
-
/** Callback when an attribute indicator is clicked */
|
|
14
|
-
onAttributeClick?: (cmsId: string, rect: DOMRect) => void;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Shadow DOM-based hover outline component.
|
|
18
|
-
* Uses a custom element with Shadow DOM to avoid style conflicts.
|
|
19
|
-
*/
|
|
20
|
-
export declare function Outline({ visible, rect, isComponent, componentName, tagName, element, cmsId, onColorClick, onAttributeClick }: OutlineProps): import("preact").JSX.Element;
|
|
21
|
-
//# sourceMappingURL=outline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/outline.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mEAAmE;IACnE,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrD,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACzD;AAOD;;;GAGG;AACH,wBAAgB,OAAO,CACtB,EAAE,OAAO,EAAE,IAAI,EAAE,WAAmB,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,EAAE,YAAY,gCAsX5H"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redirect-countdown.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/redirect-countdown.tsx"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,wCA0ChC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seo-editor.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/seo-editor.tsx"],"names":[],"mappings":"AAiFA,wBAAgB,SAAS,wCAgaxB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface TextStyleToolbarProps {
|
|
2
|
-
visible: boolean;
|
|
3
|
-
rect: DOMRect | null;
|
|
4
|
-
element: HTMLElement | null;
|
|
5
|
-
onStyleChange?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function TextStyleToolbar({ visible, rect, element, onStyleChange }: TextStyleToolbarProps): import("preact").JSX.Element | null;
|
|
8
|
-
//# sourceMappingURL=text-style-toolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-style-toolbar.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/text-style-toolbar.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B;AA8ED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,qBAAqB,uCAqQhG"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ToastMessage } from './types';
|
|
2
|
-
export interface ToastContainerProps {
|
|
3
|
-
toasts: ToastMessage[];
|
|
4
|
-
onRemove: (id: string) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const ToastContainer: ({ toasts, onRemove }: ToastContainerProps) => import("preact").JSX.Element;
|
|
7
|
-
//# sourceMappingURL=toast-container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast-container.d.ts","sourceRoot":"","sources":["../../../../../src/editor/components/toast/toast-container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,eAAO,MAAM,cAAc,GAAI,sBAAsB,mBAAmB,iCAMvE,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ToastMessage } from './types';
|
|
2
|
-
interface ToastProps extends ToastMessage {
|
|
3
|
-
onRemove: (id: string) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare const Toast: ({ id, message, type, onRemove }: ToastProps) => import("preact").JSX.Element;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../../src/editor/components/toast/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,UAAU,UAAW,SAAQ,YAAY;IACxC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,eAAO,MAAM,KAAK,GAAI,iCAAiC,UAAU,iCAwChE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/editor/components/toast/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEpD,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,SAAS,CAAA;CACf"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { CollectionDefinition } from '../types';
|
|
2
|
-
export interface ToolbarCallbacks {
|
|
3
|
-
onEdit: () => void;
|
|
4
|
-
onCompare: () => void;
|
|
5
|
-
onSave: () => void;
|
|
6
|
-
onDiscard: () => void;
|
|
7
|
-
onAIChat?: () => void;
|
|
8
|
-
onMediaLibrary?: () => void;
|
|
9
|
-
onDismissDeployment?: () => void;
|
|
10
|
-
onNavigateChange?: () => void;
|
|
11
|
-
onEditContent?: () => void;
|
|
12
|
-
onToggleHighlights?: () => void;
|
|
13
|
-
onSeoEditor?: () => void;
|
|
14
|
-
onOpenCollection?: (name: string) => void;
|
|
15
|
-
}
|
|
16
|
-
export interface ToolbarProps {
|
|
17
|
-
callbacks: ToolbarCallbacks;
|
|
18
|
-
collectionDefinitions?: Record<string, CollectionDefinition>;
|
|
19
|
-
}
|
|
20
|
-
export declare const Toolbar: ({ callbacks, collectionDefinitions }: ToolbarProps) => import("preact").JSX.Element | null;
|
|
21
|
-
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../src/editor/components/toolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAEpD,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,gBAAgB,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;CAC5D;AAsED,eAAO,MAAM,OAAO,GAAI,sCAAsC,YAAY,wCAuPzE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/editor/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,eAAO,MAAM,cAAc,EAAE,SAI5B,CAAA;AAED,wBAAgB,SAAS,IAAI,SAAS,CAGrC"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constants for the CMS editor
|
|
3
|
-
* Centralizes magic numbers and configuration values
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Z-index layers for CMS UI elements.
|
|
7
|
-
* Uses high values to ensure CMS UI appears above all page content.
|
|
8
|
-
* Each layer is ordered from back to front.
|
|
9
|
-
*/
|
|
10
|
-
export declare const Z_INDEX: {
|
|
11
|
-
/** Highlight overlay for hovered elements */
|
|
12
|
-
readonly HIGHLIGHT: 2147483645;
|
|
13
|
-
/** Overlay backdrop for modals */
|
|
14
|
-
readonly OVERLAY: 2147483646;
|
|
15
|
-
/** Modal panels (block editor, AI chat) */
|
|
16
|
-
readonly MODAL: 2147483647;
|
|
17
|
-
/** Toast notifications - always on top */
|
|
18
|
-
readonly TOAST: 2147483648;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Timing constants for UI interactions
|
|
22
|
-
*/
|
|
23
|
-
export declare const TIMING: {
|
|
24
|
-
/** Throttle interval for element detection during mouse move (ms) */
|
|
25
|
-
readonly ELEMENT_DETECTION_THROTTLE_MS: 16;
|
|
26
|
-
/** Delay before clearing focus state on blur (ms) */
|
|
27
|
-
readonly BLUR_DELAY_MS: 10;
|
|
28
|
-
/** Duration before toast starts fading out (ms) */
|
|
29
|
-
readonly TOAST_VISIBLE_DURATION_MS: 2200;
|
|
30
|
-
/** Duration of toast fade out animation (ms) */
|
|
31
|
-
readonly TOAST_FADE_DURATION_MS: 200;
|
|
32
|
-
/** Duration to show component insertion preview before removal (ms) */
|
|
33
|
-
readonly PREVIEW_SUCCESS_DURATION_MS: 3000;
|
|
34
|
-
/** Duration to show error preview before removal (ms) */
|
|
35
|
-
readonly PREVIEW_ERROR_DURATION_MS: 5000;
|
|
36
|
-
/** Delay before focusing input after expansion (ms) */
|
|
37
|
-
readonly FOCUS_DELAY_MS: 50;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Layout constants for UI positioning
|
|
41
|
-
*/
|
|
42
|
-
export declare const LAYOUT: {
|
|
43
|
-
/** Edge threshold for component selection (pixels from border) */
|
|
44
|
-
readonly COMPONENT_EDGE_THRESHOLD: 32;
|
|
45
|
-
/** Minimum space needed to show label outside the element */
|
|
46
|
-
readonly LABEL_OUTSIDE_THRESHOLD: 28;
|
|
47
|
-
/** Padding from viewport edges for sticky label */
|
|
48
|
-
readonly STICKY_PADDING: 8;
|
|
49
|
-
/** Default padding from viewport edges */
|
|
50
|
-
readonly VIEWPORT_PADDING: 16;
|
|
51
|
-
/** Default tooltip width */
|
|
52
|
-
readonly TOOLTIP_WIDTH: 200;
|
|
53
|
-
/** Expanded tooltip minimum width */
|
|
54
|
-
readonly TOOLTIP_EXPANDED_MIN_WIDTH: 280;
|
|
55
|
-
/** Expanded tooltip maximum width */
|
|
56
|
-
readonly TOOLTIP_EXPANDED_MAX_WIDTH: 320;
|
|
57
|
-
/** Block editor panel width */
|
|
58
|
-
readonly BLOCK_EDITOR_WIDTH: 400;
|
|
59
|
-
/** Block editor approximate height for positioning */
|
|
60
|
-
readonly BLOCK_EDITOR_HEIGHT: 500;
|
|
61
|
-
/** AI chat panel width */
|
|
62
|
-
readonly AI_CHAT_WIDTH: 400;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* API request configuration
|
|
66
|
-
*/
|
|
67
|
-
export declare const API: {
|
|
68
|
-
/** Default request timeout in milliseconds */
|
|
69
|
-
readonly REQUEST_TIMEOUT_MS: 30000;
|
|
70
|
-
/** AI streaming request timeout in milliseconds */
|
|
71
|
-
readonly AI_STREAM_TIMEOUT_MS: 120000;
|
|
72
|
-
/** Maximum retry attempts for failed requests */
|
|
73
|
-
readonly MAX_RETRIES: 3;
|
|
74
|
-
/** Base delay for exponential backoff (ms) */
|
|
75
|
-
readonly RETRY_BASE_DELAY_MS: 1000;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Storage keys for persistence
|
|
79
|
-
*/
|
|
80
|
-
export declare const STORAGE_KEYS: {
|
|
81
|
-
readonly PENDING_EDITS: "cms-pending-edits";
|
|
82
|
-
readonly PENDING_IMAGE_EDITS: "cms-pending-image-edits";
|
|
83
|
-
readonly PENDING_COLOR_EDITS: "cms-pending-color-edits";
|
|
84
|
-
readonly PENDING_ATTRIBUTE_EDITS: "cms-pending-attribute-edits";
|
|
85
|
-
readonly SETTINGS: "cms-settings";
|
|
86
|
-
readonly PENDING_ENTRY_NAVIGATION: "cms-pending-entry-navigation";
|
|
87
|
-
readonly IS_EDITING: "cms-is-editing";
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* CSS class prefixes and identifiers
|
|
91
|
-
*/
|
|
92
|
-
export declare const CSS: {
|
|
93
|
-
/** Data attribute for CMS UI elements (to prevent event propagation) */
|
|
94
|
-
readonly UI_ATTRIBUTE: "data-cms-ui";
|
|
95
|
-
/** Data attribute for CMS element IDs */
|
|
96
|
-
readonly ID_ATTRIBUTE: "data-cms-id";
|
|
97
|
-
/** Data attribute for component IDs */
|
|
98
|
-
readonly COMPONENT_ID_ATTRIBUTE: "data-cms-component-id";
|
|
99
|
-
/** Custom element tag for highlight overlay */
|
|
100
|
-
readonly HIGHLIGHT_ELEMENT: "cms-highlight-overlay";
|
|
101
|
-
};
|
|
102
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/editor/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,OAAO;IACnB,6CAA6C;;IAE7C,kCAAkC;;IAElC,2CAA2C;;IAE3C,0CAA0C;;CAEjC,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,MAAM;IAClB,qEAAqE;;IAErE,qDAAqD;;IAErD,mDAAmD;;IAEnD,gDAAgD;;IAEhD,uEAAuE;;IAEvE,yDAAyD;;IAEzD,uDAAuD;;CAE9C,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,MAAM;IAClB,kEAAkE;;IAElE,6DAA6D;;IAE7D,mDAAmD;;IAEnD,0CAA0C;;IAE1C,4BAA4B;;IAE5B,qCAAqC;;IAErC,qCAAqC;;IAErC,+BAA+B;;IAE/B,sDAAsD;;IAEtD,0BAA0B;;CAEjB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,GAAG;IACf,8CAA8C;;IAE9C,mDAAmD;;IAEnD,iDAAiD;;IAEjD,8CAA8C;;CAErC,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;CAQf,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,GAAG;IACf,wEAAwE;;IAExE,yCAAyC;;IAEzC,uCAAuC;;IAEvC,+CAA+C;;CAEtC,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CmsConfig, EditorState } from './types';
|
|
2
|
-
export interface CmsProviderProps {
|
|
3
|
-
children: any;
|
|
4
|
-
initialConfig?: CmsConfig;
|
|
5
|
-
initialState?: EditorState;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* CMS Provider component.
|
|
9
|
-
*
|
|
10
|
-
* With signals, this provider is mainly for initialization and legacy compatibility.
|
|
11
|
-
* New code should import signals directly rather than using context.
|
|
12
|
-
*/
|
|
13
|
-
export declare function CmsProvider({ children, initialConfig, initialState }: CmsProviderProps): import("preact").JSX.Element;
|
|
14
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/editor/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErD,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,GAAG,CAAA;IACb,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,gBAAgB,gCAqBtF"}
|