@vonage/vivid 5.29.0 → 5.31.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/accordion/definition.js +1 -2
- package/accordion-item/definition.js +1 -2
- package/action-group/definition.js +1 -2
- package/alert/definition.js +1 -2
- package/audio-player/definition.js +1 -2
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +1 -5
- package/avatar/definition.js +1 -2
- package/badge/definition.js +1 -2
- package/banner/definition.js +1 -2
- package/banner/index.cjs +1 -1
- package/banner/index.js +1 -1
- package/breadcrumb/definition.js +1 -2
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/decorate.js +1 -1
- package/bundled/definition12.cjs +2 -1
- package/bundled/definition12.js +2 -1
- package/bundled/definition16.cjs +1 -1
- package/bundled/definition16.js +2 -5
- package/bundled/definition19.cjs +2 -2
- package/bundled/definition19.js +10 -25
- package/bundled/definition21.cjs +1 -1
- package/bundled/definition21.js +1 -1
- package/bundled/definition25.cjs +4 -4
- package/bundled/definition25.js +4 -4
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +2 -5
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +1 -5
- package/bundled/option.cjs +1 -1
- package/bundled/option.js +1 -5
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +1 -5
- package/bundled/single-value-picker.cjs +1 -1
- package/bundled/single-value-picker.js +5 -15
- package/bundled/slottable-request.cjs +2 -2
- package/bundled/slottable-request.js +31 -34
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +1 -1
- package/bundled/vivid-element.cjs +2 -2
- package/bundled/vivid-element.js +42 -38
- package/button/definition.js +1 -2
- package/calendar/definition.js +1 -2
- package/card/definition.js +1 -2
- package/checkbox/definition.js +1 -2
- package/color-picker/definition.js +1 -2
- package/color-picker/index.cjs +1 -1
- package/color-picker/index.js +2 -4
- package/combobox/definition.js +1 -2
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -5
- package/contextual-help/definition.js +1 -2
- package/country/definition.js +1 -2
- package/country-group/definition.js +1 -2
- package/country-group/index.cjs +1 -1
- package/country-group/index.js +1 -5
- package/custom-elements.json +4824 -4718
- package/data-grid/definition.js +1 -2
- package/data-grid/index.cjs +2 -2
- package/data-grid/index.js +16 -44
- package/date-picker/definition.js +1 -2
- package/date-range-picker/definition.js +1 -2
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -18
- package/date-time-picker/definition.js +1 -2
- package/dial-pad/definition.js +1 -2
- package/dial-pad/index.cjs +1 -1
- package/dial-pad/index.js +1 -5
- package/dialog/definition.js +1 -2
- package/elevation/definition.js +1 -2
- package/empty-state/definition.js +1 -2
- package/fab/definition.js +1 -2
- package/fab/index.cjs +1 -1
- package/fab/index.js +2 -5
- package/file-picker/definition.js +1 -2
- package/file-picker/index.js +1 -0
- package/flag/definition.js +1 -2
- package/form-field/definition.js +1 -2
- package/header/definition.js +1 -2
- package/kbd-key/definition.js +1 -2
- package/kbd-shortcut/definition.js +1 -2
- package/layout/definition.js +1 -2
- package/lib/rich-text-editor/rte/feature.d.ts +0 -1
- package/lib/rich-text-editor/rte/features/base.d.ts +11 -1
- package/lib/rich-text-editor/rte/features/bold.d.ts +5 -1
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +7 -1
- package/lib/rich-text-editor/rte/features/hard-break.d.ts +4 -0
- package/lib/rich-text-editor/rte/features/inline-image.d.ts +5 -0
- package/lib/rich-text-editor/rte/features/italic.d.ts +5 -1
- package/lib/rich-text-editor/rte/features/link.d.ts +5 -1
- package/lib/rich-text-editor/rte/features/list.d.ts +6 -0
- package/lib/rich-text-editor/rte/features/monospace.d.ts +5 -1
- package/lib/rich-text-editor/rte/features/strikethrough.d.ts +5 -1
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +7 -1
- package/lib/rich-text-editor/rte/features/underline.d.ts +5 -1
- package/lib/rich-text-editor/rte/public-interface.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/color.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/flatten-slice.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/sanitization.d.ts +2 -0
- package/listbox/definition.js +1 -2
- package/listbox/index.cjs +1 -1
- package/listbox/index.js +3 -7
- package/locales/en-US.js +1 -2
- package/menu/definition.js +1 -2
- package/menu-item/definition.js +1 -2
- package/nav/definition.js +1 -2
- package/nav-disclosure/definition.js +1 -2
- package/nav-item/definition.js +1 -2
- package/note/definition.js +1 -2
- package/number-field/definition.js +1 -2
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/package.json +18 -18
- package/pagination/definition.js +1 -2
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +2 -13
- package/platform-switch/definition.js +1 -2
- package/platform-switch/index.cjs +1 -1
- package/platform-switch/index.js +1 -7
- package/popover/definition.js +1 -2
- package/popover/index.js +1 -0
- package/popup/definition.js +1 -2
- package/progress/definition.js +1 -2
- package/progress-ring/definition.js +1 -2
- package/radio/definition.js +1 -2
- package/radio-group/definition.js +1 -2
- package/radio-group/index.cjs +13 -2
- package/radio-group/index.js +21 -14
- package/range-slider/definition.js +1 -2
- package/rich-text-editor/definition.js +1 -2
- package/rich-text-editor/index.cjs +7 -7
- package/rich-text-editor/index.js +2123 -2047
- package/rich-text-view/definition.js +1 -2
- package/searchable-select/definition.js +1 -2
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +4 -24
- package/select/definition.js +1 -2
- package/selectable-box/definition.js +1 -2
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +2 -5
- package/shared/foundation/vivid-element/vivid-element.browser-spec.d.ts +1 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +8 -8
- package/side-drawer/definition.js +1 -2
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +2 -5
- package/simple-color-picker/definition.js +1 -2
- package/split-button/definition.js +1 -2
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +4 -10
- package/status/definition.js +1 -2
- package/styles/fonts/spezia-variable.css +33 -21
- package/switch/definition.js +1 -2
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/definition.js +1 -2
- package/tab-panel/definition.js +1 -2
- package/table/definition.js +1 -2
- package/tabs/definition.js +1 -2
- package/tag/definition.js +1 -2
- package/tag/index.cjs +1 -1
- package/tag/index.js +2 -2
- package/tag-group/definition.js +1 -2
- package/text-area/definition.js +1 -2
- package/text-field/definition.js +1 -2
- package/toggletip/definition.js +1 -2
- package/tooltip/definition.js +1 -2
- package/tree-item/definition.js +1 -2
- package/tree-view/definition.js +1 -2
- package/unbundled/decorate.cjs +1 -1
- package/unbundled/decorate.js +1 -1
- package/unbundled/definition11.cjs +1 -1
- package/unbundled/definition11.js +1 -1
- package/unbundled/definition2.cjs +4 -4
- package/unbundled/definition2.js +4 -4
- package/unbundled/definition55.cjs +1 -1
- package/unbundled/definition55.js +1 -1
- package/unbundled/definition61.cjs +21 -2
- package/unbundled/definition61.js +21 -2
- package/unbundled/definition63.cjs +191 -61
- package/unbundled/definition63.js +191 -61
- package/unbundled/definition72.cjs +1 -0
- package/unbundled/definition72.js +1 -0
- package/unbundled/definition74.cjs +2 -1
- package/unbundled/definition74.js +2 -1
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/vivid-element.cjs +54 -1
- package/unbundled/vivid-element.js +55 -2
- package/video-player/definition.js +1 -2
- package/video-player/index.cjs +18 -18
- package/video-player/index.js +629 -1219
- package/visually-hidden/definition.js +1 -2
- package/vivid.api.json +13 -13
package/unbundled/text-field.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/lib/text-field/text-field.scss?inline
|
|
2
|
-
var text_field_default = ".label-wrapper{align-items:center;gap:var(--label-wrapper-gap,4px);flex-direction:row;display:flex}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 auto}:host{display:inline-block}.base{--_text-field-gutter-start:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_text-field-gutter-end:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_text-field-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);--_text-field-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));--_text-field-border-radius:8px;--_text-field-pill-border-radius:24px;grid-template-columns:min-content 1fr max-content;align-items:center;gap:4px;width:100%;display:inline-grid}.base.size-condensed{--_text-field-gutter-start:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2);--_text-field-gutter-end:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2);--_text-field-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8)) / 2);--_text-field-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));--_text-field-border-radius:4px}.base{user-select:none}.base:not(.disabled){--_low-ink-color:var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color:var(--_appearance-color-text)}.label:not(slot),.label::slotted(label){font:var(--vvd-typography-base);grid-area:1/1/auto/4;box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.label-wrapper{grid-area:1/1/auto/4}.char-count+.label-wrapper{grid-column:1/3}.fieldset{background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;align-items:center;padding-block:0;transition:color .2s,background-color .2s;display:flex;position:relative}.fieldset:after{border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";pointer-events:none;inline-size:100%;transition:box-shadow .2s;display:block;position:absolute}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){font:inherit;text-align:inherit;outline:#0000;box-sizing:border-box!important;border-radius:inherit!important;width:100%!important;margin:initial!important;appearance:none!important;block-size:100%!important;color:inherit!important;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;background-color:#0000!important;border:0!important}.control:not(slot,:focus),.control::slotted(input:not(:focus)){text-overflow:ellipsis!important}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control::slotted(input:autofill),.control:not(slot):autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);line-height:1;position:absolute;inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.base:not(.has-activedescendant) .fieldset:has(.wrapper .control:focus-within):after{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}}@supports not selector(:has(*)){.base:not(.has-activedescendant) .wrapper:focus-within:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent;z-index:1;border-radius:inherit;content:\"\";pointer-events:none;display:block;position:absolute;inset:0}}:host([internal-part]) .fieldset{font:var(--vvd-typography-heading-4);background-color:#0000;line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}";
|
|
2
|
+
var text_field_default = ".label-wrapper{align-items:center;gap:var(--label-wrapper-gap,4px);flex-direction:row;display:flex}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 auto}:host{display:inline-block}.base{--_text-field-gutter-start:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_text-field-gutter-end:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_text-field-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);--_text-field-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));--_text-field-border-radius:8px;--_text-field-pill-border-radius:24px;grid-template-columns:min-content 1fr max-content;align-items:center;gap:4px;width:100%;display:inline-grid}.base.size-condensed{--_text-field-gutter-start:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2);--_text-field-gutter-end:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2);--_text-field-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8)) / 2);--_text-field-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));--_text-field-border-radius:4px}.base{user-select:none}.base:not(.disabled){--_low-ink-color:var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color:var(--_appearance-color-text)}.label:not(slot),.label::slotted(label){font:var(--vvd-typography-base);grid-area:1/1/auto/4;box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.label-wrapper{grid-area:1/1/auto/4}.char-count+.label-wrapper{grid-column:1/3}.fieldset{background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);max-inline-size:var(--text-field-input-inline-size,auto);grid-column:1/4;align-items:center;padding-block:0;transition:color .2s,background-color .2s;display:flex;position:relative}.fieldset:after{border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";pointer-events:none;inline-size:100%;transition:box-shadow .2s;display:block;position:absolute}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){font:inherit;text-align:inherit;outline:#0000;box-sizing:border-box!important;border-radius:inherit!important;width:100%!important;margin:initial!important;appearance:none!important;block-size:100%!important;color:inherit!important;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;background-color:#0000!important;border:0!important}.control:not(slot,:focus),.control::slotted(input:not(:focus)){text-overflow:ellipsis!important}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control::slotted(input:autofill),.control:not(slot):autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);line-height:1;position:absolute;inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.base:not(.has-activedescendant) .fieldset:has(.wrapper .control:focus-within):after{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}}@supports not selector(:has(*)){.base:not(.has-activedescendant) .wrapper:focus-within:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent;z-index:1;border-radius:inherit;content:\"\";pointer-events:none;display:block;position:absolute;inset:0}}:host([internal-part]) .fieldset{font:var(--vvd-typography-heading-4);background-color:#0000;line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { text_field_default as t };
|
|
@@ -346,7 +346,7 @@ var ReplacedPropHandling = (Base) => {
|
|
|
346
346
|
*/
|
|
347
347
|
var VividElement = class extends AriaMixin(ReplacedPropHandling(ReactiveControllerHostSupport(_microsoft_fast_element.FASTElement))) {
|
|
348
348
|
static {
|
|
349
|
-
this.VIVID_VERSION = "5.
|
|
349
|
+
this.VIVID_VERSION = "5.31.0";
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -367,6 +367,59 @@ var VividElement = class extends AriaMixin(ReplacedPropHandling(ReactiveControll
|
|
|
367
367
|
super.focus(...args);
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
|
+
patchElementControllerForCustomElement();
|
|
371
|
+
/**
|
|
372
|
+
* Works around https://github.com/microsoft/fast/issues/7745.
|
|
373
|
+
*
|
|
374
|
+
* `ElementController.forCustomElement` subscribes a closure over the element to
|
|
375
|
+
* the notifier of the element's `FASTElementDefinition` and never unsubscribes.
|
|
376
|
+
* The definition is a per-tag singleton that lives as long as the custom element
|
|
377
|
+
* registry, so every element ever constructed — plus its detached subtree — is
|
|
378
|
+
* retained for the lifetime of the page.
|
|
379
|
+
*
|
|
380
|
+
* This replacement ties the subscription to the element's connected lifetime
|
|
381
|
+
* instead, so a removed element becomes collectable.
|
|
382
|
+
*/
|
|
383
|
+
function patchElementControllerForCustomElement() {
|
|
384
|
+
let strategy = _microsoft_fast_element.ElementController;
|
|
385
|
+
const originalSetStrategy = _microsoft_fast_element.ElementController.setStrategy;
|
|
386
|
+
_microsoft_fast_element.ElementController.setStrategy = function(newStrategy) {
|
|
387
|
+
strategy = newStrategy;
|
|
388
|
+
originalSetStrategy.call(this, newStrategy);
|
|
389
|
+
};
|
|
390
|
+
const subscribers = /* @__PURE__ */ new WeakMap();
|
|
391
|
+
_microsoft_fast_element.ElementController.forCustomElement = function(element, override = false) {
|
|
392
|
+
const existing = element.$fastController;
|
|
393
|
+
if (existing !== void 0 && !override) return existing;
|
|
394
|
+
const definition = _microsoft_fast_element.FASTElementDefinition.getForInstance(element);
|
|
395
|
+
if (definition === void 0) throw new Error("Missing element definition");
|
|
396
|
+
const controller = new strategy(element, definition);
|
|
397
|
+
element.$fastController = controller;
|
|
398
|
+
let subscriber = subscribers.get(element);
|
|
399
|
+
if (subscriber === void 0) {
|
|
400
|
+
subscriber = { handleChange: () => {
|
|
401
|
+
_microsoft_fast_element.ElementController.forCustomElement(element, true);
|
|
402
|
+
element.$fastController.connect();
|
|
403
|
+
} };
|
|
404
|
+
subscribers.set(element, subscriber);
|
|
405
|
+
}
|
|
406
|
+
const definitionSubscriber = subscriber;
|
|
407
|
+
const notifier = _microsoft_fast_element.Observable.getNotifier(definition);
|
|
408
|
+
const connect = controller.connect.bind(controller);
|
|
409
|
+
const disconnect = controller.disconnect.bind(controller);
|
|
410
|
+
controller.connect = () => {
|
|
411
|
+
notifier.subscribe(definitionSubscriber, "template");
|
|
412
|
+
notifier.subscribe(definitionSubscriber, "shadowOptions");
|
|
413
|
+
connect();
|
|
414
|
+
};
|
|
415
|
+
controller.disconnect = () => {
|
|
416
|
+
disconnect();
|
|
417
|
+
notifier.unsubscribe(definitionSubscriber, "template");
|
|
418
|
+
notifier.unsubscribe(definitionSubscriber, "shadowOptions");
|
|
419
|
+
};
|
|
420
|
+
return controller;
|
|
421
|
+
};
|
|
422
|
+
}
|
|
370
423
|
//#endregion
|
|
371
424
|
Object.defineProperty(exports, "VividElement", {
|
|
372
425
|
enumerable: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DOM, FASTElement, FASTElementDefinition, Observable, attr, html } from "@microsoft/fast-element";
|
|
1
|
+
import { DOM, ElementController, FASTElement, FASTElementDefinition, Observable, attr, html } from "@microsoft/fast-element";
|
|
2
2
|
//#region src/shared/design-system/createRegisterFunction.ts
|
|
3
3
|
function resolve(templateOrResolveFunction, ctx) {
|
|
4
4
|
if (templateOrResolveFunction instanceof Function) return templateOrResolveFunction(ctx);
|
|
@@ -346,7 +346,7 @@ var ReplacedPropHandling = (Base) => {
|
|
|
346
346
|
*/
|
|
347
347
|
var VividElement = class extends AriaMixin(ReplacedPropHandling(ReactiveControllerHostSupport(FASTElement))) {
|
|
348
348
|
static {
|
|
349
|
-
this.VIVID_VERSION = "5.
|
|
349
|
+
this.VIVID_VERSION = "5.31.0";
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -367,5 +367,58 @@ var VividElement = class extends AriaMixin(ReplacedPropHandling(ReactiveControll
|
|
|
367
367
|
super.focus(...args);
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
|
+
patchElementControllerForCustomElement();
|
|
371
|
+
/**
|
|
372
|
+
* Works around https://github.com/microsoft/fast/issues/7745.
|
|
373
|
+
*
|
|
374
|
+
* `ElementController.forCustomElement` subscribes a closure over the element to
|
|
375
|
+
* the notifier of the element's `FASTElementDefinition` and never unsubscribes.
|
|
376
|
+
* The definition is a per-tag singleton that lives as long as the custom element
|
|
377
|
+
* registry, so every element ever constructed — plus its detached subtree — is
|
|
378
|
+
* retained for the lifetime of the page.
|
|
379
|
+
*
|
|
380
|
+
* This replacement ties the subscription to the element's connected lifetime
|
|
381
|
+
* instead, so a removed element becomes collectable.
|
|
382
|
+
*/
|
|
383
|
+
function patchElementControllerForCustomElement() {
|
|
384
|
+
let strategy = ElementController;
|
|
385
|
+
const originalSetStrategy = ElementController.setStrategy;
|
|
386
|
+
ElementController.setStrategy = function(newStrategy) {
|
|
387
|
+
strategy = newStrategy;
|
|
388
|
+
originalSetStrategy.call(this, newStrategy);
|
|
389
|
+
};
|
|
390
|
+
const subscribers = /* @__PURE__ */ new WeakMap();
|
|
391
|
+
ElementController.forCustomElement = function(element, override = false) {
|
|
392
|
+
const existing = element.$fastController;
|
|
393
|
+
if (existing !== void 0 && !override) return existing;
|
|
394
|
+
const definition = FASTElementDefinition.getForInstance(element);
|
|
395
|
+
if (definition === void 0) throw new Error("Missing element definition");
|
|
396
|
+
const controller = new strategy(element, definition);
|
|
397
|
+
element.$fastController = controller;
|
|
398
|
+
let subscriber = subscribers.get(element);
|
|
399
|
+
if (subscriber === void 0) {
|
|
400
|
+
subscriber = { handleChange: () => {
|
|
401
|
+
ElementController.forCustomElement(element, true);
|
|
402
|
+
element.$fastController.connect();
|
|
403
|
+
} };
|
|
404
|
+
subscribers.set(element, subscriber);
|
|
405
|
+
}
|
|
406
|
+
const definitionSubscriber = subscriber;
|
|
407
|
+
const notifier = Observable.getNotifier(definition);
|
|
408
|
+
const connect = controller.connect.bind(controller);
|
|
409
|
+
const disconnect = controller.disconnect.bind(controller);
|
|
410
|
+
controller.connect = () => {
|
|
411
|
+
notifier.subscribe(definitionSubscriber, "template");
|
|
412
|
+
notifier.subscribe(definitionSubscriber, "shadowOptions");
|
|
413
|
+
connect();
|
|
414
|
+
};
|
|
415
|
+
controller.disconnect = () => {
|
|
416
|
+
disconnect();
|
|
417
|
+
notifier.unsubscribe(definitionSubscriber, "template");
|
|
418
|
+
notifier.unsubscribe(definitionSubscriber, "shadowOptions");
|
|
419
|
+
};
|
|
420
|
+
return controller;
|
|
421
|
+
};
|
|
422
|
+
}
|
|
370
423
|
//#endregion
|
|
371
424
|
export { ariaValueProperties as a, subscribeToAriaPropertyChanges as c, createRegisterFunction as d, ariaIdrefsProperties as i, unsubscribeFromAriaPropertyChanges as l, replaces as n, handleAriaPropertyChange as o, ariaAttributeName as r, publishAriaPropertyChange as s, VividElement as t, defineVividComponent as u };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { VideoPlayer as VwcVideoPlayerElement, registerVideoPlayer, videoPlayerDefinition };
|
|
1
|
+
export { r as VwcVideoPlayerElement, t as registerVideoPlayer, n as videoPlayerDefinition } from "../unbundled/definition83.js";
|