@puckeditor/core 0.24.1-canary.ab5624dd → 0.24.1-canary.caa28d2b
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/{actions-Dgllwd-W.d.mts → actions-0EHeGita.d.mts} +14 -2
- package/dist/{actions-Dgllwd-W.d.ts → actions-0EHeGita.d.ts} +14 -2
- package/dist/{chunk-7CQJTM2E.mjs → chunk-23JKXUXJ.mjs} +19 -13
- package/dist/{index-DDjbEIfs.d.mts → index-BPkpm4Az.d.mts} +1 -1
- package/dist/{index-CT0X7S4r.d.ts → index-UEGrr-Tp.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -12
- package/dist/index.mjs +1 -1
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +18 -12
- package/dist/no-external.mjs +1 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/{walk-tree-BA4pi921.d.mts → walk-tree-BFTZdvq8.d.mts} +1 -1
- package/dist/{walk-tree-zKkZGcaE.d.ts → walk-tree-vgdtHk4C.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -386,9 +386,21 @@ interface SlotField extends BaseField {
|
|
|
386
386
|
allow?: string[];
|
|
387
387
|
disallow?: string[];
|
|
388
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* Register your own field types by augmenting this interface.
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* declare module "@puckeditor/core" {
|
|
394
|
+
* interface FieldTypes {
|
|
395
|
+
* switch: { type: "switch"; options: string[] };
|
|
396
|
+
* }
|
|
397
|
+
* }
|
|
398
|
+
*/
|
|
399
|
+
interface FieldTypes {
|
|
400
|
+
}
|
|
389
401
|
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
390
402
|
[key: string]: any;
|
|
391
|
-
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
403
|
+
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField | (FieldTypes[keyof FieldTypes] & BaseField);
|
|
392
404
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
393
405
|
[PropName in keyof Omit<ComponentProps, "editMode">]: UserField extends {
|
|
394
406
|
type: PropertyKey;
|
|
@@ -925,4 +937,4 @@ type PuckAction = {
|
|
|
925
937
|
recordHistory?: boolean;
|
|
926
938
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
927
939
|
|
|
928
|
-
export { type
|
|
940
|
+
export { type NumberField as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldGroupVariant as L, type FieldMetadata as M, type FieldProps as N, type FieldRenderFunctions as O, type FieldTransformFn as P, type FieldTransformFnParams as Q, type FieldTransforms as R, type FieldTypes as S, type Fields as T, type History as U, type IframeConfig as V, type InitialHistory as W, type ItemSelector as X, type ItemWithId as Y, type MappedItem as Z, type Metadata as _, type AppState as a, type ObjectField as a0, type OnAction as a1, type OverrideKey as a2, type Overrides as a3, type Permissions as a4, type Plugin as a5, type PluginInternal as a6, type PrivateAppState as a7, type PuckAction as a8, type PuckComponent as a9, type PuckContext as aa, type PuckMetadata as ab, type RadioField as ac, type ResolveDataTrigger as ad, type RichText as ae, type RichtextField as af, type RootConfig as ag, type RootData as ah, type RootDataWithProps as ai, type RootDataWithoutProps as aj, type SelectField as ak, type Slot as al, type SlotComponent as am, type SlotField as an, type TextField as ao, type TextareaField as ap, type UiState as aq, type UserGenerics as ar, type Viewport as as, type Viewports as at, type WithChildren as au, type WithDefaultRootFieldProps as av, type WithId as aw, type WithPuckProps as ax, type WithSlotProps as ay, overrideKeys as az, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
|
|
@@ -386,9 +386,21 @@ interface SlotField extends BaseField {
|
|
|
386
386
|
allow?: string[];
|
|
387
387
|
disallow?: string[];
|
|
388
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* Register your own field types by augmenting this interface.
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* declare module "@puckeditor/core" {
|
|
394
|
+
* interface FieldTypes {
|
|
395
|
+
* switch: { type: "switch"; options: string[] };
|
|
396
|
+
* }
|
|
397
|
+
* }
|
|
398
|
+
*/
|
|
399
|
+
interface FieldTypes {
|
|
400
|
+
}
|
|
389
401
|
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
390
402
|
[key: string]: any;
|
|
391
|
-
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
403
|
+
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField | (FieldTypes[keyof FieldTypes] & BaseField);
|
|
392
404
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
393
405
|
[PropName in keyof Omit<ComponentProps, "editMode">]: UserField extends {
|
|
394
406
|
type: PropertyKey;
|
|
@@ -925,4 +937,4 @@ type PuckAction = {
|
|
|
925
937
|
recordHistory?: boolean;
|
|
926
938
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
927
939
|
|
|
928
|
-
export { type
|
|
940
|
+
export { type NumberField as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldGroupVariant as L, type FieldMetadata as M, type FieldProps as N, type FieldRenderFunctions as O, type FieldTransformFn as P, type FieldTransformFnParams as Q, type FieldTransforms as R, type FieldTypes as S, type Fields as T, type History as U, type IframeConfig as V, type InitialHistory as W, type ItemSelector as X, type ItemWithId as Y, type MappedItem as Z, type Metadata as _, type AppState as a, type ObjectField as a0, type OnAction as a1, type OverrideKey as a2, type Overrides as a3, type Permissions as a4, type Plugin as a5, type PluginInternal as a6, type PrivateAppState as a7, type PuckAction as a8, type PuckComponent as a9, type PuckContext as aa, type PuckMetadata as ab, type RadioField as ac, type ResolveDataTrigger as ad, type RichText as ae, type RichtextField as af, type RootConfig as ag, type RootData as ah, type RootDataWithProps as ai, type RootDataWithoutProps as aj, type SelectField as ak, type Slot as al, type SlotComponent as am, type SlotField as an, type TextField as ao, type TextareaField as ap, type UiState as aq, type UserGenerics as ar, type Viewport as as, type Viewports as at, type WithChildren as au, type WithDefaultRootFieldProps as av, type WithId as aw, type WithPuckProps as ax, type WithSlotProps as ay, overrideKeys as az, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
|
|
@@ -13984,7 +13984,7 @@ init_react_import();
|
|
|
13984
13984
|
|
|
13985
13985
|
// components/Puck/components/ResizeHandle/index.tsx
|
|
13986
13986
|
init_react_import();
|
|
13987
|
-
import { useCallback as useCallback29, useRef as useRef19 } from "react";
|
|
13987
|
+
import { useCallback as useCallback29, useEffect as useEffect32, useRef as useRef19 } from "react";
|
|
13988
13988
|
|
|
13989
13989
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/ResizeHandle/styles.module.css#css-module
|
|
13990
13990
|
init_react_import();
|
|
@@ -14005,6 +14005,7 @@ var ResizeHandle = ({
|
|
|
14005
14005
|
const isDragging = useRef19(false);
|
|
14006
14006
|
const startX = useRef19(0);
|
|
14007
14007
|
const startWidth = useRef19(0);
|
|
14008
|
+
const endDrag = useRef19(null);
|
|
14008
14009
|
const handleMouseMove = useCallback29(
|
|
14009
14010
|
(e) => {
|
|
14010
14011
|
if (!isDragging.current) return;
|
|
@@ -14017,18 +14018,10 @@ var ResizeHandle = ({
|
|
|
14017
14018
|
[onResize, position]
|
|
14018
14019
|
);
|
|
14019
14020
|
const handleMouseUp = useCallback29(() => {
|
|
14020
|
-
var _a;
|
|
14021
|
+
var _a, _b;
|
|
14021
14022
|
if (!isDragging.current) return;
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
document.body.style.userSelect = "";
|
|
14025
|
-
const overlay = document.getElementById("resize-overlay");
|
|
14026
|
-
if (overlay) {
|
|
14027
|
-
document.body.removeChild(overlay);
|
|
14028
|
-
}
|
|
14029
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
14030
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
14031
|
-
const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
14023
|
+
(_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
14024
|
+
const finalWidth = ((_b = sidebarRef.current) == null ? void 0 : _b.getBoundingClientRect().width) || 0;
|
|
14032
14025
|
onResizeEnd(finalWidth);
|
|
14033
14026
|
resetAutoZoom();
|
|
14034
14027
|
}, [onResizeEnd]);
|
|
@@ -14046,10 +14039,23 @@ var ResizeHandle = ({
|
|
|
14046
14039
|
document.body.appendChild(overlay);
|
|
14047
14040
|
document.addEventListener("mousemove", handleMouseMove);
|
|
14048
14041
|
document.addEventListener("mouseup", handleMouseUp);
|
|
14042
|
+
endDrag.current = () => {
|
|
14043
|
+
isDragging.current = false;
|
|
14044
|
+
document.body.style.cursor = "";
|
|
14045
|
+
document.body.style.userSelect = "";
|
|
14046
|
+
overlay.remove();
|
|
14047
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
14048
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
14049
|
+
endDrag.current = null;
|
|
14050
|
+
};
|
|
14049
14051
|
e.preventDefault();
|
|
14050
14052
|
},
|
|
14051
14053
|
[position, handleMouseMove, handleMouseUp]
|
|
14052
14054
|
);
|
|
14055
|
+
useEffect32(() => () => {
|
|
14056
|
+
var _a;
|
|
14057
|
+
return (_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
14058
|
+
}, []);
|
|
14053
14059
|
return /* @__PURE__ */ jsx69(
|
|
14054
14060
|
"div",
|
|
14055
14061
|
{
|
|
@@ -14084,7 +14090,7 @@ var Sidebar = ({
|
|
|
14084
14090
|
children
|
|
14085
14091
|
}
|
|
14086
14092
|
),
|
|
14087
|
-
/* @__PURE__ */ jsx70("div", { className: `${getClassName44("resizeHandle")}`, children: /* @__PURE__ */ jsx70(
|
|
14093
|
+
isVisible && /* @__PURE__ */ jsx70("div", { className: `${getClassName44("resizeHandle")}`, children: /* @__PURE__ */ jsx70(
|
|
14088
14094
|
ResizeHandle,
|
|
14089
14095
|
{
|
|
14090
14096
|
position,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as History, a4 as Permissions, j as ComponentData, n as Config, ar as UserGenerics, T as Fields, a8 as PuckAction, ai as RootDataWithProps, ad as ResolveDataTrigger, a5 as Plugin, a3 as Overrides, at as Viewports, V as IframeConfig, aq as UiState, g as ComponentConfig, a as AppState, _ as Metadata, z as DndConfig, R as FieldTransforms, af as RichtextField } from './actions-0EHeGita.mjs';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as History, a4 as Permissions, j as ComponentData, n as Config, ar as UserGenerics, T as Fields, a8 as PuckAction, ai as RootDataWithProps, ad as ResolveDataTrigger, a5 as Plugin, a3 as Overrides, at as Viewports, V as IframeConfig, aq as UiState, g as ComponentConfig, a as AppState, _ as Metadata, z as DndConfig, R as FieldTransforms, af as RichtextField } from './actions-0EHeGita.js';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config,
|
|
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
|
|
3
|
-
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
4
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, ar as UserGenerics, D as Data, aq as UiState, a1 as OnAction, a4 as Permissions, a5 as Plugin, a3 as Overrides, R as FieldTransforms, a8 as PuckAction, at as Viewports, V as IframeConfig, z as DndConfig, W as InitialHistory, _ as Metadata, ad as ResolveDataTrigger, X as ItemSelector, j as ComponentData, a6 as PluginInternal } from './actions-0EHeGita.mjs';
|
|
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 FieldTypes, T as Fields, U as History, Y as ItemWithId, Z as MappedItem, $ as NumberField, a0 as ObjectField, a2 as OverrideKey, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, as as Viewport, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.mjs';
|
|
3
|
+
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BPkpm4Az.mjs';
|
|
4
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BFTZdvq8.mjs';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, ElementType, Ref, CSSProperties } from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config,
|
|
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
|
|
3
|
-
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
4
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, ar as UserGenerics, D as Data, aq as UiState, a1 as OnAction, a4 as Permissions, a5 as Plugin, a3 as Overrides, R as FieldTransforms, a8 as PuckAction, at as Viewports, V as IframeConfig, z as DndConfig, W as InitialHistory, _ as Metadata, ad as ResolveDataTrigger, X as ItemSelector, j as ComponentData, a6 as PluginInternal } from './actions-0EHeGita.js';
|
|
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 FieldTypes, T as Fields, U as History, Y as ItemWithId, Z as MappedItem, $ as NumberField, a0 as ObjectField, a2 as OverrideKey, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, as as Viewport, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.js';
|
|
3
|
+
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-UEGrr-Tp.js';
|
|
4
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-vgdtHk4C.js';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, ElementType, Ref, CSSProperties } from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/dist/index.js
CHANGED
|
@@ -20306,6 +20306,7 @@ var ResizeHandle = ({
|
|
|
20306
20306
|
const isDragging = (0, import_react110.useRef)(false);
|
|
20307
20307
|
const startX = (0, import_react110.useRef)(0);
|
|
20308
20308
|
const startWidth = (0, import_react110.useRef)(0);
|
|
20309
|
+
const endDrag = (0, import_react110.useRef)(null);
|
|
20309
20310
|
const handleMouseMove = (0, import_react110.useCallback)(
|
|
20310
20311
|
(e) => {
|
|
20311
20312
|
if (!isDragging.current) return;
|
|
@@ -20318,18 +20319,10 @@ var ResizeHandle = ({
|
|
|
20318
20319
|
[onResize, position]
|
|
20319
20320
|
);
|
|
20320
20321
|
const handleMouseUp = (0, import_react110.useCallback)(() => {
|
|
20321
|
-
var _a;
|
|
20322
|
+
var _a, _b;
|
|
20322
20323
|
if (!isDragging.current) return;
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
document.body.style.userSelect = "";
|
|
20326
|
-
const overlay = document.getElementById("resize-overlay");
|
|
20327
|
-
if (overlay) {
|
|
20328
|
-
document.body.removeChild(overlay);
|
|
20329
|
-
}
|
|
20330
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
20331
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
20332
|
-
const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
20324
|
+
(_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20325
|
+
const finalWidth = ((_b = sidebarRef.current) == null ? void 0 : _b.getBoundingClientRect().width) || 0;
|
|
20333
20326
|
onResizeEnd(finalWidth);
|
|
20334
20327
|
resetAutoZoom();
|
|
20335
20328
|
}, [onResizeEnd]);
|
|
@@ -20347,10 +20340,23 @@ var ResizeHandle = ({
|
|
|
20347
20340
|
document.body.appendChild(overlay);
|
|
20348
20341
|
document.addEventListener("mousemove", handleMouseMove);
|
|
20349
20342
|
document.addEventListener("mouseup", handleMouseUp);
|
|
20343
|
+
endDrag.current = () => {
|
|
20344
|
+
isDragging.current = false;
|
|
20345
|
+
document.body.style.cursor = "";
|
|
20346
|
+
document.body.style.userSelect = "";
|
|
20347
|
+
overlay.remove();
|
|
20348
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
20349
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
20350
|
+
endDrag.current = null;
|
|
20351
|
+
};
|
|
20350
20352
|
e.preventDefault();
|
|
20351
20353
|
},
|
|
20352
20354
|
[position, handleMouseMove, handleMouseUp]
|
|
20353
20355
|
);
|
|
20356
|
+
(0, import_react110.useEffect)(() => () => {
|
|
20357
|
+
var _a;
|
|
20358
|
+
return (_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20359
|
+
}, []);
|
|
20354
20360
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20355
20361
|
"div",
|
|
20356
20362
|
{
|
|
@@ -20388,7 +20394,7 @@ var Sidebar = ({
|
|
|
20388
20394
|
children
|
|
20389
20395
|
}
|
|
20390
20396
|
),
|
|
20391
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20397
|
+
isVisible && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20392
20398
|
ResizeHandle,
|
|
20393
20399
|
{
|
|
20394
20400
|
position,
|
package/dist/index.mjs
CHANGED
package/dist/internal.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, a as AppState,
|
|
3
|
-
import { A as AppStore } from './index-
|
|
2
|
+
import { D as Data, a as AppState, a1 as OnAction, a7 as PrivateAppState, a8 as PuckAction } from './actions-0EHeGita.mjs';
|
|
3
|
+
import { A as AppStore } from './index-BPkpm4Az.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
|
-
import { D as Data, a as AppState,
|
|
3
|
-
import { A as AppStore } from './index-
|
|
2
|
+
import { D as Data, a as AppState, a1 as OnAction, a7 as PrivateAppState, a8 as PuckAction } from './actions-0EHeGita.js';
|
|
3
|
+
import { A as AppStore } from './index-UEGrr-Tp.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,7 +1,7 @@
|
|
|
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
|
|
2
|
-
export { D as Dictionary } from './index-
|
|
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 FieldTypes, T as Fields, U as History, V as IframeConfig, W as InitialHistory, Y as ItemWithId, Z as MappedItem, _ as Metadata, $ as NumberField, a0 as ObjectField, a1 as OnAction, a2 as OverrideKey, a3 as Overrides, a4 as Permissions, a5 as Plugin, a8 as PuckAction, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ad as ResolveDataTrigger, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as UiState, ar as UserGenerics, as as Viewport, at as Viewports, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.mjs';
|
|
2
|
+
export { D as Dictionary } from './index-BPkpm4Az.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
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
4
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BFTZdvq8.mjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@tiptap/react';
|
|
7
7
|
import '@tiptap/extension-blockquote';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
2
|
-
export { D as Dictionary } from './index-
|
|
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 FieldTypes, T as Fields, U as History, V as IframeConfig, W as InitialHistory, Y as ItemWithId, Z as MappedItem, _ as Metadata, $ as NumberField, a0 as ObjectField, a1 as OnAction, a2 as OverrideKey, a3 as Overrides, a4 as Permissions, a5 as Plugin, a8 as PuckAction, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ad as ResolveDataTrigger, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as UiState, ar as UserGenerics, as as Viewport, at as Viewports, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.js';
|
|
2
|
+
export { D as Dictionary } from './index-UEGrr-Tp.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
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
4
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-vgdtHk4C.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@tiptap/react';
|
|
7
7
|
import '@tiptap/extension-blockquote';
|
package/dist/no-external.js
CHANGED
|
@@ -20306,6 +20306,7 @@ var ResizeHandle = ({
|
|
|
20306
20306
|
const isDragging = (0, import_react110.useRef)(false);
|
|
20307
20307
|
const startX = (0, import_react110.useRef)(0);
|
|
20308
20308
|
const startWidth = (0, import_react110.useRef)(0);
|
|
20309
|
+
const endDrag = (0, import_react110.useRef)(null);
|
|
20309
20310
|
const handleMouseMove = (0, import_react110.useCallback)(
|
|
20310
20311
|
(e) => {
|
|
20311
20312
|
if (!isDragging.current) return;
|
|
@@ -20318,18 +20319,10 @@ var ResizeHandle = ({
|
|
|
20318
20319
|
[onResize, position]
|
|
20319
20320
|
);
|
|
20320
20321
|
const handleMouseUp = (0, import_react110.useCallback)(() => {
|
|
20321
|
-
var _a;
|
|
20322
|
+
var _a, _b;
|
|
20322
20323
|
if (!isDragging.current) return;
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
document.body.style.userSelect = "";
|
|
20326
|
-
const overlay = document.getElementById("resize-overlay");
|
|
20327
|
-
if (overlay) {
|
|
20328
|
-
document.body.removeChild(overlay);
|
|
20329
|
-
}
|
|
20330
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
20331
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
20332
|
-
const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
20324
|
+
(_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20325
|
+
const finalWidth = ((_b = sidebarRef.current) == null ? void 0 : _b.getBoundingClientRect().width) || 0;
|
|
20333
20326
|
onResizeEnd(finalWidth);
|
|
20334
20327
|
resetAutoZoom();
|
|
20335
20328
|
}, [onResizeEnd]);
|
|
@@ -20347,10 +20340,23 @@ var ResizeHandle = ({
|
|
|
20347
20340
|
document.body.appendChild(overlay);
|
|
20348
20341
|
document.addEventListener("mousemove", handleMouseMove);
|
|
20349
20342
|
document.addEventListener("mouseup", handleMouseUp);
|
|
20343
|
+
endDrag.current = () => {
|
|
20344
|
+
isDragging.current = false;
|
|
20345
|
+
document.body.style.cursor = "";
|
|
20346
|
+
document.body.style.userSelect = "";
|
|
20347
|
+
overlay.remove();
|
|
20348
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
20349
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
20350
|
+
endDrag.current = null;
|
|
20351
|
+
};
|
|
20350
20352
|
e.preventDefault();
|
|
20351
20353
|
},
|
|
20352
20354
|
[position, handleMouseMove, handleMouseUp]
|
|
20353
20355
|
);
|
|
20356
|
+
(0, import_react110.useEffect)(() => () => {
|
|
20357
|
+
var _a;
|
|
20358
|
+
return (_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20359
|
+
}, []);
|
|
20354
20360
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20355
20361
|
"div",
|
|
20356
20362
|
{
|
|
@@ -20388,7 +20394,7 @@ var Sidebar = ({
|
|
|
20388
20394
|
children
|
|
20389
20395
|
}
|
|
20390
20396
|
),
|
|
20391
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20397
|
+
isVisible && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20392
20398
|
ResizeHandle,
|
|
20393
20399
|
{
|
|
20394
20400
|
position,
|
package/dist/no-external.mjs
CHANGED
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { n as Config,
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { n as Config, ar as UserGenerics, _ as Metadata, R as FieldTransforms } from './actions-0EHeGita.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BFTZdvq8.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { n as Config,
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { n as Config, ar as UserGenerics, _ as Metadata, R as FieldTransforms } from './actions-0EHeGita.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-vgdtHk4C.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Config, D as Data,
|
|
1
|
+
import { n as Config, D as Data, aw as WithId, ar as UserGenerics, p as Content, j as ComponentData, t as DefaultComponents, s as DefaultComponentProps, u as DefaultRootFieldProps, _ as Metadata, ah as RootData } from './actions-0EHeGita.mjs';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Config, D as Data,
|
|
1
|
+
import { n as Config, D as Data, aw as WithId, ar as UserGenerics, p as Content, j as ComponentData, t as DefaultComponents, s as DefaultComponentProps, u as DefaultRootFieldProps, _ as Metadata, ah as RootData } from './actions-0EHeGita.js';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|