@measured/puck 0.15.0-canary.e2cd445 → 0.15.1-canary.0daf478
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/{Config-a4123ba2.d.ts → Config-041c35a2.d.ts} +1 -1
- package/dist/index.css +41 -38
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -6
- package/dist/rsc.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -137,44 +137,45 @@
|
|
137
137
|
/* styles.css */
|
138
138
|
|
139
139
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/AutoField/styles.module.css/#css-module-data */
|
140
|
-
.
|
140
|
+
._Input_3pq3z_1 {
|
141
141
|
color: var(--puck-color-grey-04);
|
142
142
|
padding: 16px;
|
143
143
|
padding-bottom: 12px;
|
144
144
|
display: block;
|
145
145
|
}
|
146
|
-
.
|
146
|
+
._Input_3pq3z_1 ._Input_3pq3z_1 {
|
147
147
|
padding: 0px;
|
148
148
|
}
|
149
|
-
.
|
149
|
+
._Input_3pq3z_1 * {
|
150
150
|
box-sizing: border-box;
|
151
151
|
}
|
152
|
-
.
|
152
|
+
._Input_3pq3z_1 + ._Input_3pq3z_1 {
|
153
153
|
border-top: 1px solid var(--puck-color-grey-09);
|
154
154
|
margin-top: 8px;
|
155
155
|
}
|
156
|
-
.
|
156
|
+
._Input_3pq3z_1 ._Input_3pq3z_1 + ._Input_3pq3z_1 {
|
157
157
|
border-top: 0px;
|
158
158
|
margin-top: 12px;
|
159
159
|
}
|
160
|
-
._Input-
|
160
|
+
._Input-label_3pq3z_26 {
|
161
161
|
align-items: center;
|
162
|
+
color: var(--puck-color-grey-04);
|
162
163
|
display: flex;
|
163
164
|
padding-bottom: 12px;
|
164
165
|
font-size: var(--puck-font-size-xxs);
|
165
166
|
font-weight: 600;
|
166
167
|
}
|
167
|
-
._Input-
|
168
|
+
._Input-labelIcon_3pq3z_35 {
|
168
169
|
color: var(--puck-color-grey-07);
|
169
170
|
display: flex;
|
170
171
|
margin-right: 4px;
|
171
172
|
padding-left: 4px;
|
172
173
|
}
|
173
|
-
._Input-
|
174
|
+
._Input-disabledIcon_3pq3z_42 {
|
174
175
|
color: var(--puck-color-grey-05);
|
175
176
|
margin-left: auto;
|
176
177
|
}
|
177
|
-
._Input-
|
178
|
+
._Input-input_3pq3z_47 {
|
178
179
|
background: var(--puck-color-white);
|
179
180
|
border-width: 1px;
|
180
181
|
border-style: solid;
|
@@ -186,7 +187,7 @@
|
|
186
187
|
transition: border-color 50ms ease-in;
|
187
188
|
width: 100%;
|
188
189
|
}
|
189
|
-
select._Input-
|
190
|
+
select._Input-input_3pq3z_47 {
|
190
191
|
appearance: none;
|
191
192
|
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
|
192
193
|
background-size: 12px;
|
@@ -196,25 +197,25 @@ select._Input-input_1qi5b_46 {
|
|
196
197
|
cursor: pointer;
|
197
198
|
}
|
198
199
|
@media (hover: hover) and (pointer: fine) {
|
199
|
-
.
|
200
|
-
.
|
200
|
+
._Input_3pq3z_1:has(> input):hover ._Input-input_3pq3z_47:not([readonly]),
|
201
|
+
._Input_3pq3z_1:has(> textarea):hover ._Input-input_3pq3z_47:not([readonly]) {
|
201
202
|
border-color: var(--puck-color-grey-05);
|
202
203
|
transition: none;
|
203
204
|
}
|
204
|
-
.
|
205
|
+
._Input_3pq3z_1:has(> select):hover ._Input-input_3pq3z_47:not([disabled]) {
|
205
206
|
background-color: var(--puck-color-azure-12);
|
206
207
|
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%235a5a5a'><polygon points='0,0 100,0 50,50'/></svg>");
|
207
208
|
border-color: var(--puck-color-grey-05);
|
208
209
|
transition: none;
|
209
210
|
}
|
210
211
|
}
|
211
|
-
._Input-
|
212
|
+
._Input-input_3pq3z_47:focus {
|
212
213
|
border-color: var(--puck-color-grey-05);
|
213
214
|
outline: 2px solid var(--puck-color-azure-05);
|
214
215
|
transition: none;
|
215
216
|
}
|
216
|
-
._Input--
|
217
|
-
._Input--
|
217
|
+
._Input--readOnly_3pq3z_91 > ._Input-input_3pq3z_47,
|
218
|
+
._Input--readOnly_3pq3z_91 > select._Input-input_3pq3z_47 {
|
218
219
|
background-color: var(--puck-color-grey-11);
|
219
220
|
border-color: var(--puck-color-grey-09);
|
220
221
|
color: var(--puck-color-grey-04);
|
@@ -223,34 +224,34 @@ select._Input-input_1qi5b_46 {
|
|
223
224
|
outline: 0;
|
224
225
|
transition: none;
|
225
226
|
}
|
226
|
-
._Input-
|
227
|
+
._Input-radioGroupItems_3pq3z_102 {
|
227
228
|
display: flex;
|
228
229
|
border: 1px solid var(--puck-color-grey-09);
|
229
230
|
border-radius: 4px;
|
230
231
|
flex-wrap: wrap;
|
231
232
|
}
|
232
|
-
._Input-
|
233
|
+
._Input-radio_3pq3z_102 {
|
233
234
|
border-right: 1px solid var(--puck-color-grey-09);
|
234
235
|
flex-grow: 1;
|
235
236
|
}
|
236
|
-
._Input-
|
237
|
+
._Input-radio_3pq3z_102:first-of-type {
|
237
238
|
border-bottom-left-radius: 4px;
|
238
239
|
border-top-left-radius: 4px;
|
239
240
|
}
|
240
|
-
._Input-
|
241
|
+
._Input-radio_3pq3z_102:first-of-type ._Input-radioInner_3pq3z_119 {
|
241
242
|
border-bottom-left-radius: 3px;
|
242
243
|
border-top-left-radius: 3px;
|
243
244
|
}
|
244
|
-
._Input-
|
245
|
+
._Input-radio_3pq3z_102:last-of-type {
|
245
246
|
border-bottom-right-radius: 4px;
|
246
247
|
border-right: 0;
|
247
248
|
border-top-right-radius: 4px;
|
248
249
|
}
|
249
|
-
._Input-
|
250
|
+
._Input-radio_3pq3z_102:last-of-type ._Input-radioInner_3pq3z_119 {
|
250
251
|
border-bottom-right-radius: 3px;
|
251
252
|
border-top-right-radius: 3px;
|
252
253
|
}
|
253
|
-
._Input-
|
254
|
+
._Input-radioInner_3pq3z_119 {
|
254
255
|
background-color: var(--puck-color-white);
|
255
256
|
color: var(--puck-color-grey-04);
|
256
257
|
cursor: pointer;
|
@@ -259,32 +260,32 @@ select._Input-input_1qi5b_46 {
|
|
259
260
|
text-align: center;
|
260
261
|
transition: background-color 50ms ease-in;
|
261
262
|
}
|
262
|
-
._Input-
|
263
|
+
._Input-radio_3pq3z_102:has(:focus-visible) {
|
263
264
|
outline: 2px solid var(--puck-color-azure-05);
|
264
265
|
outline-offset: 2px;
|
265
266
|
position: relative;
|
266
267
|
}
|
267
268
|
@media (hover: hover) and (pointer: fine) {
|
268
|
-
._Input-
|
269
|
+
._Input-radioInner_3pq3z_119:hover {
|
269
270
|
background-color: var(--puck-color-azure-12);
|
270
271
|
transition: none;
|
271
272
|
}
|
272
273
|
}
|
273
|
-
._Input--
|
274
|
+
._Input--readOnly_3pq3z_91 ._Input-radioInner_3pq3z_119 {
|
274
275
|
background-color: var(--puck-color-white);
|
275
276
|
color: var(--puck-color-grey-04);
|
276
277
|
cursor: default;
|
277
278
|
}
|
278
|
-
._Input-
|
279
|
+
._Input-radio_3pq3z_102 ._Input-radioInput_3pq3z_164:checked ~ ._Input-radioInner_3pq3z_119 {
|
279
280
|
background-color: var(--puck-color-azure-11);
|
280
281
|
color: var(--puck-color-azure-04);
|
281
282
|
font-weight: 500;
|
282
283
|
}
|
283
|
-
._Input--
|
284
|
+
._Input--readOnly_3pq3z_91 ._Input-radioInput_3pq3z_164:checked ~ ._Input-radioInner_3pq3z_119 {
|
284
285
|
background-color: var(--puck-color-grey-11);
|
285
286
|
color: var(--puck-color-grey-04);
|
286
287
|
}
|
287
|
-
._Input-
|
288
|
+
._Input-radio_3pq3z_102 ._Input-radioInput_3pq3z_164 {
|
288
289
|
clip: rect(0 0 0 0);
|
289
290
|
clip-path: inset(100%);
|
290
291
|
height: 1px;
|
@@ -293,7 +294,7 @@ select._Input-input_1qi5b_46 {
|
|
293
294
|
white-space: nowrap;
|
294
295
|
width: 1px;
|
295
296
|
}
|
296
|
-
textarea._Input-
|
297
|
+
textarea._Input-input_3pq3z_47 {
|
297
298
|
margin-bottom: -4px;
|
298
299
|
}
|
299
300
|
|
@@ -1489,13 +1490,14 @@ textarea._Input-input_1qi5b_46 {
|
|
1489
1490
|
}
|
1490
1491
|
|
1491
1492
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Fields/styles.module.css/#css-module-data */
|
1492
|
-
.
|
1493
|
+
._PuckFields_jp3lw_1 {
|
1494
|
+
position: relative;
|
1493
1495
|
font-family: var(--puck-font-family);
|
1494
1496
|
}
|
1495
|
-
._PuckFields--
|
1497
|
+
._PuckFields--isLoading_jp3lw_6 {
|
1496
1498
|
min-height: 48px;
|
1497
1499
|
}
|
1498
|
-
._PuckFields-
|
1500
|
+
._PuckFields-loadingOverlay_jp3lw_10 {
|
1499
1501
|
background: var(--puck-color-white);
|
1500
1502
|
display: flex;
|
1501
1503
|
justify-content: flex-end;
|
@@ -1509,7 +1511,7 @@ textarea._Input-input_1qi5b_46 {
|
|
1509
1511
|
box-sizing: border-box;
|
1510
1512
|
opacity: 0.8;
|
1511
1513
|
}
|
1512
|
-
._PuckFields-
|
1514
|
+
._PuckFields-loadingOverlayInner_jp3lw_25 {
|
1513
1515
|
display: flex;
|
1514
1516
|
padding: 16px;
|
1515
1517
|
position: sticky;
|
@@ -1679,7 +1681,7 @@ textarea._Input-input_1qi5b_46 {
|
|
1679
1681
|
}
|
1680
1682
|
|
1681
1683
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/ViewportControls/styles.module.css/#css-module-data */
|
1682
|
-
.
|
1684
|
+
._ViewportControls_g1wgg_1 {
|
1683
1685
|
display: flex;
|
1684
1686
|
background: var(--puck-color-grey-11);
|
1685
1687
|
box-sizing: border-box;
|
@@ -1692,12 +1694,12 @@ textarea._Input-input_1qi5b_46 {
|
|
1692
1694
|
padding-right: var(--puck-space-px);
|
1693
1695
|
z-index: 1;
|
1694
1696
|
}
|
1695
|
-
._ViewportControls-
|
1697
|
+
._ViewportControls-divider_g1wgg_15 {
|
1696
1698
|
border-right: 1px solid var(--puck-color-grey-09);
|
1697
1699
|
margin-left: 8px;
|
1698
1700
|
margin-right: 8px;
|
1699
1701
|
}
|
1700
|
-
._ViewportControls-
|
1702
|
+
._ViewportControls-zoomSelect_g1wgg_21 {
|
1701
1703
|
appearance: none;
|
1702
1704
|
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
|
1703
1705
|
background-size: 10px;
|
@@ -1705,9 +1707,10 @@ textarea._Input-input_1qi5b_46 {
|
|
1705
1707
|
background-repeat: no-repeat;
|
1706
1708
|
border: 0;
|
1707
1709
|
font-size: var(--puck-font-size-xxxs);
|
1710
|
+
padding: 0;
|
1708
1711
|
width: 96px;
|
1709
1712
|
}
|
1710
|
-
._ViewportButton--
|
1713
|
+
._ViewportButton--isActive_g1wgg_34 ._ViewportButton-inner_g1wgg_34 {
|
1711
1714
|
color: var(--puck-color-azure-04);
|
1712
1715
|
}
|
1713
1716
|
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { U as UiState, D as Data, A as AppState, F as Field, a as FieldProps, C as Config, b as DefaultRootProps, I as ItemSelector, c as DropZoneProps, V as Viewports, d as DefaultComponentProps, M as MappedItem, R as RootDataWithProps, e as RootData, f as ComponentData } from './Config-
|
2
|
-
export { q as Adaptor, p as ArrayField, l as ArrayState, B as BaseData, m as BaseField, i as ComponentConfig, g as Content, s as CustomField, r as ExternalField, E as ExternalFieldWithAdaptor, t as Fields, k as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, h as PuckContext, o as RadioField, j as RootDataWithoutProps, S as SelectField, T as TextField, n as TextareaField } from './Config-
|
1
|
+
import { U as UiState, D as Data, A as AppState, F as Field, a as FieldProps, C as Config, b as DefaultRootProps, I as ItemSelector, c as DropZoneProps, V as Viewports, d as DefaultComponentProps, M as MappedItem, R as RootDataWithProps, e as RootData, f as ComponentData } from './Config-041c35a2.js';
|
2
|
+
export { q as Adaptor, p as ArrayField, l as ArrayState, B as BaseData, m as BaseField, i as ComponentConfig, g as Content, s as CustomField, r as ExternalField, E as ExternalFieldWithAdaptor, t as Fields, k as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, h as PuckContext, o as RadioField, j as RootDataWithoutProps, S as SelectField, T as TextField, n as TextareaField } from './Config-041c35a2.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
5
|
import { ReactNode, ReactElement, CSSProperties, SyntheticEvent } from 'react';
|
package/dist/index.js
CHANGED
@@ -29207,7 +29207,7 @@ var get_class_name_factory_default = getClassNameFactory;
|
|
29207
29207
|
|
29208
29208
|
// css-module:/home/runner/work/puck/puck/packages/core/components/AutoField/styles.module.css#css-module
|
29209
29209
|
init_react_import();
|
29210
|
-
var styles_module_default = { "Input": "
|
29210
|
+
var styles_module_default = { "Input": "_Input_3pq3z_1", "Input-label": "_Input-label_3pq3z_26", "Input-labelIcon": "_Input-labelIcon_3pq3z_35", "Input-disabledIcon": "_Input-disabledIcon_3pq3z_42", "Input-input": "_Input-input_3pq3z_47", "Input--readOnly": "_Input--readOnly_3pq3z_91", "Input-radioGroupItems": "_Input-radioGroupItems_3pq3z_102", "Input-radio": "_Input-radio_3pq3z_102", "Input-radioInner": "_Input-radioInner_3pq3z_119", "Input-radioInput": "_Input-radioInput_3pq3z_164" };
|
29211
29211
|
|
29212
29212
|
// components/AutoField/index.tsx
|
29213
29213
|
var import_react11 = require("react");
|
@@ -31408,6 +31408,8 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
|
|
31408
31408
|
"No configuration for ",
|
31409
31409
|
item.type
|
31410
31410
|
] });
|
31411
|
+
const componentConfig = config.components[item.type];
|
31412
|
+
const label = (_b = componentConfig == null ? void 0 : componentConfig["label"]) != null ? _b : item.type.toString();
|
31411
31413
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
31412
31414
|
"div",
|
31413
31415
|
{
|
@@ -31423,7 +31425,7 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
|
|
31423
31425
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
31424
31426
|
DraggableComponent,
|
31425
31427
|
{
|
31426
|
-
label
|
31428
|
+
label,
|
31427
31429
|
id: `draggable-${componentId}`,
|
31428
31430
|
index: i,
|
31429
31431
|
isSelected,
|
@@ -32375,7 +32377,7 @@ init_react_import();
|
|
32375
32377
|
|
32376
32378
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Fields/styles.module.css#css-module
|
32377
32379
|
init_react_import();
|
32378
|
-
var styles_module_default15 = { "PuckFields": "
|
32380
|
+
var styles_module_default15 = { "PuckFields": "_PuckFields_jp3lw_1", "PuckFields--isLoading": "_PuckFields--isLoading_jp3lw_6", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_jp3lw_10", "PuckFields-loadingOverlayInner": "_PuckFields-loadingOverlayInner_jp3lw_25" };
|
32379
32381
|
|
32380
32382
|
// components/Puck/components/Fields/index.tsx
|
32381
32383
|
var import_react20 = require("react");
|
@@ -33080,6 +33082,8 @@ var LayerTree = ({
|
|
33080
33082
|
const selectedItem = itemSelector && data ? getItem(itemSelector, data) : null;
|
33081
33083
|
const isHovering = hoveringComponent === item.props.id;
|
33082
33084
|
const childIsSelected = isChildOfZone(item, selectedItem, ctx);
|
33085
|
+
const componentConfig = config.components[item.type];
|
33086
|
+
const label2 = (_a = componentConfig == null ? void 0 : componentConfig["label"]) != null ? _a : item.type.toString();
|
33083
33087
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
33084
33088
|
"li",
|
33085
33089
|
{
|
@@ -33132,7 +33136,7 @@ var LayerTree = ({
|
|
33132
33136
|
),
|
33133
33137
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: getClassNameLayer("title"), children: [
|
33134
33138
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LayoutGrid, { size: "16" }) }),
|
33135
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getClassNameLayer("name"), children:
|
33139
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getClassNameLayer("name"), children: label2 })
|
33136
33140
|
] })
|
33137
33141
|
]
|
33138
33142
|
}
|
@@ -33447,7 +33451,7 @@ var import_react28 = require("react");
|
|
33447
33451
|
|
33448
33452
|
// css-module:/home/runner/work/puck/puck/packages/core/components/ViewportControls/styles.module.css#css-module
|
33449
33453
|
init_react_import();
|
33450
|
-
var styles_module_default19 = { "ViewportControls": "
|
33454
|
+
var styles_module_default19 = { "ViewportControls": "_ViewportControls_g1wgg_1", "ViewportControls-divider": "_ViewportControls-divider_g1wgg_15", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_g1wgg_21", "ViewportButton--isActive": "_ViewportButton--isActive_g1wgg_34", "ViewportButton-inner": "_ViewportButton-inner_g1wgg_34" };
|
33451
33455
|
|
33452
33456
|
// components/ViewportControls/index.tsx
|
33453
33457
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
@@ -33941,6 +33945,8 @@ function Puck({
|
|
33941
33945
|
(0, import_react30.useEffect)(() => {
|
33942
33946
|
setMounted(true);
|
33943
33947
|
}, []);
|
33948
|
+
const selectedComponentConfig = selectedItem && config.components[selectedItem.type];
|
33949
|
+
const selectedComponentLabel = selectedItem ? (_a = selectedComponentConfig == null ? void 0 : selectedComponentConfig["label"]) != null ? _a : selectedItem.type.toString() : "";
|
33944
33950
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: `Puck ${getClassName26()}`, children: [
|
33945
33951
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
33946
33952
|
AppProvider,
|
@@ -34149,7 +34155,7 @@ function Puck({
|
|
34149
34155
|
noPadding: true,
|
34150
34156
|
noBorderTop: true,
|
34151
34157
|
showBreadcrumbs: true,
|
34152
|
-
title: selectedItem ?
|
34158
|
+
title: selectedItem ? selectedComponentLabel : "Page",
|
34153
34159
|
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Fields, {})
|
34154
34160
|
}
|
34155
34161
|
) })
|
package/dist/rsc.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { C as Config, D as Data } from './Config-
|
2
|
+
import { C as Config, D as Data } from './Config-041c35a2.js';
|
3
3
|
import 'react';
|
4
4
|
|
5
5
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
package/package.json
CHANGED