@puckeditor/core 0.22.1 → 0.23.0-canary.20671fd7
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-MXSH3OSX.mjs → Editor-BJP5AFD5.mjs} +9 -9
- package/dist/{chunk-HRNJ42TO.mjs → chunk-25QAPMLH.mjs} +1 -1
- package/dist/{chunk-VOB4L2BJ.mjs → chunk-BMRBP3ET.mjs} +3 -3
- package/dist/{chunk-2AATV7NG.mjs → chunk-EYJW64M2.mjs} +21 -10
- package/dist/{chunk-DATOBXTJ.mjs → chunk-HB4CVO3I.mjs} +15 -8
- package/dist/{chunk-54LFCIWQ.mjs → chunk-JHNG6XYK.mjs} +122 -7
- package/dist/{chunk-FKYOVZNF.mjs → chunk-JNJJ2M57.mjs} +2 -2
- package/dist/{chunk-BVKXFA4V.mjs → chunk-MU6IPW26.mjs} +27 -12
- package/dist/{chunk-6PIQFZBM.mjs → chunk-Q6WCB6GM.mjs} +297 -160
- package/dist/{chunk-74HKFKJU.mjs → chunk-QHQD3BMI.mjs} +7 -5
- package/dist/{chunk-73XKHVBN.mjs → chunk-WQV7W7OC.mjs} +37 -22
- package/dist/{chunk-GR7NLT4T.mjs → chunk-WUO7D6OQ.mjs} +1 -1
- package/dist/{full-7JVAMOPS.mjs → full-7ONH7UPJ.mjs} +8 -8
- package/dist/{index-ClzBCbx_.d.mts → index-De5Tn61v.d.mts} +85 -1
- package/dist/{index-B1b1cFug.d.ts → index-t7c1w81O.d.ts} +85 -1
- package/dist/index.d.mts +20 -5
- package/dist/index.d.ts +20 -5
- package/dist/index.js +500 -154
- package/dist/index.mjs +11 -11
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +7 -5
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-HECCGJKO.mjs → loaded-35D7XAOE.mjs} +5 -5
- package/dist/{loaded-B7563MDT.mjs → loaded-6YDNF4HS.mjs} +5 -5
- package/dist/{loaded-EFZRGV2Y.mjs → loaded-PF5Y4VWH.mjs} +5 -5
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +500 -154
- package/dist/no-external.mjs +11 -11
- package/dist/rsc.js +7 -5
- package/dist/rsc.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1427,7 +1427,7 @@ var init_default_slots = __esm({
|
|
|
1427
1427
|
});
|
|
1428
1428
|
|
|
1429
1429
|
// lib/data/map-fields.ts
|
|
1430
|
-
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true) {
|
|
1430
|
+
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true, fieldsToMap) {
|
|
1431
1431
|
var _a, _b, _c, _d, _e;
|
|
1432
1432
|
const itemType = "type" in item ? item.type : "root";
|
|
1433
1433
|
const componentConfig = itemType === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[itemType];
|
|
@@ -1439,7 +1439,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
1439
1439
|
getPropPath: (k) => k,
|
|
1440
1440
|
config,
|
|
1441
1441
|
recurseSlots,
|
|
1442
|
-
ownedFields: true
|
|
1442
|
+
ownedFields: true,
|
|
1443
|
+
keysToWalk: fieldsToMap
|
|
1443
1444
|
});
|
|
1444
1445
|
if (isPromise(newProps)) {
|
|
1445
1446
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -1546,10 +1547,11 @@ var init_map_fields = __esm({
|
|
|
1546
1547
|
getPropPath,
|
|
1547
1548
|
config,
|
|
1548
1549
|
recurseSlots,
|
|
1549
|
-
ownedFields
|
|
1550
|
+
ownedFields,
|
|
1551
|
+
keysToWalk: providedKeys
|
|
1550
1552
|
}) => {
|
|
1551
|
-
const keys = Object.keys(value);
|
|
1552
|
-
if (ownedFields) {
|
|
1553
|
+
const keys = providedKeys != null ? providedKeys : Object.keys(value);
|
|
1554
|
+
if (!providedKeys && ownedFields) {
|
|
1553
1555
|
for (const fieldName in fields) {
|
|
1554
1556
|
const fieldType = fields[fieldName].type;
|
|
1555
1557
|
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
@@ -3141,7 +3143,7 @@ var init_fields = __esm({
|
|
|
3141
3143
|
const componentData = node == null ? void 0 : node.data;
|
|
3142
3144
|
const parentNode = (node == null ? void 0 : node.parentId) ? nodes[node.parentId] : null;
|
|
3143
3145
|
const parent = (parentNode == null ? void 0 : parentNode.data) || null;
|
|
3144
|
-
const { getComponentConfig, state } = appStore.getState();
|
|
3146
|
+
const { getComponentConfig, state, config } = appStore.getState();
|
|
3145
3147
|
const componentConfig = getComponentConfig(componentData == null ? void 0 : componentData.type);
|
|
3146
3148
|
if (!componentData || !componentConfig) return;
|
|
3147
3149
|
const defaultFields2 = componentConfig.fields || {};
|
|
@@ -3174,6 +3176,9 @@ var init_fields = __esm({
|
|
|
3174
3176
|
if (((_b = appStore.getState().selectedItem) == null ? void 0 : _b.props.id) !== id) {
|
|
3175
3177
|
return;
|
|
3176
3178
|
}
|
|
3179
|
+
if (appStore.getState().config !== config) {
|
|
3180
|
+
return;
|
|
3181
|
+
}
|
|
3177
3182
|
appStore.setState({
|
|
3178
3183
|
fields: {
|
|
3179
3184
|
fields: newFields,
|
|
@@ -3192,10 +3197,18 @@ var init_fields = __esm({
|
|
|
3192
3197
|
);
|
|
3193
3198
|
(0, import_react10.useEffect)(() => {
|
|
3194
3199
|
resolveFields(true);
|
|
3195
|
-
|
|
3200
|
+
const unsubscribeData = appStore.subscribe(
|
|
3196
3201
|
(s) => s.state.indexes.nodes[id || "root"],
|
|
3197
3202
|
() => resolveFields()
|
|
3198
3203
|
);
|
|
3204
|
+
const unsubscribeConfig = appStore.subscribe(
|
|
3205
|
+
(s) => s.config,
|
|
3206
|
+
() => resolveFields(true)
|
|
3207
|
+
);
|
|
3208
|
+
return () => {
|
|
3209
|
+
unsubscribeData();
|
|
3210
|
+
unsubscribeConfig();
|
|
3211
|
+
};
|
|
3199
3212
|
}, [id]);
|
|
3200
3213
|
};
|
|
3201
3214
|
}
|
|
@@ -3402,6 +3415,7 @@ var init_store = __esm({
|
|
|
3402
3415
|
_experimentalFullScreenCanvas: false,
|
|
3403
3416
|
_experimentalVirtualization: false,
|
|
3404
3417
|
metadata: {},
|
|
3418
|
+
dictionary: {},
|
|
3405
3419
|
fieldTransforms: {}
|
|
3406
3420
|
}, initialAppStore), {
|
|
3407
3421
|
fields: createFieldsSlice(set, get),
|
|
@@ -3796,6 +3810,118 @@ var init_styles_module2 = __esm({
|
|
|
3796
3810
|
}
|
|
3797
3811
|
});
|
|
3798
3812
|
|
|
3813
|
+
// lib/dictionary.ts
|
|
3814
|
+
var defaultDictionary, interpolate, getMessage;
|
|
3815
|
+
var init_dictionary = __esm({
|
|
3816
|
+
"lib/dictionary.ts"() {
|
|
3817
|
+
"use strict";
|
|
3818
|
+
init_react_import();
|
|
3819
|
+
defaultDictionary = {
|
|
3820
|
+
// Header
|
|
3821
|
+
"header-publish": "Publish",
|
|
3822
|
+
"header-undo": "undo",
|
|
3823
|
+
"header-redo": "redo",
|
|
3824
|
+
"header-toggle-leftsidebar": "Toggle left sidebar",
|
|
3825
|
+
"header-toggle-rightsidebar": "Toggle right sidebar",
|
|
3826
|
+
"header-toggle-menubar": "Toggle menu bar",
|
|
3827
|
+
// Component action bar
|
|
3828
|
+
"action-selectparent": "Select parent",
|
|
3829
|
+
"action-duplicate": "Duplicate",
|
|
3830
|
+
"action-delete": "Delete",
|
|
3831
|
+
// Fallback labels — shared by the breadcrumbs, fields panel and header
|
|
3832
|
+
"label-page": "Page",
|
|
3833
|
+
"label-component": "Component",
|
|
3834
|
+
// Outline
|
|
3835
|
+
"outline-empty": "No items",
|
|
3836
|
+
"outline-collapse": "Collapse",
|
|
3837
|
+
"outline-expand": "Expand",
|
|
3838
|
+
// Drawer (component list)
|
|
3839
|
+
"drawer-category-collapse": "Collapse {title}",
|
|
3840
|
+
"drawer-category-expand": "Expand {title}",
|
|
3841
|
+
"drawer-category-other": "Other",
|
|
3842
|
+
// Canvas
|
|
3843
|
+
"canvas-noconfig": "No configuration for {type}",
|
|
3844
|
+
// Fields
|
|
3845
|
+
"field-readonly": "Read-only",
|
|
3846
|
+
"field-arrayitem-summary": "Item #{index}",
|
|
3847
|
+
"field-arrayitem-duplicate": "Duplicate",
|
|
3848
|
+
"field-arrayitem-delete": "Delete",
|
|
3849
|
+
"field-external-selectdata": "Select data",
|
|
3850
|
+
"field-external-search": "Search",
|
|
3851
|
+
"field-external-togglefilters": "Toggle filters",
|
|
3852
|
+
"field-external-item": "External item",
|
|
3853
|
+
"field-external-result-singular": "{count} result",
|
|
3854
|
+
"field-external-result-plural": "{count} results",
|
|
3855
|
+
// Rich text field
|
|
3856
|
+
"field-richtext-bold": "Bold",
|
|
3857
|
+
"field-richtext-italic": "Italic",
|
|
3858
|
+
"field-richtext-underline": "Underline",
|
|
3859
|
+
"field-richtext-strikethrough": "Strikethrough",
|
|
3860
|
+
"field-richtext-blockquote": "Blockquote",
|
|
3861
|
+
"field-richtext-code-inline": "Inline code",
|
|
3862
|
+
"field-richtext-code-block": "Code block",
|
|
3863
|
+
"field-richtext-list-bullet": "Bullet list",
|
|
3864
|
+
"field-richtext-list-ordered": "Ordered list",
|
|
3865
|
+
"field-richtext-horizontalrule": "Horizontal rule",
|
|
3866
|
+
"field-richtext-align-left": "Align left",
|
|
3867
|
+
"field-richtext-align-center": "Align center",
|
|
3868
|
+
"field-richtext-align-right": "Align right",
|
|
3869
|
+
"field-richtext-align-justify": "Justify",
|
|
3870
|
+
"field-richtext-select": "Select",
|
|
3871
|
+
"field-richtext-headingselect-1": "Heading 1",
|
|
3872
|
+
"field-richtext-headingselect-2": "Heading 2",
|
|
3873
|
+
"field-richtext-headingselect-3": "Heading 3",
|
|
3874
|
+
"field-richtext-headingselect-4": "Heading 4",
|
|
3875
|
+
"field-richtext-headingselect-5": "Heading 5",
|
|
3876
|
+
"field-richtext-headingselect-6": "Heading 6",
|
|
3877
|
+
"field-richtext-alignselect-left": "Left",
|
|
3878
|
+
"field-richtext-alignselect-center": "Center",
|
|
3879
|
+
"field-richtext-alignselect-right": "Right",
|
|
3880
|
+
"field-richtext-alignselect-justify": "Justify",
|
|
3881
|
+
"field-richtext-listselect-bullet": "Bullet list",
|
|
3882
|
+
"field-richtext-listselect-ordered": "Ordered list",
|
|
3883
|
+
// Viewport controls
|
|
3884
|
+
"viewport-zoom-in": "Zoom viewport in",
|
|
3885
|
+
"viewport-zoom-out": "Zoom viewport out",
|
|
3886
|
+
"viewport-zoom-auto": "{zoom}% (Auto)",
|
|
3887
|
+
"viewport-toggle-menu": "Toggle viewport menu",
|
|
3888
|
+
"viewport-switch": "Switch to {label} viewport",
|
|
3889
|
+
"viewport-switch-default": "Switch viewport",
|
|
3890
|
+
// Plugin bar
|
|
3891
|
+
"plugin-blocks": "Blocks",
|
|
3892
|
+
"plugin-outline": "Outline",
|
|
3893
|
+
"plugin-fields": "Fields",
|
|
3894
|
+
"plugin-components": "Components",
|
|
3895
|
+
// Layout
|
|
3896
|
+
"layout-maximize": "maximize",
|
|
3897
|
+
"layout-minimize": "minimize",
|
|
3898
|
+
// Loader
|
|
3899
|
+
"loader-loading": "loading"
|
|
3900
|
+
};
|
|
3901
|
+
interpolate = (template, params) => template.replace(
|
|
3902
|
+
/\{(\w+)\}/g,
|
|
3903
|
+
(match, key) => params[key] !== void 0 ? String(params[key]) : match
|
|
3904
|
+
);
|
|
3905
|
+
getMessage = (dictionary, key, params) => {
|
|
3906
|
+
var _a;
|
|
3907
|
+
const message = (_a = dictionary[key]) != null ? _a : defaultDictionary[key];
|
|
3908
|
+
return params ? interpolate(message, params) : message;
|
|
3909
|
+
};
|
|
3910
|
+
}
|
|
3911
|
+
});
|
|
3912
|
+
|
|
3913
|
+
// lib/use-message.ts
|
|
3914
|
+
var useMessage;
|
|
3915
|
+
var init_use_message = __esm({
|
|
3916
|
+
"lib/use-message.ts"() {
|
|
3917
|
+
"use strict";
|
|
3918
|
+
init_react_import();
|
|
3919
|
+
init_store();
|
|
3920
|
+
init_dictionary();
|
|
3921
|
+
useMessage = (key, params) => useAppStore((s) => getMessage(s.dictionary, key, params));
|
|
3922
|
+
}
|
|
3923
|
+
});
|
|
3924
|
+
|
|
3799
3925
|
// components/Loader/index.tsx
|
|
3800
3926
|
var import_jsx_runtime3, getClassName2, Loader;
|
|
3801
3927
|
var init_Loader = __esm({
|
|
@@ -3804,6 +3930,7 @@ var init_Loader = __esm({
|
|
|
3804
3930
|
init_react_import();
|
|
3805
3931
|
init_lib();
|
|
3806
3932
|
init_styles_module2();
|
|
3933
|
+
init_use_message();
|
|
3807
3934
|
import_jsx_runtime3 = require("react/jsx-runtime");
|
|
3808
3935
|
getClassName2 = get_class_name_factory_default("Loader", styles_module_default4);
|
|
3809
3936
|
Loader = (_a) => {
|
|
@@ -3814,6 +3941,7 @@ var init_Loader = __esm({
|
|
|
3814
3941
|
"color",
|
|
3815
3942
|
"size"
|
|
3816
3943
|
]);
|
|
3944
|
+
const loadingLabel = useMessage("loader-loading");
|
|
3817
3945
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3818
3946
|
"span",
|
|
3819
3947
|
__spreadValues({
|
|
@@ -3823,7 +3951,7 @@ var init_Loader = __esm({
|
|
|
3823
3951
|
height: size,
|
|
3824
3952
|
color
|
|
3825
3953
|
},
|
|
3826
|
-
"aria-label":
|
|
3954
|
+
"aria-label": loadingLabel
|
|
3827
3955
|
}, props)
|
|
3828
3956
|
);
|
|
3829
3957
|
};
|
|
@@ -4018,6 +4146,7 @@ var init_Control = __esm({
|
|
|
4018
4146
|
// components/RichTextMenu/controls/AlignLeft.tsx
|
|
4019
4147
|
function AlignLeft2() {
|
|
4020
4148
|
const { editor, editorState } = useControlContext();
|
|
4149
|
+
const alignLeftLabel = useMessage("field-richtext-align-left");
|
|
4021
4150
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4022
4151
|
Control,
|
|
4023
4152
|
{
|
|
@@ -4028,7 +4157,7 @@ function AlignLeft2() {
|
|
|
4028
4157
|
},
|
|
4029
4158
|
disabled: !(editorState == null ? void 0 : editorState.canAlignLeft),
|
|
4030
4159
|
active: editorState == null ? void 0 : editorState.isAlignLeft,
|
|
4031
|
-
title:
|
|
4160
|
+
title: alignLeftLabel
|
|
4032
4161
|
}
|
|
4033
4162
|
);
|
|
4034
4163
|
}
|
|
@@ -4039,6 +4168,7 @@ var init_AlignLeft = __esm({
|
|
|
4039
4168
|
init_react_import();
|
|
4040
4169
|
init_lucide_react();
|
|
4041
4170
|
init_Control();
|
|
4171
|
+
init_use_message();
|
|
4042
4172
|
init_use_control_context();
|
|
4043
4173
|
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4044
4174
|
}
|
|
@@ -4047,6 +4177,7 @@ var init_AlignLeft = __esm({
|
|
|
4047
4177
|
// components/RichTextMenu/controls/AlignCenter.tsx
|
|
4048
4178
|
function AlignCenter2() {
|
|
4049
4179
|
const { editor, editorState } = useControlContext();
|
|
4180
|
+
const alignCenterLabel = useMessage("field-richtext-align-center");
|
|
4050
4181
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4051
4182
|
Control,
|
|
4052
4183
|
{
|
|
@@ -4057,7 +4188,7 @@ function AlignCenter2() {
|
|
|
4057
4188
|
},
|
|
4058
4189
|
disabled: !(editorState == null ? void 0 : editorState.canAlignCenter),
|
|
4059
4190
|
active: editorState == null ? void 0 : editorState.isAlignCenter,
|
|
4060
|
-
title:
|
|
4191
|
+
title: alignCenterLabel
|
|
4061
4192
|
}
|
|
4062
4193
|
);
|
|
4063
4194
|
}
|
|
@@ -4068,6 +4199,7 @@ var init_AlignCenter = __esm({
|
|
|
4068
4199
|
init_react_import();
|
|
4069
4200
|
init_lucide_react();
|
|
4070
4201
|
init_Control();
|
|
4202
|
+
init_use_message();
|
|
4071
4203
|
init_use_control_context();
|
|
4072
4204
|
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4073
4205
|
}
|
|
@@ -4076,6 +4208,7 @@ var init_AlignCenter = __esm({
|
|
|
4076
4208
|
// components/RichTextMenu/controls/AlignRight.tsx
|
|
4077
4209
|
function AlignRight2() {
|
|
4078
4210
|
const { editor, editorState } = useControlContext();
|
|
4211
|
+
const alignRightLabel = useMessage("field-richtext-align-right");
|
|
4079
4212
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4080
4213
|
Control,
|
|
4081
4214
|
{
|
|
@@ -4086,7 +4219,7 @@ function AlignRight2() {
|
|
|
4086
4219
|
},
|
|
4087
4220
|
disabled: !(editorState == null ? void 0 : editorState.canAlignRight),
|
|
4088
4221
|
active: editorState == null ? void 0 : editorState.isAlignRight,
|
|
4089
|
-
title:
|
|
4222
|
+
title: alignRightLabel
|
|
4090
4223
|
}
|
|
4091
4224
|
);
|
|
4092
4225
|
}
|
|
@@ -4097,6 +4230,7 @@ var init_AlignRight = __esm({
|
|
|
4097
4230
|
init_react_import();
|
|
4098
4231
|
init_lucide_react();
|
|
4099
4232
|
init_Control();
|
|
4233
|
+
init_use_message();
|
|
4100
4234
|
init_use_control_context();
|
|
4101
4235
|
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4102
4236
|
}
|
|
@@ -4105,6 +4239,7 @@ var init_AlignRight = __esm({
|
|
|
4105
4239
|
// components/RichTextMenu/controls/AlignJustify.tsx
|
|
4106
4240
|
function AlignJustify2() {
|
|
4107
4241
|
const { editor, editorState } = useControlContext();
|
|
4242
|
+
const alignJustifyLabel = useMessage("field-richtext-align-justify");
|
|
4108
4243
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4109
4244
|
Control,
|
|
4110
4245
|
{
|
|
@@ -4115,7 +4250,7 @@ function AlignJustify2() {
|
|
|
4115
4250
|
},
|
|
4116
4251
|
disabled: !(editorState == null ? void 0 : editorState.canAlignJustify),
|
|
4117
4252
|
active: editorState == null ? void 0 : editorState.isAlignJustify,
|
|
4118
|
-
title:
|
|
4253
|
+
title: alignJustifyLabel
|
|
4119
4254
|
}
|
|
4120
4255
|
);
|
|
4121
4256
|
}
|
|
@@ -4126,6 +4261,7 @@ var init_AlignJustify = __esm({
|
|
|
4126
4261
|
init_react_import();
|
|
4127
4262
|
init_lucide_react();
|
|
4128
4263
|
init_Control();
|
|
4264
|
+
init_use_message();
|
|
4129
4265
|
init_use_control_context();
|
|
4130
4266
|
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4131
4267
|
}
|
|
@@ -4161,6 +4297,7 @@ var init_Select = __esm({
|
|
|
4161
4297
|
init_lib();
|
|
4162
4298
|
init_IconButton2();
|
|
4163
4299
|
init_ActionBar();
|
|
4300
|
+
init_use_message();
|
|
4164
4301
|
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4165
4302
|
getClassName15 = get_class_name_factory_default("Select", styles_module_default11);
|
|
4166
4303
|
getItemClassName = get_class_name_factory_default("SelectItem", styles_module_default11);
|
|
@@ -4181,6 +4318,7 @@ var init_Select = __esm({
|
|
|
4181
4318
|
disabled = false
|
|
4182
4319
|
}) => {
|
|
4183
4320
|
const [open, setOpen] = (0, import_react25.useState)(false);
|
|
4321
|
+
const selectLabel = useMessage("field-richtext-select");
|
|
4184
4322
|
const hasOptions = options.length > 0;
|
|
4185
4323
|
const isDisabled = disabled || !hasOptions;
|
|
4186
4324
|
const buttonInner = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName15("buttonInner"), children: [
|
|
@@ -4190,7 +4328,7 @@ var init_Select = __esm({
|
|
|
4190
4328
|
const trigger = mode === "actionBar" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Action, { active: value !== defaultValue, disabled: isDisabled, children: buttonInner }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4191
4329
|
IconButton,
|
|
4192
4330
|
{
|
|
4193
|
-
title:
|
|
4331
|
+
title: selectLabel,
|
|
4194
4332
|
active: value !== defaultValue,
|
|
4195
4333
|
disabled: isDisabled,
|
|
4196
4334
|
children: buttonInner
|
|
@@ -4273,21 +4411,32 @@ var init_SelectControl = __esm({
|
|
|
4273
4411
|
});
|
|
4274
4412
|
|
|
4275
4413
|
// components/RichTextMenu/controls/AlignSelect/use-options.ts
|
|
4276
|
-
var import_react27,
|
|
4414
|
+
var import_react27, optionIcons, useAlignOptions;
|
|
4277
4415
|
var init_use_options = __esm({
|
|
4278
4416
|
"components/RichTextMenu/controls/AlignSelect/use-options.ts"() {
|
|
4279
4417
|
"use strict";
|
|
4280
4418
|
init_react_import();
|
|
4281
4419
|
import_react27 = require("react");
|
|
4282
4420
|
init_lucide_react();
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4421
|
+
init_use_message();
|
|
4422
|
+
optionIcons = {
|
|
4423
|
+
left: AlignLeft,
|
|
4424
|
+
center: AlignCenter,
|
|
4425
|
+
right: AlignRight,
|
|
4426
|
+
justify: AlignJustify
|
|
4288
4427
|
};
|
|
4289
4428
|
useAlignOptions = (fieldOptions) => {
|
|
4290
4429
|
var _a;
|
|
4430
|
+
const leftString = useMessage("field-richtext-alignselect-left");
|
|
4431
|
+
const centerString = useMessage("field-richtext-alignselect-center");
|
|
4432
|
+
const rightString = useMessage("field-richtext-alignselect-right");
|
|
4433
|
+
const justifyString = useMessage("field-richtext-alignselect-justify");
|
|
4434
|
+
const optionLabels = {
|
|
4435
|
+
left: leftString,
|
|
4436
|
+
center: centerString,
|
|
4437
|
+
right: rightString,
|
|
4438
|
+
justify: justifyString
|
|
4439
|
+
};
|
|
4291
4440
|
let blockOptions = [];
|
|
4292
4441
|
if ((fieldOptions == null ? void 0 : fieldOptions.textAlign) !== false) {
|
|
4293
4442
|
if (!((_a = fieldOptions == null ? void 0 : fieldOptions.textAlign) == null ? void 0 : _a.alignments)) {
|
|
@@ -4310,10 +4459,10 @@ var init_use_options = __esm({
|
|
|
4310
4459
|
return (0, import_react27.useMemo)(
|
|
4311
4460
|
() => blockOptions.map((item) => ({
|
|
4312
4461
|
value: item,
|
|
4313
|
-
label:
|
|
4314
|
-
icon:
|
|
4462
|
+
label: optionLabels[item],
|
|
4463
|
+
icon: optionIcons[item]
|
|
4315
4464
|
})),
|
|
4316
|
-
[blockOptions]
|
|
4465
|
+
[blockOptions, optionLabels]
|
|
4317
4466
|
);
|
|
4318
4467
|
};
|
|
4319
4468
|
}
|
|
@@ -4422,6 +4571,7 @@ var init_AlignSelect = __esm({
|
|
|
4422
4571
|
// components/RichTextMenu/controls/Bold.tsx
|
|
4423
4572
|
function Bold2() {
|
|
4424
4573
|
const { editor, editorState } = useControlContext();
|
|
4574
|
+
const boldLabel = useMessage("field-richtext-bold");
|
|
4425
4575
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4426
4576
|
Control,
|
|
4427
4577
|
{
|
|
@@ -4432,7 +4582,7 @@ function Bold2() {
|
|
|
4432
4582
|
},
|
|
4433
4583
|
disabled: !(editorState == null ? void 0 : editorState.canBold),
|
|
4434
4584
|
active: editorState == null ? void 0 : editorState.isBold,
|
|
4435
|
-
title:
|
|
4585
|
+
title: boldLabel
|
|
4436
4586
|
}
|
|
4437
4587
|
);
|
|
4438
4588
|
}
|
|
@@ -4443,6 +4593,7 @@ var init_Bold = __esm({
|
|
|
4443
4593
|
init_react_import();
|
|
4444
4594
|
init_lucide_react();
|
|
4445
4595
|
init_Control();
|
|
4596
|
+
init_use_message();
|
|
4446
4597
|
init_use_control_context();
|
|
4447
4598
|
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4448
4599
|
}
|
|
@@ -4451,6 +4602,7 @@ var init_Bold = __esm({
|
|
|
4451
4602
|
// components/RichTextMenu/controls/Italic.tsx
|
|
4452
4603
|
function Italic2() {
|
|
4453
4604
|
const { editor, editorState } = useControlContext();
|
|
4605
|
+
const italicLabel = useMessage("field-richtext-italic");
|
|
4454
4606
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4455
4607
|
Control,
|
|
4456
4608
|
{
|
|
@@ -4461,7 +4613,7 @@ function Italic2() {
|
|
|
4461
4613
|
},
|
|
4462
4614
|
disabled: !(editorState == null ? void 0 : editorState.canItalic),
|
|
4463
4615
|
active: editorState == null ? void 0 : editorState.isItalic,
|
|
4464
|
-
title:
|
|
4616
|
+
title: italicLabel
|
|
4465
4617
|
}
|
|
4466
4618
|
);
|
|
4467
4619
|
}
|
|
@@ -4472,6 +4624,7 @@ var init_Italic = __esm({
|
|
|
4472
4624
|
init_react_import();
|
|
4473
4625
|
init_lucide_react();
|
|
4474
4626
|
init_Control();
|
|
4627
|
+
init_use_message();
|
|
4475
4628
|
init_use_control_context();
|
|
4476
4629
|
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4477
4630
|
}
|
|
@@ -4480,6 +4633,7 @@ var init_Italic = __esm({
|
|
|
4480
4633
|
// components/RichTextMenu/controls/Underline.tsx
|
|
4481
4634
|
function Underline2() {
|
|
4482
4635
|
const { editor, editorState } = useControlContext();
|
|
4636
|
+
const underlineLabel = useMessage("field-richtext-underline");
|
|
4483
4637
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4484
4638
|
Control,
|
|
4485
4639
|
{
|
|
@@ -4490,7 +4644,7 @@ function Underline2() {
|
|
|
4490
4644
|
},
|
|
4491
4645
|
disabled: !(editorState == null ? void 0 : editorState.canUnderline),
|
|
4492
4646
|
active: editorState == null ? void 0 : editorState.isUnderline,
|
|
4493
|
-
title:
|
|
4647
|
+
title: underlineLabel
|
|
4494
4648
|
}
|
|
4495
4649
|
);
|
|
4496
4650
|
}
|
|
@@ -4501,6 +4655,7 @@ var init_Underline = __esm({
|
|
|
4501
4655
|
init_react_import();
|
|
4502
4656
|
init_lucide_react();
|
|
4503
4657
|
init_Control();
|
|
4658
|
+
init_use_message();
|
|
4504
4659
|
init_use_control_context();
|
|
4505
4660
|
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4506
4661
|
}
|
|
@@ -4509,6 +4664,7 @@ var init_Underline = __esm({
|
|
|
4509
4664
|
// components/RichTextMenu/controls/Strikethrough.tsx
|
|
4510
4665
|
function Strikethrough2() {
|
|
4511
4666
|
const { editor, editorState } = useControlContext();
|
|
4667
|
+
const strikethroughLabel = useMessage("field-richtext-strikethrough");
|
|
4512
4668
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4513
4669
|
Control,
|
|
4514
4670
|
{
|
|
@@ -4519,7 +4675,7 @@ function Strikethrough2() {
|
|
|
4519
4675
|
},
|
|
4520
4676
|
disabled: !(editorState == null ? void 0 : editorState.canStrike),
|
|
4521
4677
|
active: editorState == null ? void 0 : editorState.isStrike,
|
|
4522
|
-
title:
|
|
4678
|
+
title: strikethroughLabel
|
|
4523
4679
|
}
|
|
4524
4680
|
);
|
|
4525
4681
|
}
|
|
@@ -4530,6 +4686,7 @@ var init_Strikethrough = __esm({
|
|
|
4530
4686
|
init_react_import();
|
|
4531
4687
|
init_lucide_react();
|
|
4532
4688
|
init_Control();
|
|
4689
|
+
init_use_message();
|
|
4533
4690
|
init_use_control_context();
|
|
4534
4691
|
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4535
4692
|
}
|
|
@@ -4538,6 +4695,7 @@ var init_Strikethrough = __esm({
|
|
|
4538
4695
|
// components/RichTextMenu/controls/InlineCode.tsx
|
|
4539
4696
|
function InlineCode() {
|
|
4540
4697
|
const { editor, editorState } = useControlContext();
|
|
4698
|
+
const inlineCodeLabel = useMessage("field-richtext-code-inline");
|
|
4541
4699
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4542
4700
|
Control,
|
|
4543
4701
|
{
|
|
@@ -4548,7 +4706,7 @@ function InlineCode() {
|
|
|
4548
4706
|
},
|
|
4549
4707
|
disabled: !(editorState == null ? void 0 : editorState.canInlineCode),
|
|
4550
4708
|
active: editorState == null ? void 0 : editorState.isInlineCode,
|
|
4551
|
-
title:
|
|
4709
|
+
title: inlineCodeLabel
|
|
4552
4710
|
}
|
|
4553
4711
|
);
|
|
4554
4712
|
}
|
|
@@ -4559,6 +4717,7 @@ var init_InlineCode = __esm({
|
|
|
4559
4717
|
init_react_import();
|
|
4560
4718
|
init_lucide_react();
|
|
4561
4719
|
init_Control();
|
|
4720
|
+
init_use_message();
|
|
4562
4721
|
init_use_control_context();
|
|
4563
4722
|
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4564
4723
|
}
|
|
@@ -4567,6 +4726,7 @@ var init_InlineCode = __esm({
|
|
|
4567
4726
|
// components/RichTextMenu/controls/BulletList.tsx
|
|
4568
4727
|
function BulletList() {
|
|
4569
4728
|
const { editor, editorState } = useControlContext();
|
|
4729
|
+
const bulletListLabel = useMessage("field-richtext-list-bullet");
|
|
4570
4730
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4571
4731
|
Control,
|
|
4572
4732
|
{
|
|
@@ -4577,7 +4737,7 @@ function BulletList() {
|
|
|
4577
4737
|
},
|
|
4578
4738
|
disabled: !(editorState == null ? void 0 : editorState.canBulletList),
|
|
4579
4739
|
active: editorState == null ? void 0 : editorState.isBulletList,
|
|
4580
|
-
title:
|
|
4740
|
+
title: bulletListLabel
|
|
4581
4741
|
}
|
|
4582
4742
|
);
|
|
4583
4743
|
}
|
|
@@ -4588,6 +4748,7 @@ var init_BulletList = __esm({
|
|
|
4588
4748
|
init_react_import();
|
|
4589
4749
|
init_lucide_react();
|
|
4590
4750
|
init_Control();
|
|
4751
|
+
init_use_message();
|
|
4591
4752
|
init_use_control_context();
|
|
4592
4753
|
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4593
4754
|
}
|
|
@@ -4596,6 +4757,7 @@ var init_BulletList = __esm({
|
|
|
4596
4757
|
// components/RichTextMenu/controls/OrderedList.tsx
|
|
4597
4758
|
function OrderedList() {
|
|
4598
4759
|
const { editor, editorState } = useControlContext();
|
|
4760
|
+
const orderedListLabel = useMessage("field-richtext-list-ordered");
|
|
4599
4761
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4600
4762
|
Control,
|
|
4601
4763
|
{
|
|
@@ -4606,7 +4768,7 @@ function OrderedList() {
|
|
|
4606
4768
|
},
|
|
4607
4769
|
disabled: !(editorState == null ? void 0 : editorState.canOrderedList),
|
|
4608
4770
|
active: editorState == null ? void 0 : editorState.isOrderedList,
|
|
4609
|
-
title:
|
|
4771
|
+
title: orderedListLabel
|
|
4610
4772
|
}
|
|
4611
4773
|
);
|
|
4612
4774
|
}
|
|
@@ -4617,6 +4779,7 @@ var init_OrderedList = __esm({
|
|
|
4617
4779
|
init_react_import();
|
|
4618
4780
|
init_lucide_react();
|
|
4619
4781
|
init_Control();
|
|
4782
|
+
init_use_message();
|
|
4620
4783
|
init_use_control_context();
|
|
4621
4784
|
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4622
4785
|
}
|
|
@@ -4625,6 +4788,7 @@ var init_OrderedList = __esm({
|
|
|
4625
4788
|
// components/RichTextMenu/controls/CodeBlock.tsx
|
|
4626
4789
|
function CodeBlock() {
|
|
4627
4790
|
const { editor, editorState } = useControlContext();
|
|
4791
|
+
const codeBlockLabel = useMessage("field-richtext-code-block");
|
|
4628
4792
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4629
4793
|
Control,
|
|
4630
4794
|
{
|
|
@@ -4635,7 +4799,7 @@ function CodeBlock() {
|
|
|
4635
4799
|
},
|
|
4636
4800
|
disabled: !(editorState == null ? void 0 : editorState.canCodeBlock),
|
|
4637
4801
|
active: editorState == null ? void 0 : editorState.isCodeBlock,
|
|
4638
|
-
title:
|
|
4802
|
+
title: codeBlockLabel
|
|
4639
4803
|
}
|
|
4640
4804
|
);
|
|
4641
4805
|
}
|
|
@@ -4646,6 +4810,7 @@ var init_CodeBlock = __esm({
|
|
|
4646
4810
|
init_react_import();
|
|
4647
4811
|
init_lucide_react();
|
|
4648
4812
|
init_Control();
|
|
4813
|
+
init_use_message();
|
|
4649
4814
|
init_use_control_context();
|
|
4650
4815
|
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4651
4816
|
}
|
|
@@ -4654,6 +4819,7 @@ var init_CodeBlock = __esm({
|
|
|
4654
4819
|
// components/RichTextMenu/controls/Blockquote.tsx
|
|
4655
4820
|
function Blockquote() {
|
|
4656
4821
|
const { editor, editorState } = useControlContext();
|
|
4822
|
+
const blockquoteLabel = useMessage("field-richtext-blockquote");
|
|
4657
4823
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4658
4824
|
Control,
|
|
4659
4825
|
{
|
|
@@ -4664,7 +4830,7 @@ function Blockquote() {
|
|
|
4664
4830
|
},
|
|
4665
4831
|
disabled: !(editorState == null ? void 0 : editorState.canBlockquote),
|
|
4666
4832
|
active: editorState == null ? void 0 : editorState.isBlockquote,
|
|
4667
|
-
title:
|
|
4833
|
+
title: blockquoteLabel
|
|
4668
4834
|
}
|
|
4669
4835
|
);
|
|
4670
4836
|
}
|
|
@@ -4675,6 +4841,7 @@ var init_Blockquote = __esm({
|
|
|
4675
4841
|
init_react_import();
|
|
4676
4842
|
init_lucide_react();
|
|
4677
4843
|
init_Control();
|
|
4844
|
+
init_use_message();
|
|
4678
4845
|
init_use_control_context();
|
|
4679
4846
|
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4680
4847
|
}
|
|
@@ -4683,6 +4850,7 @@ var init_Blockquote = __esm({
|
|
|
4683
4850
|
// components/RichTextMenu/controls/HorizontalRule.tsx
|
|
4684
4851
|
function HorizontalRule() {
|
|
4685
4852
|
const { editor, editorState } = useControlContext();
|
|
4853
|
+
const horizontalRuleLabel = useMessage("field-richtext-horizontalrule");
|
|
4686
4854
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4687
4855
|
Control,
|
|
4688
4856
|
{
|
|
@@ -4692,7 +4860,7 @@ function HorizontalRule() {
|
|
|
4692
4860
|
editor == null ? void 0 : editor.chain().focus().setHorizontalRule().run();
|
|
4693
4861
|
},
|
|
4694
4862
|
disabled: !(editorState == null ? void 0 : editorState.canHorizontalRule),
|
|
4695
|
-
title:
|
|
4863
|
+
title: horizontalRuleLabel
|
|
4696
4864
|
}
|
|
4697
4865
|
);
|
|
4698
4866
|
}
|
|
@@ -4703,29 +4871,45 @@ var init_HorizontalRule = __esm({
|
|
|
4703
4871
|
init_react_import();
|
|
4704
4872
|
init_lucide_react();
|
|
4705
4873
|
init_Control();
|
|
4874
|
+
init_use_message();
|
|
4706
4875
|
init_use_control_context();
|
|
4707
4876
|
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4708
4877
|
}
|
|
4709
4878
|
});
|
|
4710
4879
|
|
|
4711
4880
|
// components/RichTextMenu/controls/HeadingSelect/use-options.ts
|
|
4712
|
-
var import_react30,
|
|
4881
|
+
var import_react30, optionIcons2, useHeadingOptions;
|
|
4713
4882
|
var init_use_options2 = __esm({
|
|
4714
4883
|
"components/RichTextMenu/controls/HeadingSelect/use-options.ts"() {
|
|
4715
4884
|
"use strict";
|
|
4716
4885
|
init_react_import();
|
|
4717
4886
|
import_react30 = require("react");
|
|
4718
4887
|
init_lucide_react();
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4888
|
+
init_use_message();
|
|
4889
|
+
optionIcons2 = {
|
|
4890
|
+
h1: Heading1,
|
|
4891
|
+
h2: Heading2,
|
|
4892
|
+
h3: Heading3,
|
|
4893
|
+
h4: Heading4,
|
|
4894
|
+
h5: Heading5,
|
|
4895
|
+
h6: Heading6
|
|
4726
4896
|
};
|
|
4727
4897
|
useHeadingOptions = (fieldOptions) => {
|
|
4728
4898
|
var _a;
|
|
4899
|
+
const h1String = useMessage("field-richtext-headingselect-1");
|
|
4900
|
+
const h2String = useMessage("field-richtext-headingselect-2");
|
|
4901
|
+
const h3String = useMessage("field-richtext-headingselect-3");
|
|
4902
|
+
const h4String = useMessage("field-richtext-headingselect-4");
|
|
4903
|
+
const h5String = useMessage("field-richtext-headingselect-5");
|
|
4904
|
+
const h6String = useMessage("field-richtext-headingselect-6");
|
|
4905
|
+
const optionLabels = {
|
|
4906
|
+
h1: h1String,
|
|
4907
|
+
h2: h2String,
|
|
4908
|
+
h3: h3String,
|
|
4909
|
+
h4: h4String,
|
|
4910
|
+
h5: h5String,
|
|
4911
|
+
h6: h6String
|
|
4912
|
+
};
|
|
4729
4913
|
let blockOptions = [];
|
|
4730
4914
|
if ((fieldOptions == null ? void 0 : fieldOptions.heading) !== false) {
|
|
4731
4915
|
if (!((_a = fieldOptions == null ? void 0 : fieldOptions.heading) == null ? void 0 : _a.levels)) {
|
|
@@ -4754,10 +4938,10 @@ var init_use_options2 = __esm({
|
|
|
4754
4938
|
return (0, import_react30.useMemo)(
|
|
4755
4939
|
() => blockOptions.map((item) => ({
|
|
4756
4940
|
value: item,
|
|
4757
|
-
label:
|
|
4758
|
-
icon:
|
|
4941
|
+
label: optionLabels[item],
|
|
4942
|
+
icon: optionIcons2[item]
|
|
4759
4943
|
})),
|
|
4760
|
-
[blockOptions]
|
|
4944
|
+
[blockOptions, optionLabels]
|
|
4761
4945
|
);
|
|
4762
4946
|
};
|
|
4763
4947
|
}
|
|
@@ -4867,18 +5051,25 @@ var init_HeadingSelect = __esm({
|
|
|
4867
5051
|
});
|
|
4868
5052
|
|
|
4869
5053
|
// components/RichTextMenu/controls/ListSelect/use-options.ts
|
|
4870
|
-
var import_react33,
|
|
5054
|
+
var import_react33, optionIcons3, useListOptions;
|
|
4871
5055
|
var init_use_options3 = __esm({
|
|
4872
5056
|
"components/RichTextMenu/controls/ListSelect/use-options.ts"() {
|
|
4873
5057
|
"use strict";
|
|
4874
5058
|
init_react_import();
|
|
4875
5059
|
import_react33 = require("react");
|
|
4876
5060
|
init_lucide_react();
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
5061
|
+
init_use_message();
|
|
5062
|
+
optionIcons3 = {
|
|
5063
|
+
ul: List,
|
|
5064
|
+
ol: ListOrdered
|
|
4880
5065
|
};
|
|
4881
5066
|
useListOptions = (fieldOptions) => {
|
|
5067
|
+
const ulString = useMessage("field-richtext-listselect-bullet");
|
|
5068
|
+
const olString = useMessage("field-richtext-listselect-ordered");
|
|
5069
|
+
const optionLabels = {
|
|
5070
|
+
ul: ulString,
|
|
5071
|
+
ol: olString
|
|
5072
|
+
};
|
|
4882
5073
|
let blockOptions = [];
|
|
4883
5074
|
if ((fieldOptions == null ? void 0 : fieldOptions.listItem) !== false) {
|
|
4884
5075
|
blockOptions = ["ul", "ol"];
|
|
@@ -4886,10 +5077,10 @@ var init_use_options3 = __esm({
|
|
|
4886
5077
|
return (0, import_react33.useMemo)(
|
|
4887
5078
|
() => blockOptions.map((item) => ({
|
|
4888
5079
|
value: item,
|
|
4889
|
-
label:
|
|
4890
|
-
icon:
|
|
5080
|
+
label: optionLabels[item],
|
|
5081
|
+
icon: optionIcons3[item]
|
|
4891
5082
|
})),
|
|
4892
|
-
[blockOptions]
|
|
5083
|
+
[blockOptions, optionLabels]
|
|
4893
5084
|
);
|
|
4894
5085
|
};
|
|
4895
5086
|
}
|
|
@@ -6445,6 +6636,7 @@ function setDeep(node, path, newVal) {
|
|
|
6445
6636
|
}
|
|
6446
6637
|
|
|
6447
6638
|
// components/AutoField/fields/ArrayField/index.tsx
|
|
6639
|
+
init_use_message();
|
|
6448
6640
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
6449
6641
|
var getClassName5 = get_class_name_factory_default("ArrayField", styles_module_default3);
|
|
6450
6642
|
var getClassNameItem = get_class_name_factory_default("ArrayFieldItem", styles_module_default3);
|
|
@@ -6458,12 +6650,15 @@ var ItemSummaryInner = ({
|
|
|
6458
6650
|
const path = `${[name]}[${index}]`;
|
|
6459
6651
|
return getDeep(s, path);
|
|
6460
6652
|
});
|
|
6653
|
+
const fallbackSummary = useMessage("field-arrayitem-summary", {
|
|
6654
|
+
index: originalIndex
|
|
6655
|
+
});
|
|
6461
6656
|
const itemSummary = (0, import_react18.useMemo)(() => {
|
|
6462
6657
|
if (data && field.getItemSummary) {
|
|
6463
6658
|
return field.getItemSummary(data, index);
|
|
6464
6659
|
}
|
|
6465
|
-
return
|
|
6466
|
-
}, [data, field, originalIndex, index]);
|
|
6660
|
+
return fallbackSummary;
|
|
6661
|
+
}, [data, field, originalIndex, index, fallbackSummary]);
|
|
6467
6662
|
return itemSummary;
|
|
6468
6663
|
};
|
|
6469
6664
|
var ItemSummary = (0, import_react18.memo)(ItemSummaryInner);
|
|
@@ -6685,6 +6880,8 @@ var ArrayField = ({
|
|
|
6685
6880
|
const newArrayState = regenerateArrayState(getValue());
|
|
6686
6881
|
setUi(mapArrayStateToUi(newArrayState), false);
|
|
6687
6882
|
}, [numItems]);
|
|
6883
|
+
const duplicateLabel = useMessage("field-arrayitem-duplicate");
|
|
6884
|
+
const deleteLabel = useMessage("field-arrayitem-delete");
|
|
6688
6885
|
if (field.type !== "array" || !field.arrayFields) {
|
|
6689
6886
|
return null;
|
|
6690
6887
|
}
|
|
@@ -6796,7 +6993,7 @@ var ArrayField = ({
|
|
|
6796
6993
|
existingValue.splice(index, 0, newItem);
|
|
6797
6994
|
updateValue(existingValue);
|
|
6798
6995
|
},
|
|
6799
|
-
title:
|
|
6996
|
+
title: duplicateLabel,
|
|
6800
6997
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Copy, { size: 16 })
|
|
6801
6998
|
}
|
|
6802
6999
|
) }),
|
|
@@ -6812,7 +7009,7 @@ var ArrayField = ({
|
|
|
6812
7009
|
existingValue.splice(index, 1);
|
|
6813
7010
|
updateValue(existingValue);
|
|
6814
7011
|
},
|
|
6815
|
-
title:
|
|
7012
|
+
title: deleteLabel,
|
|
6816
7013
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Trash, { size: 16 })
|
|
6817
7014
|
}
|
|
6818
7015
|
) })
|
|
@@ -7132,9 +7329,15 @@ var Button = (_a) => {
|
|
|
7132
7329
|
|
|
7133
7330
|
// components/ExternalInput/index.tsx
|
|
7134
7331
|
init_IconButton2();
|
|
7332
|
+
init_use_message();
|
|
7135
7333
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
7136
7334
|
var getClassName10 = get_class_name_factory_default("ExternalInput", styles_module_default6);
|
|
7137
7335
|
var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default6);
|
|
7336
|
+
var DefaultFooter = ({ count }) => {
|
|
7337
|
+
const singular = useMessage("field-external-result-singular", { count });
|
|
7338
|
+
const plural = useMessage("field-external-result-plural", { count });
|
|
7339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: getClassNameModal("footer"), children: count === 1 ? singular : plural });
|
|
7340
|
+
};
|
|
7138
7341
|
var dataCache = {};
|
|
7139
7342
|
var ExternalInput = ({
|
|
7140
7343
|
field,
|
|
@@ -7193,16 +7396,16 @@ var ExternalInput = ({
|
|
|
7193
7396
|
[id, field]
|
|
7194
7397
|
);
|
|
7195
7398
|
const Footer = (0, import_react22.useCallback)(
|
|
7196
|
-
(props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
7197
|
-
props.items.length,
|
|
7198
|
-
" result",
|
|
7199
|
-
props.items.length === 1 ? "" : "s"
|
|
7200
|
-
] }),
|
|
7399
|
+
(props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DefaultFooter, { count: props.items.length }),
|
|
7201
7400
|
[field.renderFooter]
|
|
7202
7401
|
);
|
|
7203
7402
|
(0, import_react22.useEffect)(() => {
|
|
7204
7403
|
search(searchQuery, filters);
|
|
7205
7404
|
}, []);
|
|
7405
|
+
const externalItemLabel = useMessage("field-external-item");
|
|
7406
|
+
const searchLabel = useMessage("field-external-search");
|
|
7407
|
+
const toggleFiltersLabel = useMessage("field-external-togglefilters");
|
|
7408
|
+
const selectDataLabel = useMessage("field-external-selectdata");
|
|
7206
7409
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
7207
7410
|
"div",
|
|
7208
7411
|
{
|
|
@@ -7221,7 +7424,7 @@ var ExternalInput = ({
|
|
|
7221
7424
|
onClick: () => setOpen(true),
|
|
7222
7425
|
className: getClassName10("button"),
|
|
7223
7426
|
disabled: readOnly,
|
|
7224
|
-
children: value ? field.getItemSummary ? field.getItemSummary(value) :
|
|
7427
|
+
children: value ? field.getItemSummary ? field.getItemSummary(value) : externalItemLabel : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
7225
7428
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Link, { size: "16" }),
|
|
7226
7429
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: field.placeholder })
|
|
7227
7430
|
] })
|
|
@@ -7257,7 +7460,7 @@ var ExternalInput = ({
|
|
|
7257
7460
|
children: [
|
|
7258
7461
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("searchForm"), children: [
|
|
7259
7462
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: getClassNameModal("search"), children: [
|
|
7260
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: getClassNameModal("searchIconText"), children:
|
|
7463
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: getClassNameModal("searchIconText"), children: searchLabel }),
|
|
7261
7464
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Search, { size: "18" }) }),
|
|
7262
7465
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7263
7466
|
"input",
|
|
@@ -7275,12 +7478,12 @@ var ExternalInput = ({
|
|
|
7275
7478
|
)
|
|
7276
7479
|
] }),
|
|
7277
7480
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("searchActions"), children: [
|
|
7278
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children:
|
|
7481
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children: searchLabel }),
|
|
7279
7482
|
hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7280
7483
|
IconButton,
|
|
7281
7484
|
{
|
|
7282
7485
|
type: "button",
|
|
7283
|
-
title:
|
|
7486
|
+
title: toggleFiltersLabel,
|
|
7284
7487
|
onClick: (e) => {
|
|
7285
7488
|
e.preventDefault();
|
|
7286
7489
|
e.stopPropagation();
|
|
@@ -7290,7 +7493,7 @@ var ExternalInput = ({
|
|
|
7290
7493
|
}
|
|
7291
7494
|
) })
|
|
7292
7495
|
] })
|
|
7293
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading7, { rank: "2", size: "xs", children: field.placeholder ||
|
|
7496
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading7, { rank: "2", size: "xs", children: field.placeholder || selectDataLabel }) }),
|
|
7294
7497
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: getClassNameModal("grid"), children: [
|
|
7295
7498
|
hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
|
|
7296
7499
|
const filterField = filterFields[fieldName];
|
|
@@ -7360,6 +7563,7 @@ var ExternalInput = ({
|
|
|
7360
7563
|
|
|
7361
7564
|
// components/AutoField/fields/ExternalField/index.tsx
|
|
7362
7565
|
init_lucide_react();
|
|
7566
|
+
init_use_message();
|
|
7363
7567
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
7364
7568
|
var ExternalField = ({
|
|
7365
7569
|
field,
|
|
@@ -7375,6 +7579,7 @@ var ExternalField = ({
|
|
|
7375
7579
|
const value = useDeepField(name);
|
|
7376
7580
|
const validField = field;
|
|
7377
7581
|
const deprecatedField = field;
|
|
7582
|
+
const selectDataLabel = useMessage("field-external-selectdata");
|
|
7378
7583
|
(0, import_react23.useEffect)(() => {
|
|
7379
7584
|
if (deprecatedField.adaptor) {
|
|
7380
7585
|
console.error(
|
|
@@ -7397,7 +7602,7 @@ var ExternalField = ({
|
|
|
7397
7602
|
name,
|
|
7398
7603
|
field: __spreadProps(__spreadValues({}, validField), {
|
|
7399
7604
|
// DEPRECATED
|
|
7400
|
-
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder ||
|
|
7605
|
+
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || selectDataLabel,
|
|
7401
7606
|
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
|
7402
7607
|
mapRow: validField.mapRow,
|
|
7403
7608
|
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(null, null, function* () {
|
|
@@ -7740,6 +7945,7 @@ init_get_class_name_factory();
|
|
|
7740
7945
|
var import_react48 = require("react");
|
|
7741
7946
|
init_lucide_react();
|
|
7742
7947
|
init_store();
|
|
7948
|
+
init_use_message();
|
|
7743
7949
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7744
7950
|
var getClassName19 = get_class_name_factory_default("Input", styles_module_default2);
|
|
7745
7951
|
var FieldLabel = ({
|
|
@@ -7751,11 +7957,12 @@ var FieldLabel = ({
|
|
|
7751
7957
|
className
|
|
7752
7958
|
}) => {
|
|
7753
7959
|
const El = el;
|
|
7960
|
+
const readOnlyLabel = useMessage("field-readonly");
|
|
7754
7961
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(El, { className, children: [
|
|
7755
7962
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: getClassName19("label"), children: [
|
|
7756
7963
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: getClassName19("labelIcon"), children: icon }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, {}),
|
|
7757
7964
|
label,
|
|
7758
|
-
readOnly && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: getClassName19("disabledIcon"), title:
|
|
7965
|
+
readOnly && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: getClassName19("disabledIcon"), title: readOnlyLabel, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Lock, { size: "12" }) })
|
|
7759
7966
|
] }),
|
|
7760
7967
|
children
|
|
7761
7968
|
] });
|
|
@@ -8138,6 +8345,7 @@ function assignRefs(refs, node) {
|
|
|
8138
8345
|
}
|
|
8139
8346
|
|
|
8140
8347
|
// components/DraggableComponent/index.tsx
|
|
8348
|
+
init_use_message();
|
|
8141
8349
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
8142
8350
|
var getClassName21 = get_class_name_factory_default("DraggableComponent", styles_module_default15);
|
|
8143
8351
|
var DEBUG2 = false;
|
|
@@ -8626,9 +8834,12 @@ var DraggableComponent = ({
|
|
|
8626
8834
|
}
|
|
8627
8835
|
setDragAxis(autoDragAxis);
|
|
8628
8836
|
}, [ref, userDragAxis, autoDragAxis]);
|
|
8837
|
+
const selectParentLabel = useMessage("action-selectparent");
|
|
8838
|
+
const duplicateLabel = useMessage("action-duplicate");
|
|
8839
|
+
const deleteLabel = useMessage("action-delete");
|
|
8629
8840
|
const parentAction = (0, import_react52.useMemo)(
|
|
8630
|
-
() => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ActionBar.Action, { onClick: onSelectParent, label:
|
|
8631
|
-
[ctx == null ? void 0 : ctx.areaId]
|
|
8841
|
+
() => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ActionBar.Action, { onClick: onSelectParent, label: selectParentLabel, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CornerLeftUp, { size: 16 }) }),
|
|
8842
|
+
[ctx == null ? void 0 : ctx.areaId, selectParentLabel]
|
|
8632
8843
|
);
|
|
8633
8844
|
const nextContextValue = (0, import_react52.useMemo)(
|
|
8634
8845
|
() => __spreadProps(__spreadValues({}, ctx), {
|
|
@@ -8708,8 +8919,15 @@ var DraggableComponent = ({
|
|
|
8708
8919
|
),
|
|
8709
8920
|
hasNormalActions && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ActionBar.Separator, {})
|
|
8710
8921
|
] }),
|
|
8711
|
-
permissions.duplicate && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8712
|
-
|
|
8922
|
+
permissions.duplicate && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8923
|
+
ActionBar.Action,
|
|
8924
|
+
{
|
|
8925
|
+
onClick: onDuplicate,
|
|
8926
|
+
label: duplicateLabel,
|
|
8927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Copy, { className: getClassName21("actionsAction") })
|
|
8928
|
+
}
|
|
8929
|
+
),
|
|
8930
|
+
permissions.delete && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ActionBar.Action, { onClick: onDelete, label: deleteLabel, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Trash, { className: getClassName21("actionsAction") }) })
|
|
8713
8931
|
]
|
|
8714
8932
|
}
|
|
8715
8933
|
)
|
|
@@ -9235,6 +9453,7 @@ init_react_import();
|
|
|
9235
9453
|
var import_react63 = require("react");
|
|
9236
9454
|
init_map_fields();
|
|
9237
9455
|
function useFieldTransformsTracked(config, item, transforms, readOnly, forceReadOnly) {
|
|
9456
|
+
const prevMappers = (0, import_react63.useRef)(null);
|
|
9238
9457
|
const prevProps = (0, import_react63.useRef)(null);
|
|
9239
9458
|
const prevResult = (0, import_react63.useRef)(item.props);
|
|
9240
9459
|
const mappers = (0, import_react63.useMemo)(
|
|
@@ -9242,29 +9461,44 @@ function useFieldTransformsTracked(config, item, transforms, readOnly, forceRead
|
|
|
9242
9461
|
[transforms, readOnly, forceReadOnly]
|
|
9243
9462
|
);
|
|
9244
9463
|
const transformedProps = (0, import_react63.useMemo)(() => {
|
|
9245
|
-
var _a, _b, _c;
|
|
9246
|
-
const changedProps = {};
|
|
9464
|
+
var _a, _b, _c, _d;
|
|
9247
9465
|
const componentConfig = item.type === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[item.type];
|
|
9466
|
+
const componentFields = (_b = componentConfig == null ? void 0 : componentConfig.fields) != null ? _b : {};
|
|
9467
|
+
const fullRemap = prevMappers.current !== mappers;
|
|
9468
|
+
let changedFields;
|
|
9248
9469
|
let changeIncludesSlot = false;
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
changedProps[fieldName] = item.props[fieldName];
|
|
9253
|
-
if (fieldType === "slot") {
|
|
9470
|
+
if (!prevProps.current || fullRemap) {
|
|
9471
|
+
for (const fieldName in item.props) {
|
|
9472
|
+
if (((_c = componentFields[fieldName]) == null ? void 0 : _c.type) === "slot") {
|
|
9254
9473
|
changeIncludesSlot = true;
|
|
9255
9474
|
}
|
|
9256
9475
|
}
|
|
9476
|
+
} else {
|
|
9477
|
+
changedFields = ["id"];
|
|
9478
|
+
const allFieldNames = /* @__PURE__ */ new Set([
|
|
9479
|
+
...Object.keys(item.props),
|
|
9480
|
+
...Object.keys(prevProps.current)
|
|
9481
|
+
]);
|
|
9482
|
+
for (const fieldName of allFieldNames) {
|
|
9483
|
+
if (item.props[fieldName] !== prevProps.current[fieldName]) {
|
|
9484
|
+
changedFields.push(fieldName);
|
|
9485
|
+
if (((_d = componentFields[fieldName]) == null ? void 0 : _d.type) === "slot") {
|
|
9486
|
+
changeIncludesSlot = true;
|
|
9487
|
+
}
|
|
9488
|
+
}
|
|
9489
|
+
}
|
|
9257
9490
|
}
|
|
9258
|
-
changedProps.id = item.props.id;
|
|
9259
|
-
prevProps.current = item.props;
|
|
9260
9491
|
const mapped = mapFields(
|
|
9261
|
-
|
|
9492
|
+
item,
|
|
9262
9493
|
mappers,
|
|
9263
9494
|
config,
|
|
9264
9495
|
false,
|
|
9265
|
-
changeIncludesSlot
|
|
9496
|
+
changeIncludesSlot,
|
|
9497
|
+
changedFields
|
|
9266
9498
|
).props;
|
|
9267
|
-
|
|
9499
|
+
prevProps.current = item.props;
|
|
9500
|
+
prevMappers.current = mappers;
|
|
9501
|
+
prevResult.current = changedFields ? __spreadValues(__spreadValues({}, prevResult.current), mapped) : mapped;
|
|
9268
9502
|
return prevResult.current;
|
|
9269
9503
|
}, [config, item, mappers]);
|
|
9270
9504
|
const mergedProps = (0, import_react63.useMemo)(
|
|
@@ -9274,6 +9508,9 @@ function useFieldTransformsTracked(config, item, transforms, readOnly, forceRead
|
|
|
9274
9508
|
return mergedProps;
|
|
9275
9509
|
}
|
|
9276
9510
|
|
|
9511
|
+
// components/DropZone/index.tsx
|
|
9512
|
+
init_use_message();
|
|
9513
|
+
|
|
9277
9514
|
// lib/field-transforms/default-transforms/inline-text-transform.tsx
|
|
9278
9515
|
init_react_import();
|
|
9279
9516
|
|
|
@@ -9899,7 +10136,7 @@ var DropZoneChild = ({
|
|
|
9899
10136
|
inDroppableZone,
|
|
9900
10137
|
itemRef
|
|
9901
10138
|
}) => {
|
|
9902
|
-
var _a, _b;
|
|
10139
|
+
var _a, _b, _c, _d;
|
|
9903
10140
|
const metadata = useAppStore((s) => s.metadata);
|
|
9904
10141
|
const ctx = (0, import_react68.useContext)(dropZoneContext);
|
|
9905
10142
|
const { depth = 1 } = ctx != null ? ctx : {};
|
|
@@ -9967,7 +10204,11 @@ var DropZoneChild = ({
|
|
|
9967
10204
|
return ((_a2 = s.selectedItem) == null ? void 0 : _a2.props.id) === componentId || false;
|
|
9968
10205
|
}
|
|
9969
10206
|
);
|
|
9970
|
-
|
|
10207
|
+
const componentLabel = useMessage("label-component");
|
|
10208
|
+
const noConfigMessage = useMessage("canvas-noconfig", {
|
|
10209
|
+
type: (_b = (_a = item == null ? void 0 : item.type) == null ? void 0 : _a.toString()) != null ? _b : ""
|
|
10210
|
+
});
|
|
10211
|
+
let label = (_d = (_c = componentConfig == null ? void 0 : componentConfig.label) != null ? _c : item == null ? void 0 : item.type.toString()) != null ? _d : componentLabel;
|
|
9971
10212
|
const defaultsProps = (0, import_react68.useMemo)(
|
|
9972
10213
|
() => __spreadProps(__spreadValues(__spreadValues({}, componentConfig == null ? void 0 : componentConfig.defaultProps), item == null ? void 0 : item.props), {
|
|
9973
10214
|
puck: puckProps,
|
|
@@ -10001,10 +10242,7 @@ var DropZoneChild = ({
|
|
|
10001
10242
|
isLoading
|
|
10002
10243
|
);
|
|
10003
10244
|
if (!item) return;
|
|
10004
|
-
const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ (0, import_jsx_runtime68.
|
|
10005
|
-
"No configuration for ",
|
|
10006
|
-
item.type
|
|
10007
|
-
] });
|
|
10245
|
+
const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { style: { padding: 48, textAlign: "center" }, children: noConfigMessage });
|
|
10008
10246
|
let componentType = item.type;
|
|
10009
10247
|
const isInserting = "previewType" in item ? item.previewType === "insert" : false;
|
|
10010
10248
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
@@ -11457,6 +11695,7 @@ var styles_module_default19 = { "ComponentList": "_ComponentList_htktj_1", "Comp
|
|
|
11457
11695
|
init_get_class_name_factory();
|
|
11458
11696
|
var import_react75 = require("react");
|
|
11459
11697
|
init_store();
|
|
11698
|
+
init_use_message();
|
|
11460
11699
|
init_lucide_react();
|
|
11461
11700
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
11462
11701
|
var getClassName28 = get_class_name_factory_default("ComponentList", styles_module_default19);
|
|
@@ -11490,6 +11729,12 @@ var ComponentList = ({
|
|
|
11490
11729
|
const componentList = useAppStore((s) => s.state.ui.componentList);
|
|
11491
11730
|
const { expanded = true } = componentList[id] || {};
|
|
11492
11731
|
const contentId = `puck-drawer-category-${id}`;
|
|
11732
|
+
const collapseTitle = useMessage("drawer-category-collapse", {
|
|
11733
|
+
title: title != null ? title : ""
|
|
11734
|
+
});
|
|
11735
|
+
const expandTitle = useMessage("drawer-category-expand", {
|
|
11736
|
+
title: title != null ? title : ""
|
|
11737
|
+
});
|
|
11493
11738
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: getClassName28({ isExpanded: expanded }), children: [
|
|
11494
11739
|
title && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
11495
11740
|
"button",
|
|
@@ -11505,7 +11750,7 @@ var ComponentList = ({
|
|
|
11505
11750
|
})
|
|
11506
11751
|
})
|
|
11507
11752
|
}),
|
|
11508
|
-
title: expanded ?
|
|
11753
|
+
title: expanded ? collapseTitle : expandTitle,
|
|
11509
11754
|
children: [
|
|
11510
11755
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { children: title }),
|
|
11511
11756
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: getClassName28("titleIcon"), children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ChevronUp, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ChevronDown, { size: 12 }) })
|
|
@@ -11529,11 +11774,13 @@ ComponentList.Item = ComponentListItem;
|
|
|
11529
11774
|
|
|
11530
11775
|
// lib/use-component-list.tsx
|
|
11531
11776
|
init_store();
|
|
11777
|
+
init_use_message();
|
|
11532
11778
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
11533
11779
|
var useComponentList = () => {
|
|
11534
11780
|
const [componentList, setComponentList] = (0, import_react76.useState)();
|
|
11535
11781
|
const config = useAppStore((s) => s.config);
|
|
11536
11782
|
const uiComponentList = useAppStore((s) => s.state.ui.componentList);
|
|
11783
|
+
const otherLabel = useMessage("drawer-category-other");
|
|
11537
11784
|
(0, import_react76.useEffect)(() => {
|
|
11538
11785
|
var _a, _b, _c;
|
|
11539
11786
|
if (Object.keys(uiComponentList).length > 0) {
|
|
@@ -11541,6 +11788,7 @@ var useComponentList = () => {
|
|
|
11541
11788
|
let _componentList;
|
|
11542
11789
|
_componentList = Object.entries(uiComponentList).map(
|
|
11543
11790
|
([categoryKey, category]) => {
|
|
11791
|
+
var _a2, _b2;
|
|
11544
11792
|
if (!category.components) {
|
|
11545
11793
|
return null;
|
|
11546
11794
|
}
|
|
@@ -11554,14 +11802,14 @@ var useComponentList = () => {
|
|
|
11554
11802
|
ComponentList,
|
|
11555
11803
|
{
|
|
11556
11804
|
id: categoryKey,
|
|
11557
|
-
title: category.title || categoryKey,
|
|
11805
|
+
title: ((_b2 = (_a2 = config.categories) == null ? void 0 : _a2[categoryKey]) == null ? void 0 : _b2.title) || category.title || categoryKey,
|
|
11558
11806
|
children: category.components.map((componentName, i) => {
|
|
11559
|
-
var
|
|
11807
|
+
var _a3;
|
|
11560
11808
|
const componentConf = config.components[componentName] || {};
|
|
11561
11809
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
11562
11810
|
ComponentList.Item,
|
|
11563
11811
|
{
|
|
11564
|
-
label: (
|
|
11812
|
+
label: (_a3 = componentConf["label"]) != null ? _a3 : componentName,
|
|
11565
11813
|
name: componentName,
|
|
11566
11814
|
index: i
|
|
11567
11815
|
},
|
|
@@ -11582,7 +11830,7 @@ var useComponentList = () => {
|
|
|
11582
11830
|
ComponentList,
|
|
11583
11831
|
{
|
|
11584
11832
|
id: "other",
|
|
11585
|
-
title: ((_c = uiComponentList.other) == null ? void 0 : _c.title) ||
|
|
11833
|
+
title: ((_c = uiComponentList.other) == null ? void 0 : _c.title) || otherLabel,
|
|
11586
11834
|
children: remainingComponents.map((componentName, i) => {
|
|
11587
11835
|
var _a2;
|
|
11588
11836
|
const componentConf = config.components[componentName] || {};
|
|
@@ -11603,7 +11851,7 @@ var useComponentList = () => {
|
|
|
11603
11851
|
}
|
|
11604
11852
|
setComponentList(_componentList);
|
|
11605
11853
|
}
|
|
11606
|
-
}, [config.categories, config.components, uiComponentList]);
|
|
11854
|
+
}, [config.categories, config.components, uiComponentList, otherLabel]);
|
|
11607
11855
|
return componentList;
|
|
11608
11856
|
};
|
|
11609
11857
|
|
|
@@ -15038,6 +15286,7 @@ init_lucide_react();
|
|
|
15038
15286
|
init_root_droppable_id();
|
|
15039
15287
|
var import_react81 = require("react");
|
|
15040
15288
|
init_store();
|
|
15289
|
+
init_use_message();
|
|
15041
15290
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
15042
15291
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
15043
15292
|
var getClassName30 = get_class_name_factory_default("LayerTree", styles_module_default21);
|
|
@@ -15073,11 +15322,12 @@ var buildLayerNode = ({
|
|
|
15073
15322
|
nodes,
|
|
15074
15323
|
zoneCompound,
|
|
15075
15324
|
zones,
|
|
15076
|
-
zonesByParent
|
|
15325
|
+
zonesByParent,
|
|
15326
|
+
componentFallbackLabel = "Component"
|
|
15077
15327
|
}) => {
|
|
15078
15328
|
var _a, _b, _c;
|
|
15079
15329
|
const nodeData = nodes[itemId];
|
|
15080
|
-
const componentType = ((_a = nodeData == null ? void 0 : nodeData.data.type) == null ? void 0 : _a.toString()) ||
|
|
15330
|
+
const componentType = ((_a = nodeData == null ? void 0 : nodeData.data.type) == null ? void 0 : _a.toString()) || componentFallbackLabel;
|
|
15081
15331
|
const label = (_c = (_b = config.components[componentType]) == null ? void 0 : _b.label) != null ? _c : componentType;
|
|
15082
15332
|
const childZoneCompounds = zonesByParent[itemId] || [];
|
|
15083
15333
|
return {
|
|
@@ -15087,7 +15337,8 @@ var buildLayerNode = ({
|
|
|
15087
15337
|
nodes,
|
|
15088
15338
|
zoneCompound: childZoneCompound,
|
|
15089
15339
|
zones,
|
|
15090
|
-
zonesByParent
|
|
15340
|
+
zonesByParent,
|
|
15341
|
+
componentFallbackLabel
|
|
15091
15342
|
})
|
|
15092
15343
|
),
|
|
15093
15344
|
componentType,
|
|
@@ -15103,7 +15354,8 @@ var buildLayerTree = ({
|
|
|
15103
15354
|
nodes,
|
|
15104
15355
|
zoneCompound,
|
|
15105
15356
|
zones,
|
|
15106
|
-
zonesByParent = getZonesByParent(zones)
|
|
15357
|
+
zonesByParent = getZonesByParent(zones),
|
|
15358
|
+
componentFallbackLabel = "Component"
|
|
15107
15359
|
}) => {
|
|
15108
15360
|
var _a, _b;
|
|
15109
15361
|
const contentIds = (_b = (_a = zones[zoneCompound]) == null ? void 0 : _a.contentIds) != null ? _b : [];
|
|
@@ -15116,7 +15368,8 @@ var buildLayerTree = ({
|
|
|
15116
15368
|
nodes,
|
|
15117
15369
|
zoneCompound,
|
|
15118
15370
|
zones,
|
|
15119
|
-
zonesByParent
|
|
15371
|
+
zonesByParent,
|
|
15372
|
+
componentFallbackLabel
|
|
15120
15373
|
})
|
|
15121
15374
|
),
|
|
15122
15375
|
label: getZoneLabel(zoneCompound, nodes, config, label),
|
|
@@ -15161,6 +15414,8 @@ var Layer = (0, import_react81.forwardRef)(function Layer2({
|
|
|
15161
15414
|
(s) => s.hoveringComponent === node.itemId
|
|
15162
15415
|
);
|
|
15163
15416
|
const containsZone = node.childZones.length > 0;
|
|
15417
|
+
const collapseLabel = useMessage("outline-collapse");
|
|
15418
|
+
const expandLabel = useMessage("outline-expand");
|
|
15164
15419
|
const setItemSelector = (0, import_react81.useCallback)(
|
|
15165
15420
|
(itemSelector) => {
|
|
15166
15421
|
dispatch({ type: "setUi", ui: { itemSelector } });
|
|
@@ -15210,7 +15465,7 @@ var Layer = (0, import_react81.forwardRef)(function Layer2({
|
|
|
15210
15465
|
"div",
|
|
15211
15466
|
{
|
|
15212
15467
|
className: getClassNameLayer("chevron"),
|
|
15213
|
-
title: isSelected ?
|
|
15468
|
+
title: isSelected ? collapseLabel : expandLabel,
|
|
15214
15469
|
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ChevronDown, { size: "12" })
|
|
15215
15470
|
}
|
|
15216
15471
|
),
|
|
@@ -15278,8 +15533,9 @@ var StaticLayerTreeItems = ({
|
|
|
15278
15533
|
selectedPathIds,
|
|
15279
15534
|
tree
|
|
15280
15535
|
}) => {
|
|
15536
|
+
const noItemsLabel = useMessage("outline-empty");
|
|
15281
15537
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("ul", { className: getClassName30(), children: [
|
|
15282
|
-
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: getClassName30("helper"), children:
|
|
15538
|
+
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: getClassName30("helper"), children: noItemsLabel }),
|
|
15283
15539
|
tree.items.map((node) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
15284
15540
|
Layer,
|
|
15285
15541
|
{
|
|
@@ -15301,6 +15557,7 @@ var VirtualizedLayerTreeItems = ({
|
|
|
15301
15557
|
tree
|
|
15302
15558
|
}) => {
|
|
15303
15559
|
const listRef = (0, import_react81.useRef)(null);
|
|
15560
|
+
const noItemsLabel = useMessage("outline-empty");
|
|
15304
15561
|
const virtualizer = (0, import_react_virtual2.useVirtualizer)({
|
|
15305
15562
|
count: tree.items.length,
|
|
15306
15563
|
estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
|
|
@@ -15369,7 +15626,7 @@ var VirtualizedLayerTreeItems = ({
|
|
|
15369
15626
|
);
|
|
15370
15627
|
}
|
|
15371
15628
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("ul", { className: getClassName30(), ref: listRef, children: [
|
|
15372
|
-
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: getClassName30("helper"), children:
|
|
15629
|
+
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: getClassName30("helper"), children: noItemsLabel }),
|
|
15373
15630
|
renderedItems
|
|
15374
15631
|
] });
|
|
15375
15632
|
};
|
|
@@ -15392,6 +15649,7 @@ var LayerTree = ({
|
|
|
15392
15649
|
|
|
15393
15650
|
// components/Puck/components/Outline/index.tsx
|
|
15394
15651
|
init_store();
|
|
15652
|
+
init_use_message();
|
|
15395
15653
|
var import_react82 = require("react");
|
|
15396
15654
|
|
|
15397
15655
|
// lib/data/find-zones-for-area.ts
|
|
@@ -15414,6 +15672,7 @@ var Outline = () => {
|
|
|
15414
15672
|
var _a;
|
|
15415
15673
|
return ((_a = s.selectedItem) == null ? void 0 : _a.props.id) || null;
|
|
15416
15674
|
});
|
|
15675
|
+
const componentFallbackLabel = useMessage("label-component");
|
|
15417
15676
|
const rootZones = useAppStore(
|
|
15418
15677
|
(0, import_shallow8.useShallow)((s) => findZonesForArea(s.state, "root"))
|
|
15419
15678
|
);
|
|
@@ -15431,10 +15690,11 @@ var Outline = () => {
|
|
|
15431
15690
|
label: rootZones.length === 1 ? "" : zoneCompound.split(":")[1],
|
|
15432
15691
|
nodes,
|
|
15433
15692
|
zoneCompound,
|
|
15434
|
-
zones
|
|
15693
|
+
zones,
|
|
15694
|
+
componentFallbackLabel
|
|
15435
15695
|
})
|
|
15436
15696
|
),
|
|
15437
|
-
[config, nodes, rootZones, zones]
|
|
15697
|
+
[config, nodes, rootZones, zones, componentFallbackLabel]
|
|
15438
15698
|
);
|
|
15439
15699
|
const Wrapper = (0, import_react82.useMemo)(() => outlineOverride || "div", [outlineOverride]);
|
|
15440
15700
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
@@ -15608,7 +15868,8 @@ var generateUsePuck = (store, getState) => {
|
|
|
15608
15868
|
const parentNode = store.state.indexes.nodes[parentId];
|
|
15609
15869
|
if (!parentNode) return;
|
|
15610
15870
|
return parentNode.data;
|
|
15611
|
-
}
|
|
15871
|
+
},
|
|
15872
|
+
dictionary: store.dictionary
|
|
15612
15873
|
};
|
|
15613
15874
|
storeData.__private = {
|
|
15614
15875
|
appState: store.state
|
|
@@ -15625,7 +15886,8 @@ var convertToPickedStore = (store) => {
|
|
|
15625
15886
|
dispatch: store.dispatch,
|
|
15626
15887
|
permissions: store.permissions,
|
|
15627
15888
|
history: store.history,
|
|
15628
|
-
selectedItem: store.selectedItem
|
|
15889
|
+
selectedItem: store.selectedItem,
|
|
15890
|
+
dictionary: store.dictionary
|
|
15629
15891
|
};
|
|
15630
15892
|
};
|
|
15631
15893
|
var useRegisterUsePuckStore = (appStore) => {
|
|
@@ -15693,6 +15955,7 @@ var styles_module_default22 = { "Puck": "_Puck_mr27u_19", "Puck-portal": "_Puck-
|
|
|
15693
15955
|
|
|
15694
15956
|
// components/Puck/components/Layout/index.tsx
|
|
15695
15957
|
init_store();
|
|
15958
|
+
init_use_message();
|
|
15696
15959
|
|
|
15697
15960
|
// components/DefaultOverride/index.tsx
|
|
15698
15961
|
init_react_import();
|
|
@@ -15741,6 +16004,7 @@ var styles_module_default23 = { "MenuBar": "_MenuBar_1hxnj_1", "MenuBar--menuOpe
|
|
|
15741
16004
|
|
|
15742
16005
|
// components/MenuBar/index.tsx
|
|
15743
16006
|
init_store();
|
|
16007
|
+
init_use_message();
|
|
15744
16008
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
15745
16009
|
var getClassName31 = get_class_name_factory_default("MenuBar", styles_module_default23);
|
|
15746
16010
|
function MenuBar({
|
|
@@ -15752,6 +16016,8 @@ function MenuBar({
|
|
|
15752
16016
|
const forward = useAppStore((s) => s.history.forward);
|
|
15753
16017
|
const hasFuture = useAppStore((s) => s.history.hasFuture());
|
|
15754
16018
|
const hasPast = useAppStore((s) => s.history.hasPast());
|
|
16019
|
+
const undoLabel = useMessage("header-undo");
|
|
16020
|
+
const redoLabel = useMessage("header-redo");
|
|
15755
16021
|
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
15756
16022
|
"div",
|
|
15757
16023
|
{
|
|
@@ -15772,7 +16038,7 @@ function MenuBar({
|
|
|
15772
16038
|
IconButton,
|
|
15773
16039
|
{
|
|
15774
16040
|
type: "button",
|
|
15775
|
-
title:
|
|
16041
|
+
title: undoLabel,
|
|
15776
16042
|
disabled: !hasPast,
|
|
15777
16043
|
onClick: back,
|
|
15778
16044
|
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Undo2, { size: 21 })
|
|
@@ -15782,7 +16048,7 @@ function MenuBar({
|
|
|
15782
16048
|
IconButton,
|
|
15783
16049
|
{
|
|
15784
16050
|
type: "button",
|
|
15785
|
-
title:
|
|
16051
|
+
title: redoLabel,
|
|
15786
16052
|
disabled: !hasFuture,
|
|
15787
16053
|
onClick: forward,
|
|
15788
16054
|
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Redo2, { size: 21 })
|
|
@@ -15797,6 +16063,7 @@ function MenuBar({
|
|
|
15797
16063
|
|
|
15798
16064
|
// components/Puck/components/Header/index.tsx
|
|
15799
16065
|
init_lib();
|
|
16066
|
+
init_use_message();
|
|
15800
16067
|
|
|
15801
16068
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Header/styles.module.css#css-module
|
|
15802
16069
|
init_react_import();
|
|
@@ -15877,6 +16144,11 @@ var HeaderInner = ({
|
|
|
15877
16144
|
},
|
|
15878
16145
|
[dispatch, leftSideBarVisible, rightSideBarVisible]
|
|
15879
16146
|
);
|
|
16147
|
+
const publishLabel = useMessage("header-publish");
|
|
16148
|
+
const pageLabel = useMessage("label-page");
|
|
16149
|
+
const toggleLeftLabel = useMessage("header-toggle-leftsidebar");
|
|
16150
|
+
const toggleRightLabel = useMessage("header-toggle-rightsidebar");
|
|
16151
|
+
const toggleMenuLabel = useMessage("header-toggle-menubar");
|
|
15880
16152
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
15881
16153
|
CustomHeader,
|
|
15882
16154
|
{
|
|
@@ -15888,7 +16160,7 @@ var HeaderInner = ({
|
|
|
15888
16160
|
onPublish && onPublish(data);
|
|
15889
16161
|
},
|
|
15890
16162
|
icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Globe, { size: "14px" }),
|
|
15891
|
-
children:
|
|
16163
|
+
children: publishLabel
|
|
15892
16164
|
}
|
|
15893
16165
|
) }) }),
|
|
15894
16166
|
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
@@ -15908,7 +16180,7 @@ var HeaderInner = ({
|
|
|
15908
16180
|
onClick: () => {
|
|
15909
16181
|
toggleSidebars("left");
|
|
15910
16182
|
},
|
|
15911
|
-
title:
|
|
16183
|
+
title: toggleLeftLabel,
|
|
15912
16184
|
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PanelLeft, { focusable: "false" })
|
|
15913
16185
|
}
|
|
15914
16186
|
) }),
|
|
@@ -15919,13 +16191,13 @@ var HeaderInner = ({
|
|
|
15919
16191
|
onClick: () => {
|
|
15920
16192
|
toggleSidebars("right");
|
|
15921
16193
|
},
|
|
15922
|
-
title:
|
|
16194
|
+
title: toggleRightLabel,
|
|
15923
16195
|
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PanelRight, { focusable: "false" })
|
|
15924
16196
|
}
|
|
15925
16197
|
) })
|
|
15926
16198
|
] }),
|
|
15927
16199
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: getClassName32("title"), children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Heading7, { rank: "2", size: "xs", children: [
|
|
15928
|
-
headerTitle || rootTitle ||
|
|
16200
|
+
headerTitle || rootTitle || pageLabel,
|
|
15929
16201
|
headerPath && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
15930
16202
|
" ",
|
|
15931
16203
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("code", { className: getClassName32("path"), children: headerPath })
|
|
@@ -15939,7 +16211,7 @@ var HeaderInner = ({
|
|
|
15939
16211
|
onClick: () => {
|
|
15940
16212
|
return setMenuOpen(!menuOpen);
|
|
15941
16213
|
},
|
|
15942
|
-
title:
|
|
16214
|
+
title: toggleMenuLabel,
|
|
15943
16215
|
children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ChevronDown, { focusable: "false" })
|
|
15944
16216
|
}
|
|
15945
16217
|
) }),
|
|
@@ -15957,7 +16229,7 @@ var HeaderInner = ({
|
|
|
15957
16229
|
onPublish && onPublish(data);
|
|
15958
16230
|
},
|
|
15959
16231
|
icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Globe, { size: "14px" }),
|
|
15960
|
-
children:
|
|
16232
|
+
children: publishLabel
|
|
15961
16233
|
}
|
|
15962
16234
|
) }),
|
|
15963
16235
|
setMenuOpen
|
|
@@ -15998,6 +16270,7 @@ init_lucide_react();
|
|
|
15998
16270
|
init_react_import();
|
|
15999
16271
|
var import_react87 = require("react");
|
|
16000
16272
|
init_store();
|
|
16273
|
+
init_use_message();
|
|
16001
16274
|
var useBreadcrumbs = (renderCount) => {
|
|
16002
16275
|
const selectedId = useAppStore((s) => {
|
|
16003
16276
|
var _a;
|
|
@@ -16009,13 +16282,15 @@ var useBreadcrumbs = (renderCount) => {
|
|
|
16009
16282
|
return (_a = s.state.indexes.nodes[selectedId]) == null ? void 0 : _a.path;
|
|
16010
16283
|
});
|
|
16011
16284
|
const appStore = useAppStoreApi();
|
|
16285
|
+
const pageLabel = useMessage("label-page");
|
|
16286
|
+
const componentLabel = useMessage("label-component");
|
|
16012
16287
|
return (0, import_react87.useMemo)(() => {
|
|
16013
16288
|
const breadcrumbs = (path == null ? void 0 : path.map((zoneCompound) => {
|
|
16014
16289
|
var _a, _b, _c, _d;
|
|
16015
16290
|
const [componentId] = zoneCompound.split(":");
|
|
16016
16291
|
if (componentId === "root") {
|
|
16017
16292
|
return {
|
|
16018
|
-
label: ((_a = config == null ? void 0 : config.root) == null ? void 0 : _a.label) ||
|
|
16293
|
+
label: ((_a = config == null ? void 0 : config.root) == null ? void 0 : _a.label) || pageLabel,
|
|
16019
16294
|
selector: null
|
|
16020
16295
|
};
|
|
16021
16296
|
}
|
|
@@ -16023,7 +16298,7 @@ var useBreadcrumbs = (renderCount) => {
|
|
|
16023
16298
|
const parentId = node.path[node.path.length - 1];
|
|
16024
16299
|
const contentIds = ((_b = appStore.getState().state.indexes.zones[parentId]) == null ? void 0 : _b.contentIds) || [];
|
|
16025
16300
|
const index = contentIds.indexOf(componentId);
|
|
16026
|
-
const label = node ? (_d = (_c = config.components[node.data.type]) == null ? void 0 : _c.label) != null ? _d : node.data.type :
|
|
16301
|
+
const label = node ? (_d = (_c = config.components[node.data.type]) == null ? void 0 : _c.label) != null ? _d : node.data.type : componentLabel;
|
|
16027
16302
|
return {
|
|
16028
16303
|
label,
|
|
16029
16304
|
selector: node ? {
|
|
@@ -16036,7 +16311,7 @@ var useBreadcrumbs = (renderCount) => {
|
|
|
16036
16311
|
return breadcrumbs.slice(breadcrumbs.length - renderCount);
|
|
16037
16312
|
}
|
|
16038
16313
|
return breadcrumbs;
|
|
16039
|
-
}, [path, renderCount]);
|
|
16314
|
+
}, [path, renderCount, pageLabel, componentLabel]);
|
|
16040
16315
|
};
|
|
16041
16316
|
|
|
16042
16317
|
// components/Breadcrumbs/index.tsx
|
|
@@ -16098,6 +16373,7 @@ init_react_import();
|
|
|
16098
16373
|
init_lucide_react();
|
|
16099
16374
|
init_IconButton2();
|
|
16100
16375
|
init_store();
|
|
16376
|
+
init_use_message();
|
|
16101
16377
|
var import_react88 = require("react");
|
|
16102
16378
|
init_lib();
|
|
16103
16379
|
|
|
@@ -16143,6 +16419,26 @@ var defaultZoomOptions = [
|
|
|
16143
16419
|
{ label: "150%", value: 1.5 },
|
|
16144
16420
|
{ label: "200%", value: 2 }
|
|
16145
16421
|
];
|
|
16422
|
+
var ViewportButton = ({
|
|
16423
|
+
viewport,
|
|
16424
|
+
isActive,
|
|
16425
|
+
onClick
|
|
16426
|
+
}) => {
|
|
16427
|
+
var _a;
|
|
16428
|
+
const switchTitle = useMessage("viewport-switch", {
|
|
16429
|
+
label: (_a = viewport.label) != null ? _a : ""
|
|
16430
|
+
});
|
|
16431
|
+
const switchDefaultTitle = useMessage("viewport-switch-default");
|
|
16432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16433
|
+
ActionButton,
|
|
16434
|
+
{
|
|
16435
|
+
title: viewport.label ? switchTitle : switchDefaultTitle,
|
|
16436
|
+
onClick,
|
|
16437
|
+
isActive,
|
|
16438
|
+
children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
|
|
16439
|
+
}
|
|
16440
|
+
);
|
|
16441
|
+
};
|
|
16146
16442
|
var ViewportControls = ({
|
|
16147
16443
|
autoZoom,
|
|
16148
16444
|
zoom,
|
|
@@ -16156,17 +16452,20 @@ var ViewportControls = ({
|
|
|
16156
16452
|
const defaultsContainAutoZoom = defaultZoomOptions.find(
|
|
16157
16453
|
(option) => option.value === autoZoom
|
|
16158
16454
|
);
|
|
16455
|
+
const autoZoomLabel = useMessage("viewport-zoom-auto", {
|
|
16456
|
+
zoom: (autoZoom * 100).toFixed(0)
|
|
16457
|
+
});
|
|
16159
16458
|
const zoomOptions = (0, import_react88.useMemo)(
|
|
16160
16459
|
() => [
|
|
16161
16460
|
...defaultZoomOptions,
|
|
16162
16461
|
...defaultsContainAutoZoom ? [] : [
|
|
16163
16462
|
{
|
|
16164
16463
|
value: autoZoom,
|
|
16165
|
-
label:
|
|
16464
|
+
label: autoZoomLabel
|
|
16166
16465
|
}
|
|
16167
16466
|
]
|
|
16168
16467
|
].filter((a) => a.value <= autoZoom).sort((a, b) => a.value > b.value ? 1 : -1),
|
|
16169
|
-
[autoZoom]
|
|
16468
|
+
[autoZoom, autoZoomLabel]
|
|
16170
16469
|
);
|
|
16171
16470
|
const [activeViewport, setActiveViewport] = (0, import_react88.useState)(
|
|
16172
16471
|
uiViewports.current.width
|
|
@@ -16175,6 +16474,9 @@ var ViewportControls = ({
|
|
|
16175
16474
|
setActiveViewport(uiViewports.current.width);
|
|
16176
16475
|
}, [uiViewports.current]);
|
|
16177
16476
|
const [isExpanded, setIsExpanded] = (0, import_react88.useState)(false);
|
|
16477
|
+
const zoomOutLabel = useMessage("viewport-zoom-out");
|
|
16478
|
+
const zoomInLabel = useMessage("viewport-zoom-in");
|
|
16479
|
+
const toggleMenuLabel = useMessage("viewport-toggle-menu");
|
|
16178
16480
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
16179
16481
|
"div",
|
|
16180
16482
|
{
|
|
@@ -16183,15 +16485,14 @@ var ViewportControls = ({
|
|
|
16183
16485
|
children: [
|
|
16184
16486
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: getClassName35("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName35("actionsInner"), children: [
|
|
16185
16487
|
viewports.map((viewport, i) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16186
|
-
|
|
16488
|
+
ViewportButton,
|
|
16187
16489
|
{
|
|
16188
|
-
|
|
16490
|
+
viewport,
|
|
16189
16491
|
onClick: () => {
|
|
16190
16492
|
setActiveViewport(viewport.width);
|
|
16191
16493
|
onViewportChange(viewport);
|
|
16192
16494
|
},
|
|
16193
|
-
isActive: activeViewport === viewport.width
|
|
16194
|
-
children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
|
|
16495
|
+
isActive: activeViewport === viewport.width
|
|
16195
16496
|
},
|
|
16196
16497
|
i
|
|
16197
16498
|
)),
|
|
@@ -16199,7 +16500,7 @@ var ViewportControls = ({
|
|
|
16199
16500
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16200
16501
|
ActionButton,
|
|
16201
16502
|
{
|
|
16202
|
-
title:
|
|
16503
|
+
title: zoomOutLabel,
|
|
16203
16504
|
disabled: zoom <= ((_a = zoomOptions[0]) == null ? void 0 : _a.value),
|
|
16204
16505
|
onClick: (e) => {
|
|
16205
16506
|
e.stopPropagation();
|
|
@@ -16216,7 +16517,7 @@ var ViewportControls = ({
|
|
|
16216
16517
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16217
16518
|
ActionButton,
|
|
16218
16519
|
{
|
|
16219
|
-
title:
|
|
16520
|
+
title: zoomInLabel,
|
|
16220
16521
|
disabled: zoom >= ((_b = zoomOptions[zoomOptions.length - 1]) == null ? void 0 : _b.value),
|
|
16221
16522
|
onClick: (e) => {
|
|
16222
16523
|
e.stopPropagation();
|
|
@@ -16259,7 +16560,7 @@ var ViewportControls = ({
|
|
|
16259
16560
|
"button",
|
|
16260
16561
|
{
|
|
16261
16562
|
className: getClassName35("toggleButton"),
|
|
16262
|
-
title:
|
|
16563
|
+
title: toggleMenuLabel,
|
|
16263
16564
|
onClick: () => setIsExpanded((s) => !s),
|
|
16264
16565
|
children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(X, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Monitor, { size: 16 })
|
|
16265
16566
|
}
|
|
@@ -16866,12 +17167,15 @@ var styles_module_default32 = { "BlocksPlugin": "_BlocksPlugin_9af19_1" };
|
|
|
16866
17167
|
init_lib();
|
|
16867
17168
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
16868
17169
|
var getClassName40 = get_class_name_factory_default("BlocksPlugin", styles_module_default32);
|
|
16869
|
-
var blocksPlugin = () =>
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
})
|
|
17170
|
+
var blocksPlugin = (props = {}) => {
|
|
17171
|
+
var _a, _b;
|
|
17172
|
+
return {
|
|
17173
|
+
name: "blocks",
|
|
17174
|
+
label: (_a = props.label) != null ? _a : "Blocks",
|
|
17175
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: getClassName40(), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Components, {}) }),
|
|
17176
|
+
icon: (_b = props.icon) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Hammer, {})
|
|
17177
|
+
};
|
|
17178
|
+
};
|
|
16875
17179
|
|
|
16876
17180
|
// plugins/outline/index.tsx
|
|
16877
17181
|
init_react_import();
|
|
@@ -16885,17 +17189,21 @@ var styles_module_default33 = { "OutlinePlugin": "_OutlinePlugin_16k03_1" };
|
|
|
16885
17189
|
init_lib();
|
|
16886
17190
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
16887
17191
|
var getClassName41 = get_class_name_factory_default("OutlinePlugin", styles_module_default33);
|
|
16888
|
-
var outlinePlugin = () =>
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
})
|
|
17192
|
+
var outlinePlugin = (props = {}) => {
|
|
17193
|
+
var _a, _b;
|
|
17194
|
+
return {
|
|
17195
|
+
name: "outline",
|
|
17196
|
+
label: (_a = props.label) != null ? _a : "Outline",
|
|
17197
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: getClassName41(), children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Outline, {}) }),
|
|
17198
|
+
icon: (_b = props.icon) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Layers, {})
|
|
17199
|
+
};
|
|
17200
|
+
};
|
|
16894
17201
|
|
|
16895
17202
|
// plugins/fields/index.tsx
|
|
16896
17203
|
init_react_import();
|
|
16897
17204
|
init_lucide_react();
|
|
16898
17205
|
init_store();
|
|
17206
|
+
init_use_message();
|
|
16899
17207
|
|
|
16900
17208
|
// css-module:/home/runner/work/puck/puck/packages/core/plugins/fields/styles.module.css#css-module
|
|
16901
17209
|
init_react_import();
|
|
@@ -16906,21 +17214,22 @@ init_lib();
|
|
|
16906
17214
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
16907
17215
|
var getClassName42 = get_class_name_factory_default("FieldsPlugin", styles_module_default34);
|
|
16908
17216
|
var CurrentTitle = () => {
|
|
17217
|
+
const pageLabel = useMessage("label-page");
|
|
16909
17218
|
const label = useAppStore((s) => {
|
|
16910
17219
|
var _a, _b;
|
|
16911
17220
|
const selectedItem = s.selectedItem;
|
|
16912
|
-
return selectedItem ? (_b = (_a = s.config.components[selectedItem.type]) == null ? void 0 : _a.label) != null ? _b : selectedItem.type :
|
|
17221
|
+
return selectedItem ? (_b = (_a = s.config.components[selectedItem.type]) == null ? void 0 : _a.label) != null ? _b : selectedItem.type : null;
|
|
16913
17222
|
});
|
|
16914
|
-
return label;
|
|
17223
|
+
return label != null ? label : pageLabel;
|
|
16915
17224
|
};
|
|
16916
|
-
var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
|
|
17225
|
+
var fieldsPlugin = ({ desktopSideBar = "right", label, icon } = {}) => ({
|
|
16917
17226
|
name: "fields",
|
|
16918
|
-
label: "Fields",
|
|
17227
|
+
label: label != null ? label : "Fields",
|
|
16919
17228
|
render: () => /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName42(), children: [
|
|
16920
17229
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassName42("header"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CurrentTitle, {}) }) }),
|
|
16921
17230
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Fields, {})
|
|
16922
17231
|
] }),
|
|
16923
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(RectangleEllipsis, {}),
|
|
17232
|
+
icon: icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(RectangleEllipsis, {}),
|
|
16924
17233
|
mobileOnly: desktopSideBar === "right"
|
|
16925
17234
|
});
|
|
16926
17235
|
|
|
@@ -16939,13 +17248,14 @@ var getLayoutClassName = get_class_name_factory_default("PuckLayout", styles_mod
|
|
|
16939
17248
|
var getPluginTabClassName = get_class_name_factory_default("PuckPluginTab", styles_module_default22);
|
|
16940
17249
|
var useBrowserLayoutEffect = typeof window === "undefined" ? import_react94.useEffect : import_react94.useLayoutEffect;
|
|
16941
17250
|
var FieldSideBar = () => {
|
|
17251
|
+
const pageLabel = useMessage("label-page");
|
|
16942
17252
|
const title = useAppStore(
|
|
16943
17253
|
(s) => {
|
|
16944
17254
|
var _a, _b, _c;
|
|
16945
|
-
return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : (
|
|
17255
|
+
return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : (_c = s.config.root) == null ? void 0 : _c.label;
|
|
16946
17256
|
}
|
|
16947
17257
|
);
|
|
16948
|
-
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Fields, {}) });
|
|
17258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title: title || pageLabel, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Fields, {}) });
|
|
16949
17259
|
};
|
|
16950
17260
|
var PluginTab = ({
|
|
16951
17261
|
children,
|
|
@@ -17047,16 +17357,22 @@ var Layout = ({ children }) => {
|
|
|
17047
17357
|
() => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
|
|
17048
17358
|
[plugins]
|
|
17049
17359
|
);
|
|
17360
|
+
const blocksLabel = useMessage("plugin-blocks");
|
|
17361
|
+
const outlineLabel = useMessage("plugin-outline");
|
|
17362
|
+
const fieldsLabel = useMessage("plugin-fields");
|
|
17050
17363
|
const pluginItems = (0, import_react94.useMemo)(() => {
|
|
17051
17364
|
const details = {};
|
|
17052
|
-
const defaultPlugins = [
|
|
17365
|
+
const defaultPlugins = [
|
|
17366
|
+
blocksPlugin({ label: blocksLabel }),
|
|
17367
|
+
outlinePlugin({ label: outlineLabel })
|
|
17368
|
+
];
|
|
17053
17369
|
const isLegacy = (plugin) => plugin.name === "legacy-side-bar" ? -1 : 0;
|
|
17054
17370
|
const combinedPlugins = [
|
|
17055
17371
|
...defaultPlugins,
|
|
17056
17372
|
...plugins != null ? plugins : []
|
|
17057
17373
|
].sort((a, b) => isLegacy(a) - isLegacy(b));
|
|
17058
17374
|
if (!(plugins == null ? void 0 : plugins.some((p) => p.name === "fields"))) {
|
|
17059
|
-
combinedPlugins.push(fieldsPlugin());
|
|
17375
|
+
combinedPlugins.push(fieldsPlugin({ label: fieldsLabel }));
|
|
17060
17376
|
}
|
|
17061
17377
|
combinedPlugins == null ? void 0 : combinedPlugins.forEach((plugin) => {
|
|
17062
17378
|
var _a, _b;
|
|
@@ -17093,7 +17409,15 @@ var Layout = ({ children }) => {
|
|
|
17093
17409
|
}
|
|
17094
17410
|
});
|
|
17095
17411
|
return details;
|
|
17096
|
-
}, [
|
|
17412
|
+
}, [
|
|
17413
|
+
plugins,
|
|
17414
|
+
currentPlugin,
|
|
17415
|
+
appStoreApi,
|
|
17416
|
+
leftSideBarVisible,
|
|
17417
|
+
blocksLabel,
|
|
17418
|
+
outlineLabel,
|
|
17419
|
+
fieldsLabel
|
|
17420
|
+
]);
|
|
17097
17421
|
(0, import_react94.useEffect)(() => {
|
|
17098
17422
|
if (!currentPlugin) {
|
|
17099
17423
|
const names = Object.keys(pluginItems);
|
|
@@ -17107,6 +17431,8 @@ var Layout = ({ children }) => {
|
|
|
17107
17431
|
return (_a = s.state.ui.mobilePanelExpanded) != null ? _a : false;
|
|
17108
17432
|
}
|
|
17109
17433
|
);
|
|
17434
|
+
const maximizeLabel = useMessage("layout-maximize");
|
|
17435
|
+
const minimizeLabel = useMessage("layout-minimize");
|
|
17110
17436
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
17111
17437
|
"div",
|
|
17112
17438
|
{
|
|
@@ -17143,7 +17469,7 @@ var Layout = ({ children }) => {
|
|
|
17143
17469
|
IconButton,
|
|
17144
17470
|
{
|
|
17145
17471
|
type: "button",
|
|
17146
|
-
title:
|
|
17472
|
+
title: mobilePanelExpanded ? minimizeLabel : maximizeLabel,
|
|
17147
17473
|
onClick: () => {
|
|
17148
17474
|
setUi({
|
|
17149
17475
|
mobilePanelExpanded: !mobilePanelExpanded
|
|
@@ -17218,6 +17544,7 @@ function PuckProvider({ children }) {
|
|
|
17218
17544
|
iframe: _iframe,
|
|
17219
17545
|
initialHistory: _initialHistory,
|
|
17220
17546
|
metadata,
|
|
17547
|
+
dictionary,
|
|
17221
17548
|
onAction,
|
|
17222
17549
|
fieldTransforms,
|
|
17223
17550
|
_experimentalFullScreenCanvas,
|
|
@@ -17315,6 +17642,7 @@ function PuckProvider({ children }) {
|
|
|
17315
17642
|
_experimentalVirtualization: !!_experimentalVirtualization,
|
|
17316
17643
|
onAction,
|
|
17317
17644
|
metadata,
|
|
17645
|
+
dictionary: dictionary || {},
|
|
17318
17646
|
fieldTransforms: loadedFieldTransforms
|
|
17319
17647
|
};
|
|
17320
17648
|
},
|
|
@@ -17330,6 +17658,7 @@ function PuckProvider({ children }) {
|
|
|
17330
17658
|
_experimentalVirtualization,
|
|
17331
17659
|
onAction,
|
|
17332
17660
|
metadata,
|
|
17661
|
+
dictionary,
|
|
17333
17662
|
loadedFieldTransforms
|
|
17334
17663
|
]
|
|
17335
17664
|
);
|
|
@@ -17642,13 +17971,30 @@ init_walk_tree();
|
|
|
17642
17971
|
|
|
17643
17972
|
// plugins/legacy-side-bar/index.tsx
|
|
17644
17973
|
init_react_import();
|
|
17974
|
+
init_use_message();
|
|
17645
17975
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
17646
|
-
var
|
|
17976
|
+
var LegacySideBar = ({
|
|
17977
|
+
outlineLabel,
|
|
17978
|
+
componentsLabel
|
|
17979
|
+
}) => {
|
|
17980
|
+
const componentsLabelMessage = useMessage("plugin-components");
|
|
17981
|
+
const outlineLabelMessage = useMessage("plugin-outline");
|
|
17982
|
+
const resolvedComponentsLabel = componentsLabel != null ? componentsLabel : componentsLabelMessage;
|
|
17983
|
+
const resolvedOutlineLabel = outlineLabel != null ? outlineLabel : outlineLabelMessage;
|
|
17984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { style: { overflowY: "auto" }, children: [
|
|
17985
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SidebarSection, { title: resolvedComponentsLabel, noBorderTop: true, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Components, {}) }),
|
|
17986
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SidebarSection, { title: resolvedOutlineLabel, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Outline, {}) })
|
|
17987
|
+
] });
|
|
17988
|
+
};
|
|
17989
|
+
var legacySideBarPlugin = (props = {}) => ({
|
|
17647
17990
|
name: "legacy-side-bar",
|
|
17648
|
-
render: () => /* @__PURE__ */ (0, import_jsx_runtime95.
|
|
17649
|
-
|
|
17650
|
-
|
|
17651
|
-
|
|
17991
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
17992
|
+
LegacySideBar,
|
|
17993
|
+
{
|
|
17994
|
+
outlineLabel: props.outlineLabel,
|
|
17995
|
+
componentsLabel: props.componentsLabel
|
|
17996
|
+
}
|
|
17997
|
+
)
|
|
17652
17998
|
});
|
|
17653
17999
|
// Annotate the CommonJS export names for ESM import in node:
|
|
17654
18000
|
0 && (module.exports = {
|