@limetech/lime-elements 39.34.0 → 39.34.2
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 +14 -0
- package/dist/cjs/{checkbox.template-CHtKKyY1.js → checkbox.template-BLkvZRs6.js} +1 -1
- package/dist/cjs/{index-BjHIBY-I.js → index-8x93m5oI.js} +57 -21
- package/dist/cjs/{index-BgFEL6FF.js → index-ETPz91V5.js} +10 -0
- package/dist/cjs/lime-elements.cjs.js +2 -2
- package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +2 -2
- package/dist/cjs/limel-action-bar_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +2 -2
- package/dist/cjs/limel-badge.cjs.entry.js +3 -3
- package/dist/cjs/limel-banner.cjs.entry.js +2 -2
- package/dist/cjs/limel-breadcrumbs_8.cjs.entry.js +9 -9
- package/dist/cjs/limel-button-group.cjs.entry.js +2 -2
- package/dist/cjs/limel-button.cjs.entry.js +3 -3
- package/dist/cjs/limel-callout.cjs.entry.js +2 -2
- package/dist/cjs/limel-card.cjs.entry.js +2 -2
- package/dist/cjs/limel-chart.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
- package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
- package/dist/cjs/limel-code-diff.cjs.entry.js +75 -34
- package/dist/cjs/limel-code-editor.cjs.entry.js +2 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +3 -3
- package/dist/cjs/limel-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-config.cjs.entry.js +1 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +3 -3
- package/dist/cjs/limel-dock-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-dock.cjs.entry.js +3 -3
- package/dist/cjs/limel-drag-handle.cjs.entry.js +2 -2
- package/dist/cjs/limel-dynamic-label.cjs.entry.js +1 -1
- package/dist/cjs/limel-email-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +3 -3
- package/dist/cjs/limel-file-viewer.cjs.entry.js +62 -50
- package/dist/cjs/limel-file.cjs.entry.js +2 -2
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +2 -2
- package/dist/cjs/limel-flex-container.cjs.entry.js +2 -2
- package/dist/cjs/limel-form.cjs.entry.js +7831 -6820
- package/dist/cjs/limel-grid.cjs.entry.js +2 -2
- package/dist/cjs/limel-header.cjs.entry.js +2 -2
- package/dist/cjs/limel-help-content.cjs.entry.js +2 -2
- package/dist/cjs/limel-help.cjs.entry.js +3 -3
- package/dist/cjs/limel-helper-line.cjs.entry.js +3 -3
- package/dist/cjs/limel-hotkey_4.cjs.entry.js +6 -6
- package/dist/cjs/limel-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-icon.cjs.entry.js +2 -2
- package/dist/cjs/limel-info-tile.cjs.entry.js +3 -3
- package/dist/cjs/limel-list-item.cjs.entry.js +5 -5
- package/dist/cjs/limel-markdown.cjs.entry.js +4 -4
- package/dist/cjs/limel-masonry-layout.cjs.entry.js +2 -2
- package/dist/cjs/limel-menu-item-meta.cjs.entry.js +2 -2
- package/dist/cjs/limel-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1833 -1639
- package/dist/cjs/limel-radio-button-group.cjs.entry.js +2 -2
- package/dist/cjs/limel-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/limel-select.cjs.entry.js +3 -3
- package/dist/cjs/limel-shortcut.cjs.entry.js +2 -2
- package/dist/cjs/limel-slider.cjs.entry.js +3 -3
- package/dist/cjs/limel-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/limel-split-button.cjs.entry.js +3 -3
- package/dist/cjs/limel-switch.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-bar.cjs.entry.js +3 -3
- package/dist/cjs/limel-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/limel-table.cjs.entry.js +255 -154
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +4 -4
- package/dist/cjs/limel-text-editor.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markdown-parser-BIa99LAc.js → markdown-parser-F3YRMjcy.js} +363 -370
- package/dist/cjs/{render-list-component-DgRQ8H3v.js → render-list-component-DAV1Dyg1.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/3d-hover-effect-glow/3d-hover-effect-glow.js +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +2 -2
- package/dist/collection/components/ai-avatar/ai-avatar.js +1 -1
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/button-group/button-group.js +1 -1
- package/dist/collection/components/callout/callout.js +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.js +11 -7
- package/dist/collection/components/chip-set/chip-set.js +1 -1
- package/dist/collection/components/circular-progress/circular-progress.js +2 -2
- package/dist/collection/components/code-diff/code-diff.js +1 -1
- package/dist/collection/components/code-editor/code-editor.js +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js +1 -1
- package/dist/collection/components/color-picker/color-picker-palette.js +2 -2
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
- package/dist/collection/components/dialog/dialog.js +2 -2
- package/dist/collection/components/dock/dock.js +3 -3
- package/dist/collection/components/drag-handle/drag-handle.js +1 -1
- package/dist/collection/components/email-viewer/email-viewer.js +1 -1
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
- package/dist/collection/components/file-input/file-input.js +1 -1
- package/dist/collection/components/flex-container/flex-container.js +1 -1
- package/dist/collection/components/form/form.js +1 -1
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/help/help-content.js +1 -1
- package/dist/collection/components/help/help.js +2 -2
- package/dist/collection/components/helper-line/helper-line.js +2 -2
- package/dist/collection/components/hotkey/hotkey.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-item/list-item.js +2 -2
- package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
- package/dist/collection/components/markdown/markdown-parser.js +31 -4
- package/dist/collection/components/markdown/markdown.js +2 -1
- package/dist/collection/components/masonry-layout/masonry-layout.js +1 -1
- package/dist/collection/components/menu/menu.js +2 -2
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-surface/menu-surface.js +1 -1
- package/dist/collection/components/notched-outline/notched-outline.js +1 -1
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover-surface/popover-surface.js +1 -1
- package/dist/collection/components/portal/portal.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button.js +2 -2
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shortcut/shortcut.js +1 -1
- package/dist/collection/components/slider/slider.js +5 -5
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table.css +1 -0
- package/dist/collection/components/table/table.js +3 -3
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +3 -3
- package/dist/esm/{checkbox.template-CfWJ3CAC.js → checkbox.template-CtIjSGPt.js} +1 -1
- package/dist/esm/{index-t4DgGbWS.js → index-CbciMfiU.js} +10 -1
- package/dist/esm/{index-DBTJNfo7.js → index-VCOjLfyP.js} +57 -21
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-3d-hover-effect-glow.entry.js +2 -2
- package/dist/esm/limel-action-bar_3.entry.js +4 -4
- package/dist/esm/limel-ai-avatar.entry.js +2 -2
- package/dist/esm/limel-badge.entry.js +3 -3
- package/dist/esm/limel-banner.entry.js +2 -2
- package/dist/esm/limel-breadcrumbs_8.entry.js +9 -9
- package/dist/esm/limel-button-group.entry.js +2 -2
- package/dist/esm/limel-button.entry.js +3 -3
- package/dist/esm/limel-callout.entry.js +2 -2
- package/dist/esm/limel-card.entry.js +2 -2
- package/dist/esm/limel-chart.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +3 -3
- package/dist/esm/limel-chip-set.entry.js +2 -2
- package/dist/esm/limel-chip_2.entry.js +2 -2
- package/dist/esm/limel-circular-progress.entry.js +2 -2
- package/dist/esm/limel-code-diff.entry.js +75 -34
- package/dist/esm/limel-code-editor.entry.js +2 -2
- package/dist/esm/limel-collapsible-section.entry.js +2 -2
- package/dist/esm/limel-color-picker-palette.entry.js +3 -3
- package/dist/esm/limel-color-picker.entry.js +2 -2
- package/dist/esm/limel-config.entry.js +1 -1
- package/dist/esm/limel-date-picker.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +3 -3
- package/dist/esm/limel-dock-button.entry.js +1 -1
- package/dist/esm/limel-dock.entry.js +3 -3
- package/dist/esm/limel-drag-handle.entry.js +2 -2
- package/dist/esm/limel-dynamic-label.entry.js +1 -1
- package/dist/esm/limel-email-viewer.entry.js +2 -2
- package/dist/esm/limel-file-dropzone_2.entry.js +3 -3
- package/dist/esm/limel-file-viewer.entry.js +62 -50
- package/dist/esm/limel-file.entry.js +2 -2
- package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
- package/dist/esm/limel-flex-container.entry.js +2 -2
- package/dist/esm/limel-form.entry.js +7831 -6820
- package/dist/esm/limel-grid.entry.js +2 -2
- package/dist/esm/limel-header.entry.js +2 -2
- package/dist/esm/limel-help-content.entry.js +2 -2
- package/dist/esm/limel-help.entry.js +3 -3
- package/dist/esm/limel-helper-line.entry.js +3 -3
- package/dist/esm/limel-hotkey_4.entry.js +6 -6
- package/dist/esm/limel-icon-button.entry.js +2 -2
- package/dist/esm/limel-icon.entry.js +2 -2
- package/dist/esm/limel-info-tile.entry.js +3 -3
- package/dist/esm/limel-list-item.entry.js +5 -5
- package/dist/esm/limel-markdown.entry.js +4 -4
- package/dist/esm/limel-masonry-layout.entry.js +2 -2
- package/dist/esm/limel-menu-item-meta.entry.js +2 -2
- package/dist/esm/limel-picker.entry.js +2 -2
- package/dist/esm/limel-popover_2.entry.js +3 -3
- package/dist/esm/limel-profile-picture.entry.js +1 -1
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +1833 -1639
- package/dist/esm/limel-radio-button-group.entry.js +2 -2
- package/dist/esm/limel-radio-button.entry.js +3 -3
- package/dist/esm/limel-select.entry.js +3 -3
- package/dist/esm/limel-shortcut.entry.js +2 -2
- package/dist/esm/limel-slider.entry.js +3 -3
- package/dist/esm/limel-snackbar.entry.js +3 -3
- package/dist/esm/limel-split-button.entry.js +3 -3
- package/dist/esm/limel-switch.entry.js +2 -2
- package/dist/esm/limel-tab-bar.entry.js +3 -3
- package/dist/esm/limel-tab-panel.entry.js +2 -2
- package/dist/esm/limel-table.entry.js +255 -154
- package/dist/esm/limel-text-editor-link-menu.entry.js +4 -4
- package/dist/esm/limel-text-editor.entry.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{markdown-parser-D7vLKElE.js → markdown-parser-Blt6ZFY0.js} +326 -333
- package/dist/esm/{render-list-component-D7LjGxDF.js → render-list-component-BdncB2vG.js} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-1efd78ee.entry.js → p-0605c490.entry.js} +1 -1
- package/dist/lime-elements/{p-5d9adcbb.entry.js → p-08e7006f.entry.js} +1 -1
- package/dist/lime-elements/p-0b9f3cf1.entry.js +1 -0
- package/dist/lime-elements/p-10955e5d.entry.js +1 -0
- package/dist/lime-elements/p-1153e2ba.entry.js +1 -0
- package/dist/lime-elements/{p-49901dd7.entry.js → p-17ff8353.entry.js} +1 -1
- package/dist/lime-elements/p-2486f61d.entry.js +1 -0
- package/dist/lime-elements/{p-19a259ff.entry.js → p-2a27bf12.entry.js} +1 -1
- package/dist/lime-elements/{p-d8b640e8.entry.js → p-2cb55d62.entry.js} +1 -1
- package/dist/lime-elements/{p-0f8672fe.entry.js → p-2ef433e0.entry.js} +1 -1
- package/dist/lime-elements/{p-12aa0d06.entry.js → p-317d56a7.entry.js} +1 -1
- package/dist/lime-elements/{p-d5f189b9.entry.js → p-31965f6c.entry.js} +2 -2
- package/dist/lime-elements/{p-61ec46d5.entry.js → p-33ab319b.entry.js} +1 -1
- package/dist/lime-elements/p-444e3088.entry.js +1 -0
- package/dist/lime-elements/{p-4a9b5914.entry.js → p-44bd59ac.entry.js} +1 -1
- package/dist/lime-elements/{p-5f121609.entry.js → p-45801616.entry.js} +1 -1
- package/dist/lime-elements/{p-1ae8b33a.entry.js → p-53b7bee8.entry.js} +1 -1
- package/dist/lime-elements/{p-08a261ce.entry.js → p-5a00f0fb.entry.js} +1 -1
- package/dist/lime-elements/{p-122cd39d.entry.js → p-66600fc3.entry.js} +1 -1
- package/dist/lime-elements/{p-46900c5b.entry.js → p-6c60d915.entry.js} +1 -1
- package/dist/lime-elements/{p-a85b2734.entry.js → p-6fa4b1b3.entry.js} +1 -1
- package/dist/lime-elements/{p-59716b48.entry.js → p-719dc4c0.entry.js} +1 -1
- package/dist/lime-elements/{p-7b074737.entry.js → p-7776313e.entry.js} +1 -1
- package/dist/lime-elements/{p-6ca1da96.entry.js → p-7b687fc6.entry.js} +1 -1
- package/dist/lime-elements/{p-2a92790c.entry.js → p-7f891de4.entry.js} +1 -1
- package/dist/lime-elements/{p-a7764b6d.entry.js → p-80b0bcb3.entry.js} +1 -1
- package/dist/lime-elements/{p-871eb795.entry.js → p-8376ac0d.entry.js} +2 -2
- package/dist/lime-elements/{p-dee5717c.entry.js → p-8aaf4f50.entry.js} +1 -1
- package/dist/lime-elements/{p-8fde4714.entry.js → p-90a506aa.entry.js} +1 -1
- package/dist/lime-elements/{p-d0288858.entry.js → p-9b7966f1.entry.js} +1 -1
- package/dist/lime-elements/{p-bffbd011.entry.js → p-9bb07225.entry.js} +1 -1
- package/dist/lime-elements/{p-a6805c64.entry.js → p-9e8eaa86.entry.js} +1 -1
- package/dist/lime-elements/{p-989f4a52.entry.js → p-9eb06bf7.entry.js} +1 -1
- package/dist/lime-elements/{p-faceccc0.entry.js → p-9eb6879d.entry.js} +1 -1
- package/dist/lime-elements/{p--9pvUs5M.js → p-D9twpDvz.js} +1 -1
- package/dist/lime-elements/p-DMNtoJ8I.js +1 -0
- package/dist/lime-elements/{p-DdYOzHlg.js → p-DnPeu2SH.js} +2 -2
- package/dist/lime-elements/p-NN0EYecx.js +1 -0
- package/dist/lime-elements/p-VCOjLfyP.js +2 -0
- package/dist/lime-elements/{p-e5e8a734.entry.js → p-a0720aca.entry.js} +8 -8
- package/dist/lime-elements/{p-f5d60f9c.entry.js → p-a11abcb0.entry.js} +4 -4
- package/dist/lime-elements/p-a73f70d7.entry.js +1 -0
- package/dist/lime-elements/{p-129a19c7.entry.js → p-a7e9e96c.entry.js} +1 -1
- package/dist/lime-elements/{p-140afd9f.entry.js → p-a827a280.entry.js} +1 -1
- package/dist/lime-elements/{p-d0607ba8.entry.js → p-aa6190e8.entry.js} +1 -1
- package/dist/lime-elements/{p-b8a31121.entry.js → p-aa8d7faa.entry.js} +1 -1
- package/dist/lime-elements/{p-5da0315f.entry.js → p-aba01020.entry.js} +1 -1
- package/dist/lime-elements/{p-b61a1d27.entry.js → p-ac5d5099.entry.js} +2 -2
- package/dist/lime-elements/{p-9b3e8f43.entry.js → p-b3b53dbc.entry.js} +1 -1
- package/dist/lime-elements/{p-9359e870.entry.js → p-b7649589.entry.js} +1 -1
- package/dist/lime-elements/{p-1a5541f1.entry.js → p-bcc2cb1a.entry.js} +1 -1
- package/dist/lime-elements/{p-4d948ed5.entry.js → p-c447d311.entry.js} +1 -1
- package/dist/lime-elements/{p-33bd5212.entry.js → p-c6cbd842.entry.js} +1 -1
- package/dist/lime-elements/{p-df0b927e.entry.js → p-caf1bca2.entry.js} +1 -1
- package/dist/lime-elements/{p-f85dbaec.entry.js → p-cdbab1d5.entry.js} +1 -1
- package/dist/lime-elements/p-d8d6e12a.entry.js +13 -0
- package/dist/lime-elements/{p-60518e6b.entry.js → p-db0bd965.entry.js} +1 -1
- package/dist/lime-elements/{p-22f34040.entry.js → p-dc415221.entry.js} +1 -1
- package/dist/lime-elements/{p-91990c64.entry.js → p-e31d0b36.entry.js} +1 -1
- package/dist/lime-elements/p-e38a13fb.entry.js +1 -0
- package/dist/lime-elements/{p-fa0d7b8c.entry.js → p-e4549e8b.entry.js} +1 -1
- package/dist/lime-elements/{p-d09e74b1.entry.js → p-e59d7177.entry.js} +1 -1
- package/dist/lime-elements/{p-50f51eb9.entry.js → p-e7b9716f.entry.js} +1 -1
- package/dist/lime-elements/{p-9e1a4d63.entry.js → p-ed70059b.entry.js} +1 -1
- package/dist/lime-elements/{p-afd4be62.entry.js → p-eef0cd8b.entry.js} +1 -1
- package/dist/lime-elements/{p-de203f64.entry.js → p-f7695614.entry.js} +1 -1
- package/dist/lime-elements/{p-198f3179.entry.js → p-f91de6bd.entry.js} +1 -1
- package/dist/lime-elements/{p-2a9e7bf5.entry.js → p-f9b74b03.entry.js} +1 -1
- package/dist/lime-elements/{p-6b7e58c3.entry.js → p-fac02bae.entry.js} +1 -1
- package/dist/lime-elements/{p-82fb5c74.entry.js → p-fc435802.entry.js} +1 -1
- package/dist/lime-elements/p-fe64b285.entry.js +1 -0
- package/dist/types/components/form/widgets/code-editor.d.ts +2 -2
- package/dist/types/components/markdown/markdown.d.ts +1 -0
- package/dist/types/components.d.ts +26 -20
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/package.json +34 -36
- package/dist/lime-elements/p-00e54ccf.entry.js +0 -1
- package/dist/lime-elements/p-1614ad86.entry.js +0 -1
- package/dist/lime-elements/p-16254e4a.entry.js +0 -1
- package/dist/lime-elements/p-3f78362b.entry.js +0 -13
- package/dist/lime-elements/p-5b9d84b4.entry.js +0 -1
- package/dist/lime-elements/p-6015621e.entry.js +0 -1
- package/dist/lime-elements/p-730ba357.entry.js +0 -1
- package/dist/lime-elements/p-84f5727c.entry.js +0 -1
- package/dist/lime-elements/p-BaPK7VfG.js +0 -1
- package/dist/lime-elements/p-DBTJNfo7.js +0 -2
- package/dist/lime-elements/p-DJvGLFul.js +0 -1
- package/dist/lime-elements/p-c9fa7a09.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-B85MJLTf.js';
|
|
2
|
-
import { s as structuredClone, v as visit,
|
|
2
|
+
import { s as structuredClone, v as visit, f as convert, g as visitParents, h as ccount, E as EXIT, z as zwitch, i as determineBranch, j as htmlDecodeTree, B as BinTrieFlags, u as unified, a as rehypeSanitize, b as rehypeStringify, r as rehypeParse, d as defaultSchema } from './index-CbciMfiU.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -10740,7 +10740,7 @@ var defaultConstructs = /*#__PURE__*/Object.freeze({
|
|
|
10740
10740
|
* @param {ParseOptions | null | undefined} [options]
|
|
10741
10741
|
* @returns {ParseContext}
|
|
10742
10742
|
*/
|
|
10743
|
-
function parse$
|
|
10743
|
+
function parse$2(options) {
|
|
10744
10744
|
const settings = options || {};
|
|
10745
10745
|
const constructs =
|
|
10746
10746
|
/** @type {FullNormalizedExtension} */
|
|
@@ -11008,7 +11008,7 @@ function stringifyPosition(value) {
|
|
|
11008
11008
|
* @returns {string}
|
|
11009
11009
|
*/
|
|
11010
11010
|
function point$4(point) {
|
|
11011
|
-
return index(point && point.line) + ':' + index(point && point.column)
|
|
11011
|
+
return index$1(point && point.line) + ':' + index$1(point && point.column)
|
|
11012
11012
|
}
|
|
11013
11013
|
|
|
11014
11014
|
/**
|
|
@@ -11023,7 +11023,7 @@ function position$2(pos) {
|
|
|
11023
11023
|
* @param {number | null | undefined} value
|
|
11024
11024
|
* @returns {number}
|
|
11025
11025
|
*/
|
|
11026
|
-
function index(value) {
|
|
11026
|
+
function index$1(value) {
|
|
11027
11027
|
return value && typeof value === 'number' ? value : 1
|
|
11028
11028
|
}
|
|
11029
11029
|
|
|
@@ -11094,7 +11094,7 @@ function fromMarkdown(value, encoding, options) {
|
|
|
11094
11094
|
}
|
|
11095
11095
|
return compiler(options)(
|
|
11096
11096
|
postprocess(
|
|
11097
|
-
parse$
|
|
11097
|
+
parse$2(options).document().write(preprocess()(value, encoding, true))
|
|
11098
11098
|
)
|
|
11099
11099
|
)
|
|
11100
11100
|
}
|
|
@@ -21842,7 +21842,7 @@ const svg$2 = merge$1([xml$1, xlink$1, xmlns$1, aria$1, svg$3], 'svg');
|
|
|
21842
21842
|
* @returns {Array<string>}
|
|
21843
21843
|
* List of tokens.
|
|
21844
21844
|
*/
|
|
21845
|
-
function parse$
|
|
21845
|
+
function parse$1(value) {
|
|
21846
21846
|
/** @type {Array<string>} */
|
|
21847
21847
|
const tokens = [];
|
|
21848
21848
|
const input = String(value || '');
|
|
@@ -21966,7 +21966,7 @@ function parseSelector(selector, defaultTagName) {
|
|
|
21966
21966
|
* @returns {Array<string>}
|
|
21967
21967
|
* List of tokens.
|
|
21968
21968
|
*/
|
|
21969
|
-
function parse
|
|
21969
|
+
function parse(value) {
|
|
21970
21970
|
const input = String(value || '').trim();
|
|
21971
21971
|
return input ? input.split(/[ \t\n\r\f]+/g) : []
|
|
21972
21972
|
}
|
|
@@ -22145,11 +22145,11 @@ function addProperty(schema, properties, key, value) {
|
|
|
22145
22145
|
// Handle list values.
|
|
22146
22146
|
else if (typeof value === 'string') {
|
|
22147
22147
|
if (info.spaceSeparated) {
|
|
22148
|
-
result = parse
|
|
22148
|
+
result = parse(value);
|
|
22149
22149
|
} else if (info.commaSeparated) {
|
|
22150
|
-
result = parse$
|
|
22150
|
+
result = parse$1(value);
|
|
22151
22151
|
} else if (info.commaOrSpaceSeparated) {
|
|
22152
|
-
result = parse
|
|
22152
|
+
result = parse(parse$1(value).join(' '));
|
|
22153
22153
|
} else {
|
|
22154
22154
|
result = parsePrimitive(info, info.property, value);
|
|
22155
22155
|
}
|
|
@@ -33089,330 +33089,296 @@ function rehypeRaw(options) {
|
|
|
33089
33089
|
}
|
|
33090
33090
|
}
|
|
33091
33091
|
|
|
33092
|
-
|
|
33093
|
-
|
|
33094
|
-
var
|
|
33095
|
-
var hasRequiredInlineStyleParser;
|
|
33096
|
-
|
|
33097
|
-
function requireInlineStyleParser () {
|
|
33098
|
-
if (hasRequiredInlineStyleParser) return inlineStyleParser;
|
|
33099
|
-
hasRequiredInlineStyleParser = 1;
|
|
33100
|
-
// http://www.w3.org/TR/CSS21/grammar.html
|
|
33101
|
-
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
|
33102
|
-
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
33103
|
-
|
|
33104
|
-
var NEWLINE_REGEX = /\n/g;
|
|
33105
|
-
var WHITESPACE_REGEX = /^\s*/;
|
|
33106
|
-
|
|
33107
|
-
// declaration
|
|
33108
|
-
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
|
|
33109
|
-
var COLON_REGEX = /^:\s*/;
|
|
33110
|
-
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
|
|
33111
|
-
var SEMICOLON_REGEX = /^[;\s]*/;
|
|
33112
|
-
|
|
33113
|
-
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
|
|
33114
|
-
var TRIM_REGEX = /^\s+|\s+$/g;
|
|
33115
|
-
|
|
33116
|
-
// strings
|
|
33117
|
-
var NEWLINE = '\n';
|
|
33118
|
-
var FORWARD_SLASH = '/';
|
|
33119
|
-
var ASTERISK = '*';
|
|
33120
|
-
var EMPTY_STRING = '';
|
|
33121
|
-
|
|
33122
|
-
// types
|
|
33123
|
-
var TYPE_COMMENT = 'comment';
|
|
33124
|
-
var TYPE_DECLARATION = 'declaration';
|
|
33125
|
-
|
|
33126
|
-
/**
|
|
33127
|
-
* @param {String} style
|
|
33128
|
-
* @param {Object} [options]
|
|
33129
|
-
* @return {Object[]}
|
|
33130
|
-
* @throws {TypeError}
|
|
33131
|
-
* @throws {Error}
|
|
33132
|
-
*/
|
|
33133
|
-
inlineStyleParser = function (style, options) {
|
|
33134
|
-
if (typeof style !== 'string') {
|
|
33135
|
-
throw new TypeError('First argument must be a string');
|
|
33136
|
-
}
|
|
33137
|
-
|
|
33138
|
-
if (!style) return [];
|
|
33139
|
-
|
|
33140
|
-
options = options || {};
|
|
33141
|
-
|
|
33142
|
-
/**
|
|
33143
|
-
* Positional.
|
|
33144
|
-
*/
|
|
33145
|
-
var lineno = 1;
|
|
33146
|
-
var column = 1;
|
|
33147
|
-
|
|
33148
|
-
/**
|
|
33149
|
-
* Update lineno and column based on `str`.
|
|
33150
|
-
*
|
|
33151
|
-
* @param {String} str
|
|
33152
|
-
*/
|
|
33153
|
-
function updatePosition(str) {
|
|
33154
|
-
var lines = str.match(NEWLINE_REGEX);
|
|
33155
|
-
if (lines) lineno += lines.length;
|
|
33156
|
-
var i = str.lastIndexOf(NEWLINE);
|
|
33157
|
-
column = ~i ? str.length - i : column + str.length;
|
|
33158
|
-
}
|
|
33159
|
-
|
|
33160
|
-
/**
|
|
33161
|
-
* Mark position and patch `node.position`.
|
|
33162
|
-
*
|
|
33163
|
-
* @return {Function}
|
|
33164
|
-
*/
|
|
33165
|
-
function position() {
|
|
33166
|
-
var start = { line: lineno, column: column };
|
|
33167
|
-
return function (node) {
|
|
33168
|
-
node.position = new Position(start);
|
|
33169
|
-
whitespace();
|
|
33170
|
-
return node;
|
|
33171
|
-
};
|
|
33172
|
-
}
|
|
33173
|
-
|
|
33174
|
-
/**
|
|
33175
|
-
* Store position information for a node.
|
|
33176
|
-
*
|
|
33177
|
-
* @constructor
|
|
33178
|
-
* @property {Object} start
|
|
33179
|
-
* @property {Object} end
|
|
33180
|
-
* @property {undefined|String} source
|
|
33181
|
-
*/
|
|
33182
|
-
function Position(start) {
|
|
33183
|
-
this.start = start;
|
|
33184
|
-
this.end = { line: lineno, column: column };
|
|
33185
|
-
this.source = options.source;
|
|
33186
|
-
}
|
|
33187
|
-
|
|
33188
|
-
/**
|
|
33189
|
-
* Non-enumerable source string.
|
|
33190
|
-
*/
|
|
33191
|
-
Position.prototype.content = style;
|
|
33192
|
-
|
|
33193
|
-
/**
|
|
33194
|
-
* Error `msg`.
|
|
33195
|
-
*
|
|
33196
|
-
* @param {String} msg
|
|
33197
|
-
* @throws {Error}
|
|
33198
|
-
*/
|
|
33199
|
-
function error(msg) {
|
|
33200
|
-
var err = new Error(
|
|
33201
|
-
options.source + ':' + lineno + ':' + column + ': ' + msg
|
|
33202
|
-
);
|
|
33203
|
-
err.reason = msg;
|
|
33204
|
-
err.filename = options.source;
|
|
33205
|
-
err.line = lineno;
|
|
33206
|
-
err.column = column;
|
|
33207
|
-
err.source = style;
|
|
33208
|
-
|
|
33209
|
-
if (options.silent) ; else {
|
|
33210
|
-
throw err;
|
|
33211
|
-
}
|
|
33212
|
-
}
|
|
33213
|
-
|
|
33214
|
-
/**
|
|
33215
|
-
* Match `re` and return captures.
|
|
33216
|
-
*
|
|
33217
|
-
* @param {RegExp} re
|
|
33218
|
-
* @return {undefined|Array}
|
|
33219
|
-
*/
|
|
33220
|
-
function match(re) {
|
|
33221
|
-
var m = re.exec(style);
|
|
33222
|
-
if (!m) return;
|
|
33223
|
-
var str = m[0];
|
|
33224
|
-
updatePosition(str);
|
|
33225
|
-
style = style.slice(str.length);
|
|
33226
|
-
return m;
|
|
33227
|
-
}
|
|
33228
|
-
|
|
33229
|
-
/**
|
|
33230
|
-
* Parse whitespace.
|
|
33231
|
-
*/
|
|
33232
|
-
function whitespace() {
|
|
33233
|
-
match(WHITESPACE_REGEX);
|
|
33234
|
-
}
|
|
33235
|
-
|
|
33236
|
-
/**
|
|
33237
|
-
* Parse comments.
|
|
33238
|
-
*
|
|
33239
|
-
* @param {Object[]} [rules]
|
|
33240
|
-
* @return {Object[]}
|
|
33241
|
-
*/
|
|
33242
|
-
function comments(rules) {
|
|
33243
|
-
var c;
|
|
33244
|
-
rules = rules || [];
|
|
33245
|
-
while ((c = comment())) {
|
|
33246
|
-
if (c !== false) {
|
|
33247
|
-
rules.push(c);
|
|
33248
|
-
}
|
|
33249
|
-
}
|
|
33250
|
-
return rules;
|
|
33251
|
-
}
|
|
33252
|
-
|
|
33253
|
-
/**
|
|
33254
|
-
* Parse comment.
|
|
33255
|
-
*
|
|
33256
|
-
* @return {Object}
|
|
33257
|
-
* @throws {Error}
|
|
33258
|
-
*/
|
|
33259
|
-
function comment() {
|
|
33260
|
-
var pos = position();
|
|
33261
|
-
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
|
|
33262
|
-
|
|
33263
|
-
var i = 2;
|
|
33264
|
-
while (
|
|
33265
|
-
EMPTY_STRING != style.charAt(i) &&
|
|
33266
|
-
(ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))
|
|
33267
|
-
) {
|
|
33268
|
-
++i;
|
|
33269
|
-
}
|
|
33270
|
-
i += 2;
|
|
33271
|
-
|
|
33272
|
-
if (EMPTY_STRING === style.charAt(i - 1)) {
|
|
33273
|
-
return error('End of comment missing');
|
|
33274
|
-
}
|
|
33275
|
-
|
|
33276
|
-
var str = style.slice(2, i - 2);
|
|
33277
|
-
column += 2;
|
|
33278
|
-
updatePosition(str);
|
|
33279
|
-
style = style.slice(i);
|
|
33280
|
-
column += 2;
|
|
33281
|
-
|
|
33282
|
-
return pos({
|
|
33283
|
-
type: TYPE_COMMENT,
|
|
33284
|
-
comment: str
|
|
33285
|
-
});
|
|
33286
|
-
}
|
|
33287
|
-
|
|
33288
|
-
/**
|
|
33289
|
-
* Parse declaration.
|
|
33290
|
-
*
|
|
33291
|
-
* @return {Object}
|
|
33292
|
-
* @throws {Error}
|
|
33293
|
-
*/
|
|
33294
|
-
function declaration() {
|
|
33295
|
-
var pos = position();
|
|
33296
|
-
|
|
33297
|
-
// prop
|
|
33298
|
-
var prop = match(PROPERTY_REGEX);
|
|
33299
|
-
if (!prop) return;
|
|
33300
|
-
comment();
|
|
33301
|
-
|
|
33302
|
-
// :
|
|
33303
|
-
if (!match(COLON_REGEX)) return error("property missing ':'");
|
|
33304
|
-
|
|
33305
|
-
// val
|
|
33306
|
-
var val = match(VALUE_REGEX);
|
|
33307
|
-
|
|
33308
|
-
var ret = pos({
|
|
33309
|
-
type: TYPE_DECLARATION,
|
|
33310
|
-
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
|
|
33311
|
-
value: val
|
|
33312
|
-
? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))
|
|
33313
|
-
: EMPTY_STRING
|
|
33314
|
-
});
|
|
33315
|
-
|
|
33316
|
-
// ;
|
|
33317
|
-
match(SEMICOLON_REGEX);
|
|
33318
|
-
|
|
33319
|
-
return ret;
|
|
33320
|
-
}
|
|
33321
|
-
|
|
33322
|
-
/**
|
|
33323
|
-
* Parse declarations.
|
|
33324
|
-
*
|
|
33325
|
-
* @return {Object[]}
|
|
33326
|
-
*/
|
|
33327
|
-
function declarations() {
|
|
33328
|
-
var decls = [];
|
|
33329
|
-
|
|
33330
|
-
comments(decls);
|
|
33331
|
-
|
|
33332
|
-
// declarations
|
|
33333
|
-
var decl;
|
|
33334
|
-
while ((decl = declaration())) {
|
|
33335
|
-
if (decl !== false) {
|
|
33336
|
-
decls.push(decl);
|
|
33337
|
-
comments(decls);
|
|
33338
|
-
}
|
|
33339
|
-
}
|
|
33340
|
-
|
|
33341
|
-
return decls;
|
|
33342
|
-
}
|
|
33343
|
-
|
|
33344
|
-
whitespace();
|
|
33345
|
-
return declarations();
|
|
33346
|
-
};
|
|
33092
|
+
// http://www.w3.org/TR/CSS21/grammar.html
|
|
33093
|
+
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
|
33094
|
+
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
33347
33095
|
|
|
33348
|
-
|
|
33349
|
-
|
|
33350
|
-
*
|
|
33351
|
-
* @param {String} str
|
|
33352
|
-
* @return {String}
|
|
33353
|
-
*/
|
|
33354
|
-
function trim(str) {
|
|
33355
|
-
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
|
33356
|
-
}
|
|
33357
|
-
return inlineStyleParser;
|
|
33358
|
-
}
|
|
33096
|
+
var NEWLINE_REGEX = /\n/g;
|
|
33097
|
+
var WHITESPACE_REGEX = /^\s*/;
|
|
33359
33098
|
|
|
33360
|
-
|
|
33099
|
+
// declaration
|
|
33100
|
+
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
|
|
33101
|
+
var COLON_REGEX = /^:\s*/;
|
|
33102
|
+
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
|
|
33103
|
+
var SEMICOLON_REGEX = /^[;\s]*/;
|
|
33361
33104
|
|
|
33362
|
-
|
|
33363
|
-
|
|
33364
|
-
|
|
33365
|
-
|
|
33366
|
-
|
|
33367
|
-
|
|
33368
|
-
|
|
33369
|
-
|
|
33370
|
-
|
|
33371
|
-
|
|
33372
|
-
|
|
33373
|
-
|
|
33374
|
-
|
|
33375
|
-
|
|
33376
|
-
|
|
33377
|
-
|
|
33378
|
-
|
|
33379
|
-
|
|
33380
|
-
|
|
33381
|
-
|
|
33382
|
-
|
|
33383
|
-
|
|
33384
|
-
|
|
33385
|
-
|
|
33386
|
-
|
|
33387
|
-
|
|
33388
|
-
|
|
33389
|
-
|
|
33390
|
-
|
|
33391
|
-
|
|
33392
|
-
|
|
33393
|
-
|
|
33394
|
-
|
|
33395
|
-
|
|
33396
|
-
|
|
33397
|
-
|
|
33398
|
-
|
|
33399
|
-
|
|
33400
|
-
|
|
33401
|
-
|
|
33402
|
-
|
|
33403
|
-
|
|
33404
|
-
|
|
33405
|
-
|
|
33406
|
-
|
|
33407
|
-
|
|
33408
|
-
|
|
33105
|
+
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
|
|
33106
|
+
var TRIM_REGEX = /^\s+|\s+$/g;
|
|
33107
|
+
|
|
33108
|
+
// strings
|
|
33109
|
+
var NEWLINE = '\n';
|
|
33110
|
+
var FORWARD_SLASH = '/';
|
|
33111
|
+
var ASTERISK = '*';
|
|
33112
|
+
var EMPTY_STRING = '';
|
|
33113
|
+
|
|
33114
|
+
// types
|
|
33115
|
+
var TYPE_COMMENT = 'comment';
|
|
33116
|
+
var TYPE_DECLARATION = 'declaration';
|
|
33117
|
+
|
|
33118
|
+
/**
|
|
33119
|
+
* @param {String} style
|
|
33120
|
+
* @param {Object} [options]
|
|
33121
|
+
* @return {Object[]}
|
|
33122
|
+
* @throws {TypeError}
|
|
33123
|
+
* @throws {Error}
|
|
33124
|
+
*/
|
|
33125
|
+
function index (style, options) {
|
|
33126
|
+
if (typeof style !== 'string') {
|
|
33127
|
+
throw new TypeError('First argument must be a string');
|
|
33128
|
+
}
|
|
33129
|
+
|
|
33130
|
+
if (!style) return [];
|
|
33131
|
+
|
|
33132
|
+
options = options || {};
|
|
33133
|
+
|
|
33134
|
+
/**
|
|
33135
|
+
* Positional.
|
|
33136
|
+
*/
|
|
33137
|
+
var lineno = 1;
|
|
33138
|
+
var column = 1;
|
|
33139
|
+
|
|
33140
|
+
/**
|
|
33141
|
+
* Update lineno and column based on `str`.
|
|
33142
|
+
*
|
|
33143
|
+
* @param {String} str
|
|
33144
|
+
*/
|
|
33145
|
+
function updatePosition(str) {
|
|
33146
|
+
var lines = str.match(NEWLINE_REGEX);
|
|
33147
|
+
if (lines) lineno += lines.length;
|
|
33148
|
+
var i = str.lastIndexOf(NEWLINE);
|
|
33149
|
+
column = ~i ? str.length - i : column + str.length;
|
|
33150
|
+
}
|
|
33151
|
+
|
|
33152
|
+
/**
|
|
33153
|
+
* Mark position and patch `node.position`.
|
|
33154
|
+
*
|
|
33155
|
+
* @return {Function}
|
|
33156
|
+
*/
|
|
33157
|
+
function position() {
|
|
33158
|
+
var start = { line: lineno, column: column };
|
|
33159
|
+
return function (node) {
|
|
33160
|
+
node.position = new Position(start);
|
|
33161
|
+
whitespace();
|
|
33162
|
+
return node;
|
|
33163
|
+
};
|
|
33164
|
+
}
|
|
33165
|
+
|
|
33166
|
+
/**
|
|
33167
|
+
* Store position information for a node.
|
|
33168
|
+
*
|
|
33169
|
+
* @constructor
|
|
33170
|
+
* @property {Object} start
|
|
33171
|
+
* @property {Object} end
|
|
33172
|
+
* @property {undefined|String} source
|
|
33173
|
+
*/
|
|
33174
|
+
function Position(start) {
|
|
33175
|
+
this.start = start;
|
|
33176
|
+
this.end = { line: lineno, column: column };
|
|
33177
|
+
this.source = options.source;
|
|
33178
|
+
}
|
|
33179
|
+
|
|
33180
|
+
/**
|
|
33181
|
+
* Non-enumerable source string.
|
|
33182
|
+
*/
|
|
33183
|
+
Position.prototype.content = style;
|
|
33184
|
+
|
|
33185
|
+
/**
|
|
33186
|
+
* Error `msg`.
|
|
33187
|
+
*
|
|
33188
|
+
* @param {String} msg
|
|
33189
|
+
* @throws {Error}
|
|
33190
|
+
*/
|
|
33191
|
+
function error(msg) {
|
|
33192
|
+
var err = new Error(
|
|
33193
|
+
options.source + ':' + lineno + ':' + column + ': ' + msg
|
|
33194
|
+
);
|
|
33195
|
+
err.reason = msg;
|
|
33196
|
+
err.filename = options.source;
|
|
33197
|
+
err.line = lineno;
|
|
33198
|
+
err.column = column;
|
|
33199
|
+
err.source = style;
|
|
33200
|
+
|
|
33201
|
+
if (options.silent) ; else {
|
|
33202
|
+
throw err;
|
|
33203
|
+
}
|
|
33204
|
+
}
|
|
33205
|
+
|
|
33206
|
+
/**
|
|
33207
|
+
* Match `re` and return captures.
|
|
33208
|
+
*
|
|
33209
|
+
* @param {RegExp} re
|
|
33210
|
+
* @return {undefined|Array}
|
|
33211
|
+
*/
|
|
33212
|
+
function match(re) {
|
|
33213
|
+
var m = re.exec(style);
|
|
33214
|
+
if (!m) return;
|
|
33215
|
+
var str = m[0];
|
|
33216
|
+
updatePosition(str);
|
|
33217
|
+
style = style.slice(str.length);
|
|
33218
|
+
return m;
|
|
33219
|
+
}
|
|
33220
|
+
|
|
33221
|
+
/**
|
|
33222
|
+
* Parse whitespace.
|
|
33223
|
+
*/
|
|
33224
|
+
function whitespace() {
|
|
33225
|
+
match(WHITESPACE_REGEX);
|
|
33226
|
+
}
|
|
33227
|
+
|
|
33228
|
+
/**
|
|
33229
|
+
* Parse comments.
|
|
33230
|
+
*
|
|
33231
|
+
* @param {Object[]} [rules]
|
|
33232
|
+
* @return {Object[]}
|
|
33233
|
+
*/
|
|
33234
|
+
function comments(rules) {
|
|
33235
|
+
var c;
|
|
33236
|
+
rules = rules || [];
|
|
33237
|
+
while ((c = comment())) {
|
|
33238
|
+
if (c !== false) {
|
|
33239
|
+
rules.push(c);
|
|
33240
|
+
}
|
|
33241
|
+
}
|
|
33242
|
+
return rules;
|
|
33243
|
+
}
|
|
33244
|
+
|
|
33245
|
+
/**
|
|
33246
|
+
* Parse comment.
|
|
33247
|
+
*
|
|
33248
|
+
* @return {Object}
|
|
33249
|
+
* @throws {Error}
|
|
33250
|
+
*/
|
|
33251
|
+
function comment() {
|
|
33252
|
+
var pos = position();
|
|
33253
|
+
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
|
|
33254
|
+
|
|
33255
|
+
var i = 2;
|
|
33256
|
+
while (
|
|
33257
|
+
EMPTY_STRING != style.charAt(i) &&
|
|
33258
|
+
(ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))
|
|
33259
|
+
) {
|
|
33260
|
+
++i;
|
|
33261
|
+
}
|
|
33262
|
+
i += 2;
|
|
33263
|
+
|
|
33264
|
+
if (EMPTY_STRING === style.charAt(i - 1)) {
|
|
33265
|
+
return error('End of comment missing');
|
|
33266
|
+
}
|
|
33267
|
+
|
|
33268
|
+
var str = style.slice(2, i - 2);
|
|
33269
|
+
column += 2;
|
|
33270
|
+
updatePosition(str);
|
|
33271
|
+
style = style.slice(i);
|
|
33272
|
+
column += 2;
|
|
33273
|
+
|
|
33274
|
+
return pos({
|
|
33275
|
+
type: TYPE_COMMENT,
|
|
33276
|
+
comment: str
|
|
33277
|
+
});
|
|
33278
|
+
}
|
|
33279
|
+
|
|
33280
|
+
/**
|
|
33281
|
+
* Parse declaration.
|
|
33282
|
+
*
|
|
33283
|
+
* @return {Object}
|
|
33284
|
+
* @throws {Error}
|
|
33285
|
+
*/
|
|
33286
|
+
function declaration() {
|
|
33287
|
+
var pos = position();
|
|
33288
|
+
|
|
33289
|
+
// prop
|
|
33290
|
+
var prop = match(PROPERTY_REGEX);
|
|
33291
|
+
if (!prop) return;
|
|
33292
|
+
comment();
|
|
33293
|
+
|
|
33294
|
+
// :
|
|
33295
|
+
if (!match(COLON_REGEX)) return error("property missing ':'");
|
|
33296
|
+
|
|
33297
|
+
// val
|
|
33298
|
+
var val = match(VALUE_REGEX);
|
|
33299
|
+
|
|
33300
|
+
var ret = pos({
|
|
33301
|
+
type: TYPE_DECLARATION,
|
|
33302
|
+
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
|
|
33303
|
+
value: val
|
|
33304
|
+
? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))
|
|
33305
|
+
: EMPTY_STRING
|
|
33306
|
+
});
|
|
33307
|
+
|
|
33308
|
+
// ;
|
|
33309
|
+
match(SEMICOLON_REGEX);
|
|
33310
|
+
|
|
33311
|
+
return ret;
|
|
33312
|
+
}
|
|
33313
|
+
|
|
33314
|
+
/**
|
|
33315
|
+
* Parse declarations.
|
|
33316
|
+
*
|
|
33317
|
+
* @return {Object[]}
|
|
33318
|
+
*/
|
|
33319
|
+
function declarations() {
|
|
33320
|
+
var decls = [];
|
|
33321
|
+
|
|
33322
|
+
comments(decls);
|
|
33323
|
+
|
|
33324
|
+
// declarations
|
|
33325
|
+
var decl;
|
|
33326
|
+
while ((decl = declaration())) {
|
|
33327
|
+
if (decl !== false) {
|
|
33328
|
+
decls.push(decl);
|
|
33329
|
+
comments(decls);
|
|
33330
|
+
}
|
|
33331
|
+
}
|
|
33332
|
+
|
|
33333
|
+
return decls;
|
|
33334
|
+
}
|
|
33335
|
+
|
|
33336
|
+
whitespace();
|
|
33337
|
+
return declarations();
|
|
33409
33338
|
}
|
|
33410
33339
|
|
|
33411
|
-
|
|
33412
|
-
|
|
33340
|
+
/**
|
|
33341
|
+
* Trim `str`.
|
|
33342
|
+
*
|
|
33343
|
+
* @param {String} str
|
|
33344
|
+
* @return {String}
|
|
33345
|
+
*/
|
|
33346
|
+
function trim(str) {
|
|
33347
|
+
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
|
33348
|
+
}
|
|
33413
33349
|
|
|
33414
|
-
|
|
33415
|
-
|
|
33350
|
+
/**
|
|
33351
|
+
* Parses inline style to object.
|
|
33352
|
+
*
|
|
33353
|
+
* @param style - Inline style.
|
|
33354
|
+
* @param iterator - Iterator.
|
|
33355
|
+
* @returns - Style object or null.
|
|
33356
|
+
*
|
|
33357
|
+
* @example Parsing inline style to object:
|
|
33358
|
+
*
|
|
33359
|
+
* ```js
|
|
33360
|
+
* import parse from 'style-to-object';
|
|
33361
|
+
* parse('line-height: 42;'); // { 'line-height': '42' }
|
|
33362
|
+
* ```
|
|
33363
|
+
*/
|
|
33364
|
+
function StyleToObject(style, iterator) {
|
|
33365
|
+
let styleObject = null;
|
|
33366
|
+
if (!style || typeof style !== 'string') {
|
|
33367
|
+
return styleObject;
|
|
33368
|
+
}
|
|
33369
|
+
const declarations = index(style);
|
|
33370
|
+
declarations.forEach((declaration) => {
|
|
33371
|
+
if (declaration.type !== 'declaration') {
|
|
33372
|
+
return;
|
|
33373
|
+
}
|
|
33374
|
+
const { property, value } = declaration;
|
|
33375
|
+
if (value) {
|
|
33376
|
+
styleObject = styleObject || {};
|
|
33377
|
+
styleObject[property] = value;
|
|
33378
|
+
}
|
|
33379
|
+
});
|
|
33380
|
+
return styleObject;
|
|
33381
|
+
}
|
|
33416
33382
|
|
|
33417
33383
|
var colorName$1;
|
|
33418
33384
|
var hasRequiredColorName;
|
|
@@ -33840,7 +33806,7 @@ function sanitizeStyle(node) {
|
|
|
33840
33806
|
*/
|
|
33841
33807
|
function sanitizeStyleValue(styleValue) {
|
|
33842
33808
|
try {
|
|
33843
|
-
const css =
|
|
33809
|
+
const css = StyleToObject(styleValue);
|
|
33844
33810
|
const normalizedCss = normalizeBackgroundColor(css);
|
|
33845
33811
|
return Object.entries(normalizedCss)
|
|
33846
33812
|
.filter(([key]) => allowedCssProperties.includes(key))
|
|
@@ -34080,7 +34046,7 @@ async function markdownToHTML(text, options) {
|
|
|
34080
34046
|
.use(remarkRehype, { allowDangerousHtml: true })
|
|
34081
34047
|
.use(rehypeRaw)
|
|
34082
34048
|
.use(createLinksPlugin())
|
|
34083
|
-
.use(rehypeSanitize,
|
|
34049
|
+
.use(rehypeSanitize, getWhiteList((_a = options === null || options === void 0 ? void 0 : options.whitelist) !== null && _a !== void 0 ? _a : []))
|
|
34084
34050
|
.use(() => {
|
|
34085
34051
|
return (tree) => {
|
|
34086
34052
|
// Run the sanitizeStyle function on all elements, to sanitize
|
|
@@ -34104,7 +34070,7 @@ async function markdownToHTML(text, options) {
|
|
|
34104
34070
|
async function sanitizeHTML(html, whitelist) {
|
|
34105
34071
|
const file = await unified()
|
|
34106
34072
|
.use(rehypeParse)
|
|
34107
|
-
.use(rehypeSanitize,
|
|
34073
|
+
.use(rehypeSanitize, getWhiteList(whitelist !== null && whitelist !== void 0 ? whitelist : []))
|
|
34108
34074
|
.use(() => {
|
|
34109
34075
|
return (tree) => {
|
|
34110
34076
|
// Run the sanitizeStyle function on all elements, to sanitize
|
|
@@ -34123,13 +34089,40 @@ function getWhiteList(allowedComponents) {
|
|
|
34123
34089
|
return attr !== 'height';
|
|
34124
34090
|
});
|
|
34125
34091
|
asteriskAttributeWhitelist.push('style');
|
|
34126
|
-
const whitelist = Object.assign(Object.assign({}, defaultSchema), {
|
|
34092
|
+
const whitelist = Object.assign(Object.assign({}, defaultSchema), {
|
|
34093
|
+
// Disable rehype-sanitize's default `user-content-` prefix, which it
|
|
34094
|
+
// otherwise prepends to the DOM-clobber attributes (`id`, `name`,
|
|
34095
|
+
// `aria-describedby`, `aria-labelledby`).
|
|
34096
|
+
//
|
|
34097
|
+
// Without this, whitelisted custom elements break: e.g.
|
|
34098
|
+
// `<limel-icon name="globe">` becomes `name="user-content-globe"` and
|
|
34099
|
+
// the icon no longer resolves. It also keeps GFM footnote ids
|
|
34100
|
+
// consistent with the links that reference them — remark-rehype already
|
|
34101
|
+
// namespaces those with `user-content-`, and a second prefix here would
|
|
34102
|
+
// desync the id (`user-content-user-content-fn-1`) from its link
|
|
34103
|
+
// (`#user-content-fn-1`).
|
|
34104
|
+
//
|
|
34105
|
+
// Set here, in the shared schema, so that both `markdownToHTML` and
|
|
34106
|
+
// `sanitizeHTML` behave identically — the same content must not be
|
|
34107
|
+
// prefixed on one path and left unprefixed on the other.
|
|
34108
|
+
//
|
|
34109
|
+
// Safe to disable here because every current consumer renders this
|
|
34110
|
+
// output inside a shadow root (`limel-markdown` and `limel-text-editor`
|
|
34111
|
+
// are both `shadow: true`). Unprefixed `id`/`name` attributes inside a
|
|
34112
|
+
// shadow root cannot clobber document-level globals
|
|
34113
|
+
// (`document.getElementById`, `window.<name>`, `document.forms`), which
|
|
34114
|
+
// is what the prefix guards against. If a future consumer renders this
|
|
34115
|
+
// output into the light DOM — or these functions become public exports
|
|
34116
|
+
// — reinstate the prefix or scope its removal to whitelisted custom
|
|
34117
|
+
// elements only.
|
|
34118
|
+
clobberPrefix: '', strip: [...((_b = defaultSchema.strip) !== null && _b !== void 0 ? _b : []), 'style'], tagNames: [
|
|
34127
34119
|
...(defaultSchema.tagNames || []),
|
|
34128
34120
|
...allowedComponents.map((component) => component.tagName),
|
|
34129
34121
|
], attributes: Object.assign(Object.assign({}, defaultSchema.attributes), { p: [
|
|
34130
34122
|
...((_c = defaultSchema.attributes.p) !== null && _c !== void 0 ? _c : []),
|
|
34131
34123
|
['className', 'MsoNormal'],
|
|
34132
|
-
], a: [...((_d = defaultSchema.attributes.a) !== null && _d !== void 0 ? _d : []), 'referrerpolicy'], '*': asteriskAttributeWhitelist })
|
|
34124
|
+
], a: [...((_d = defaultSchema.attributes.a) !== null && _d !== void 0 ? _d : []), 'referrerpolicy'], '*': asteriskAttributeWhitelist })
|
|
34125
|
+
});
|
|
34133
34126
|
for (const component of allowedComponents) {
|
|
34134
34127
|
whitelist.attributes[component.tagName] = component.attributes;
|
|
34135
34128
|
}
|