@kubex/zinc 1.1.62 → 1.1.63
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/custom-elements.json +337 -6
- package/dist/vscode.html-custom-data.json +55 -3
- package/dist/web-types.json +116 -6
- package/dist/zn.d.ts +83 -0
- package/dist/zn.min.js +529 -518
- package/docs/data/preview-frame-payload-error.json +4 -0
- package/docs/data/preview-frame-payload.json +6 -0
- package/docs/pages/components/form-group.md +12 -0
- package/docs/pages/components/preview-frame-demo.njk +138 -0
- package/docs/pages/components/preview-frame.md +105 -0
- package/docs/pages/components/toggle.md +2 -2
- package/package.json +1 -1
- package/src/components/form-group/form-group.component.ts +24 -12
- package/src/components/form-group/form-group.scss +10 -0
- package/src/components/form-group/form-group.test.ts +19 -0
- package/src/components/preview-frame/index.ts +12 -0
- package/src/components/preview-frame/preview-frame.component.ts +246 -0
- package/src/components/preview-frame/preview-frame.scss +27 -0
- package/src/components/preview-frame/preview-frame.test.ts +268 -0
- package/src/components/select/select.component.ts +4 -0
- package/src/components/select/select.test.ts +29 -0
- package/src/components/sp/sp.scss +5 -1
- package/src/components/tile/tile.scss +5 -1
- package/src/components/toggle/toggle.component.ts +3 -12
- package/src/components/toggle/toggle.test.ts +29 -0
- package/src/events/zn-error.ts +1 -1
- package/src/zinc.ts +1 -0
|
@@ -15291,6 +15291,10 @@
|
|
|
15291
15291
|
{
|
|
15292
15292
|
"description": "The default slot.",
|
|
15293
15293
|
"name": ""
|
|
15294
|
+
},
|
|
15295
|
+
{
|
|
15296
|
+
"description": "A chip displayed under the form group's help text.",
|
|
15297
|
+
"name": "chip"
|
|
15294
15298
|
}
|
|
15295
15299
|
],
|
|
15296
15300
|
"members": [
|
|
@@ -15299,7 +15303,7 @@
|
|
|
15299
15303
|
"name": "hasSlotController",
|
|
15300
15304
|
"privacy": "private",
|
|
15301
15305
|
"readonly": true,
|
|
15302
|
-
"default": "new HasSlotController(this, 'help-text', 'label')"
|
|
15306
|
+
"default": "new HasSlotController(this, 'help-text', 'label', 'chip')"
|
|
15303
15307
|
},
|
|
15304
15308
|
{
|
|
15305
15309
|
"kind": "field",
|
|
@@ -15348,6 +15352,15 @@
|
|
|
15348
15352
|
},
|
|
15349
15353
|
"default": "\"1,2\"",
|
|
15350
15354
|
"attribute": "layout"
|
|
15355
|
+
},
|
|
15356
|
+
{
|
|
15357
|
+
"kind": "field",
|
|
15358
|
+
"name": "pad",
|
|
15359
|
+
"type": {
|
|
15360
|
+
"text": "boolean"
|
|
15361
|
+
},
|
|
15362
|
+
"default": "false",
|
|
15363
|
+
"attribute": "pad"
|
|
15351
15364
|
}
|
|
15352
15365
|
],
|
|
15353
15366
|
"attributes": [
|
|
@@ -15393,6 +15406,14 @@
|
|
|
15393
15406
|
},
|
|
15394
15407
|
"default": "\"1,2\"",
|
|
15395
15408
|
"fieldName": "layout"
|
|
15409
|
+
},
|
|
15410
|
+
{
|
|
15411
|
+
"name": "pad",
|
|
15412
|
+
"type": {
|
|
15413
|
+
"text": "boolean"
|
|
15414
|
+
},
|
|
15415
|
+
"default": "false",
|
|
15416
|
+
"fieldName": "pad"
|
|
15396
15417
|
}
|
|
15397
15418
|
],
|
|
15398
15419
|
"superclass": {
|
|
@@ -15403,7 +15424,7 @@
|
|
|
15403
15424
|
"tagNameWithoutPrefix": "form-group",
|
|
15404
15425
|
"tagName": "zn-form-group",
|
|
15405
15426
|
"customElement": true,
|
|
15406
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/form-group\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot.\n *\n */",
|
|
15427
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/form-group\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot.\n * @slot chip - A chip displayed under the form group's help text.\n *\n */",
|
|
15407
15428
|
"documentation": "https://zinc.style/components/form-group",
|
|
15408
15429
|
"status": "experimental",
|
|
15409
15430
|
"since": "1.0"
|
|
@@ -28102,6 +28123,314 @@
|
|
|
28102
28123
|
}
|
|
28103
28124
|
]
|
|
28104
28125
|
},
|
|
28126
|
+
{
|
|
28127
|
+
"kind": "javascript-module",
|
|
28128
|
+
"path": "components/preview-frame/preview-frame.js",
|
|
28129
|
+
"declarations": [
|
|
28130
|
+
{
|
|
28131
|
+
"kind": "class",
|
|
28132
|
+
"description": "",
|
|
28133
|
+
"name": "ZnPreviewFrame",
|
|
28134
|
+
"cssParts": [
|
|
28135
|
+
{
|
|
28136
|
+
"description": "The component's base wrapper.",
|
|
28137
|
+
"name": "base"
|
|
28138
|
+
},
|
|
28139
|
+
{
|
|
28140
|
+
"description": "The preview iframe.",
|
|
28141
|
+
"name": "iframe"
|
|
28142
|
+
},
|
|
28143
|
+
{
|
|
28144
|
+
"description": "The error overlay.",
|
|
28145
|
+
"name": "error"
|
|
28146
|
+
}
|
|
28147
|
+
],
|
|
28148
|
+
"members": [
|
|
28149
|
+
{
|
|
28150
|
+
"kind": "field",
|
|
28151
|
+
"name": "src",
|
|
28152
|
+
"type": {
|
|
28153
|
+
"text": "string"
|
|
28154
|
+
},
|
|
28155
|
+
"default": "''",
|
|
28156
|
+
"description": "URL of the preview shell page (tokened embed URL).",
|
|
28157
|
+
"attribute": "src"
|
|
28158
|
+
},
|
|
28159
|
+
{
|
|
28160
|
+
"kind": "field",
|
|
28161
|
+
"name": "frameOrigin",
|
|
28162
|
+
"type": {
|
|
28163
|
+
"text": "string"
|
|
28164
|
+
},
|
|
28165
|
+
"default": "''",
|
|
28166
|
+
"description": "Expected origin of the iframe; all postMessage traffic is checked against it.",
|
|
28167
|
+
"attribute": "frame-origin"
|
|
28168
|
+
},
|
|
28169
|
+
{
|
|
28170
|
+
"kind": "field",
|
|
28171
|
+
"name": "dataUri",
|
|
28172
|
+
"type": {
|
|
28173
|
+
"text": "string"
|
|
28174
|
+
},
|
|
28175
|
+
"default": "''",
|
|
28176
|
+
"description": "Endpoint returning the hp-preview:config payload JSON. The console proxy rewrites this attribute to an app-prefixed path for proper fetch resolution.",
|
|
28177
|
+
"attribute": "data-uri"
|
|
28178
|
+
},
|
|
28179
|
+
{
|
|
28180
|
+
"kind": "field",
|
|
28181
|
+
"name": "watch",
|
|
28182
|
+
"type": {
|
|
28183
|
+
"text": "string"
|
|
28184
|
+
},
|
|
28185
|
+
"default": "'form[data-auto-save]'",
|
|
28186
|
+
"description": "Selector (resolved against the component's root node) for the forms to watch.\nDefaults to only forms explicitly opted in via a `data-auto-save` attribute —\nunmarked forms keep normal submit behavior and are never intercepted,\nauto-saved, or used to trigger a preview refresh. Override to widen the scope.",
|
|
28187
|
+
"attribute": "watch"
|
|
28188
|
+
},
|
|
28189
|
+
{
|
|
28190
|
+
"kind": "field",
|
|
28191
|
+
"name": "debounce",
|
|
28192
|
+
"type": {
|
|
28193
|
+
"text": "number"
|
|
28194
|
+
},
|
|
28195
|
+
"default": "400",
|
|
28196
|
+
"description": "Debounce in ms between a form change and its auto-save.",
|
|
28197
|
+
"attribute": "debounce"
|
|
28198
|
+
},
|
|
28199
|
+
{
|
|
28200
|
+
"kind": "field",
|
|
28201
|
+
"name": "zoom",
|
|
28202
|
+
"type": {
|
|
28203
|
+
"text": "number"
|
|
28204
|
+
},
|
|
28205
|
+
"default": "1",
|
|
28206
|
+
"description": "Zooms the previewed page out (0–1]. The frame always fills the panel;\nzoom shrinks the content browser-style, so 0.4 shows the page at 40%\nsize with correspondingly more of it visible. 1 = natural size.",
|
|
28207
|
+
"attribute": "zoom"
|
|
28208
|
+
},
|
|
28209
|
+
{
|
|
28210
|
+
"kind": "field",
|
|
28211
|
+
"name": "minHeight",
|
|
28212
|
+
"type": {
|
|
28213
|
+
"text": "number"
|
|
28214
|
+
},
|
|
28215
|
+
"default": "480",
|
|
28216
|
+
"description": "The visible height (in CSS pixels) of the preview panel. Fixed rather\nthan measured, because a measured height would feed back into the\nscaled iframe's layout box and grow unbounded.",
|
|
28217
|
+
"attribute": "min-height"
|
|
28218
|
+
},
|
|
28219
|
+
{
|
|
28220
|
+
"kind": "field",
|
|
28221
|
+
"name": "frame",
|
|
28222
|
+
"type": {
|
|
28223
|
+
"text": "HTMLIFrameElement"
|
|
28224
|
+
}
|
|
28225
|
+
},
|
|
28226
|
+
{
|
|
28227
|
+
"kind": "field",
|
|
28228
|
+
"name": "error",
|
|
28229
|
+
"type": {
|
|
28230
|
+
"text": "string"
|
|
28231
|
+
},
|
|
28232
|
+
"privacy": "private",
|
|
28233
|
+
"default": "''"
|
|
28234
|
+
},
|
|
28235
|
+
{
|
|
28236
|
+
"kind": "field",
|
|
28237
|
+
"name": "_generation",
|
|
28238
|
+
"type": {
|
|
28239
|
+
"text": "number"
|
|
28240
|
+
},
|
|
28241
|
+
"privacy": "private",
|
|
28242
|
+
"default": "0"
|
|
28243
|
+
},
|
|
28244
|
+
{
|
|
28245
|
+
"kind": "field",
|
|
28246
|
+
"name": "_watchedForms",
|
|
28247
|
+
"privacy": "private",
|
|
28248
|
+
"readonly": true,
|
|
28249
|
+
"default": "new Set<HTMLFormElement>()"
|
|
28250
|
+
},
|
|
28251
|
+
{
|
|
28252
|
+
"kind": "field",
|
|
28253
|
+
"name": "_debounceTimers",
|
|
28254
|
+
"privacy": "private",
|
|
28255
|
+
"readonly": true,
|
|
28256
|
+
"default": "new Map<HTMLFormElement, number>()"
|
|
28257
|
+
},
|
|
28258
|
+
{
|
|
28259
|
+
"kind": "field",
|
|
28260
|
+
"name": "_formObserver",
|
|
28261
|
+
"privacy": "private",
|
|
28262
|
+
"readonly": true,
|
|
28263
|
+
"default": "new MutationController(this, { target: null, config: {subtree: true, childList: true}, callback: () => this._attachForms(), })"
|
|
28264
|
+
},
|
|
28265
|
+
{
|
|
28266
|
+
"kind": "field",
|
|
28267
|
+
"name": "_onMessage",
|
|
28268
|
+
"privacy": "private",
|
|
28269
|
+
"readonly": true
|
|
28270
|
+
},
|
|
28271
|
+
{
|
|
28272
|
+
"kind": "method",
|
|
28273
|
+
"name": "refresh",
|
|
28274
|
+
"description": "Re-fetches the payload and pushes a fresh config to the preview."
|
|
28275
|
+
},
|
|
28276
|
+
{
|
|
28277
|
+
"kind": "method",
|
|
28278
|
+
"name": "_sendConfig",
|
|
28279
|
+
"privacy": "private"
|
|
28280
|
+
},
|
|
28281
|
+
{
|
|
28282
|
+
"kind": "method",
|
|
28283
|
+
"name": "_attachForms",
|
|
28284
|
+
"privacy": "private"
|
|
28285
|
+
},
|
|
28286
|
+
{
|
|
28287
|
+
"kind": "method",
|
|
28288
|
+
"name": "_detachForm",
|
|
28289
|
+
"privacy": "private",
|
|
28290
|
+
"parameters": [
|
|
28291
|
+
{
|
|
28292
|
+
"name": "form",
|
|
28293
|
+
"type": {
|
|
28294
|
+
"text": "HTMLFormElement"
|
|
28295
|
+
}
|
|
28296
|
+
}
|
|
28297
|
+
]
|
|
28298
|
+
},
|
|
28299
|
+
{
|
|
28300
|
+
"kind": "field",
|
|
28301
|
+
"name": "_onChange",
|
|
28302
|
+
"privacy": "private",
|
|
28303
|
+
"readonly": true
|
|
28304
|
+
},
|
|
28305
|
+
{
|
|
28306
|
+
"kind": "field",
|
|
28307
|
+
"name": "_onSubmit",
|
|
28308
|
+
"privacy": "private",
|
|
28309
|
+
"readonly": true
|
|
28310
|
+
},
|
|
28311
|
+
{
|
|
28312
|
+
"kind": "method",
|
|
28313
|
+
"name": "_save",
|
|
28314
|
+
"privacy": "private",
|
|
28315
|
+
"parameters": [
|
|
28316
|
+
{
|
|
28317
|
+
"name": "form",
|
|
28318
|
+
"type": {
|
|
28319
|
+
"text": "HTMLFormElement"
|
|
28320
|
+
}
|
|
28321
|
+
}
|
|
28322
|
+
]
|
|
28323
|
+
},
|
|
28324
|
+
{
|
|
28325
|
+
"kind": "method",
|
|
28326
|
+
"name": "_fail",
|
|
28327
|
+
"privacy": "private",
|
|
28328
|
+
"parameters": [
|
|
28329
|
+
{
|
|
28330
|
+
"name": "message",
|
|
28331
|
+
"type": {
|
|
28332
|
+
"text": "string"
|
|
28333
|
+
}
|
|
28334
|
+
}
|
|
28335
|
+
]
|
|
28336
|
+
}
|
|
28337
|
+
],
|
|
28338
|
+
"events": [
|
|
28339
|
+
{
|
|
28340
|
+
"description": "Emitted when the preview reports a render error or a save fails.",
|
|
28341
|
+
"name": "zn-error"
|
|
28342
|
+
}
|
|
28343
|
+
],
|
|
28344
|
+
"attributes": [
|
|
28345
|
+
{
|
|
28346
|
+
"name": "src",
|
|
28347
|
+
"type": {
|
|
28348
|
+
"text": "string"
|
|
28349
|
+
},
|
|
28350
|
+
"default": "''",
|
|
28351
|
+
"description": "URL of the preview shell page (tokened embed URL).",
|
|
28352
|
+
"fieldName": "src"
|
|
28353
|
+
},
|
|
28354
|
+
{
|
|
28355
|
+
"name": "frame-origin",
|
|
28356
|
+
"type": {
|
|
28357
|
+
"text": "string"
|
|
28358
|
+
},
|
|
28359
|
+
"default": "''",
|
|
28360
|
+
"description": "Expected origin of the iframe; all postMessage traffic is checked against it.",
|
|
28361
|
+
"fieldName": "frameOrigin"
|
|
28362
|
+
},
|
|
28363
|
+
{
|
|
28364
|
+
"name": "data-uri",
|
|
28365
|
+
"type": {
|
|
28366
|
+
"text": "string"
|
|
28367
|
+
},
|
|
28368
|
+
"default": "''",
|
|
28369
|
+
"description": "Endpoint returning the hp-preview:config payload JSON. The console proxy rewrites this attribute to an app-prefixed path for proper fetch resolution.",
|
|
28370
|
+
"fieldName": "dataUri"
|
|
28371
|
+
},
|
|
28372
|
+
{
|
|
28373
|
+
"name": "watch",
|
|
28374
|
+
"type": {
|
|
28375
|
+
"text": "string"
|
|
28376
|
+
},
|
|
28377
|
+
"default": "'form[data-auto-save]'",
|
|
28378
|
+
"description": "Selector (resolved against the component's root node) for the forms to watch.\nDefaults to only forms explicitly opted in via a `data-auto-save` attribute —\nunmarked forms keep normal submit behavior and are never intercepted,\nauto-saved, or used to trigger a preview refresh. Override to widen the scope.",
|
|
28379
|
+
"fieldName": "watch"
|
|
28380
|
+
},
|
|
28381
|
+
{
|
|
28382
|
+
"name": "debounce",
|
|
28383
|
+
"type": {
|
|
28384
|
+
"text": "number"
|
|
28385
|
+
},
|
|
28386
|
+
"default": "400",
|
|
28387
|
+
"description": "Debounce in ms between a form change and its auto-save.",
|
|
28388
|
+
"fieldName": "debounce"
|
|
28389
|
+
},
|
|
28390
|
+
{
|
|
28391
|
+
"name": "zoom",
|
|
28392
|
+
"type": {
|
|
28393
|
+
"text": "number"
|
|
28394
|
+
},
|
|
28395
|
+
"default": "1",
|
|
28396
|
+
"description": "Zooms the previewed page out (0–1]. The frame always fills the panel;\nzoom shrinks the content browser-style, so 0.4 shows the page at 40%\nsize with correspondingly more of it visible. 1 = natural size.",
|
|
28397
|
+
"fieldName": "zoom"
|
|
28398
|
+
},
|
|
28399
|
+
{
|
|
28400
|
+
"name": "min-height",
|
|
28401
|
+
"type": {
|
|
28402
|
+
"text": "number"
|
|
28403
|
+
},
|
|
28404
|
+
"default": "480",
|
|
28405
|
+
"description": "The visible height (in CSS pixels) of the preview panel. Fixed rather\nthan measured, because a measured height would feed back into the\nscaled iframe's layout box and grow unbounded.",
|
|
28406
|
+
"fieldName": "minHeight"
|
|
28407
|
+
}
|
|
28408
|
+
],
|
|
28409
|
+
"superclass": {
|
|
28410
|
+
"name": "ZincElement",
|
|
28411
|
+
"module": "/src/internal/zinc-element"
|
|
28412
|
+
},
|
|
28413
|
+
"summary": "Embeds a live preview iframe and drives the hp-preview postMessage\nprotocol: answers the frame's ready handshake with a config payload fetched\nfrom data-uri, auto-saves watched forms on change, and refreshes the\npreview after each save.",
|
|
28414
|
+
"tagNameWithoutPrefix": "preview-frame",
|
|
28415
|
+
"tagName": "zn-preview-frame",
|
|
28416
|
+
"customElement": true,
|
|
28417
|
+
"jsDoc": "/**\n * @summary Embeds a live preview iframe and drives the hp-preview postMessage\n * protocol: answers the frame's ready handshake with a config payload fetched\n * from data-uri, auto-saves watched forms on change, and refreshes the\n * preview after each save.\n * @documentation https://zinc.style/components/preview-frame\n * @status experimental\n * @since 1.0\n *\n * @event zn-error - Emitted when the preview reports a render error or a save fails.\n *\n * @csspart base - The component's base wrapper.\n * @csspart iframe - The preview iframe.\n * @csspart error - The error overlay.\n */",
|
|
28418
|
+
"documentation": "https://zinc.style/components/preview-frame",
|
|
28419
|
+
"status": "experimental",
|
|
28420
|
+
"since": "1.0"
|
|
28421
|
+
}
|
|
28422
|
+
],
|
|
28423
|
+
"exports": [
|
|
28424
|
+
{
|
|
28425
|
+
"kind": "js",
|
|
28426
|
+
"name": "default",
|
|
28427
|
+
"declaration": {
|
|
28428
|
+
"name": "ZnPreviewFrame",
|
|
28429
|
+
"module": "components/preview-frame/preview-frame.js"
|
|
28430
|
+
}
|
|
28431
|
+
}
|
|
28432
|
+
]
|
|
28433
|
+
},
|
|
28105
28434
|
{
|
|
28106
28435
|
"kind": "javascript-module",
|
|
28107
28436
|
"path": "components/priority-list/priority-list.js",
|
|
@@ -38839,7 +39168,7 @@
|
|
|
38839
39168
|
"name": "formControlController",
|
|
38840
39169
|
"privacy": "private",
|
|
38841
39170
|
"readonly": true,
|
|
38842
|
-
"default": "new FormControlController(this, { value: (control: ZnToggle) => (control.checked ? control.value || 'on' :
|
|
39171
|
+
"default": "new FormControlController(this, { value: (control: ZnToggle) => (control.checked ? control.value || 'on' : control.fallbackValue), defaultValue: (control: ZnToggle) => control.defaultChecked, setValue: (control: ZnToggle, checked: boolean) => (control.checked = checked) })"
|
|
38843
39172
|
},
|
|
38844
39173
|
{
|
|
38845
39174
|
"kind": "field",
|
|
@@ -38888,7 +39217,8 @@
|
|
|
38888
39217
|
"type": {
|
|
38889
39218
|
"text": "string"
|
|
38890
39219
|
},
|
|
38891
|
-
"default": "''",
|
|
39220
|
+
"default": "'off'",
|
|
39221
|
+
"description": "The value submitted when the toggle is unchecked, so the toggle always submits a value.",
|
|
38892
39222
|
"attribute": "fallback"
|
|
38893
39223
|
},
|
|
38894
39224
|
{
|
|
@@ -39165,7 +39495,8 @@
|
|
|
39165
39495
|
"type": {
|
|
39166
39496
|
"text": "string"
|
|
39167
39497
|
},
|
|
39168
|
-
"default": "''",
|
|
39498
|
+
"default": "'off'",
|
|
39499
|
+
"description": "The value submitted when the toggle is unchecked, so the toggle always submits a value.",
|
|
39169
39500
|
"fieldName": "fallbackValue"
|
|
39170
39501
|
},
|
|
39171
39502
|
{
|
|
@@ -40826,7 +41157,7 @@
|
|
|
40826
41157
|
"package": {
|
|
40827
41158
|
"name": "@kubex/zinc",
|
|
40828
41159
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
40829
|
-
"version": "1.1.
|
|
41160
|
+
"version": "1.1.63",
|
|
40830
41161
|
"author": "",
|
|
40831
41162
|
"license": "MIT"
|
|
40832
41163
|
}
|
|
@@ -1722,7 +1722,7 @@
|
|
|
1722
1722
|
},
|
|
1723
1723
|
{
|
|
1724
1724
|
"name": "zn-form-group",
|
|
1725
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
1725
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.\n- **chip** - A chip displayed under the form group's help text.",
|
|
1726
1726
|
"attributes": [
|
|
1727
1727
|
{
|
|
1728
1728
|
"name": "label",
|
|
@@ -1740,7 +1740,8 @@
|
|
|
1740
1740
|
"values": []
|
|
1741
1741
|
},
|
|
1742
1742
|
{ "name": "cols", "values": [] },
|
|
1743
|
-
{ "name": "layout", "values": [] }
|
|
1743
|
+
{ "name": "layout", "values": [] },
|
|
1744
|
+
{ "name": "pad", "values": [] }
|
|
1744
1745
|
],
|
|
1745
1746
|
"references": [
|
|
1746
1747
|
{
|
|
@@ -2908,6 +2909,53 @@
|
|
|
2908
2909
|
}
|
|
2909
2910
|
]
|
|
2910
2911
|
},
|
|
2912
|
+
{
|
|
2913
|
+
"name": "zn-preview-frame",
|
|
2914
|
+
"description": "Embeds a live preview iframe and drives the hp-preview postMessage\nprotocol: answers the frame's ready handshake with a config payload fetched\nfrom data-uri, auto-saves watched forms on change, and refreshes the\npreview after each save.\n---\n\n\n### **Events:**\n - **zn-error** - Emitted when the preview reports a render error or a save fails.\n\n### **Methods:**\n - **refresh()** - Re-fetches the payload and pushes a fresh config to the preview.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **iframe** - The preview iframe.\n- **error** - The error overlay.",
|
|
2915
|
+
"attributes": [
|
|
2916
|
+
{
|
|
2917
|
+
"name": "src",
|
|
2918
|
+
"description": "URL of the preview shell page (tokened embed URL).",
|
|
2919
|
+
"values": []
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"name": "frame-origin",
|
|
2923
|
+
"description": "Expected origin of the iframe; all postMessage traffic is checked against it.",
|
|
2924
|
+
"values": []
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"name": "data-uri",
|
|
2928
|
+
"description": "Endpoint returning the hp-preview:config payload JSON. The console proxy rewrites this attribute to an app-prefixed path for proper fetch resolution.",
|
|
2929
|
+
"values": []
|
|
2930
|
+
},
|
|
2931
|
+
{
|
|
2932
|
+
"name": "watch",
|
|
2933
|
+
"description": "Selector (resolved against the component's root node) for the forms to watch.\nDefaults to only forms explicitly opted in via a `data-auto-save` attribute —\nunmarked forms keep normal submit behavior and are never intercepted,\nauto-saved, or used to trigger a preview refresh. Override to widen the scope.",
|
|
2934
|
+
"values": []
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
"name": "debounce",
|
|
2938
|
+
"description": "Debounce in ms between a form change and its auto-save.",
|
|
2939
|
+
"values": []
|
|
2940
|
+
},
|
|
2941
|
+
{
|
|
2942
|
+
"name": "zoom",
|
|
2943
|
+
"description": "Zooms the previewed page out (0–1]. The frame always fills the panel;\nzoom shrinks the content browser-style, so 0.4 shows the page at 40%\nsize with correspondingly more of it visible. 1 = natural size.",
|
|
2944
|
+
"values": []
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
"name": "min-height",
|
|
2948
|
+
"description": "The visible height (in CSS pixels) of the preview panel. Fixed rather\nthan measured, because a measured height would feed back into the\nscaled iframe's layout box and grow unbounded.",
|
|
2949
|
+
"values": []
|
|
2950
|
+
}
|
|
2951
|
+
],
|
|
2952
|
+
"references": [
|
|
2953
|
+
{
|
|
2954
|
+
"name": "Documentation",
|
|
2955
|
+
"url": "https://zinc.style/components/preview-frame"
|
|
2956
|
+
}
|
|
2957
|
+
]
|
|
2958
|
+
},
|
|
2911
2959
|
{
|
|
2912
2960
|
"name": "zn-priority-list",
|
|
2913
2961
|
"description": "A reorderable list where each item receives a numerical priority based on its position. Supports drag-and-drop\nand keyboard reordering. Priority values are submitted as form data via hidden inputs.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the order of items changes.\n- **zn-reorder** - Emitted when items are reordered. Call `getPriorityMap()` on the component to get the updated `{ key: string, priority: number }[]` array.\n\n### **Methods:**\n - **getPriorityMap(): _PriorityItem[]_** - Returns the priority map: an array of { key, priority } objects.\n- **checkValidity(): _boolean_** - Checks for validity but does not show a validation message.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity(): _boolean_** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(_message)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - _default_ - The default slot where list items are placed. Each slotted element must have a `value` attribute that uniquely identifies the item. The component automatically assigns slot names to project each item into the correct position. The item's position in the list determines its priority (top = `priority-start`, incrementing).\n- **label** - The component's label. Required for proper accessibility. Alternatively, use the `label` attribute.\n- **label-tooltip** - Used to add text displayed in a tooltip next to the label.\n- **help-text** - Text that describes how to use the component. Alternatively, use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--zn-priority-list-item-gap** - The gap between list items. Defaults to `var(--zn-spacing-2x-small)`. _(default: undefined)_\n- **--zn-priority-list-item-padding** - The padding inside each item. Defaults to `var(--zn-spacing-small) var(--zn-spacing-medium)`. _(default: undefined)_\n- **--zn-priority-list-handle-color** - The color of the drag handle. Defaults to `var(--zn-color-neutral-500)`. _(default: undefined)_\n- **--zn-priority-list-priority-color** - The color of the priority number. Defaults to `var(--zn-color-neutral-600)`. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control wrapper.\n- **form-control-label** - The label wrapper.\n- **form-control-input** - The input area wrapper.\n- **form-control-help-text** - The help text wrapper.\n- **list** - The list container.\n- **item** - An individual list item row.\n- **drag-handle** - The drag handle icon.\n- **priority** - The priority number badge.\n- **content** - The content area of an item.",
|
|
@@ -4059,7 +4107,11 @@
|
|
|
4059
4107
|
{ "name": "title", "values": [] },
|
|
4060
4108
|
{ "name": "name", "values": [] },
|
|
4061
4109
|
{ "name": "value", "values": [] },
|
|
4062
|
-
{
|
|
4110
|
+
{
|
|
4111
|
+
"name": "fallback",
|
|
4112
|
+
"description": "The value submitted when the toggle is unchecked, so the toggle always submits a value.",
|
|
4113
|
+
"values": []
|
|
4114
|
+
},
|
|
4063
4115
|
{
|
|
4064
4116
|
"name": "size",
|
|
4065
4117
|
"values": [
|