@limetech/lime-elements 39.23.0 → 39.24.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/CHANGELOG.md +16 -0
- package/dist/cjs/adapt-color-contrast-Beo1IEl_.js +168 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-email-viewer.cjs.entry.js +9 -2
- package/dist/cjs/limel-form.cjs.entry.js +45 -8
- package/dist/cjs/limel-markdown.cjs.entry.js +25 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/email-viewer/email-viewer.js +9 -2
- package/dist/collection/components/form/form.js +39 -2
- package/dist/collection/components/markdown/markdown.js +46 -1
- package/dist/collection/util/adapt-color-contrast.js +164 -0
- package/dist/esm/adapt-color-contrast-Dgcw_h7C.js +166 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-email-viewer.entry.js +9 -2
- package/dist/esm/limel-form.entry.js +45 -8
- package/dist/esm/limel-markdown.entry.js +25 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-96ee6090.entry.js +1 -0
- package/dist/lime-elements/{p-29a59535.entry.js → p-9758568e.entry.js} +1 -1
- package/dist/lime-elements/p-Dgcw_h7C.js +1 -0
- package/dist/lime-elements/p-c1c635c1.entry.js +1 -0
- package/dist/types/components/email-viewer/email-viewer.d.ts +2 -0
- package/dist/types/components/form/form.d.ts +14 -0
- package/dist/types/components/markdown/markdown.d.ts +16 -0
- package/dist/types/components.d.ts +15 -0
- package/dist/types/util/adapt-color-contrast.d.ts +38 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-5b31c118.entry.js +0 -1
- package/dist/lime-elements/p-70541fe3.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var index = require('./index-BjHIBY-I.js');
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy(JSON.parse("[[\"limel-icon.cjs\",[[1,\"limel-icon\",{\"size\":[513],\"name\":[513],\"badge\":[516]},null,{\"name\":[{\"loadIcon\":0}]}]]],[\"limel-text-editor.cjs\",[[17,\"limel-text-editor\",{\"contentType\":[1,\"content-type\"],\"language\":[513],\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"value\":[513],\"customElements\":[16],\"triggers\":[16],\"required\":[516],\"allowResize\":[516,\"allow-resize\"],\"ui\":[513]}]]],[\"limel-card.cjs\",[[257,\"limel-card\",{\"heading\":[513],\"subheading\":[513],\"image\":[16],\"icon\":[513],\"value\":[1],\"actions\":[16],\"clickable\":[516],\"orientation\":[513],\"selected\":[516],\"show3dEffect\":[516,\"show-3d-effect\"],\"canScrollUp\":[32],\"canScrollDown\":[32]}]]],[\"limel-file.cjs\",[[1,\"limel-file\",{\"value\":[16],\"label\":[513],\"required\":[516],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"accept\":[513],\"language\":[1]}]]],[\"limel-code-diff.cjs\",[[1,\"limel-code-diff\",{\"oldValue\":[1,\"old-value\"],\"newValue\":[1,\"new-value\"],\"oldHeading\":[513,\"old-heading\"],\"newHeading\":[513,\"new-heading\"],\"layout\":[513],\"contextLines\":[514,\"context-lines\"],\"lineWrapping\":[516,\"line-wrapping\"],\"language\":[513],\"reformatJson\":[516,\"reformat-json\"],\"translationLanguage\":[513,\"translation-language\"],\"diffResult\":[32],\"liveAnnouncement\":[32],\"copyState\":[32],\"searchVisible\":[32],\"searchTerm\":[32],\"currentMatchIndex\":[32]},null,{\"oldValue\":[{\"watchInputs\":0}],\"newValue\":[{\"watchInputs\":0}],\"contextLines\":[{\"watchInputs\":0}],\"reformatJson\":[{\"watchInputs\":0}],\"layout\":[{\"watchInputs\":0}]}]]],[\"limel-file-viewer.cjs\",[[1,\"limel-file-viewer\",{\"url\":[513],\"filename\":[513],\"alt\":[513],\"allowFullscreen\":[516,\"allow-fullscreen\"],\"allowOpenInNewTab\":[516,\"allow-open-in-new-tab\"],\"allowDownload\":[516,\"allow-download\"],\"language\":[1],\"officeViewer\":[513,\"office-viewer\"],\"actions\":[16],\"isFullscreen\":[32],\"fileType\":[32],\"loading\":[32],\"fileUrl\":[32],\"email\":[32]},null,{\"url\":[{\"watchUrl\":0}]}]]],[\"limel-list-item.cjs\",[[0,\"limel-list-item\",{\"language\":[513],\"value\":[8],\"text\":[513],\"secondaryText\":[513,\"secondary-text\"],\"disabled\":[516],\"icon\":[1],\"iconSize\":[513,\"icon-size\"],\"badgeIcon\":[516,\"badge-icon\"],\"selected\":[516],\"actions\":[16],\"primaryComponent\":[16],\"image\":[16],\"type\":[513]}]]],[\"limel-picker.cjs\",[[17,\"limel-picker\",{\"disabled\":[4],\"readonly\":[516],\"label\":[1],\"searchLabel\":[1,\"search-label\"],\"helperText\":[513,\"helper-text\"],\"leadingIcon\":[1,\"leading-icon\"],\"emptyResultMessage\":[1,\"empty-result-message\"],\"required\":[4],\"invalid\":[516],\"value\":[16],\"searcher\":[16],\"allItems\":[16],\"multiple\":[4],\"delimiter\":[513],\"actions\":[16],\"actionPosition\":[1,\"action-position\"],\"actionScrollBehavior\":[1,\"action-scroll-behavior\"],\"badgeIcons\":[516,\"badge-icons\"],\"items\":[32],\"textValue\":[32],\"loading\":[32],\"chips\":[32]},null,{\"disabled\":[{\"onDisabledChange\":0}],\"value\":[{\"onChangeValue\":0}]}]]],[\"limel-split-button.cjs\",[[17,\"limel-split-button\",{\"label\":[513],\"primary\":[516],\"icon\":[513],\"disabled\":[516],\"loading\":[516],\"loadingFailed\":[516,\"loading-failed\"],\"items\":[16]}]]],[\"limel-color-picker.cjs\",[[1,\"limel-color-picker\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"tooltipLabel\":[513,\"tooltip-label\"],\"required\":[516],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"placeholder\":[513],\"manualInput\":[516,\"manual-input\"],\"palette\":[16],\"paletteColumnCount\":[514,\"palette-column-count\"],\"isOpen\":[32]}]]],[\"limel-profile-picture.cjs\",[[1,\"limel-profile-picture\",{\"language\":[513],\"label\":[513],\"icon\":[1],\"helperText\":[1,\"helper-text\"],\"disabled\":[516],\"readonly\":[516],\"required\":[516],\"invalid\":[516],\"loading\":[516],\"value\":[1],\"imageFit\":[513,\"image-fit\"],\"accept\":[513],\"resize\":[16],\"objectUrl\":[32],\"imageError\":[32],\"isErrorMessagePopoverOpen\":[32]},null,{\"value\":[{\"handleValueChange\":0}]}]]],[\"limel-dock.cjs\",[[1,\"limel-dock\",{\"dockItems\":[16],\"dockFooterItems\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"expanded\":[516],\"allowResize\":[516,\"allow-resize\"],\"mobileBreakPoint\":[514,\"mobile-break-point\"],\"useMobileLayout\":[32]}]]],[\"limel-snackbar.cjs\",[[1,\"limel-snackbar\",{\"open\":[516],\"message\":[1],\"timeout\":[514],\"actionText\":[1,\"action-text\"],\"dismissible\":[4],\"multiline\":[4],\"language\":[1],\"offset\":[32],\"isOpen\":[32],\"closing\":[32],\"show\":[64]},[[0,\"changeOffset\",\"onChangeIndex\"]],{\"open\":[{\"watchOpen\":0}]}]]],[\"limel-date-picker.cjs\",[[1,\"limel-date-picker\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"value\":[16],\"type\":[513],\"format\":[513],\"language\":[513],\"formatter\":[16],\"internalFormat\":[32],\"showPortal\":[32]}]]],[\"limel-button-group.cjs\",[[1,\"limel-button-group\",{\"value\":[16],\"disabled\":[516],\"selectedButtonId\":[32]},null,{\"value\":[{\"valueChanged\":0}]}]]],[\"limel-chart.cjs\",[[1,\"limel-chart\",{\"language\":[513],\"accessibleLabel\":[513,\"accessible-label\"],\"accessibleItemsLabel\":[513,\"accessible-items-label\"],\"accessibleValuesLabel\":[513,\"accessible-values-label\"],\"displayAxisLabels\":[516,\"display-axis-labels\"],\"displayItemText\":[516,\"display-item-text\"],\"displayItemValue\":[516,\"display-item-value\"],\"items\":[16],\"type\":[513],\"orientation\":[513],\"maxValue\":[514,\"max-value\"],\"axisIncrement\":[514,\"axis-increment\"],\"loading\":[516]},null,{\"items\":[{\"handleChange\":0}],\"axisIncrement\":[{\"handleChange\":0}],\"maxValue\":[{\"handleChange\":0}]}]]],[\"limel-select.cjs\",[[1,\"limel-select\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"required\":[516],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"value\":[16],\"options\":[16],\"multiple\":[4],\"menuOpen\":[32]},null,{\"value\":[{\"resetHasChanged\":0}],\"options\":[{\"resetHasChanged\":0},{\"updateHasPrimaryComponent\":0}],\"menuOpen\":[{\"watchOpen\":0}]}]]],[\"limel-help.cjs\",[[1,\"limel-help\",{\"value\":[1],\"trigger\":[1],\"readMoreLink\":[16],\"openDirection\":[513,\"open-direction\"],\"isOpen\":[32]}]]],[\"limel-info-tile.cjs\",[[257,\"limel-info-tile\",{\"value\":[520],\"icon\":[1],\"label\":[513],\"prefix\":[513],\"suffix\":[513],\"disabled\":[516],\"badge\":[520],\"loading\":[516],\"link\":[16],\"progress\":[16],\"hasPrimarySlot\":[32]}]]],[\"limel-table.cjs\",[[1,\"limel-table\",{\"data\":[16],\"columns\":[16],\"mode\":[513],\"layout\":[513],\"pageSize\":[514,\"page-size\"],\"totalRows\":[514,\"total-rows\"],\"sorting\":[16],\"activeRow\":[1040],\"movableColumns\":[516,\"movable-columns\"],\"movableRows\":[516,\"movable-rows\"],\"sortableColumns\":[516,\"sortable-columns\"],\"loading\":[516],\"page\":[514],\"emptyMessage\":[1,\"empty-message\"],\"aggregates\":[16],\"selectable\":[516],\"selection\":[16],\"language\":[513],\"paginationLocation\":[513,\"pagination-location\"]},null,{\"totalRows\":[{\"totalRowsChanged\":0}],\"pageSize\":[{\"pageSizeChanged\":0}],\"page\":[{\"pageChanged\":0}],\"activeRow\":[{\"activeRowChanged\":0}],\"data\":[{\"updateData\":0}],\"columns\":[{\"updateColumns\":0}],\"aggregates\":[{\"updateAggregates\":0}],\"selection\":[{\"updateSelection\":0}],\"selectable\":[{\"updateSelectable\":0}],\"movableRows\":[{\"updateMovableRows\":0}],\"sortableColumns\":[{\"updateSortableColumns\":0}],\"sorting\":[{\"updateSorting\":0}]}]]],[\"limel-drag-handle.cjs\",[[0,\"limel-drag-handle\",{\"dragDirection\":[513,\"drag-direction\"],\"tooltipOpenDirection\":[513,\"tooltip-open-direction\"],\"language\":[513]}]]],[\"limel-shortcut.cjs\",[[1,\"limel-shortcut\",{\"icon\":[513],\"label\":[513],\"disabled\":[516],\"badge\":[520],\"link\":[16]}]]],[\"limel-switch.cjs\",[[1,\"limel-switch\",{\"label\":[513],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"value\":[516],\"helperText\":[513,\"helper-text\"],\"readonlyLabels\":[16],\"fieldId\":[32]}]]],[\"limel-tab-panel.cjs\",[[257,\"limel-tab-panel\",{\"tabs\":[1040]},null,{\"tabs\":[{\"tabsChanged\":0}]}]]],[\"limel-code-editor.cjs\",[[1,\"limel-code-editor\",{\"value\":[1],\"language\":[1],\"readonly\":[516],\"disabled\":[516],\"invalid\":[516],\"required\":[516],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"lineNumbers\":[516,\"line-numbers\"],\"lineWrapping\":[516,\"line-wrapping\"],\"fold\":[516],\"lint\":[516],\"colorScheme\":[513,\"color-scheme\"],\"translationLanguage\":[513,\"translation-language\"],\"showCopyButton\":[516,\"show-copy-button\"],\"random\":[32],\"wasCopied\":[32]},null,{\"value\":[{\"watchValue\":0}],\"disabled\":[{\"watchDisabled\":0}],\"readonly\":[{\"watchReadonly\":0}],\"invalid\":[{\"watchInvalid\":0}],\"required\":[{\"watchRequired\":0}],\"helperText\":[{\"watchHelperText\":0}]}]]],[\"limel-dialog.cjs\",[[257,\"limel-dialog\",{\"heading\":[1],\"fullscreen\":[516],\"open\":[1540],\"closingActions\":[16]},null,{\"open\":[{\"watchHandler\":0}],\"closingActions\":[{\"closingActionsChanged\":0}]}]]],[\"limel-menu-item-meta.cjs\",[[1,\"limel-menu-item-meta\",{\"commandText\":[513,\"command-text\"],\"hotkey\":[513],\"disabled\":[516],\"badge\":[8],\"showChevron\":[4,\"show-chevron\"]}]]],[\"limel-progress-flow.cjs\",[[1,\"limel-progress-flow\",{\"flowItems\":[16],\"disabled\":[4],\"readonly\":[4]}]]],[\"limel-slider.cjs\",[[1,\"limel-slider\",{\"disabled\":[516],\"readonly\":[516],\"factor\":[514],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"invalid\":[516],\"displaysPercentageColors\":[516,\"displays-percentage-colors\"],\"unit\":[513],\"value\":[514],\"valuemax\":[514],\"valuemin\":[514],\"step\":[514],\"percentageClass\":[32],\"displayValue\":[32]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"limel-banner.cjs\",[[257,\"limel-banner\",{\"message\":[513],\"icon\":[513],\"isOpen\":[32],\"open\":[64],\"close\":[64]}]]],[\"limel-form.cjs\",[[1,\"limel-form\",{\"schema\":[16],\"value\":[16],\"disabled\":[4],\"propsFactory\":[16],\"transformErrors\":[16],\"errors\":[16]}]]],[\"limel-radio-button-group.cjs\",[[0,\"limel-radio-button-group\",{\"items\":[16],\"selectedItem\":[16],\"disabled\":[516],\"badgeIcons\":[516,\"badge-icons\"],\"maxLinesSecondaryText\":[514,\"max-lines-secondary-text\"]}]]],[\"limel-ai-avatar.cjs\",[[1,\"limel-ai-avatar\",{\"isThinking\":[516,\"is-thinking\"],\"language\":[513]}]]],[\"limel-config.cjs\",[[1,\"limel-config\",{\"config\":[16]}]]],[\"limel-flex-container.cjs\",[[257,\"limel-flex-container\",{\"direction\":[513],\"justify\":[513],\"align\":[513],\"reverse\":[516]}]]],[\"limel-grid.cjs\",[[257,\"limel-grid\"]]],[\"limel-masonry-layout.cjs\",[[257,\"limel-masonry-layout\",{\"ordered\":[516],\"containerHeight\":[32]},null,{\"ordered\":[{\"onOrderedChange\":0}]}]]],[\"limel-prosemirror-adapter.cjs\",[[17,\"limel-prosemirror-adapter\",{\"contentType\":[1,\"content-type\"],\"value\":[1],\"language\":[513],\"disabled\":[516],\"customElements\":[16],\"triggerCharacters\":[16],\"ui\":[1],\"view\":[32],\"actionBarItems\":[32],\"link\":[32],\"isLinkMenuOpen\":[32]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"limel-email-viewer.cjs\",[[257,\"limel-email-viewer\",{\"email\":[16],\"fallbackUrl\":[513,\"fallback-url\"],\"language\":[513],\"allowRemoteImages\":[4,\"allow-remote-images\"],\"allowRemoteImagesState\":[32]},null,{\"email\":[{\"resetAllowRemoteImages\":0}]}]]],[\"limel-dock-button.cjs\",[[0,\"limel-dock-button\",{\"item\":[16],\"expanded\":[516],\"useMobileLayout\":[516,\"use-mobile-layout\"],\"isOpen\":[32]},null,{\"isOpen\":[{\"openWatcher\":0}]}]]],[\"limel-color-picker-palette.cjs\",[[17,\"limel-color-picker-palette\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"required\":[516],\"invalid\":[516],\"manualInput\":[516,\"manual-input\"],\"columnCount\":[514,\"column-count\"],\"palette\":[16]}]]],[\"limel-checkbox.cjs\",[[1,\"limel-checkbox\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"checked\":[516],\"indeterminate\":[516],\"required\":[516],\"readonlyLabels\":[16],\"modified\":[32]},null,{\"checked\":[{\"handleCheckedChange\":0}],\"indeterminate\":[{\"handleIndeterminateChange\":0}],\"readonly\":[{\"handleReadonlyChange\":0}]}]]],[\"limel-tab-bar.cjs\",[[1,\"limel-tab-bar\",{\"tabs\":[1040],\"canScrollLeft\":[32],\"canScrollRight\":[32]},[[9,\"resize\",\"handleWindowResize\"]],{\"tabs\":[{\"tabsChanged\":0}]}]]],[\"limel-callout.cjs\",[[257,\"limel-callout\",{\"heading\":[513],\"icon\":[513],\"type\":[513],\"language\":[1]}]]],[\"limel-header.cjs\",[[257,\"limel-header\",{\"icon\":[1],\"heading\":[1],\"subheading\":[1],\"supportingText\":[1,\"supporting-text\"],\"subheadingDivider\":[1,\"subheading-divider\"]}]]],[\"limel-help-content.cjs\",[[1,\"limel-help-content\",{\"value\":[1],\"readMoreLink\":[16]}]]],[\"limel-progress-flow-item.cjs\",[[0,\"limel-progress-flow-item\",{\"item\":[16],\"disabled\":[4],\"readonly\":[4],\"currentStep\":[4,\"current-step\"]}]]],[\"limel-circular-progress.cjs\",[[1,\"limel-circular-progress\",{\"value\":[2],\"maxValue\":[2,\"max-value\"],\"prefix\":[513],\"suffix\":[1],\"displayPercentageColors\":[4,\"display-percentage-colors\"],\"size\":[513]}]]],[\"limel-flatpickr-adapter.cjs\",[[1,\"limel-flatpickr-adapter\",{\"value\":[16],\"type\":[1],\"format\":[1],\"isOpen\":[4,\"is-open\"],\"inputElement\":[16],\"language\":[1],\"formatter\":[16]}]]],[\"limel-radio-button.cjs\",[[0,\"limel-radio-button\",{\"checked\":[516],\"disabled\":[516],\"id\":[1],\"label\":[1],\"onChange\":[16]}]]],[\"limel-text-editor-link-menu.cjs\",[[1,\"limel-text-editor-link-menu\",{\"link\":[16],\"language\":[513],\"isOpen\":[516,\"is-open\"]}]]],[\"limel-collapsible-section.cjs\",[[257,\"limel-collapsible-section\",{\"isOpen\":[1540,\"is-open\"],\"header\":[513],\"icon\":[1],\"invalid\":[516],\"actions\":[16],\"language\":[513]}]]],[\"limel-3d-hover-effect-glow.cjs\",[[1,\"limel-3d-hover-effect-glow\"]]],[\"limel-file-dropzone_2.cjs\",[[257,\"limel-file-dropzone\",{\"accept\":[513],\"disabled\":[4],\"text\":[1],\"helperText\":[1,\"helper-text\"],\"hasFileToDrop\":[32]}],[257,\"limel-file-input\",{\"accept\":[513],\"disabled\":[516],\"multiple\":[516]}]]],[\"limel-dynamic-label.cjs\",[[1,\"limel-dynamic-label\",{\"value\":[8],\"defaultLabel\":[16],\"labels\":[16]}]]],[\"limel-linear-progress.cjs\",[[1,\"limel-linear-progress\",{\"language\":[513],\"value\":[514],\"indeterminate\":[516],\"accessibleLabel\":[513,\"accessible-label\"]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"limel-badge.cjs\",[[1,\"limel-badge\",{\"label\":[520]}]]],[\"limel-helper-line_2.cjs\",[[260,\"limel-notched-outline\",{\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"label\":[513],\"labelId\":[513,\"label-id\"],\"hasValue\":[516,\"has-value\"],\"hasLeadingIcon\":[516,\"has-leading-icon\"],\"hasFloatingLabel\":[516,\"has-floating-label\"]}],[1,\"limel-helper-line\",{\"helperText\":[513,\"helper-text\"],\"length\":[514],\"maxLength\":[514,\"max-length\"],\"invalid\":[516],\"helperTextId\":[513,\"helper-text-id\"]}]]],[\"limel-chip_2.cjs\",[[17,\"limel-chip-set\",{\"value\":[16],\"type\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"inputType\":[513,\"input-type\"],\"maxItems\":[514,\"max-items\"],\"required\":[516],\"searchLabel\":[513,\"search-label\"],\"emptyInputOnBlur\":[516,\"empty-input-on-blur\"],\"clearAllButton\":[4,\"clear-all-button\"],\"leadingIcon\":[513,\"leading-icon\"],\"delimiter\":[513],\"autocomplete\":[513],\"language\":[1],\"editMode\":[32],\"textValue\":[32],\"blurred\":[32],\"inputChipIndexSelected\":[32],\"selectedChipIds\":[32],\"getEditMode\":[64],\"setFocus\":[64],\"emptyInput\":[64]},null,{\"value\":[{\"handleChangeChips\":0}]}],[17,\"limel-chip\",{\"language\":[513],\"text\":[513],\"icon\":[1],\"image\":[16],\"link\":[16],\"badge\":[520],\"disabled\":[516],\"readonly\":[516],\"selected\":[516],\"invalid\":[516],\"removable\":[516],\"type\":[513],\"loading\":[516],\"progress\":[514],\"identifier\":[520],\"size\":[513],\"menuItems\":[16]}]]],[\"limel-button.cjs\",[[17,\"limel-button\",{\"label\":[513],\"primary\":[516],\"outlined\":[516],\"icon\":[513],\"disabled\":[516],\"loading\":[516],\"loadingFailed\":[516,\"loading-failed\"],\"justLoaded\":[32]},null,{\"loading\":[{\"loadingWatcher\":0}]}]]],[\"limel-icon-button.cjs\",[[17,\"limel-icon-button\",{\"icon\":[1],\"elevated\":[516],\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"disabled\":[516]}]]],[\"limel-markdown.cjs\",[[1,\"limel-markdown\",{\"value\":[1],\"whitelist\":[16],\"lazyLoadImages\":[516,\"lazy-load-images\"],\"removeEmptyParagraphs\":[516,\"remove-empty-paragraphs\"]},null,{\"value\":[{\"textChanged\":0}],\"whitelist\":[{\"handleWhitelistChange\":0}],\"removeEmptyParagraphs\":[{\"handleRemoveEmptyParagraphsChange\":0}]}]]],[\"limel-hotkey_4.cjs\",[[1,\"limel-tooltip\",{\"elementId\":[513,\"element-id\"],\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"hotkey\":[513],\"maxlength\":[514],\"openDirection\":[513,\"open-direction\"],\"open\":[32]}],[1,\"limel-tooltip-content\",{\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"maxlength\":[514],\"hotkey\":[513]}],[1,\"limel-hotkey\",{\"value\":[513],\"disabled\":[516]}],[257,\"limel-portal\",{\"openDirection\":[513,\"open-direction\"],\"position\":[513],\"containerId\":[513,\"container-id\"],\"containerStyle\":[16],\"inheritParentWidth\":[516,\"inherit-parent-width\"],\"visible\":[516],\"anchor\":[16]},null,{\"visible\":[{\"onVisible\":0}]}]]],[\"limel-popover_2.cjs\",[[257,\"limel-popover\",{\"open\":[4],\"openDirection\":[513,\"open-direction\"]},null,{\"open\":[{\"watchOpen\":0}]}],[1,\"limel-popover-surface\",{\"contentCollection\":[16]}]]],[\"limel-breadcrumbs_7.cjs\",[[257,\"limel-menu\",{\"items\":[16],\"disabled\":[516],\"openDirection\":[513,\"open-direction\"],\"surfaceWidth\":[513,\"surface-width\"],\"open\":[1540],\"badgeIcons\":[516,\"badge-icons\"],\"gridLayout\":[516,\"grid-layout\"],\"loading\":[516],\"currentSubMenu\":[1040],\"rootItem\":[16],\"searcher\":[16],\"searchPlaceholder\":[1,\"search-placeholder\"],\"emptyResultMessage\":[1,\"empty-result-message\"],\"keepOpenOnSelect\":[516,\"keep-open-on-select\"],\"loadingSubItems\":[32],\"searchValue\":[32],\"searchResults\":[32]},null,{\"items\":[{\"itemsWatcher\":0}],\"open\":[{\"openWatcher\":0}]}],[1,\"limel-breadcrumbs\",{\"items\":[16],\"divider\":[1]}],[17,\"limel-menu-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"]},null,{\"items\":[{\"itemsChanged\":0}]}],[17,\"limel-input-field\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"prefix\":[513],\"suffix\":[513],\"required\":[516],\"value\":[513],\"trailingIcon\":[513,\"trailing-icon\"],\"leadingIcon\":[513,\"leading-icon\"],\"pattern\":[513],\"type\":[513],\"formatNumber\":[516,\"format-number\"],\"step\":[520],\"max\":[514],\"min\":[514],\"maxlength\":[514],\"minlength\":[514],\"completions\":[16],\"showLink\":[516,\"show-link\"],\"locale\":[513],\"isFocused\":[32],\"wasInvalid\":[32],\"showCompletions\":[32],\"getSelectionStart\":[64],\"getSelectionEnd\":[64],\"getSelectionDirection\":[64]},null,{\"value\":[{\"valueWatcher\":0}],\"completions\":[{\"completionsWatcher\":0}]}],[257,\"limel-menu-surface\",{\"open\":[4],\"allowClicksElement\":[16]}],[1,\"limel-spinner\",{\"size\":[513],\"limeBranded\":[4,\"lime-branded\"]}],[17,\"limel-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"],\"type\":[1],\"maxLinesSecondaryText\":[2,\"max-lines-secondary-text\"]},null,{\"type\":[{\"handleType\":0}],\"items\":[{\"itemsChanged\":0}]}]]],[\"limel-action-bar_3.cjs\",[[1,\"limel-action-bar\",{\"actions\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"language\":[1],\"layout\":[513],\"collapsible\":[516],\"openDirection\":[513,\"open-direction\"],\"overflowCutoff\":[32]}],[0,\"limel-action-bar-overflow-menu\",{\"items\":[16],\"openDirection\":[513,\"open-direction\"]}],[0,\"limel-action-bar-item\",{\"item\":[16],\"isVisible\":[516,\"is-visible\"],\"selected\":[516]}]]]]"), options);
|
|
8
|
+
return index.bootstrapLazy(JSON.parse("[[\"limel-icon.cjs\",[[1,\"limel-icon\",{\"size\":[513],\"name\":[513],\"badge\":[516]},null,{\"name\":[{\"loadIcon\":0}]}]]],[\"limel-text-editor.cjs\",[[17,\"limel-text-editor\",{\"contentType\":[1,\"content-type\"],\"language\":[513],\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"value\":[513],\"customElements\":[16],\"triggers\":[16],\"required\":[516],\"allowResize\":[516,\"allow-resize\"],\"ui\":[513]}]]],[\"limel-card.cjs\",[[257,\"limel-card\",{\"heading\":[513],\"subheading\":[513],\"image\":[16],\"icon\":[513],\"value\":[1],\"actions\":[16],\"clickable\":[516],\"orientation\":[513],\"selected\":[516],\"show3dEffect\":[516,\"show-3d-effect\"],\"canScrollUp\":[32],\"canScrollDown\":[32]}]]],[\"limel-file.cjs\",[[1,\"limel-file\",{\"value\":[16],\"label\":[513],\"required\":[516],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"accept\":[513],\"language\":[1]}]]],[\"limel-code-diff.cjs\",[[1,\"limel-code-diff\",{\"oldValue\":[1,\"old-value\"],\"newValue\":[1,\"new-value\"],\"oldHeading\":[513,\"old-heading\"],\"newHeading\":[513,\"new-heading\"],\"layout\":[513],\"contextLines\":[514,\"context-lines\"],\"lineWrapping\":[516,\"line-wrapping\"],\"language\":[513],\"reformatJson\":[516,\"reformat-json\"],\"translationLanguage\":[513,\"translation-language\"],\"diffResult\":[32],\"liveAnnouncement\":[32],\"copyState\":[32],\"searchVisible\":[32],\"searchTerm\":[32],\"currentMatchIndex\":[32]},null,{\"oldValue\":[{\"watchInputs\":0}],\"newValue\":[{\"watchInputs\":0}],\"contextLines\":[{\"watchInputs\":0}],\"reformatJson\":[{\"watchInputs\":0}],\"layout\":[{\"watchInputs\":0}]}]]],[\"limel-file-viewer.cjs\",[[1,\"limel-file-viewer\",{\"url\":[513],\"filename\":[513],\"alt\":[513],\"allowFullscreen\":[516,\"allow-fullscreen\"],\"allowOpenInNewTab\":[516,\"allow-open-in-new-tab\"],\"allowDownload\":[516,\"allow-download\"],\"language\":[1],\"officeViewer\":[513,\"office-viewer\"],\"actions\":[16],\"isFullscreen\":[32],\"fileType\":[32],\"loading\":[32],\"fileUrl\":[32],\"email\":[32]},null,{\"url\":[{\"watchUrl\":0}]}]]],[\"limel-list-item.cjs\",[[0,\"limel-list-item\",{\"language\":[513],\"value\":[8],\"text\":[513],\"secondaryText\":[513,\"secondary-text\"],\"disabled\":[516],\"icon\":[1],\"iconSize\":[513,\"icon-size\"],\"badgeIcon\":[516,\"badge-icon\"],\"selected\":[516],\"actions\":[16],\"primaryComponent\":[16],\"image\":[16],\"type\":[513]}]]],[\"limel-picker.cjs\",[[17,\"limel-picker\",{\"disabled\":[4],\"readonly\":[516],\"label\":[1],\"searchLabel\":[1,\"search-label\"],\"helperText\":[513,\"helper-text\"],\"leadingIcon\":[1,\"leading-icon\"],\"emptyResultMessage\":[1,\"empty-result-message\"],\"required\":[4],\"invalid\":[516],\"value\":[16],\"searcher\":[16],\"allItems\":[16],\"multiple\":[4],\"delimiter\":[513],\"actions\":[16],\"actionPosition\":[1,\"action-position\"],\"actionScrollBehavior\":[1,\"action-scroll-behavior\"],\"badgeIcons\":[516,\"badge-icons\"],\"items\":[32],\"textValue\":[32],\"loading\":[32],\"chips\":[32]},null,{\"disabled\":[{\"onDisabledChange\":0}],\"value\":[{\"onChangeValue\":0}]}]]],[\"limel-split-button.cjs\",[[17,\"limel-split-button\",{\"label\":[513],\"primary\":[516],\"icon\":[513],\"disabled\":[516],\"loading\":[516],\"loadingFailed\":[516,\"loading-failed\"],\"items\":[16]}]]],[\"limel-color-picker.cjs\",[[1,\"limel-color-picker\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"tooltipLabel\":[513,\"tooltip-label\"],\"required\":[516],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"placeholder\":[513],\"manualInput\":[516,\"manual-input\"],\"palette\":[16],\"paletteColumnCount\":[514,\"palette-column-count\"],\"isOpen\":[32]}]]],[\"limel-profile-picture.cjs\",[[1,\"limel-profile-picture\",{\"language\":[513],\"label\":[513],\"icon\":[1],\"helperText\":[1,\"helper-text\"],\"disabled\":[516],\"readonly\":[516],\"required\":[516],\"invalid\":[516],\"loading\":[516],\"value\":[1],\"imageFit\":[513,\"image-fit\"],\"accept\":[513],\"resize\":[16],\"objectUrl\":[32],\"imageError\":[32],\"isErrorMessagePopoverOpen\":[32]},null,{\"value\":[{\"handleValueChange\":0}]}]]],[\"limel-dock.cjs\",[[1,\"limel-dock\",{\"dockItems\":[16],\"dockFooterItems\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"expanded\":[516],\"allowResize\":[516,\"allow-resize\"],\"mobileBreakPoint\":[514,\"mobile-break-point\"],\"useMobileLayout\":[32]}]]],[\"limel-snackbar.cjs\",[[1,\"limel-snackbar\",{\"open\":[516],\"message\":[1],\"timeout\":[514],\"actionText\":[1,\"action-text\"],\"dismissible\":[4],\"multiline\":[4],\"language\":[1],\"offset\":[32],\"isOpen\":[32],\"closing\":[32],\"show\":[64]},[[0,\"changeOffset\",\"onChangeIndex\"]],{\"open\":[{\"watchOpen\":0}]}]]],[\"limel-date-picker.cjs\",[[1,\"limel-date-picker\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"value\":[16],\"type\":[513],\"format\":[513],\"language\":[513],\"formatter\":[16],\"internalFormat\":[32],\"showPortal\":[32]}]]],[\"limel-button-group.cjs\",[[1,\"limel-button-group\",{\"value\":[16],\"disabled\":[516],\"selectedButtonId\":[32]},null,{\"value\":[{\"valueChanged\":0}]}]]],[\"limel-chart.cjs\",[[1,\"limel-chart\",{\"language\":[513],\"accessibleLabel\":[513,\"accessible-label\"],\"accessibleItemsLabel\":[513,\"accessible-items-label\"],\"accessibleValuesLabel\":[513,\"accessible-values-label\"],\"displayAxisLabels\":[516,\"display-axis-labels\"],\"displayItemText\":[516,\"display-item-text\"],\"displayItemValue\":[516,\"display-item-value\"],\"items\":[16],\"type\":[513],\"orientation\":[513],\"maxValue\":[514,\"max-value\"],\"axisIncrement\":[514,\"axis-increment\"],\"loading\":[516]},null,{\"items\":[{\"handleChange\":0}],\"axisIncrement\":[{\"handleChange\":0}],\"maxValue\":[{\"handleChange\":0}]}]]],[\"limel-select.cjs\",[[1,\"limel-select\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"required\":[516],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"value\":[16],\"options\":[16],\"multiple\":[4],\"menuOpen\":[32]},null,{\"value\":[{\"resetHasChanged\":0}],\"options\":[{\"resetHasChanged\":0},{\"updateHasPrimaryComponent\":0}],\"menuOpen\":[{\"watchOpen\":0}]}]]],[\"limel-help.cjs\",[[1,\"limel-help\",{\"value\":[1],\"trigger\":[1],\"readMoreLink\":[16],\"openDirection\":[513,\"open-direction\"],\"isOpen\":[32]}]]],[\"limel-info-tile.cjs\",[[257,\"limel-info-tile\",{\"value\":[520],\"icon\":[1],\"label\":[513],\"prefix\":[513],\"suffix\":[513],\"disabled\":[516],\"badge\":[520],\"loading\":[516],\"link\":[16],\"progress\":[16],\"hasPrimarySlot\":[32]}]]],[\"limel-table.cjs\",[[1,\"limel-table\",{\"data\":[16],\"columns\":[16],\"mode\":[513],\"layout\":[513],\"pageSize\":[514,\"page-size\"],\"totalRows\":[514,\"total-rows\"],\"sorting\":[16],\"activeRow\":[1040],\"movableColumns\":[516,\"movable-columns\"],\"movableRows\":[516,\"movable-rows\"],\"sortableColumns\":[516,\"sortable-columns\"],\"loading\":[516],\"page\":[514],\"emptyMessage\":[1,\"empty-message\"],\"aggregates\":[16],\"selectable\":[516],\"selection\":[16],\"language\":[513],\"paginationLocation\":[513,\"pagination-location\"]},null,{\"totalRows\":[{\"totalRowsChanged\":0}],\"pageSize\":[{\"pageSizeChanged\":0}],\"page\":[{\"pageChanged\":0}],\"activeRow\":[{\"activeRowChanged\":0}],\"data\":[{\"updateData\":0}],\"columns\":[{\"updateColumns\":0}],\"aggregates\":[{\"updateAggregates\":0}],\"selection\":[{\"updateSelection\":0}],\"selectable\":[{\"updateSelectable\":0}],\"movableRows\":[{\"updateMovableRows\":0}],\"sortableColumns\":[{\"updateSortableColumns\":0}],\"sorting\":[{\"updateSorting\":0}]}]]],[\"limel-drag-handle.cjs\",[[0,\"limel-drag-handle\",{\"dragDirection\":[513,\"drag-direction\"],\"tooltipOpenDirection\":[513,\"tooltip-open-direction\"],\"language\":[513]}]]],[\"limel-shortcut.cjs\",[[1,\"limel-shortcut\",{\"icon\":[513],\"label\":[513],\"disabled\":[516],\"badge\":[520],\"link\":[16]}]]],[\"limel-switch.cjs\",[[1,\"limel-switch\",{\"label\":[513],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"value\":[516],\"helperText\":[513,\"helper-text\"],\"readonlyLabels\":[16],\"fieldId\":[32]}]]],[\"limel-tab-panel.cjs\",[[257,\"limel-tab-panel\",{\"tabs\":[1040]},null,{\"tabs\":[{\"tabsChanged\":0}]}]]],[\"limel-code-editor.cjs\",[[1,\"limel-code-editor\",{\"value\":[1],\"language\":[1],\"readonly\":[516],\"disabled\":[516],\"invalid\":[516],\"required\":[516],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"lineNumbers\":[516,\"line-numbers\"],\"lineWrapping\":[516,\"line-wrapping\"],\"fold\":[516],\"lint\":[516],\"colorScheme\":[513,\"color-scheme\"],\"translationLanguage\":[513,\"translation-language\"],\"showCopyButton\":[516,\"show-copy-button\"],\"random\":[32],\"wasCopied\":[32]},null,{\"value\":[{\"watchValue\":0}],\"disabled\":[{\"watchDisabled\":0}],\"readonly\":[{\"watchReadonly\":0}],\"invalid\":[{\"watchInvalid\":0}],\"required\":[{\"watchRequired\":0}],\"helperText\":[{\"watchHelperText\":0}]}]]],[\"limel-dialog.cjs\",[[257,\"limel-dialog\",{\"heading\":[1],\"fullscreen\":[516],\"open\":[1540],\"closingActions\":[16]},null,{\"open\":[{\"watchHandler\":0}],\"closingActions\":[{\"closingActionsChanged\":0}]}]]],[\"limel-menu-item-meta.cjs\",[[1,\"limel-menu-item-meta\",{\"commandText\":[513,\"command-text\"],\"hotkey\":[513],\"disabled\":[516],\"badge\":[8],\"showChevron\":[4,\"show-chevron\"]}]]],[\"limel-progress-flow.cjs\",[[1,\"limel-progress-flow\",{\"flowItems\":[16],\"disabled\":[4],\"readonly\":[4]}]]],[\"limel-slider.cjs\",[[1,\"limel-slider\",{\"disabled\":[516],\"readonly\":[516],\"factor\":[514],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"invalid\":[516],\"displaysPercentageColors\":[516,\"displays-percentage-colors\"],\"unit\":[513],\"value\":[514],\"valuemax\":[514],\"valuemin\":[514],\"step\":[514],\"percentageClass\":[32],\"displayValue\":[32]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"limel-banner.cjs\",[[257,\"limel-banner\",{\"message\":[513],\"icon\":[513],\"isOpen\":[32],\"open\":[64],\"close\":[64]}]]],[\"limel-form.cjs\",[[1,\"limel-form\",{\"schema\":[16],\"value\":[16],\"disabled\":[4],\"propsFactory\":[16],\"transformErrors\":[16],\"errors\":[16]}]]],[\"limel-radio-button-group.cjs\",[[0,\"limel-radio-button-group\",{\"items\":[16],\"selectedItem\":[16],\"disabled\":[516],\"badgeIcons\":[516,\"badge-icons\"],\"maxLinesSecondaryText\":[514,\"max-lines-secondary-text\"]}]]],[\"limel-ai-avatar.cjs\",[[1,\"limel-ai-avatar\",{\"isThinking\":[516,\"is-thinking\"],\"language\":[513]}]]],[\"limel-config.cjs\",[[1,\"limel-config\",{\"config\":[16]}]]],[\"limel-flex-container.cjs\",[[257,\"limel-flex-container\",{\"direction\":[513],\"justify\":[513],\"align\":[513],\"reverse\":[516]}]]],[\"limel-grid.cjs\",[[257,\"limel-grid\"]]],[\"limel-masonry-layout.cjs\",[[257,\"limel-masonry-layout\",{\"ordered\":[516],\"containerHeight\":[32]},null,{\"ordered\":[{\"onOrderedChange\":0}]}]]],[\"limel-prosemirror-adapter.cjs\",[[17,\"limel-prosemirror-adapter\",{\"contentType\":[1,\"content-type\"],\"value\":[1],\"language\":[513],\"disabled\":[516],\"customElements\":[16],\"triggerCharacters\":[16],\"ui\":[1],\"view\":[32],\"actionBarItems\":[32],\"link\":[32],\"isLinkMenuOpen\":[32]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"limel-email-viewer.cjs\",[[257,\"limel-email-viewer\",{\"email\":[16],\"fallbackUrl\":[513,\"fallback-url\"],\"language\":[513],\"allowRemoteImages\":[4,\"allow-remote-images\"],\"allowRemoteImagesState\":[32]},null,{\"email\":[{\"resetAllowRemoteImages\":0}]}]]],[\"limel-dock-button.cjs\",[[0,\"limel-dock-button\",{\"item\":[16],\"expanded\":[516],\"useMobileLayout\":[516,\"use-mobile-layout\"],\"isOpen\":[32]},null,{\"isOpen\":[{\"openWatcher\":0}]}]]],[\"limel-color-picker-palette.cjs\",[[17,\"limel-color-picker-palette\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"required\":[516],\"invalid\":[516],\"manualInput\":[516,\"manual-input\"],\"columnCount\":[514,\"column-count\"],\"palette\":[16]}]]],[\"limel-checkbox.cjs\",[[1,\"limel-checkbox\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"checked\":[516],\"indeterminate\":[516],\"required\":[516],\"readonlyLabels\":[16],\"modified\":[32]},null,{\"checked\":[{\"handleCheckedChange\":0}],\"indeterminate\":[{\"handleIndeterminateChange\":0}],\"readonly\":[{\"handleReadonlyChange\":0}]}]]],[\"limel-tab-bar.cjs\",[[1,\"limel-tab-bar\",{\"tabs\":[1040],\"canScrollLeft\":[32],\"canScrollRight\":[32]},[[9,\"resize\",\"handleWindowResize\"]],{\"tabs\":[{\"tabsChanged\":0}]}]]],[\"limel-callout.cjs\",[[257,\"limel-callout\",{\"heading\":[513],\"icon\":[513],\"type\":[513],\"language\":[1]}]]],[\"limel-header.cjs\",[[257,\"limel-header\",{\"icon\":[1],\"heading\":[1],\"subheading\":[1],\"supportingText\":[1,\"supporting-text\"],\"subheadingDivider\":[1,\"subheading-divider\"]}]]],[\"limel-help-content.cjs\",[[1,\"limel-help-content\",{\"value\":[1],\"readMoreLink\":[16]}]]],[\"limel-progress-flow-item.cjs\",[[0,\"limel-progress-flow-item\",{\"item\":[16],\"disabled\":[4],\"readonly\":[4],\"currentStep\":[4,\"current-step\"]}]]],[\"limel-circular-progress.cjs\",[[1,\"limel-circular-progress\",{\"value\":[2],\"maxValue\":[2,\"max-value\"],\"prefix\":[513],\"suffix\":[1],\"displayPercentageColors\":[4,\"display-percentage-colors\"],\"size\":[513]}]]],[\"limel-flatpickr-adapter.cjs\",[[1,\"limel-flatpickr-adapter\",{\"value\":[16],\"type\":[1],\"format\":[1],\"isOpen\":[4,\"is-open\"],\"inputElement\":[16],\"language\":[1],\"formatter\":[16]}]]],[\"limel-radio-button.cjs\",[[0,\"limel-radio-button\",{\"checked\":[516],\"disabled\":[516],\"id\":[1],\"label\":[1],\"onChange\":[16]}]]],[\"limel-text-editor-link-menu.cjs\",[[1,\"limel-text-editor-link-menu\",{\"link\":[16],\"language\":[513],\"isOpen\":[516,\"is-open\"]}]]],[\"limel-collapsible-section.cjs\",[[257,\"limel-collapsible-section\",{\"isOpen\":[1540,\"is-open\"],\"header\":[513],\"icon\":[1],\"invalid\":[516],\"actions\":[16],\"language\":[513]}]]],[\"limel-3d-hover-effect-glow.cjs\",[[1,\"limel-3d-hover-effect-glow\"]]],[\"limel-file-dropzone_2.cjs\",[[257,\"limel-file-dropzone\",{\"accept\":[513],\"disabled\":[4],\"text\":[1],\"helperText\":[1,\"helper-text\"],\"hasFileToDrop\":[32]}],[257,\"limel-file-input\",{\"accept\":[513],\"disabled\":[516],\"multiple\":[516]}]]],[\"limel-dynamic-label.cjs\",[[1,\"limel-dynamic-label\",{\"value\":[8],\"defaultLabel\":[16],\"labels\":[16]}]]],[\"limel-linear-progress.cjs\",[[1,\"limel-linear-progress\",{\"language\":[513],\"value\":[514],\"indeterminate\":[516],\"accessibleLabel\":[513,\"accessible-label\"]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"limel-badge.cjs\",[[1,\"limel-badge\",{\"label\":[520]}]]],[\"limel-helper-line_2.cjs\",[[260,\"limel-notched-outline\",{\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"label\":[513],\"labelId\":[513,\"label-id\"],\"hasValue\":[516,\"has-value\"],\"hasLeadingIcon\":[516,\"has-leading-icon\"],\"hasFloatingLabel\":[516,\"has-floating-label\"]}],[1,\"limel-helper-line\",{\"helperText\":[513,\"helper-text\"],\"length\":[514],\"maxLength\":[514,\"max-length\"],\"invalid\":[516],\"helperTextId\":[513,\"helper-text-id\"]}]]],[\"limel-chip_2.cjs\",[[17,\"limel-chip-set\",{\"value\":[16],\"type\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"inputType\":[513,\"input-type\"],\"maxItems\":[514,\"max-items\"],\"required\":[516],\"searchLabel\":[513,\"search-label\"],\"emptyInputOnBlur\":[516,\"empty-input-on-blur\"],\"clearAllButton\":[4,\"clear-all-button\"],\"leadingIcon\":[513,\"leading-icon\"],\"delimiter\":[513],\"autocomplete\":[513],\"language\":[1],\"editMode\":[32],\"textValue\":[32],\"blurred\":[32],\"inputChipIndexSelected\":[32],\"selectedChipIds\":[32],\"getEditMode\":[64],\"setFocus\":[64],\"emptyInput\":[64]},null,{\"value\":[{\"handleChangeChips\":0}]}],[17,\"limel-chip\",{\"language\":[513],\"text\":[513],\"icon\":[1],\"image\":[16],\"link\":[16],\"badge\":[520],\"disabled\":[516],\"readonly\":[516],\"selected\":[516],\"invalid\":[516],\"removable\":[516],\"type\":[513],\"loading\":[516],\"progress\":[514],\"identifier\":[520],\"size\":[513],\"menuItems\":[16]}]]],[\"limel-button.cjs\",[[17,\"limel-button\",{\"label\":[513],\"primary\":[516],\"outlined\":[516],\"icon\":[513],\"disabled\":[516],\"loading\":[516],\"loadingFailed\":[516,\"loading-failed\"],\"justLoaded\":[32]},null,{\"loading\":[{\"loadingWatcher\":0}]}]]],[\"limel-icon-button.cjs\",[[17,\"limel-icon-button\",{\"icon\":[1],\"elevated\":[516],\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"disabled\":[516]}]]],[\"limel-markdown.cjs\",[[1,\"limel-markdown\",{\"value\":[1],\"whitelist\":[16],\"lazyLoadImages\":[516,\"lazy-load-images\"],\"removeEmptyParagraphs\":[516,\"remove-empty-paragraphs\"],\"adaptColorContrast\":[516,\"adapt-color-contrast\"]},null,{\"value\":[{\"textChanged\":0}],\"whitelist\":[{\"handleWhitelistChange\":0}],\"removeEmptyParagraphs\":[{\"handleRemoveEmptyParagraphsChange\":0}],\"adaptColorContrast\":[{\"handleAdaptColorContrastChange\":0}]}]]],[\"limel-hotkey_4.cjs\",[[1,\"limel-tooltip\",{\"elementId\":[513,\"element-id\"],\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"hotkey\":[513],\"maxlength\":[514],\"openDirection\":[513,\"open-direction\"],\"open\":[32]}],[1,\"limel-tooltip-content\",{\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"maxlength\":[514],\"hotkey\":[513]}],[1,\"limel-hotkey\",{\"value\":[513],\"disabled\":[516]}],[257,\"limel-portal\",{\"openDirection\":[513,\"open-direction\"],\"position\":[513],\"containerId\":[513,\"container-id\"],\"containerStyle\":[16],\"inheritParentWidth\":[516,\"inherit-parent-width\"],\"visible\":[516],\"anchor\":[16]},null,{\"visible\":[{\"onVisible\":0}]}]]],[\"limel-popover_2.cjs\",[[257,\"limel-popover\",{\"open\":[4],\"openDirection\":[513,\"open-direction\"]},null,{\"open\":[{\"watchOpen\":0}]}],[1,\"limel-popover-surface\",{\"contentCollection\":[16]}]]],[\"limel-breadcrumbs_7.cjs\",[[257,\"limel-menu\",{\"items\":[16],\"disabled\":[516],\"openDirection\":[513,\"open-direction\"],\"surfaceWidth\":[513,\"surface-width\"],\"open\":[1540],\"badgeIcons\":[516,\"badge-icons\"],\"gridLayout\":[516,\"grid-layout\"],\"loading\":[516],\"currentSubMenu\":[1040],\"rootItem\":[16],\"searcher\":[16],\"searchPlaceholder\":[1,\"search-placeholder\"],\"emptyResultMessage\":[1,\"empty-result-message\"],\"keepOpenOnSelect\":[516,\"keep-open-on-select\"],\"loadingSubItems\":[32],\"searchValue\":[32],\"searchResults\":[32]},null,{\"items\":[{\"itemsWatcher\":0}],\"open\":[{\"openWatcher\":0}]}],[1,\"limel-breadcrumbs\",{\"items\":[16],\"divider\":[1]}],[17,\"limel-menu-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"]},null,{\"items\":[{\"itemsChanged\":0}]}],[17,\"limel-input-field\",{\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"prefix\":[513],\"suffix\":[513],\"required\":[516],\"value\":[513],\"trailingIcon\":[513,\"trailing-icon\"],\"leadingIcon\":[513,\"leading-icon\"],\"pattern\":[513],\"type\":[513],\"formatNumber\":[516,\"format-number\"],\"step\":[520],\"max\":[514],\"min\":[514],\"maxlength\":[514],\"minlength\":[514],\"completions\":[16],\"showLink\":[516,\"show-link\"],\"locale\":[513],\"isFocused\":[32],\"wasInvalid\":[32],\"showCompletions\":[32],\"getSelectionStart\":[64],\"getSelectionEnd\":[64],\"getSelectionDirection\":[64]},null,{\"value\":[{\"valueWatcher\":0}],\"completions\":[{\"completionsWatcher\":0}]}],[257,\"limel-menu-surface\",{\"open\":[4],\"allowClicksElement\":[16]}],[1,\"limel-spinner\",{\"size\":[513],\"limeBranded\":[4,\"lime-branded\"]}],[17,\"limel-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"],\"type\":[1],\"maxLinesSecondaryText\":[2,\"max-lines-secondary-text\"]},null,{\"type\":[{\"handleType\":0}],\"items\":[{\"itemsChanged\":0}]}]]],[\"limel-action-bar_3.cjs\",[[1,\"limel-action-bar\",{\"actions\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"language\":[1],\"layout\":[513],\"collapsible\":[516],\"openDirection\":[513,\"open-direction\"],\"overflowCutoff\":[32]}],[0,\"limel-action-bar-overflow-menu\",{\"items\":[16],\"openDirection\":[513,\"open-direction\"]}],[0,\"limel-action-bar-item\",{\"item\":[16],\"isVisible\":[516,\"is-visible\"],\"selected\":[516]}]]]]"), options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -3,6 +3,7 @@ import translate from "../../global/translations";
|
|
|
3
3
|
import { applyRemoteImagesPolicy, containsRemoteImages } from "./remote-images";
|
|
4
4
|
import { splitEmailAddressList } from "./split-email-address-list";
|
|
5
5
|
import { formatBytes } from "../../util/format-bytes";
|
|
6
|
+
import { adaptColorContrast } from "../../util/adapt-color-contrast";
|
|
6
7
|
/**
|
|
7
8
|
* This is a private component, used to render `.eml` files inside
|
|
8
9
|
* `limel-file-viewer`.
|
|
@@ -60,8 +61,14 @@ export class EmailViewer {
|
|
|
60
61
|
this.allowRemoteImagesState = false;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
64
|
+
componentDidRender() {
|
|
65
|
+
var _a;
|
|
66
|
+
if ((_a = this.bodyElement) === null || _a === void 0 ? void 0 : _a.isConnected) {
|
|
67
|
+
adaptColorContrast(this.bodyElement);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
63
70
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
71
|
+
return (h(Host, { key: '25592be91649a98427363488998f461470346f06' }, h("div", { key: 'e07d2c18bc5ebd7ff922afa4c8becb1f987bb0da', class: "email", part: "email" }, this.renderHeaders(), this.renderRemoteImageBanner(), h("section", { key: 'aa174224531cbcc77f1b29b0c828d7dc8fab5d7c' }, this.renderAttachments(), this.renderBody()))));
|
|
65
72
|
}
|
|
66
73
|
renderHeaders() {
|
|
67
74
|
const headerFields = [
|
|
@@ -88,7 +95,7 @@ export class EmailViewer {
|
|
|
88
95
|
return;
|
|
89
96
|
}
|
|
90
97
|
const innerHtml = applyRemoteImagesPolicy(bodyHtml, this.getAllowRemoteImages());
|
|
91
|
-
return h("div", { class: "body", innerHTML: innerHtml, part: "email-body" });
|
|
98
|
+
return (h("div", { class: "body", innerHTML: innerHtml, part: "email-body", ref: (el) => (this.bodyElement = el) }));
|
|
92
99
|
}
|
|
93
100
|
renderBodyText() {
|
|
94
101
|
var _a;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
1
13
|
import { h, } from "@stencil/core";
|
|
2
14
|
import React from "react";
|
|
3
15
|
import { createRoot } from "react-dom/client";
|
|
@@ -78,7 +90,7 @@ export class Form {
|
|
|
78
90
|
this.root = createRoot(rootElement);
|
|
79
91
|
}
|
|
80
92
|
this.root.render(React.createElement(JSONSchemaForm, {
|
|
81
|
-
schema: this.schema,
|
|
93
|
+
schema: this.prepareSchema(this.schema),
|
|
82
94
|
formData: this.value,
|
|
83
95
|
onChange: this.handleChange,
|
|
84
96
|
widgets: widgets,
|
|
@@ -111,9 +123,34 @@ export class Form {
|
|
|
111
123
|
}
|
|
112
124
|
validateFormData() {
|
|
113
125
|
var _a;
|
|
114
|
-
const { errors } = rjsfValidator.validateFormData((_a = this.value) !== null && _a !== void 0 ? _a : {}, this.schema);
|
|
126
|
+
const { errors } = rjsfValidator.validateFormData((_a = this.value) !== null && _a !== void 0 ? _a : {}, this.prepareSchema(this.schema));
|
|
115
127
|
this.emitValidationStatus(errors);
|
|
116
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns a copy of the schema with `$id` replaced by a content-based
|
|
131
|
+
* value, so the validator never confuses two schemas that share the
|
|
132
|
+
* same `$id` but differ in content — e.g. a server schema reused with
|
|
133
|
+
* a different subset of properties at runtime.
|
|
134
|
+
*
|
|
135
|
+
* The new `$id` is built from a short numeric fingerprint of the
|
|
136
|
+
* stringified content. A fingerprint (rather than the content itself)
|
|
137
|
+
* keeps the value short and URI-safe — `$id` is parsed as a URI by
|
|
138
|
+
* the validator and must not contain JSON-shaped characters.
|
|
139
|
+
*
|
|
140
|
+
* @param schema - the schema to prepare
|
|
141
|
+
*/
|
|
142
|
+
prepareSchema(schema) {
|
|
143
|
+
const { $id } = schema, rest = __rest(schema, ["$id"]);
|
|
144
|
+
const json = JSON.stringify(rest);
|
|
145
|
+
let fingerprint = 5381;
|
|
146
|
+
for (let i = 0; i < json.length; i++) {
|
|
147
|
+
fingerprint =
|
|
148
|
+
((fingerprint << 5) + fingerprint + json.codePointAt(i)) &
|
|
149
|
+
4294967295;
|
|
150
|
+
}
|
|
151
|
+
const contentId = (fingerprint >>> 0).toString(36);
|
|
152
|
+
return Object.assign(Object.assign({}, schema), { $id: $id ? `${$id}-${contentId}` : contentId });
|
|
153
|
+
}
|
|
117
154
|
hasExtraErrors() {
|
|
118
155
|
return !!this.errors && Object.keys(this.errors).length > 0;
|
|
119
156
|
}
|
|
@@ -5,6 +5,7 @@ import { ImageIntersectionObserver } from "./image-intersection-observer";
|
|
|
5
5
|
import { hydrateCustomElements } from "./hydrate-custom-elements";
|
|
6
6
|
import { morphChildren } from "./morph-dom";
|
|
7
7
|
import { DEFAULT_MARKDOWN_WHITELIST } from "./default-whitelist";
|
|
8
|
+
import { adaptColorContrast } from "../../util/adapt-color-contrast";
|
|
8
9
|
/**
|
|
9
10
|
* The Markdown component receives markdown syntax
|
|
10
11
|
* and renders it as HTML.
|
|
@@ -34,6 +35,7 @@ import { DEFAULT_MARKDOWN_WHITELIST } from "./default-whitelist";
|
|
|
34
35
|
* @exampleComponent limel-example-markdown-custom-component
|
|
35
36
|
* @exampleComponent limel-example-markdown-custom-component-with-json-props
|
|
36
37
|
* @exampleComponent limel-example-markdown-remove-empty-paragraphs
|
|
38
|
+
* @exampleComponent limel-example-markdown-adapt-color-contrast
|
|
37
39
|
* @exampleComponent limel-example-markdown-composite
|
|
38
40
|
*/
|
|
39
41
|
export class Markdown {
|
|
@@ -76,6 +78,20 @@ export class Markdown {
|
|
|
76
78
|
* whitespace (`<br />` or ` `).
|
|
77
79
|
*/
|
|
78
80
|
this.removeEmptyParagraphs = true;
|
|
81
|
+
/**
|
|
82
|
+
* Adapt rendered inline `color:` declarations to the surrounding
|
|
83
|
+
* surface. After each markdown re-render the component walks the
|
|
84
|
+
* rendered DOM and removes any inline `color` whose contrast against
|
|
85
|
+
* the resolved background falls below WCAG 3:1, letting the surface's
|
|
86
|
+
* themed text color inherit through. Brand colors that already meet
|
|
87
|
+
* contrast are left alone.
|
|
88
|
+
*
|
|
89
|
+
* Default `false` so the component remains a neutral renderer; turn
|
|
90
|
+
* this on for surfaces that render externally-authored content
|
|
91
|
+
* (e.g. imported email bodies) where the host application's theme
|
|
92
|
+
* drives the surrounding text color.
|
|
93
|
+
*/
|
|
94
|
+
this.adaptColorContrast = false;
|
|
79
95
|
this.imageIntersectionObserver = null;
|
|
80
96
|
}
|
|
81
97
|
async textChanged() {
|
|
@@ -101,6 +117,9 @@ export class Markdown {
|
|
|
101
117
|
// into JS properties. URL sanitization happens here because
|
|
102
118
|
// rehype-sanitize can't inspect values inside JSON strings.
|
|
103
119
|
hydrateCustomElements(this.rootElement, combinedWhitelist);
|
|
120
|
+
if (this.adaptColorContrast) {
|
|
121
|
+
adaptColorContrast(this.rootElement);
|
|
122
|
+
}
|
|
104
123
|
this.setupImageIntersectionObserver();
|
|
105
124
|
}
|
|
106
125
|
catch (error) {
|
|
@@ -113,6 +132,9 @@ export class Markdown {
|
|
|
113
132
|
handleRemoveEmptyParagraphsChange() {
|
|
114
133
|
return this.textChanged();
|
|
115
134
|
}
|
|
135
|
+
handleAdaptColorContrastChange() {
|
|
136
|
+
return this.textChanged();
|
|
137
|
+
}
|
|
116
138
|
async componentDidLoad() {
|
|
117
139
|
this.textChanged();
|
|
118
140
|
}
|
|
@@ -120,7 +142,7 @@ export class Markdown {
|
|
|
120
142
|
this.cleanupImageIntersectionObserver();
|
|
121
143
|
}
|
|
122
144
|
render() {
|
|
123
|
-
return (h(Host, { key: '
|
|
145
|
+
return (h(Host, { key: '3e247fb8cee298825b5f9330fb30a1a71d634a1a' }, h("div", { key: '5f469a73b6722096ba9f0965355c5d5221753097', id: "markdown", ref: (el) => (this.rootElement = el) })));
|
|
124
146
|
}
|
|
125
147
|
setupImageIntersectionObserver() {
|
|
126
148
|
if (this.lazyLoadImages) {
|
|
@@ -234,6 +256,26 @@ export class Markdown {
|
|
|
234
256
|
"reflect": true,
|
|
235
257
|
"attribute": "remove-empty-paragraphs",
|
|
236
258
|
"defaultValue": "true"
|
|
259
|
+
},
|
|
260
|
+
"adaptColorContrast": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "boolean",
|
|
265
|
+
"resolved": "boolean",
|
|
266
|
+
"references": {}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Adapt rendered inline `color:` declarations to the surrounding\nsurface. After each markdown re-render the component walks the\nrendered DOM and removes any inline `color` whose contrast against\nthe resolved background falls below WCAG 3:1, letting the surface's\nthemed text color inherit through. Brand colors that already meet\ncontrast are left alone.\n\nDefault `false` so the component remains a neutral renderer; turn\nthis on for surfaces that render externally-authored content\n(e.g. imported email bodies) where the host application's theme\ndrives the surrounding text color."
|
|
273
|
+
},
|
|
274
|
+
"getter": false,
|
|
275
|
+
"setter": false,
|
|
276
|
+
"reflect": true,
|
|
277
|
+
"attribute": "adapt-color-contrast",
|
|
278
|
+
"defaultValue": "false"
|
|
237
279
|
}
|
|
238
280
|
};
|
|
239
281
|
}
|
|
@@ -247,6 +289,9 @@ export class Markdown {
|
|
|
247
289
|
}, {
|
|
248
290
|
"propName": "removeEmptyParagraphs",
|
|
249
291
|
"methodName": "handleRemoveEmptyParagraphsChange"
|
|
292
|
+
}, {
|
|
293
|
+
"propName": "adaptColorContrast",
|
|
294
|
+
"methodName": "handleAdaptColorContrastChange"
|
|
250
295
|
}];
|
|
251
296
|
}
|
|
252
297
|
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
const MIN_CONTRAST_RATIO = 3;
|
|
2
|
+
const RGBA_PATTERN = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)$/i;
|
|
3
|
+
const FALLBACK_BACKGROUND = { r: 255, g: 255, b: 255 };
|
|
4
|
+
/**
|
|
5
|
+
* Walk descendants of `root` and remove inline `color` declarations that
|
|
6
|
+
* fail a 3:1 contrast ratio against their resolved background.
|
|
7
|
+
* @param root - Element or ShadowRoot whose descendants should be evaluated.
|
|
8
|
+
*/
|
|
9
|
+
export function adaptColorContrast(root) {
|
|
10
|
+
if (!root) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const elements = root.querySelectorAll('[style*="color"]');
|
|
14
|
+
for (const el of elements) {
|
|
15
|
+
evaluateAndMaybeStrip(el);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function evaluateAndMaybeStrip(el) {
|
|
19
|
+
const inlineColor = el.style.color;
|
|
20
|
+
if (!inlineColor || isInheritKeyword(inlineColor)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const fg = parseColor(getComputedStyle(el).color);
|
|
24
|
+
if (!fg) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const bg = resolveBackground(el);
|
|
28
|
+
if (!bg) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const composed = compositeOver(fg, bg);
|
|
32
|
+
const ratio = contrastRatio(relativeLuminance(composed), relativeLuminance(bg));
|
|
33
|
+
if (ratio >= MIN_CONTRAST_RATIO) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
el.style.removeProperty('color');
|
|
37
|
+
if (!el.style.cssText) {
|
|
38
|
+
el.removeAttribute('style');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function isInheritKeyword(value) {
|
|
42
|
+
const v = value.trim().toLowerCase();
|
|
43
|
+
return v === 'inherit' || v === 'currentcolor' || v === 'unset';
|
|
44
|
+
}
|
|
45
|
+
function resolveBackground(start) {
|
|
46
|
+
let current = start;
|
|
47
|
+
while (current) {
|
|
48
|
+
const reading = readBackgroundAt(current);
|
|
49
|
+
if (reading === 'image') {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
if (reading !== 'transparent') {
|
|
53
|
+
return finalizeBackground(reading, nextAncestor(current));
|
|
54
|
+
}
|
|
55
|
+
current = nextAncestor(current);
|
|
56
|
+
}
|
|
57
|
+
return defaultBodyBackground();
|
|
58
|
+
}
|
|
59
|
+
function readBackgroundAt(el) {
|
|
60
|
+
const cs = getComputedStyle(el);
|
|
61
|
+
if (cs.backgroundImage && cs.backgroundImage !== 'none') {
|
|
62
|
+
return 'image';
|
|
63
|
+
}
|
|
64
|
+
const parsed = parseColor(cs.backgroundColor);
|
|
65
|
+
if (!parsed || parsed.a === 0) {
|
|
66
|
+
return 'transparent';
|
|
67
|
+
}
|
|
68
|
+
return parsed;
|
|
69
|
+
}
|
|
70
|
+
function finalizeBackground(reading, parent) {
|
|
71
|
+
if (reading.a >= 1) {
|
|
72
|
+
return { r: reading.r, g: reading.g, b: reading.b };
|
|
73
|
+
}
|
|
74
|
+
if (!parent) {
|
|
75
|
+
return compositeOver(reading, defaultBodyBackground());
|
|
76
|
+
}
|
|
77
|
+
const upper = resolveBackground(parent);
|
|
78
|
+
if (!upper) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return compositeOver(reading, upper);
|
|
82
|
+
}
|
|
83
|
+
function defaultBodyBackground() {
|
|
84
|
+
if (!document.body) {
|
|
85
|
+
return FALLBACK_BACKGROUND;
|
|
86
|
+
}
|
|
87
|
+
const parsed = parseColor(getComputedStyle(document.body).backgroundColor);
|
|
88
|
+
if (parsed && parsed.a > 0) {
|
|
89
|
+
return { r: parsed.r, g: parsed.g, b: parsed.b };
|
|
90
|
+
}
|
|
91
|
+
return FALLBACK_BACKGROUND;
|
|
92
|
+
}
|
|
93
|
+
function nextAncestor(node) {
|
|
94
|
+
if (!node) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
if (node.parentElement) {
|
|
98
|
+
return node.parentElement;
|
|
99
|
+
}
|
|
100
|
+
const root = node.getRootNode();
|
|
101
|
+
if (root instanceof ShadowRoot) {
|
|
102
|
+
return root.host;
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Parse a CSS color string (`rgb(...)`, `rgba(...)`, or `transparent`).
|
|
108
|
+
* @param value - The color string to parse.
|
|
109
|
+
*/
|
|
110
|
+
export function parseColor(value) {
|
|
111
|
+
if (!value) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
if (value === 'transparent') {
|
|
115
|
+
return { r: 0, g: 0, b: 0, a: 0 };
|
|
116
|
+
}
|
|
117
|
+
const match = RGBA_PATTERN.exec(value);
|
|
118
|
+
if (!match) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
const a = match[4] === undefined ? 1 : Number.parseFloat(match[4]);
|
|
122
|
+
return {
|
|
123
|
+
r: Number.parseInt(match[1], 10),
|
|
124
|
+
g: Number.parseInt(match[2], 10),
|
|
125
|
+
b: Number.parseInt(match[3], 10),
|
|
126
|
+
a,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Source-over alpha blend of `fg` onto opaque `bg`.
|
|
131
|
+
* @param fg - Foreground color with alpha in [0..1].
|
|
132
|
+
* @param bg - Opaque background color.
|
|
133
|
+
*/
|
|
134
|
+
export function compositeOver(fg, bg) {
|
|
135
|
+
const a = fg.a;
|
|
136
|
+
return {
|
|
137
|
+
r: Math.round(fg.r * a + bg.r * (1 - a)),
|
|
138
|
+
g: Math.round(fg.g * a + bg.g * (1 - a)),
|
|
139
|
+
b: Math.round(fg.b * a + bg.b * (1 - a)),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Relative luminance of an sRGB color per WCAG 2.x. Returns [0..1].
|
|
144
|
+
* @param rgb - The color to measure.
|
|
145
|
+
*/
|
|
146
|
+
export function relativeLuminance(rgb) {
|
|
147
|
+
const channel = (c) => {
|
|
148
|
+
const s = c / 255;
|
|
149
|
+
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
150
|
+
};
|
|
151
|
+
return (0.2126 * channel(rgb.r) +
|
|
152
|
+
0.7152 * channel(rgb.g) +
|
|
153
|
+
0.0722 * channel(rgb.b));
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* WCAG contrast ratio between two relative luminances. Returns [1..21].
|
|
157
|
+
* @param l1 - First luminance.
|
|
158
|
+
* @param l2 - Second luminance.
|
|
159
|
+
*/
|
|
160
|
+
export function contrastRatio(l1, l2) {
|
|
161
|
+
const lighter = Math.max(l1, l2);
|
|
162
|
+
const darker = Math.min(l1, l2);
|
|
163
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
164
|
+
}
|