@salesforce/ui-design-mode 10.5.0 → 10.6.0
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/authoring/core/DesignPropertyPanelRoot.d.cts +17 -3
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +17 -3
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
- package/dist/authoring/core/editors/BorderStyleEditor.d.cts +6 -1
- package/dist/authoring/core/editors/BorderStyleEditor.d.ts +6 -1
- package/dist/authoring/core/editors/BorderStyleEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/BoxDimensionEditor.d.cts +14 -3
- package/dist/authoring/core/editors/BoxDimensionEditor.d.ts +14 -3
- package/dist/authoring/core/editors/BoxDimensionEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/ColorEditor.d.cts +6 -1
- package/dist/authoring/core/editors/ColorEditor.d.ts +6 -1
- package/dist/authoring/core/editors/ColorEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/DimensionEditor.d.cts +6 -1
- package/dist/authoring/core/editors/DimensionEditor.d.ts +6 -1
- package/dist/authoring/core/editors/DimensionEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/FontFamilyEditor.d.cts +6 -1
- package/dist/authoring/core/editors/FontFamilyEditor.d.ts +6 -1
- package/dist/authoring/core/editors/FontFamilyEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/FontStyleEditor.d.cts +6 -1
- package/dist/authoring/core/editors/FontStyleEditor.d.ts +6 -1
- package/dist/authoring/core/editors/FontStyleEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/FontWeightEditor.d.cts +6 -1
- package/dist/authoring/core/editors/FontWeightEditor.d.ts +6 -1
- package/dist/authoring/core/editors/FontWeightEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/OverflowEditor.d.cts +6 -1
- package/dist/authoring/core/editors/OverflowEditor.d.ts +6 -1
- package/dist/authoring/core/editors/OverflowEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/TextAlignmentEditor.d.cts +6 -1
- package/dist/authoring/core/editors/TextAlignmentEditor.d.ts +6 -1
- package/dist/authoring/core/editors/TextAlignmentEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/TextDecorationEditor.d.cts +6 -1
- package/dist/authoring/core/editors/TextDecorationEditor.d.ts +6 -1
- package/dist/authoring/core/editors/TextDecorationEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/TextTransformEditor.d.cts +6 -1
- package/dist/authoring/core/editors/TextTransformEditor.d.ts +6 -1
- package/dist/authoring/core/editors/TextTransformEditor.d.ts.map +1 -1
- package/dist/authoring/core/labels/labels.d.cts +444 -0
- package/dist/authoring/core/labels/labels.d.ts +444 -0
- package/dist/authoring/core/labels/labels.d.ts.map +1 -0
- package/dist/authoring/core/utils/dimensionUtils.d.cts +2 -1
- package/dist/authoring/core/utils/dimensionUtils.d.ts +2 -1
- package/dist/authoring/core/utils/dimensionUtils.d.ts.map +1 -1
- package/dist/authoring/react/index.d.cts +2 -0
- package/dist/authoring/react/index.d.ts +2 -0
- package/dist/authoring/react/index.d.ts.map +1 -1
- package/dist/authoring/react/index.js +3 -3
- package/dist/authoring/web-component/index.d.cts +31 -0
- package/dist/authoring/web-component/index.d.ts +31 -0
- package/dist/authoring/web-component/index.d.ts.map +1 -1
- package/dist/authoring/web-component/index.js +20 -18
- package/package.json +2 -1
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* `PanelLabels` — the panel's localization contract.
|
|
8
|
+
*
|
|
9
|
+
* Every user-visible string the property panel renders — visible text AND
|
|
10
|
+
* accessibility strings (aria-labels, tooltips, placeholders) — is a value the
|
|
11
|
+
* host surface resolves and passes in via the `labels` prop / element property.
|
|
12
|
+
* The panel never resolves keys against an i18n library (the `no-i18n-imports`
|
|
13
|
+
* boundary forbids it); a locale switch is a surface-side re-render with a new
|
|
14
|
+
* `labels` object.
|
|
15
|
+
*
|
|
16
|
+
* Design notes:
|
|
17
|
+
* - **Localization ≠ configurability.** The panel renders a FIXED tree; only the
|
|
18
|
+
* strings vary. There is no "which editors render" config.
|
|
19
|
+
* - **All-required type.** `labels?` the prop is optional (VS Code omits it →
|
|
20
|
+
* English fallback), but if a surface passes an object the compiler demands
|
|
21
|
+
* every leaf. For the untyped LWC consumer (Codey today) `validateLabels()`
|
|
22
|
+
* enforces the same at runtime (see below).
|
|
23
|
+
* - **No `defaultLabels` export.** English lives once, at the fallback sites: a
|
|
24
|
+
* private `EN_LABELS` in the panel root (general/sections/instances) + each
|
|
25
|
+
* editor's internal option/aria consts. So there is nothing to drift.
|
|
26
|
+
* - **Per-instance vs per-type.** Section titles + per-editor legends ("Padding"
|
|
27
|
+
* vs "Margin") are per-INSTANCE → `sections` / `instances`. Reusable option
|
|
28
|
+
* labels + aria templates are per-editor-TYPE, defined once → `editors`.
|
|
29
|
+
* - **What's NOT here:** proper nouns (font-family names like "Arial"), CSS
|
|
30
|
+
* tokens (px/em/rem/%), and color-space axis letters (H/S/L, R/G/B) stay as
|
|
31
|
+
* editor-internal literals — they aren't localized.
|
|
32
|
+
*
|
|
33
|
+
* ### Parameterized strings (`{0}`-style)
|
|
34
|
+
*
|
|
35
|
+
* Composed aria like "Padding unit" or "R (RGB), 0 to 255" are positional-
|
|
36
|
+
* placeholder templates ("{0} unit", "{0} ({1}), {2} to {3}") — the Salesforce /
|
|
37
|
+
* VS Code convention (`@salesforce/label`, `nls.localize(key, ...args)`). The
|
|
38
|
+
* panel interpolates them with `interpolate()` (no i18n library). The translator
|
|
39
|
+
* owns where each `{n}` lands (word order varies by locale); the editor owns
|
|
40
|
+
* which args exist. Such leaves are documented with their arity in
|
|
41
|
+
* `REQUIRED_LABEL_KEYS`.
|
|
42
|
+
*/
|
|
43
|
+
/** A reusable per-editor-type option label map (camelCase option key → label). */
|
|
44
|
+
export interface PanelLabels {
|
|
45
|
+
general: {
|
|
46
|
+
headerTitle: string;
|
|
47
|
+
emptyPlaceholder: string;
|
|
48
|
+
inlineEditEditable: string;
|
|
49
|
+
inlineEditNonEditable: string;
|
|
50
|
+
addToChatContext: string;
|
|
51
|
+
ariaPropertyPanel: string;
|
|
52
|
+
ariaSelectedComponent: string;
|
|
53
|
+
ariaElementStyling: string;
|
|
54
|
+
};
|
|
55
|
+
sections: {
|
|
56
|
+
background: string;
|
|
57
|
+
spacing: string;
|
|
58
|
+
border: string;
|
|
59
|
+
typography: string;
|
|
60
|
+
elementDimensions: string;
|
|
61
|
+
};
|
|
62
|
+
instances: {
|
|
63
|
+
backgroundColor: string;
|
|
64
|
+
padding: string;
|
|
65
|
+
margin: string;
|
|
66
|
+
borderRadius: string;
|
|
67
|
+
borderWeight: string;
|
|
68
|
+
borderStyle: string;
|
|
69
|
+
borderColor: string;
|
|
70
|
+
fontFamily: string;
|
|
71
|
+
fontSize: string;
|
|
72
|
+
fontWeight: string;
|
|
73
|
+
fontStyle: string;
|
|
74
|
+
textColor: string;
|
|
75
|
+
textAlignment: string;
|
|
76
|
+
textFormatting: string;
|
|
77
|
+
textTransform: string;
|
|
78
|
+
lineHeight: string;
|
|
79
|
+
letterSpacing: string;
|
|
80
|
+
width: string;
|
|
81
|
+
minWidth: string;
|
|
82
|
+
maxWidth: string;
|
|
83
|
+
height: string;
|
|
84
|
+
minHeight: string;
|
|
85
|
+
maxHeight: string;
|
|
86
|
+
overflow: string;
|
|
87
|
+
};
|
|
88
|
+
editors: {
|
|
89
|
+
boxDimension: {
|
|
90
|
+
sides: {
|
|
91
|
+
top: string;
|
|
92
|
+
right: string;
|
|
93
|
+
bottom: string;
|
|
94
|
+
left: string;
|
|
95
|
+
};
|
|
96
|
+
corners: {
|
|
97
|
+
topLeft: string;
|
|
98
|
+
topRight: string;
|
|
99
|
+
bottomRight: string;
|
|
100
|
+
bottomLeft: string;
|
|
101
|
+
};
|
|
102
|
+
linkSides: string;
|
|
103
|
+
unlinkSides: string;
|
|
104
|
+
ariaUnit: string;
|
|
105
|
+
ariaSide: string;
|
|
106
|
+
};
|
|
107
|
+
dimension: {
|
|
108
|
+
ariaValue: string;
|
|
109
|
+
ariaUnit: string;
|
|
110
|
+
};
|
|
111
|
+
color: {
|
|
112
|
+
placeholder: string;
|
|
113
|
+
ariaValue: string;
|
|
114
|
+
ariaOpenPicker: string;
|
|
115
|
+
ariaPicker: string;
|
|
116
|
+
ariaSaturation: string;
|
|
117
|
+
ariaEyedropper: string;
|
|
118
|
+
ariaHue: string;
|
|
119
|
+
ariaAlphaSlider: string;
|
|
120
|
+
ariaHex: string;
|
|
121
|
+
ariaChannel: string;
|
|
122
|
+
ariaAlphaInput: string;
|
|
123
|
+
ariaFormatCycle: string;
|
|
124
|
+
titleFormatCycle: string;
|
|
125
|
+
};
|
|
126
|
+
fontWeight: {
|
|
127
|
+
options: {
|
|
128
|
+
default: string;
|
|
129
|
+
thin: string;
|
|
130
|
+
extraLight: string;
|
|
131
|
+
light: string;
|
|
132
|
+
regular: string;
|
|
133
|
+
medium: string;
|
|
134
|
+
semiBold: string;
|
|
135
|
+
bold: string;
|
|
136
|
+
extraBold: string;
|
|
137
|
+
black: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
fontStyle: {
|
|
141
|
+
options: {
|
|
142
|
+
normal: string;
|
|
143
|
+
italic: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
borderStyle: {
|
|
147
|
+
options: {
|
|
148
|
+
none: string;
|
|
149
|
+
solid: string;
|
|
150
|
+
dashed: string;
|
|
151
|
+
dotted: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
overflow: {
|
|
155
|
+
options: {
|
|
156
|
+
default: string;
|
|
157
|
+
visible: string;
|
|
158
|
+
hidden: string;
|
|
159
|
+
scroll: string;
|
|
160
|
+
auto: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
textAlignment: {
|
|
164
|
+
options: {
|
|
165
|
+
left: string;
|
|
166
|
+
center: string;
|
|
167
|
+
right: string;
|
|
168
|
+
justify: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
textDecoration: {
|
|
172
|
+
options: {
|
|
173
|
+
none: string;
|
|
174
|
+
underline: string;
|
|
175
|
+
lineThrough: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
textTransform: {
|
|
179
|
+
options: {
|
|
180
|
+
none: string;
|
|
181
|
+
uppercase: string;
|
|
182
|
+
lowercase: string;
|
|
183
|
+
capitalize: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
fontFamily: {
|
|
187
|
+
options: {
|
|
188
|
+
default: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Substitute positional `{0}`, `{1}`, … placeholders in a template with `args`.
|
|
195
|
+
* The panel's only interpolation primitive — keeps `PanelLabels` pure data (no
|
|
196
|
+
* i18n library) while letting a translator control placeholder order. A
|
|
197
|
+
* placeholder with no corresponding arg is left as-is (surfaces as an obvious
|
|
198
|
+
* `{n}` in the rendered string rather than throwing).
|
|
199
|
+
*/
|
|
200
|
+
export declare function interpolate(template: string, args: readonly (string | number)[]): string;
|
|
201
|
+
/**
|
|
202
|
+
* Deep-merge a (possibly partial) labels object over a complete English `defaults`
|
|
203
|
+
* tree, so every leaf the panel reads is guaranteed present. This is what makes a
|
|
204
|
+
* partial translation **degrade to partly-English rather than crash**: a host that
|
|
205
|
+
* supplies an incomplete `labels` (the case `validateLabels` warns about) still gets
|
|
206
|
+
* English for the missing leaves instead of `undefined` (which would render empty,
|
|
207
|
+
* or throw when fed to `interpolate`).
|
|
208
|
+
*
|
|
209
|
+
* Only plain objects are recursed; string leaves in `partial` win over `defaults`.
|
|
210
|
+
* Returns a new object (inputs are not mutated). `defaults` defines the shape, so
|
|
211
|
+
* `partial` keys absent from `defaults` are ignored.
|
|
212
|
+
*/
|
|
213
|
+
export declare function mergeDefaults<T>(defaults: T, partial: unknown): T;
|
|
214
|
+
/**
|
|
215
|
+
* Required-key manifest for `validateLabels`. Each entry is a dotted path into
|
|
216
|
+
* `PanelLabels`; parameterized leaves additionally record their expected
|
|
217
|
+
* placeholder indices so `validateLabels` can flag arity drift in a translation.
|
|
218
|
+
* Kept in lockstep with `PanelLabels` by `labels.spec-d.ts`.
|
|
219
|
+
*/
|
|
220
|
+
export interface RequiredLabelKey {
|
|
221
|
+
/** Dotted path into a `PanelLabels` object, e.g. "editors.color.ariaChannel". */
|
|
222
|
+
path: string;
|
|
223
|
+
/** For positional-template leaves, the placeholder indices that must appear. */
|
|
224
|
+
placeholders?: readonly number[];
|
|
225
|
+
}
|
|
226
|
+
export declare const REQUIRED_LABEL_KEYS: readonly [{
|
|
227
|
+
readonly path: "general.headerTitle";
|
|
228
|
+
}, {
|
|
229
|
+
readonly path: "general.emptyPlaceholder";
|
|
230
|
+
}, {
|
|
231
|
+
readonly path: "general.inlineEditEditable";
|
|
232
|
+
}, {
|
|
233
|
+
readonly path: "general.inlineEditNonEditable";
|
|
234
|
+
}, {
|
|
235
|
+
readonly path: "general.addToChatContext";
|
|
236
|
+
}, {
|
|
237
|
+
readonly path: "general.ariaPropertyPanel";
|
|
238
|
+
}, {
|
|
239
|
+
readonly path: "general.ariaSelectedComponent";
|
|
240
|
+
}, {
|
|
241
|
+
readonly path: "general.ariaElementStyling";
|
|
242
|
+
}, {
|
|
243
|
+
readonly path: "sections.background";
|
|
244
|
+
}, {
|
|
245
|
+
readonly path: "sections.spacing";
|
|
246
|
+
}, {
|
|
247
|
+
readonly path: "sections.border";
|
|
248
|
+
}, {
|
|
249
|
+
readonly path: "sections.typography";
|
|
250
|
+
}, {
|
|
251
|
+
readonly path: "sections.elementDimensions";
|
|
252
|
+
}, {
|
|
253
|
+
readonly path: "instances.backgroundColor";
|
|
254
|
+
}, {
|
|
255
|
+
readonly path: "instances.padding";
|
|
256
|
+
}, {
|
|
257
|
+
readonly path: "instances.margin";
|
|
258
|
+
}, {
|
|
259
|
+
readonly path: "instances.borderRadius";
|
|
260
|
+
}, {
|
|
261
|
+
readonly path: "instances.borderWeight";
|
|
262
|
+
}, {
|
|
263
|
+
readonly path: "instances.borderStyle";
|
|
264
|
+
}, {
|
|
265
|
+
readonly path: "instances.borderColor";
|
|
266
|
+
}, {
|
|
267
|
+
readonly path: "instances.fontFamily";
|
|
268
|
+
}, {
|
|
269
|
+
readonly path: "instances.fontSize";
|
|
270
|
+
}, {
|
|
271
|
+
readonly path: "instances.fontWeight";
|
|
272
|
+
}, {
|
|
273
|
+
readonly path: "instances.fontStyle";
|
|
274
|
+
}, {
|
|
275
|
+
readonly path: "instances.textColor";
|
|
276
|
+
}, {
|
|
277
|
+
readonly path: "instances.textAlignment";
|
|
278
|
+
}, {
|
|
279
|
+
readonly path: "instances.textFormatting";
|
|
280
|
+
}, {
|
|
281
|
+
readonly path: "instances.textTransform";
|
|
282
|
+
}, {
|
|
283
|
+
readonly path: "instances.lineHeight";
|
|
284
|
+
}, {
|
|
285
|
+
readonly path: "instances.letterSpacing";
|
|
286
|
+
}, {
|
|
287
|
+
readonly path: "instances.width";
|
|
288
|
+
}, {
|
|
289
|
+
readonly path: "instances.minWidth";
|
|
290
|
+
}, {
|
|
291
|
+
readonly path: "instances.maxWidth";
|
|
292
|
+
}, {
|
|
293
|
+
readonly path: "instances.height";
|
|
294
|
+
}, {
|
|
295
|
+
readonly path: "instances.minHeight";
|
|
296
|
+
}, {
|
|
297
|
+
readonly path: "instances.maxHeight";
|
|
298
|
+
}, {
|
|
299
|
+
readonly path: "instances.overflow";
|
|
300
|
+
}, {
|
|
301
|
+
readonly path: "editors.boxDimension.sides.top";
|
|
302
|
+
}, {
|
|
303
|
+
readonly path: "editors.boxDimension.sides.right";
|
|
304
|
+
}, {
|
|
305
|
+
readonly path: "editors.boxDimension.sides.bottom";
|
|
306
|
+
}, {
|
|
307
|
+
readonly path: "editors.boxDimension.sides.left";
|
|
308
|
+
}, {
|
|
309
|
+
readonly path: "editors.boxDimension.corners.topLeft";
|
|
310
|
+
}, {
|
|
311
|
+
readonly path: "editors.boxDimension.corners.topRight";
|
|
312
|
+
}, {
|
|
313
|
+
readonly path: "editors.boxDimension.corners.bottomRight";
|
|
314
|
+
}, {
|
|
315
|
+
readonly path: "editors.boxDimension.corners.bottomLeft";
|
|
316
|
+
}, {
|
|
317
|
+
readonly path: "editors.boxDimension.linkSides";
|
|
318
|
+
}, {
|
|
319
|
+
readonly path: "editors.boxDimension.unlinkSides";
|
|
320
|
+
}, {
|
|
321
|
+
readonly path: "editors.boxDimension.ariaUnit";
|
|
322
|
+
readonly placeholders: readonly [0];
|
|
323
|
+
}, {
|
|
324
|
+
readonly path: "editors.boxDimension.ariaSide";
|
|
325
|
+
readonly placeholders: readonly [0, 1];
|
|
326
|
+
}, {
|
|
327
|
+
readonly path: "editors.dimension.ariaValue";
|
|
328
|
+
readonly placeholders: readonly [0];
|
|
329
|
+
}, {
|
|
330
|
+
readonly path: "editors.dimension.ariaUnit";
|
|
331
|
+
readonly placeholders: readonly [0];
|
|
332
|
+
}, {
|
|
333
|
+
readonly path: "editors.color.placeholder";
|
|
334
|
+
}, {
|
|
335
|
+
readonly path: "editors.color.ariaValue";
|
|
336
|
+
readonly placeholders: readonly [0];
|
|
337
|
+
}, {
|
|
338
|
+
readonly path: "editors.color.ariaOpenPicker";
|
|
339
|
+
readonly placeholders: readonly [0, 1];
|
|
340
|
+
}, {
|
|
341
|
+
readonly path: "editors.color.ariaPicker";
|
|
342
|
+
readonly placeholders: readonly [0];
|
|
343
|
+
}, {
|
|
344
|
+
readonly path: "editors.color.ariaSaturation";
|
|
345
|
+
}, {
|
|
346
|
+
readonly path: "editors.color.ariaEyedropper";
|
|
347
|
+
}, {
|
|
348
|
+
readonly path: "editors.color.ariaHue";
|
|
349
|
+
}, {
|
|
350
|
+
readonly path: "editors.color.ariaAlphaSlider";
|
|
351
|
+
}, {
|
|
352
|
+
readonly path: "editors.color.ariaHex";
|
|
353
|
+
}, {
|
|
354
|
+
readonly path: "editors.color.ariaChannel";
|
|
355
|
+
readonly placeholders: readonly [0, 1, 2, 3];
|
|
356
|
+
}, {
|
|
357
|
+
readonly path: "editors.color.ariaAlphaInput";
|
|
358
|
+
}, {
|
|
359
|
+
readonly path: "editors.color.ariaFormatCycle";
|
|
360
|
+
readonly placeholders: readonly [0];
|
|
361
|
+
}, {
|
|
362
|
+
readonly path: "editors.color.titleFormatCycle";
|
|
363
|
+
}, {
|
|
364
|
+
readonly path: "editors.fontWeight.options.default";
|
|
365
|
+
}, {
|
|
366
|
+
readonly path: "editors.fontWeight.options.thin";
|
|
367
|
+
}, {
|
|
368
|
+
readonly path: "editors.fontWeight.options.extraLight";
|
|
369
|
+
}, {
|
|
370
|
+
readonly path: "editors.fontWeight.options.light";
|
|
371
|
+
}, {
|
|
372
|
+
readonly path: "editors.fontWeight.options.regular";
|
|
373
|
+
}, {
|
|
374
|
+
readonly path: "editors.fontWeight.options.medium";
|
|
375
|
+
}, {
|
|
376
|
+
readonly path: "editors.fontWeight.options.semiBold";
|
|
377
|
+
}, {
|
|
378
|
+
readonly path: "editors.fontWeight.options.bold";
|
|
379
|
+
}, {
|
|
380
|
+
readonly path: "editors.fontWeight.options.extraBold";
|
|
381
|
+
}, {
|
|
382
|
+
readonly path: "editors.fontWeight.options.black";
|
|
383
|
+
}, {
|
|
384
|
+
readonly path: "editors.fontStyle.options.normal";
|
|
385
|
+
}, {
|
|
386
|
+
readonly path: "editors.fontStyle.options.italic";
|
|
387
|
+
}, {
|
|
388
|
+
readonly path: "editors.borderStyle.options.none";
|
|
389
|
+
}, {
|
|
390
|
+
readonly path: "editors.borderStyle.options.solid";
|
|
391
|
+
}, {
|
|
392
|
+
readonly path: "editors.borderStyle.options.dashed";
|
|
393
|
+
}, {
|
|
394
|
+
readonly path: "editors.borderStyle.options.dotted";
|
|
395
|
+
}, {
|
|
396
|
+
readonly path: "editors.overflow.options.default";
|
|
397
|
+
}, {
|
|
398
|
+
readonly path: "editors.overflow.options.visible";
|
|
399
|
+
}, {
|
|
400
|
+
readonly path: "editors.overflow.options.hidden";
|
|
401
|
+
}, {
|
|
402
|
+
readonly path: "editors.overflow.options.scroll";
|
|
403
|
+
}, {
|
|
404
|
+
readonly path: "editors.overflow.options.auto";
|
|
405
|
+
}, {
|
|
406
|
+
readonly path: "editors.textAlignment.options.left";
|
|
407
|
+
}, {
|
|
408
|
+
readonly path: "editors.textAlignment.options.center";
|
|
409
|
+
}, {
|
|
410
|
+
readonly path: "editors.textAlignment.options.right";
|
|
411
|
+
}, {
|
|
412
|
+
readonly path: "editors.textAlignment.options.justify";
|
|
413
|
+
}, {
|
|
414
|
+
readonly path: "editors.textDecoration.options.none";
|
|
415
|
+
}, {
|
|
416
|
+
readonly path: "editors.textDecoration.options.underline";
|
|
417
|
+
}, {
|
|
418
|
+
readonly path: "editors.textDecoration.options.lineThrough";
|
|
419
|
+
}, {
|
|
420
|
+
readonly path: "editors.textTransform.options.none";
|
|
421
|
+
}, {
|
|
422
|
+
readonly path: "editors.textTransform.options.uppercase";
|
|
423
|
+
}, {
|
|
424
|
+
readonly path: "editors.textTransform.options.lowercase";
|
|
425
|
+
}, {
|
|
426
|
+
readonly path: "editors.textTransform.options.capitalize";
|
|
427
|
+
}, {
|
|
428
|
+
readonly path: "editors.fontFamily.options.default";
|
|
429
|
+
}];
|
|
430
|
+
/**
|
|
431
|
+
* Validate a `labels` object against the `PanelLabels` contract at runtime, the
|
|
432
|
+
* only completeness guard that reaches the untyped LWC consumer (TypeScript's
|
|
433
|
+
* all-required type does not typecheck JS callers). Returns a list of human-
|
|
434
|
+
* readable problems; an empty array means valid.
|
|
435
|
+
*
|
|
436
|
+
* Checks, per `REQUIRED_LABEL_KEYS`: (1) every required leaf is present and a
|
|
437
|
+
* string; (2) parameterized leaves contain exactly their expected placeholder
|
|
438
|
+
* set (a dropped `{1}` in a translation is otherwise invisible until a screen
|
|
439
|
+
* reader hits it). Callers decide how to surface problems — the `<design-mode-
|
|
440
|
+
* panel>` setter `console.warn`s and renders anyway (never throws), so a
|
|
441
|
+
* partial translation degrades rather than breaks.
|
|
442
|
+
*/
|
|
443
|
+
export declare function validateLabels(labels: unknown): string[];
|
|
444
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/labels/labels.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAE3B,OAAO,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,gBAAgB,EAAE,MAAM,CAAC;QACzB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,kBAAkB,EAAE,MAAM,CAAC;KAC3B,CAAC;IAGF,QAAQ,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,EAAE,MAAM,CAAC;KAC1B,CAAC;IAGF,SAAS,EAAE;QACV,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,QA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C;AAgBjD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAyBxD"}
|
|
@@ -31,7 +31,8 @@ export interface DimensionConfig {
|
|
|
31
31
|
}
|
|
32
32
|
export interface BoxDimensionConfig {
|
|
33
33
|
units?: readonly UnitOption[];
|
|
34
|
-
|
|
34
|
+
/** Which localized per-cell label set the instance edits (sides vs corners). */
|
|
35
|
+
sideLabelKind?: "sides" | "corners";
|
|
35
36
|
}
|
|
36
37
|
export declare const CSS_UNITS: readonly UnitOption[];
|
|
37
38
|
export declare const DEFAULT_UNIT_CONSTRAINTS: UnitConstraints;
|
|
@@ -31,7 +31,8 @@ export interface DimensionConfig {
|
|
|
31
31
|
}
|
|
32
32
|
export interface BoxDimensionConfig {
|
|
33
33
|
units?: readonly UnitOption[];
|
|
34
|
-
|
|
34
|
+
/** Which localized per-cell label set the instance edits (sides vs corners). */
|
|
35
|
+
sideLabelKind?: "sides" | "corners";
|
|
35
36
|
}
|
|
36
37
|
export declare const CSS_UNITS: readonly UnitOption[];
|
|
37
38
|
export declare const DEFAULT_UNIT_CONSTRAINTS: UnitConstraints;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensionUtils.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/utils/dimensionUtils.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC9B,YAAY,EAAE,MAAM,GAAG,EAAE,CAA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ACrD,MAAM,GAAG,EAAE,CAIb;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGjG;AAED;;GAEG;AACH,wBAAgB,SAAS,CACxB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,SAAS,GAAG,WAAW,EAC5B,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,eAA0C,GACrD,MAAM,CAOR;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,QAAQ,GAAG,MAAM,CAExF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAUxF;AAMD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAgC7D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAcpE,CAAC"}
|
|
@@ -11,4 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export { DesignPropertyPanel, mountDesignPropertyPanel } from '../core/DesignPropertyPanelRoot.cjs';
|
|
13
13
|
export type { DesignPropertyPanelProps, DesignPropertyPanelHandle, DesignPanelComponent, StylesEntryMap, SelectedComponentContext, OpenSourceFilePayload, } from '../core/DesignPropertyPanelRoot.cjs';
|
|
14
|
+
export { interpolate, validateLabels, REQUIRED_LABEL_KEYS } from '../core/labels/labels.cjs';
|
|
15
|
+
export type { PanelLabels, RequiredLabelKey } from '../core/labels/labels.cjs';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -11,4 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export { DesignPropertyPanel, mountDesignPropertyPanel } from '../core/DesignPropertyPanelRoot.js';
|
|
13
13
|
export type { DesignPropertyPanelProps, DesignPropertyPanelHandle, DesignPanelComponent, StylesEntryMap, SelectedComponentContext, OpenSourceFilePayload, } from '../core/DesignPropertyPanelRoot.js';
|
|
14
|
+
export { interpolate, validateLabels, REQUIRED_LABEL_KEYS } from '../core/labels/labels.js';
|
|
15
|
+
export type { PanelLabels, RequiredLabelKey } from '../core/labels/labels.js';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authoring/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,YAAY,EACX,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,qBAAqB,GACrB,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authoring/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,YAAY,EACX,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,qBAAqB,GACrB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzF,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|