@measured/puck 0.20.1-canary.e58ac425 → 0.20.2-canary.9172a57f
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/{chunk-NFK5JVZW.mjs → chunk-62KOMFGG.mjs} +1 -1
- package/dist/{chunk-DCZ7BU3G.mjs → chunk-V7Y7BFEC.mjs} +8 -4
- package/dist/index.css +4 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/index.mjs +2 -2
- package/dist/no-external.css +4 -3
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +8 -4
- package/dist/no-external.mjs +2 -2
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-DLGdRZVT.d.mts → walk-tree-JdJYB16L.d.mts} +2 -2
- package/dist/{walk-tree-DLGdRZVT.d.ts → walk-tree-JdJYB16L.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
walkAppState,
|
|
25
25
|
walkField,
|
|
26
26
|
walkTree
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-62KOMFGG.mjs";
|
|
28
28
|
|
|
29
29
|
// ../../node_modules/classnames/index.js
|
|
30
30
|
var require_classnames = __commonJS({
|
|
@@ -5659,7 +5659,7 @@ var registerOverlayPortal = (el, opts = {}) => {
|
|
|
5659
5659
|
|
|
5660
5660
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
|
|
5661
5661
|
init_react_import();
|
|
5662
|
-
var styles_module_default13 = { "InlineTextField": "
|
|
5662
|
+
var styles_module_default13 = { "InlineTextField": "_InlineTextField_1xph6_1" };
|
|
5663
5663
|
|
|
5664
5664
|
// lib/data/set-deep.ts
|
|
5665
5665
|
init_react_import();
|
|
@@ -5741,7 +5741,11 @@ var InlineTextFieldInternal = ({
|
|
|
5741
5741
|
const index = (_a2 = appStore2.state.indexes.zones[zoneCompound]) == null ? void 0 : _a2.contentIds.indexOf(
|
|
5742
5742
|
componentId
|
|
5743
5743
|
);
|
|
5744
|
-
|
|
5744
|
+
let value2 = e.target.innerText;
|
|
5745
|
+
if (disableLineBreaks) {
|
|
5746
|
+
value2 = value2.replaceAll(/\n/gm, "");
|
|
5747
|
+
}
|
|
5748
|
+
const newProps = setDeep(node.data.props, propPath, value2);
|
|
5745
5749
|
const resolvedData = yield appStore2.resolveComponentData(
|
|
5746
5750
|
__spreadProps(__spreadValues({}, node.data), { props: newProps }),
|
|
5747
5751
|
"replace"
|
|
@@ -5760,7 +5764,7 @@ var InlineTextFieldInternal = ({
|
|
|
5760
5764
|
cleanupPortal == null ? void 0 : cleanupPortal();
|
|
5761
5765
|
};
|
|
5762
5766
|
}
|
|
5763
|
-
}, [appStoreApi, ref.current, value]);
|
|
5767
|
+
}, [appStoreApi, ref.current, value, disableLineBreaks]);
|
|
5764
5768
|
const [isHovering, setIsHovering] = useState16(false);
|
|
5765
5769
|
const [isFocused, setIsFocused] = useState16(false);
|
|
5766
5770
|
return /* @__PURE__ */ jsx24(
|
package/dist/index.css
CHANGED
|
@@ -1331,15 +1331,16 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
1333
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css/#css-module-data */
|
|
1334
|
-
.
|
|
1334
|
+
._InlineTextField_1xph6_1 {
|
|
1335
1335
|
cursor: text;
|
|
1336
1336
|
display: inline-block;
|
|
1337
|
+
white-space: pre-wrap;
|
|
1337
1338
|
}
|
|
1338
|
-
[data-dnd-dragging] .
|
|
1339
|
+
[data-dnd-dragging] ._InlineTextField_1xph6_1 {
|
|
1339
1340
|
cursor: none;
|
|
1340
1341
|
caret-color: transparent;
|
|
1341
1342
|
}
|
|
1342
|
-
[data-dnd-dragging] .
|
|
1343
|
+
[data-dnd-dragging] ._InlineTextField_1xph6_1::selection {
|
|
1343
1344
|
display: none;
|
|
1344
1345
|
}
|
|
1345
1346
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-
|
|
2
|
-
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-JdJYB16L.mjs';
|
|
2
|
+
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-JdJYB16L.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-
|
|
2
|
-
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-JdJYB16L.js';
|
|
2
|
+
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ab as CustomField, aa as CustomFieldRender, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ad as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-JdJYB16L.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.js
CHANGED
|
@@ -791,7 +791,7 @@ var walkField = ({
|
|
|
791
791
|
return map({
|
|
792
792
|
value: mappedContent,
|
|
793
793
|
parentId: id,
|
|
794
|
-
propName:
|
|
794
|
+
propName: propPath,
|
|
795
795
|
field: fields[propKey],
|
|
796
796
|
propPath
|
|
797
797
|
});
|
|
@@ -5556,7 +5556,7 @@ var registerOverlayPortal = (el, opts = {}) => {
|
|
|
5556
5556
|
|
|
5557
5557
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
|
|
5558
5558
|
init_react_import();
|
|
5559
|
-
var styles_module_default13 = { "InlineTextField": "
|
|
5559
|
+
var styles_module_default13 = { "InlineTextField": "_InlineTextField_1xph6_1" };
|
|
5560
5560
|
|
|
5561
5561
|
// lib/data/set-deep.ts
|
|
5562
5562
|
init_react_import();
|
|
@@ -5638,7 +5638,11 @@ var InlineTextFieldInternal = ({
|
|
|
5638
5638
|
const index = (_a2 = appStore2.state.indexes.zones[zoneCompound]) == null ? void 0 : _a2.contentIds.indexOf(
|
|
5639
5639
|
componentId
|
|
5640
5640
|
);
|
|
5641
|
-
|
|
5641
|
+
let value2 = e.target.innerText;
|
|
5642
|
+
if (disableLineBreaks) {
|
|
5643
|
+
value2 = value2.replaceAll(/\n/gm, "");
|
|
5644
|
+
}
|
|
5645
|
+
const newProps = setDeep(node.data.props, propPath, value2);
|
|
5642
5646
|
const resolvedData = yield appStore2.resolveComponentData(
|
|
5643
5647
|
__spreadProps(__spreadValues({}, node.data), { props: newProps }),
|
|
5644
5648
|
"replace"
|
|
@@ -5657,7 +5661,7 @@ var InlineTextFieldInternal = ({
|
|
|
5657
5661
|
cleanupPortal == null ? void 0 : cleanupPortal();
|
|
5658
5662
|
};
|
|
5659
5663
|
}
|
|
5660
|
-
}, [appStoreApi, ref.current, value]);
|
|
5664
|
+
}, [appStoreApi, ref.current, value, disableLineBreaks]);
|
|
5661
5665
|
const [isHovering, setIsHovering] = (0, import_react33.useState)(false);
|
|
5662
5666
|
const [isFocused, setIsFocused] = (0, import_react33.useState)(false);
|
|
5663
5667
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
setDeep,
|
|
19
19
|
useGetPuck,
|
|
20
20
|
usePuck
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-V7Y7BFEC.mjs";
|
|
22
22
|
import {
|
|
23
23
|
init_react_import,
|
|
24
24
|
migrate,
|
|
25
25
|
resolveAllData,
|
|
26
26
|
transformProps,
|
|
27
27
|
walkTree
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-62KOMFGG.mjs";
|
|
29
29
|
|
|
30
30
|
// bundle/index.ts
|
|
31
31
|
init_react_import();
|
package/dist/no-external.css
CHANGED
|
@@ -1329,15 +1329,16 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
1331
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css/#css-module-data */
|
|
1332
|
-
.
|
|
1332
|
+
._InlineTextField_1xph6_1 {
|
|
1333
1333
|
cursor: text;
|
|
1334
1334
|
display: inline-block;
|
|
1335
|
+
white-space: pre-wrap;
|
|
1335
1336
|
}
|
|
1336
|
-
[data-dnd-dragging] .
|
|
1337
|
+
[data-dnd-dragging] ._InlineTextField_1xph6_1 {
|
|
1337
1338
|
cursor: none;
|
|
1338
1339
|
caret-color: transparent;
|
|
1339
1340
|
}
|
|
1340
|
-
[data-dnd-dragging] .
|
|
1341
|
+
[data-dnd-dragging] ._InlineTextField_1xph6_1::selection {
|
|
1341
1342
|
display: none;
|
|
1342
1343
|
}
|
|
1343
1344
|
|
package/dist/no-external.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-JdJYB16L.mjs';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-JdJYB16L.js';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/no-external.js
CHANGED
|
@@ -791,7 +791,7 @@ var walkField = ({
|
|
|
791
791
|
return map({
|
|
792
792
|
value: mappedContent,
|
|
793
793
|
parentId: id,
|
|
794
|
-
propName:
|
|
794
|
+
propName: propPath,
|
|
795
795
|
field: fields[propKey],
|
|
796
796
|
propPath
|
|
797
797
|
});
|
|
@@ -5556,7 +5556,7 @@ var registerOverlayPortal = (el, opts = {}) => {
|
|
|
5556
5556
|
|
|
5557
5557
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
|
|
5558
5558
|
init_react_import();
|
|
5559
|
-
var styles_module_default13 = { "InlineTextField": "
|
|
5559
|
+
var styles_module_default13 = { "InlineTextField": "_InlineTextField_1xph6_1" };
|
|
5560
5560
|
|
|
5561
5561
|
// lib/data/set-deep.ts
|
|
5562
5562
|
init_react_import();
|
|
@@ -5638,7 +5638,11 @@ var InlineTextFieldInternal = ({
|
|
|
5638
5638
|
const index = (_a2 = appStore2.state.indexes.zones[zoneCompound]) == null ? void 0 : _a2.contentIds.indexOf(
|
|
5639
5639
|
componentId
|
|
5640
5640
|
);
|
|
5641
|
-
|
|
5641
|
+
let value2 = e.target.innerText;
|
|
5642
|
+
if (disableLineBreaks) {
|
|
5643
|
+
value2 = value2.replaceAll(/\n/gm, "");
|
|
5644
|
+
}
|
|
5645
|
+
const newProps = setDeep(node.data.props, propPath, value2);
|
|
5642
5646
|
const resolvedData = yield appStore2.resolveComponentData(
|
|
5643
5647
|
__spreadProps(__spreadValues({}, node.data), { props: newProps }),
|
|
5644
5648
|
"replace"
|
|
@@ -5657,7 +5661,7 @@ var InlineTextFieldInternal = ({
|
|
|
5657
5661
|
cleanupPortal == null ? void 0 : cleanupPortal();
|
|
5658
5662
|
};
|
|
5659
5663
|
}
|
|
5660
|
-
}, [appStoreApi, ref.current, value]);
|
|
5664
|
+
}, [appStoreApi, ref.current, value, disableLineBreaks]);
|
|
5661
5665
|
const [isHovering, setIsHovering] = (0, import_react33.useState)(false);
|
|
5662
5666
|
const [isFocused, setIsFocused] = (0, import_react33.useState)(false);
|
|
5663
5667
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
package/dist/no-external.mjs
CHANGED
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
setDeep,
|
|
19
19
|
useGetPuck,
|
|
20
20
|
usePuck
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-V7Y7BFEC.mjs";
|
|
22
22
|
import {
|
|
23
23
|
init_react_import,
|
|
24
24
|
migrate,
|
|
25
25
|
resolveAllData,
|
|
26
26
|
transformProps,
|
|
27
27
|
walkTree
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-62KOMFGG.mjs";
|
|
29
29
|
|
|
30
30
|
// bundle/no-external.ts
|
|
31
31
|
init_react_import();
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-JdJYB16L.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-JdJYB16L.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-JdJYB16L.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-JdJYB16L.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
package/dist/rsc.js
CHANGED
package/dist/rsc.mjs
CHANGED
|
@@ -255,7 +255,7 @@ type ConfigInternal<Props extends DefaultComponents = DefaultComponents, RootPro
|
|
|
255
255
|
root?: RootConfigInternal<RootProps, UserField>;
|
|
256
256
|
};
|
|
257
257
|
type DefaultComponents = Record<string, any>;
|
|
258
|
-
type Config<PropsOrParams extends LeftOrExactRight<PropsOrParams, DefaultComponents, ConfigParams> = DefaultComponents | ConfigParams, RootProps extends DefaultComponentProps =
|
|
258
|
+
type Config<PropsOrParams extends LeftOrExactRight<PropsOrParams, DefaultComponents, ConfigParams> = DefaultComponents | ConfigParams, RootProps extends DefaultComponentProps = any, CategoryName extends string = string> = PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, never> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number]> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, infer ParamFields> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], ParamFields[keyof ParamFields] & BaseField> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, any> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], {}> : ConfigInternal<PropsOrParams, RootProps, CategoryName>;
|
|
259
259
|
type ExtractConfigParams<UserConfig extends ConfigInternal> = UserConfig extends ConfigInternal<infer PropsOrParams, infer RootProps, infer CategoryName, infer UserField> ? {
|
|
260
260
|
props: PropsOrParams;
|
|
261
261
|
rootProps: RootProps & DefaultRootFieldProps;
|
|
@@ -372,7 +372,7 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
|
|
|
372
372
|
type WithDeepSlots<T, SlotType = T> = T extends Slot ? SlotType : T extends (infer U)[] ? Array<WithDeepSlots<U, SlotType>> : T extends (infer U)[] ? WithDeepSlots<U, SlotType>[] : T extends BuiltinTypes ? T : T extends object ? {
|
|
373
373
|
[K in keyof T]: WithDeepSlots<T[K], SlotType>;
|
|
374
374
|
} : T;
|
|
375
|
-
type ConfigParams<Components extends DefaultComponents = DefaultComponents, RootProps extends DefaultComponentProps =
|
|
375
|
+
type ConfigParams<Components extends DefaultComponents = DefaultComponents, RootProps extends DefaultComponentProps = any, CategoryNames extends string[] = string[], UserFields extends FieldsExtension = FieldsExtension> = {
|
|
376
376
|
components?: Components;
|
|
377
377
|
root?: RootProps;
|
|
378
378
|
categories?: CategoryNames;
|
|
@@ -255,7 +255,7 @@ type ConfigInternal<Props extends DefaultComponents = DefaultComponents, RootPro
|
|
|
255
255
|
root?: RootConfigInternal<RootProps, UserField>;
|
|
256
256
|
};
|
|
257
257
|
type DefaultComponents = Record<string, any>;
|
|
258
|
-
type Config<PropsOrParams extends LeftOrExactRight<PropsOrParams, DefaultComponents, ConfigParams> = DefaultComponents | ConfigParams, RootProps extends DefaultComponentProps =
|
|
258
|
+
type Config<PropsOrParams extends LeftOrExactRight<PropsOrParams, DefaultComponents, ConfigParams> = DefaultComponents | ConfigParams, RootProps extends DefaultComponentProps = any, CategoryName extends string = string> = PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, never> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number]> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, infer ParamFields> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], ParamFields[keyof ParamFields] & BaseField> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, any> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], {}> : ConfigInternal<PropsOrParams, RootProps, CategoryName>;
|
|
259
259
|
type ExtractConfigParams<UserConfig extends ConfigInternal> = UserConfig extends ConfigInternal<infer PropsOrParams, infer RootProps, infer CategoryName, infer UserField> ? {
|
|
260
260
|
props: PropsOrParams;
|
|
261
261
|
rootProps: RootProps & DefaultRootFieldProps;
|
|
@@ -372,7 +372,7 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
|
|
|
372
372
|
type WithDeepSlots<T, SlotType = T> = T extends Slot ? SlotType : T extends (infer U)[] ? Array<WithDeepSlots<U, SlotType>> : T extends (infer U)[] ? WithDeepSlots<U, SlotType>[] : T extends BuiltinTypes ? T : T extends object ? {
|
|
373
373
|
[K in keyof T]: WithDeepSlots<T[K], SlotType>;
|
|
374
374
|
} : T;
|
|
375
|
-
type ConfigParams<Components extends DefaultComponents = DefaultComponents, RootProps extends DefaultComponentProps =
|
|
375
|
+
type ConfigParams<Components extends DefaultComponents = DefaultComponents, RootProps extends DefaultComponentProps = any, CategoryNames extends string[] = string[], UserFields extends FieldsExtension = FieldsExtension> = {
|
|
376
376
|
components?: Components;
|
|
377
377
|
root?: RootProps;
|
|
378
378
|
categories?: CategoryNames;
|
package/package.json
CHANGED