@puckeditor/core 0.24.0 → 0.24.1-canary.1bbb39de
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-LJSLIQQP.mjs → Editor-CSDCBYXY.mjs} +4 -3
- package/dist/{chunk-DQXMVPVM.mjs → chunk-7CQJTM2E.mjs} +2 -2
- package/dist/{index-dKPCNzR1.d.ts → index-CT0X7S4r.d.ts} +3 -1
- package/dist/{index-D0qqZNSQ.d.mts → index-DDjbEIfs.d.mts} +3 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/index.mjs +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +4 -3
- package/dist/no-external.mjs +1 -1
- package/package.json +1 -1
|
@@ -79,7 +79,7 @@ function useSyncedEditor({
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
useEffect(() => {
|
|
82
|
-
if (!editor) return;
|
|
82
|
+
if (!editor || editor.isDestroyed) return;
|
|
83
83
|
const handleFocus = () => {
|
|
84
84
|
onFocusChange == null ? void 0 : onFocusChange(editor);
|
|
85
85
|
};
|
|
@@ -99,11 +99,12 @@ function useSyncedEditor({
|
|
|
99
99
|
}
|
|
100
100
|
}, [editor, debouncedState, onChange, appStoreApi, name]);
|
|
101
101
|
useEffect(() => {
|
|
102
|
-
editor
|
|
102
|
+
if (!editor || editor.isDestroyed) return;
|
|
103
|
+
editor.setEditable(editable);
|
|
103
104
|
}, [editor, editable]);
|
|
104
105
|
useEffect(() => {
|
|
105
106
|
var _a;
|
|
106
|
-
if (!editor) return;
|
|
107
|
+
if (!editor || editor.isDestroyed) return;
|
|
107
108
|
if (isPending) {
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
@@ -2370,7 +2370,7 @@ EditorFallback.displayName = "EditorFallback";
|
|
|
2370
2370
|
// components/AutoField/fields/RichtextField/index.tsx
|
|
2371
2371
|
import { Fragment as Fragment5, jsx as jsx20 } from "react/jsx-runtime";
|
|
2372
2372
|
var Editor = lazy(
|
|
2373
|
-
() => import("./Editor-
|
|
2373
|
+
() => import("./Editor-CSDCBYXY.mjs").then((m) => ({
|
|
2374
2374
|
default: m.Editor
|
|
2375
2375
|
}))
|
|
2376
2376
|
);
|
|
@@ -6052,7 +6052,7 @@ import {
|
|
|
6052
6052
|
} from "react";
|
|
6053
6053
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
6054
6054
|
var Editor2 = lazy2(
|
|
6055
|
-
() => import("./Editor-
|
|
6055
|
+
() => import("./Editor-CSDCBYXY.mjs").then((m) => ({
|
|
6056
6056
|
default: m.Editor
|
|
6057
6057
|
}))
|
|
6058
6058
|
);
|
|
@@ -143,10 +143,12 @@ declare const defaultDictionary: {
|
|
|
143
143
|
readonly "loader-loading": "loading";
|
|
144
144
|
};
|
|
145
145
|
type DictionaryKey = keyof typeof defaultDictionary;
|
|
146
|
+
type BaseDictionary = Partial<Record<DictionaryKey, string> & Record<string, string>>;
|
|
146
147
|
/**
|
|
147
148
|
* Override any of Puck's built-in UI strings, or provide your own custom strings.
|
|
148
149
|
*/
|
|
149
|
-
|
|
150
|
+
interface Dictionary extends BaseDictionary {
|
|
151
|
+
}
|
|
150
152
|
|
|
151
153
|
type Status = "LOADING" | "MOUNTED" | "READY";
|
|
152
154
|
type ZoomConfig = {
|
|
@@ -143,10 +143,12 @@ declare const defaultDictionary: {
|
|
|
143
143
|
readonly "loader-loading": "loading";
|
|
144
144
|
};
|
|
145
145
|
type DictionaryKey = keyof typeof defaultDictionary;
|
|
146
|
+
type BaseDictionary = Partial<Record<DictionaryKey, string> & Record<string, string>>;
|
|
146
147
|
/**
|
|
147
148
|
* Override any of Puck's built-in UI strings, or provide your own custom strings.
|
|
148
149
|
*/
|
|
149
|
-
|
|
150
|
+
interface Dictionary extends BaseDictionary {
|
|
151
|
+
}
|
|
150
152
|
|
|
151
153
|
type Status = "LOADING" | "MOUNTED" | "READY";
|
|
152
154
|
type ZoomConfig = {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, aq as UserGenerics, D as Data, ap as UiState, a0 as OnAction, a3 as Permissions, a4 as Plugin, a2 as Overrides, R as FieldTransforms, a7 as PuckAction, as as Viewports, U as IframeConfig, z as DndConfig, V as InitialHistory, Z as Metadata, ac as ResolveDataTrigger, W as ItemSelector, j as ComponentData, a5 as PluginInternal } from './actions-Dgllwd-W.mjs';
|
|
2
2
|
export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, M as FieldMetadata, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, S as Fields, T as History, X as ItemWithId, Y as MappedItem, _ as NumberField, $ as ObjectField, a1 as OverrideKey, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ar as Viewport, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.mjs';
|
|
3
|
-
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
3
|
+
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DDjbEIfs.mjs';
|
|
4
4
|
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BA4pi921.mjs';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, ElementType, Ref, CSSProperties } from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, aq as UserGenerics, D as Data, ap as UiState, a0 as OnAction, a3 as Permissions, a4 as Plugin, a2 as Overrides, R as FieldTransforms, a7 as PuckAction, as as Viewports, U as IframeConfig, z as DndConfig, V as InitialHistory, Z as Metadata, ac as ResolveDataTrigger, W as ItemSelector, j as ComponentData, a5 as PluginInternal } from './actions-Dgllwd-W.js';
|
|
2
2
|
export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, M as FieldMetadata, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, S as Fields, T as History, X as ItemWithId, Y as MappedItem, _ as NumberField, $ as ObjectField, a1 as OverrideKey, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ar as Viewport, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.js';
|
|
3
|
-
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
3
|
+
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-CT0X7S4r.js';
|
|
4
4
|
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-zKkZGcaE.js';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, ElementType, Ref, CSSProperties } from 'react';
|
package/dist/index.js
CHANGED
|
@@ -5584,7 +5584,7 @@ function useSyncedEditor({
|
|
|
5584
5584
|
}
|
|
5585
5585
|
});
|
|
5586
5586
|
(0, import_react40.useEffect)(() => {
|
|
5587
|
-
if (!editor) return;
|
|
5587
|
+
if (!editor || editor.isDestroyed) return;
|
|
5588
5588
|
const handleFocus = () => {
|
|
5589
5589
|
onFocusChange == null ? void 0 : onFocusChange(editor);
|
|
5590
5590
|
};
|
|
@@ -5604,11 +5604,12 @@ function useSyncedEditor({
|
|
|
5604
5604
|
}
|
|
5605
5605
|
}, [editor, debouncedState, onChange, appStoreApi, name]);
|
|
5606
5606
|
(0, import_react40.useEffect)(() => {
|
|
5607
|
-
editor
|
|
5607
|
+
if (!editor || editor.isDestroyed) return;
|
|
5608
|
+
editor.setEditable(editable);
|
|
5608
5609
|
}, [editor, editable]);
|
|
5609
5610
|
(0, import_react40.useEffect)(() => {
|
|
5610
5611
|
var _a;
|
|
5611
|
-
if (!editor) return;
|
|
5612
|
+
if (!editor || editor.isDestroyed) return;
|
|
5612
5613
|
if (isPending) {
|
|
5613
5614
|
return;
|
|
5614
5615
|
}
|
package/dist/index.mjs
CHANGED
package/dist/internal.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
2
|
import { D as Data, a as AppState, a0 as OnAction, a6 as PrivateAppState, a7 as PuckAction } from './actions-Dgllwd-W.mjs';
|
|
3
|
-
import { A as AppStore } from './index-
|
|
3
|
+
import { A as AppStore } from './index-DDjbEIfs.mjs';
|
|
4
4
|
import '@tiptap/react';
|
|
5
5
|
import '@tiptap/extension-blockquote';
|
|
6
6
|
import '@tiptap/extension-bold';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
2
|
import { D as Data, a as AppState, a0 as OnAction, a6 as PrivateAppState, a7 as PuckAction } from './actions-Dgllwd-W.js';
|
|
3
|
-
import { A as AppStore } from './index-
|
|
3
|
+
import { A as AppStore } from './index-CT0X7S4r.js';
|
|
4
4
|
import '@tiptap/react';
|
|
5
5
|
import '@tiptap/extension-blockquote';
|
|
6
6
|
import '@tiptap/extension-bold';
|
package/dist/no-external.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, j as ComponentData, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, n as Config, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, D as Data, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, z as DndConfig, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, K as Field, L as FieldGroupVariant, M as FieldMetadata, N as FieldProps, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, R as FieldTransforms, S as Fields, T as History, U as IframeConfig, V as InitialHistory, X as ItemWithId, Y as MappedItem, Z as Metadata, _ as NumberField, $ as ObjectField, a0 as OnAction, a1 as OverrideKey, a2 as Overrides, a3 as Permissions, a4 as Plugin, a7 as PuckAction, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ac as ResolveDataTrigger, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as UiState, aq as UserGenerics, ar as Viewport, as as Viewports, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.mjs';
|
|
2
|
-
export { D as Dictionary } from './index-
|
|
2
|
+
export { D as Dictionary } from './index-DDjbEIfs.mjs';
|
|
3
3
|
export { Action, ActionBar, AutoField, BlocksPluginProps, Button, DragHandle, Drawer, DropZone, FieldGroup, FieldLabel, FieldTab, Group, IconButton, InlineTextField, Label, OutlinePluginProps, Puck, PuckApi, Render, RichTextMenu, Separator, UsePuckData, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
|
|
4
4
|
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BA4pi921.mjs';
|
|
5
5
|
import 'react';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, j as ComponentData, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, n as Config, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, D as Data, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, z as DndConfig, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, K as Field, L as FieldGroupVariant, M as FieldMetadata, N as FieldProps, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, R as FieldTransforms, S as Fields, T as History, U as IframeConfig, V as InitialHistory, X as ItemWithId, Y as MappedItem, Z as Metadata, _ as NumberField, $ as ObjectField, a0 as OnAction, a1 as OverrideKey, a2 as Overrides, a3 as Permissions, a4 as Plugin, a7 as PuckAction, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ac as ResolveDataTrigger, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as UiState, aq as UserGenerics, ar as Viewport, as as Viewports, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.js';
|
|
2
|
-
export { D as Dictionary } from './index-
|
|
2
|
+
export { D as Dictionary } from './index-CT0X7S4r.js';
|
|
3
3
|
export { Action, ActionBar, AutoField, BlocksPluginProps, Button, DragHandle, Drawer, DropZone, FieldGroup, FieldLabel, FieldTab, Group, IconButton, InlineTextField, Label, OutlinePluginProps, Puck, PuckApi, Render, RichTextMenu, Separator, UsePuckData, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.js';
|
|
4
4
|
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-zKkZGcaE.js';
|
|
5
5
|
import 'react';
|
package/dist/no-external.js
CHANGED
|
@@ -5584,7 +5584,7 @@ function useSyncedEditor({
|
|
|
5584
5584
|
}
|
|
5585
5585
|
});
|
|
5586
5586
|
(0, import_react40.useEffect)(() => {
|
|
5587
|
-
if (!editor) return;
|
|
5587
|
+
if (!editor || editor.isDestroyed) return;
|
|
5588
5588
|
const handleFocus = () => {
|
|
5589
5589
|
onFocusChange == null ? void 0 : onFocusChange(editor);
|
|
5590
5590
|
};
|
|
@@ -5604,11 +5604,12 @@ function useSyncedEditor({
|
|
|
5604
5604
|
}
|
|
5605
5605
|
}, [editor, debouncedState, onChange, appStoreApi, name]);
|
|
5606
5606
|
(0, import_react40.useEffect)(() => {
|
|
5607
|
-
editor
|
|
5607
|
+
if (!editor || editor.isDestroyed) return;
|
|
5608
|
+
editor.setEditable(editable);
|
|
5608
5609
|
}, [editor, editable]);
|
|
5609
5610
|
(0, import_react40.useEffect)(() => {
|
|
5610
5611
|
var _a;
|
|
5611
|
-
if (!editor) return;
|
|
5612
|
+
if (!editor || editor.isDestroyed) return;
|
|
5612
5613
|
if (isPending) {
|
|
5613
5614
|
return;
|
|
5614
5615
|
}
|
package/dist/no-external.mjs
CHANGED