@revolist/ui 4.0.1-rc → 4.0.1
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/LICENSE +21 -0
- package/MIGRATION.md +36 -0
- package/OWNERSHIP.md +32 -32
- package/README.md +405 -264
- package/_button.scss +6 -2
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/calendar-DJqiFwFT.js +258 -0
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
- package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
- package/_chunks/choice-chips-yr6Uzmof.js +126 -0
- package/_chunks/clock-BOhPNlW3.js +4 -0
- package/_chunks/color-palette-DMJUChWC.js +92 -0
- package/_chunks/{color-picker-BRv-__AM.js → color-picker-CMWxQlWt.js} +61 -56
- package/_chunks/component-DyWiItBR.js +878 -0
- package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BKd7U8OW.js} +0 -12
- package/_chunks/configurator-actions-DCodxcUw.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/control-CbOYUakE.js +118 -0
- package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
- package/_chunks/controls-DD1qvPfE.js +650 -0
- package/_chunks/{date-control-CYCkb1aQ.js → date-control-XI2cpKI_.js} +21 -21
- package/_chunks/date-time-CGJdC1Qa.js +807 -0
- package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
- package/_chunks/dialog.parts-CJ3FVxC9.js +131 -0
- package/_chunks/duration-CBJWK82T.js +272 -0
- package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-B-qtIwx1.js +288 -0
- package/_chunks/field-context-D57PnBbH.js +5 -0
- package/_chunks/framework-mount-Bk4O_T7T.js +54 -0
- package/_chunks/hooks.module-CG3gN83z.js +157 -0
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-C7i5gsKI.js +267 -0
- package/_chunks/native-Blr3byjO.js +32 -0
- package/_chunks/native-control-B9MNibfa.js +649 -0
- package/_chunks/{number-input-NnH57J4j.js → number-input-CgbZes5B.js} +89 -89
- package/_chunks/picker-DqpjDC90.js +122 -0
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/popup-C35Isk7p.js +378 -0
- package/_chunks/preact.module-BBM36DnO.js +290 -0
- package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-WDrfiluf.js} +10 -10
- package/_chunks/render-m5eMMwFR.js +83 -0
- package/_chunks/reorder-list-C4HSda4n.js +59 -0
- package/_chunks/request-trail-SHynDFdM.js +762 -0
- package/_chunks/rich-text-CtjqRvv8.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
- package/_chunks/selection-list-tooltips-BtWjpP6M.js +41 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/_dialog.scss +55 -21
- package/_form.scss +71 -21
- package/_legend.scss +25 -7
- package/_shared/data-query/index.d.ts +2 -2
- package/_shared/data-query/load-options.d.ts +2 -2
- package/_variables.scss +34 -32
- package/_vendor/preact/LICENSE +21 -0
- package/_vendor/preact/compat/src/index.d.ts +353 -0
- package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
- package/_vendor/preact/compat/src/suspense.d.ts +19 -0
- package/_vendor/preact/hooks/src/index.d.ts +145 -0
- package/_vendor/preact/src/dom.d.ts +2548 -0
- package/_vendor/preact/src/index.d.ts +373 -0
- package/_vendor/preact/src/jsx.d.ts +2958 -0
- package/_view-switcher.scss +6 -0
- package/activity-message.d.ts +2 -2
- package/activity-message.js +16 -16
- package/ai/_chat.scss +227 -0
- package/ai/_style.scss +170 -39
- package/ai/chat.d.ts +65 -0
- package/ai/components.d.ts +35 -6
- package/ai/index.d.ts +3 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +59 -6
- package/ai/prompt-history.d.ts +13 -0
- package/ai/request-trail.d.ts +9 -3
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +27 -0
- package/ai/translation-context.d.ts +1 -1
- package/ai/translations.d.ts +1 -1
- package/alert.d.ts +2 -2
- package/angular/angular.d.ts +1 -1
- package/angular/angular.js +13 -10
- package/assignee/assignee.scss +28 -6
- package/assignee/field.d.ts +2 -2
- package/assignee/index.js +86 -87
- package/assignee/layout.d.ts +2 -2
- package/assignee/picker.d.ts +1 -1
- package/avatar/avatar.style.scss +23 -6
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +42 -41
- package/badge.d.ts +1 -1
- package/badge.view.d.ts +8 -0
- package/brush-range/_brush-range.scss +55 -49
- package/brush-range/component.d.ts +2 -4
- package/brush-range/component.js +19 -19
- package/buttons/delete-button.d.ts +2 -1
- package/buttons/delete-button.js +1 -1
- package/buttons/delete-button.style.scss +6 -2
- package/buttons/remove-button.d.ts +2 -2
- package/buttons/remove-button.js +3 -3
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +3 -2
- package/buttons/svg-button.js +23 -23
- package/calendar/_calendar.scss +27 -26
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/caption.d.ts +1 -1
- package/calendar/day.d.ts +1 -1
- package/calendar/day.js +4 -4
- package/calendar/header.d.ts +1 -1
- package/calendar/header.js +34 -35
- package/calendar/index.js +2 -2
- package/calendar/month-grid.d.ts +1 -1
- package/calendar/month-grid.js +37 -37
- package/calendar/picker.d.ts +1 -1
- package/calendar/types.d.ts +1 -1
- package/calendar/year-grid.d.ts +1 -1
- package/calendar/year-grid.js +12 -12
- package/cell-input.scss +3 -7
- package/cell-visuals/badge.style.scss +6 -3
- package/cell-visuals/bar-chart.style.scss +2 -1
- package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
- package/cell-visuals/progress-line.style.scss +1 -4
- package/cell-visuals/sparkline.style.scss +2 -1
- package/cell-visuals/timeline.style.css +4 -2
- package/checkbox/checkbox.scss +6 -24
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.js +9 -9
- package/choice-chips/index.d.ts +4 -2
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.d.ts +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +88 -25
- package/color-palette/color-picker.d.ts +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/color-picker.style.scss +23 -10
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/component-catalog.d.ts +42 -29
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +63 -0
- package/configurator-drop-zone.d.ts +39 -0
- package/configurator-drop-zone.js +66 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-attributes.js +7 -7
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +31 -26
- package/controls.d.ts +23 -11
- package/controls.js +4 -3
- package/core/editor-commit.d.ts +1 -1
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +5 -1
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/selection-list-tooltips.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/date-control.d.ts +2 -2
- package/date-time/field.d.ts +4 -3
- package/date-time/index.js +1 -1
- package/date-time/picker.d.ts +1 -1
- package/date-time/style.scss +242 -39
- package/date-time/time-control.d.ts +1 -1
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +6 -2
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +53 -53
- package/dialog/dialog.parts.d.ts +18 -18
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.d.ts +1 -1
- package/dialog/dialog.preact.js +6 -6
- package/distribution-chart/_distribution-chart.scss +113 -77
- package/distribution-chart/area-chart.d.ts +1 -1
- package/distribution-chart/area-chart.js +25 -25
- package/distribution-chart/bar-chart.d.ts +6 -3
- package/distribution-chart/bar-chart.js +10 -6
- package/distribution-chart/chart-frame.d.ts +3 -2
- package/distribution-chart/index.d.ts +2 -2
- package/distribution-chart/index.js +6 -6
- package/distribution-chart/line-chart.d.ts +1 -1
- package/distribution-chart/line-chart.js +9 -9
- package/distribution-chart/types.d.ts +1 -1
- package/dropdown/content.d.ts +3 -2
- package/dropdown/content.js +1 -141
- package/dropdown/control.d.ts +14 -0
- package/dropdown/control.js +1 -0
- package/dropdown/control.view.d.ts +6 -0
- package/dropdown/dropdown.service.d.ts +1 -1
- package/dropdown/dropdown.service.js +9 -9
- package/dropdown/dropdown.types.d.ts +5 -1
- package/dropdown/editor-dropdown.style.scss +54 -16
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +3 -4
- package/dropdown/lookup-field.d.ts +6 -1
- package/dropdown/lookup-field.js +42 -41
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -140
- package/duration/controls.d.ts +1 -1
- package/duration/index.d.ts +2 -2
- package/duration/index.js +1 -1
- package/duration/style.scss +1 -1
- package/editor-actions.d.ts +1 -1
- package/editor-actions.js +21 -20
- package/editor-layout/index.d.ts +5 -5
- package/editor-layout/index.js +43 -38
- package/editor-layout/style.scss +82 -18
- package/field-configurator.d.ts +40 -2
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/field-reorder.hook.js +32 -32
- package/fieldset.d.ts +3 -0
- package/filter/filters/slider/_single-slider.scss +57 -38
- package/filter/filters/slider/_slider.scss +41 -33
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/preact.js +3 -3
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.d.ts +1 -1
- package/filter/filters/slider/single.js +23 -23
- package/filter-badge.d.ts +1 -1
- package/filter-badge.js +23 -22
- package/filter-controls.d.ts +1 -2
- package/filter-controls.js +29 -30
- package/form-controls/field-context.d.ts +5 -0
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +17 -22
- package/form-controls/presentation.d.ts +2 -2
- package/form-controls/presentation.js +59 -51
- package/formatting/comparison-preview.d.ts +1 -1
- package/formatting/icon-controls.d.ts +1 -1
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +106 -100
- package/formatting/inspector-section.d.ts +1 -1
- package/formatting/styles.scss +14 -57
- package/formatting/typography-controls.d.ts +1 -1
- package/framework-mount.d.ts +1 -1
- package/framework.js +237 -226
- package/history-controls.d.ts +14 -0
- package/history-controls.js +27 -0
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/icons/icon.d.ts +2 -2
- package/icons/icon.js +1 -1
- package/legend.d.ts +2 -2
- package/legend.js +12 -12
- package/masked-input/index.d.ts +1 -1
- package/masked-input/index.js +109 -109
- package/native-control.d.ts +14 -13
- package/native-control.js +3 -26
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native-styles.scss +6 -2
- package/native.d.ts +3 -3
- package/native.js +49 -45
- package/number-input/index.d.ts +2 -2
- package/number-input/index.js +1 -1
- package/package.json +88 -15
- package/pagination.d.ts +3 -0
- package/pagination.js +50 -40
- package/pdf-viewer/component.d.ts +1 -1
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +2 -2
- package/pdf-viewer/index.d.ts +2 -2
- package/pdf-viewer/index.js +13 -13
- package/pdf-viewer/search-bar.d.ts +2 -2
- package/pdf-viewer/status.d.ts +2 -2
- package/pdf-viewer/style.scss +205 -45
- package/pdf-viewer/toolbar.d.ts +1 -1
- package/pickers.d.ts +6 -2
- package/preact-mount.d.ts +1 -1
- package/preact-mount.js +2 -2
- package/preact.d.ts +15 -10
- package/preact.js +109 -64
- package/progress/_bar.scss +9 -3
- package/progress/_circular.scss +2 -1
- package/rating-choice.d.ts +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +5 -3
- package/react-control.d.ts +1 -0
- package/react.d.ts +20 -11
- package/react.js +72 -88
- package/reorder-list.d.ts +2 -2
- package/reorder-list.js +1 -1
- package/reorder-list.scss +59 -17
- package/resource-picker/resource-picker-avatar.d.ts +1 -1
- package/resource-picker/resource-picker-avatar.js +14 -14
- package/resource-picker/resource-picker-option.d.ts +1 -1
- package/resource-picker/resource-picker-option.js +28 -28
- package/resource-picker/resource-picker-popup.d.ts +1 -1
- package/resource-picker/resource-picker-popup.js +3 -3
- package/resource-picker/resource-picker.d.ts +1 -1
- package/resource-picker/resource-picker.js +68 -66
- package/resource-picker/resource-picker.scss +66 -35
- package/rich-text/engine.d.ts +17 -19
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +11 -7
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +6 -3
- package/rich-text/render-model.d.ts +4 -5
- package/rich-text/style.scss +295 -55
- package/rich-text/syntax.d.ts +5 -2
- package/rich-text/toolbar.d.ts +7 -7
- package/rich-text/translations.d.ts +5 -15
- package/search-input/index.js +12 -12
- package/search-input/native.d.ts +21 -2
- package/segmented-switch/index.d.ts +1 -1
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +22 -0
- package/select.js +1 -0
- package/selection-list.d.ts +1 -0
- package/selection-list.js +3 -1
- package/status-feedback/exit-snapshot.js +1 -1
- package/status-feedback/index.js +2 -2
- package/status-feedback/popover.js +9 -9
- package/status-feedback/render.d.ts +2 -2
- package/status-feedback/render.js +3 -44
- package/status-feedback/status-feedback.scss +130 -34
- package/status-feedback/types.d.ts +4 -0
- package/status-feedback/use-auto-dismiss.d.ts +3 -0
- package/styles/_activity-message.scss +24 -7
- package/styles/_alert.scss +78 -17
- package/styles/_cell-editor-frame.scss +11 -0
- package/styles/_compositions.scss +404 -82
- package/styles/_control.scss +42 -12
- package/styles/_disclosure.scss +15 -5
- package/styles/_editor-counter.scss +16 -6
- package/styles/_editor-slider.scss +8 -4
- package/styles/_field-configurator.scss +321 -23
- package/styles/_fields-grid.scss +49 -0
- package/styles/_filter-controls.scss +10 -2
- package/styles/_icon-action.scss +48 -15
- package/styles/_loading.scss +12 -3
- package/styles/_motion.scss +32 -9
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +376 -116
- package/styles/_theme.scss +130 -86
- package/styles/_thresholds.scss +28 -25
- package/styles/_time-grid.scss +8 -3
- package/styles/_tokens.scss +6 -1
- package/styles/configurator-actions.scss +241 -0
- package/styles/pagination.css +213 -0
- package/styles/{legacy-rating.css → rating.css} +8 -3
- package/styles.css +1 -1
- package/styles.scss +3 -5
- package/surfaces.d.ts +38 -2
- package/surfaces.js +37 -134
- package/svelte/UiComponent.server.js +1 -48
- package/svelte/UiComponent.svelte +44 -32
- package/svelte.d.ts +1 -1
- package/svelte.js +33 -68
- package/switch/index.js +3 -2
- package/time-grid.d.ts +1 -2
- package/time-grid.js +43 -42
- package/timeline-track/_style.scss +96 -24
- package/timeline-track/component.d.ts +5 -1
- package/timeline-track/index.js +91 -74
- package/timeline-track/model.d.ts +9 -0
- package/timeline-track/model.js +10 -1
- package/ui.css +1 -1
- package/view-switcher.d.ts +23 -0
- package/vue-adapter.d.ts +1 -1
- package/vue.d.ts +160 -144
- package/vue.js +149 -178
- package/_chunks/calendar-BsDxCYhI.js +0 -248
- package/_chunks/chart-frame-BvxbmEU9.js +0 -126
- package/_chunks/choice-chips-0HfOnK_4.js +0 -110
- package/_chunks/color-palette-BmZ7kH9R.js +0 -94
- package/_chunks/component-D4PH5UZT.js +0 -859
- package/_chunks/control-tooltip-BCNzQCXE.js +0 -100
- package/_chunks/controls-NEL5tDaz.js +0 -615
- package/_chunks/date-time-DjucJmbc.js +0 -769
- package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
- package/_chunks/dropdown-CkGQBm1Q.js +0 -357
- package/_chunks/duration-BCaktcvz.js +0 -270
- package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
- package/_chunks/editor-popup-B7fu_A_T.js +0 -81
- package/_chunks/framework-mount-BKIOsvY-.js +0 -54
- package/_chunks/mount-0-8opf1j.js +0 -90
- package/_chunks/native.view-8q_nwQ7x.js +0 -32
- package/_chunks/picker-oazJ7sO_.js +0 -121
- package/_chunks/reorder-list-BV3kZXso.js +0 -59
- package/_chunks/request-trail-D0oVzdRd.js +0 -347
- package/_chunks/rich-text-2Rla349o.js +0 -477
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -12
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/react-native-select.d.ts +0 -6
- package/search-input/native.view.d.ts +0 -21
- package/styles/legacy-pagination.css +0 -112
- package/surfaces.view.d.ts +0 -63
- package/vue-native-select.d.ts +0 -9
|
@@ -1,477 +0,0 @@
|
|
|
1
|
-
import { SvgIcon as e } from "../icons/icon.js";
|
|
2
|
-
import { Input as t, TextArea as n } from "../native-control.js";
|
|
3
|
-
import { F as r, I as i, L as a, R as o, n as s } from "./controls-NEL5tDaz.js";
|
|
4
|
-
import { SegmentedSwitch as c } from "../segmented-switch/index.js";
|
|
5
|
-
import { n as l } from "./editor-commit-D6Rf5rGz.js";
|
|
6
|
-
import { EditorActions as u } from "../editor-actions.js";
|
|
7
|
-
import { useEffect as d, useRef as f, useState as p } from "preact/hooks";
|
|
8
|
-
import { jsx as m, jsxs as h } from "preact/jsx-runtime";
|
|
9
|
-
import { $convertFromMarkdownString as g, $convertToMarkdownString as _, HIGHLIGHT as v, TRANSFORMERS as y, registerMarkdownShortcuts as b } from "@lexical/markdown";
|
|
10
|
-
import { $createParagraphNode as x, $getRoot as S, $getSelection as C, $isElementNode as w, $isRangeSelection as T, $isTextNode as E, $setSelection as D, COMMAND_PRIORITY_HIGH as O, FORMAT_TEXT_COMMAND as k, PASTE_COMMAND as A, createEditor as j } from "lexical";
|
|
11
|
-
import { $createHeadingNode as M, $createQuoteNode as ee, $isHeadingNode as N, $isQuoteNode as P, HeadingNode as F, QuoteNode as I, registerRichText as te } from "@lexical/rich-text";
|
|
12
|
-
import { $isListNode as L, INSERT_ORDERED_LIST_COMMAND as ne, INSERT_UNORDERED_LIST_COMMAND as re, ListItemNode as R, ListNode as z, REMOVE_LIST_COMMAND as ie, registerList as ae } from "@lexical/list";
|
|
13
|
-
import { $isLinkNode as B, $toggleLink as oe, LinkNode as V } from "@lexical/link";
|
|
14
|
-
import { $createCodeNode as se, $isCodeNode as H, CodeNode as U } from "@lexical/code";
|
|
15
|
-
import { $setBlocksType as ce } from "@lexical/selection";
|
|
16
|
-
import { createEmptyHistoryState as le, registerHistory as ue } from "@lexical/history";
|
|
17
|
-
//#region src/rich-text/syntax.ts
|
|
18
|
-
var W = y.filter((e) => e !== v);
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/rich-text/model.ts
|
|
21
|
-
function G(e) {
|
|
22
|
-
let t = e.replace(/^([`~])\1{2,}[^\n]*\n[\s\S]*?^\1{3,}[^\n]*$/gm, "").replace(/`[^`\n]+`/g, ""), n = [];
|
|
23
|
-
return /!\[[^\]]*\](?:\(|\[)/.test(t) && n.push("Images"), /^\s*\|?.*\|.*\n\s*\|?\s*:?-{3,}:?\s*\|/m.test(t) && n.push("Tables"), /<\/?[A-Za-z][^>]*>/.test(t) && n.push("HTML"), (/^\s*\[[^\]]+\]:\s*\S+/m.test(t) || /\[[^\]]+\]\[[^\]]*\]/.test(t)) && n.push("Reference links"), /^\s*[-*+] \[[ xX]\]/m.test(t) && n.push("Task lists"), /^ {0,3}(?:(?:\*\s*){3,}|(?:-\s*){3,}|(?:_\s*){3,})$/m.test(t) && n.push("Horizontal rules"), /^.+\n {0,3}(?:={3,}|-{3,})\s*$/m.test(t) && n.push("Alternate headings"), /(?:^|\n[ \t]*\n)(?: {4}|\t)\S/.test(t) && n.push("Indented code"), /==[^=\n]+==/.test(t) && n.push("Highlight"), /^\s*:::|\[\^[^\]]+\]/m.test(t) && n.push("Extensions"), n;
|
|
24
|
-
}
|
|
25
|
-
function K(e) {
|
|
26
|
-
if (!e || /[\u0000-\u0020\u007f]/.test(e)) return !1;
|
|
27
|
-
try {
|
|
28
|
-
return [
|
|
29
|
-
"https:",
|
|
30
|
-
"http:",
|
|
31
|
-
"mailto:"
|
|
32
|
-
].includes(new URL(e, "https://editor.invalid/").protocol);
|
|
33
|
-
} catch {
|
|
34
|
-
return !1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/rich-text/engine.ts
|
|
39
|
-
var q = {
|
|
40
|
-
formats: [],
|
|
41
|
-
block: null,
|
|
42
|
-
link: !1
|
|
43
|
-
};
|
|
44
|
-
function de() {
|
|
45
|
-
let e = C();
|
|
46
|
-
if (!T(e)) return q;
|
|
47
|
-
let t = e.anchor.getNode(), n = [t, ...t.getParents()], r = n.find((e) => N(e) || P(e) || H(e) || L(e));
|
|
48
|
-
return {
|
|
49
|
-
formats: [
|
|
50
|
-
"bold",
|
|
51
|
-
"italic",
|
|
52
|
-
"strikethrough",
|
|
53
|
-
"code"
|
|
54
|
-
].filter((t) => e.hasFormat(t)),
|
|
55
|
-
block: N(r) ? r.getTag() : L(r) ? r.getListType() === "number" ? "ordered" : "bullet" : P(r) ? "quote" : H(r) ? "code" : "paragraph",
|
|
56
|
-
link: n.some(B)
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function fe(e, t, n, r = () => {}) {
|
|
60
|
-
let i = j({
|
|
61
|
-
namespace: "RevoMarkdown",
|
|
62
|
-
nodes: [
|
|
63
|
-
F,
|
|
64
|
-
I,
|
|
65
|
-
z,
|
|
66
|
-
R,
|
|
67
|
-
V,
|
|
68
|
-
U
|
|
69
|
-
],
|
|
70
|
-
onError: (e) => {
|
|
71
|
-
throw e;
|
|
72
|
-
},
|
|
73
|
-
theme: { text: {
|
|
74
|
-
bold: "rv-markdown-bold",
|
|
75
|
-
italic: "rv-markdown-italic",
|
|
76
|
-
strikethrough: "rv-markdown-strike",
|
|
77
|
-
code: "rv-markdown-inline-code"
|
|
78
|
-
} }
|
|
79
|
-
});
|
|
80
|
-
i.setRootElement(e);
|
|
81
|
-
let a = [
|
|
82
|
-
i.registerCommand(k, (e) => ![
|
|
83
|
-
"bold",
|
|
84
|
-
"italic",
|
|
85
|
-
"strikethrough",
|
|
86
|
-
"code"
|
|
87
|
-
].includes(e), O),
|
|
88
|
-
te(i),
|
|
89
|
-
ae(i),
|
|
90
|
-
ue(i, le(), 300),
|
|
91
|
-
b(i, W)
|
|
92
|
-
];
|
|
93
|
-
a.push(i.registerCommand(A, (e) => {
|
|
94
|
-
if (!e || !("clipboardData" in e) || !e.clipboardData) return !1;
|
|
95
|
-
let t = e.clipboardData.getData("text/plain");
|
|
96
|
-
e.preventDefault();
|
|
97
|
-
let n = C();
|
|
98
|
-
return T(n) && n.insertRawText(t), !0;
|
|
99
|
-
}, O));
|
|
100
|
-
let o = null, s = (e) => i.update(() => {
|
|
101
|
-
g(e, W);
|
|
102
|
-
}, {
|
|
103
|
-
tag: "markdown-source",
|
|
104
|
-
discrete: !0
|
|
105
|
-
});
|
|
106
|
-
return s(t), a.push(i.registerUpdateListener(({ editorState: e, dirtyElements: t, dirtyLeaves: i, tags: a }) => {
|
|
107
|
-
e.read(() => r(de())), !(a.has("markdown-source") || !t.size && !i.size) && e.read(() => {
|
|
108
|
-
let e = S().getAllTextNodes().some((e) => {
|
|
109
|
-
let t = e.getParent();
|
|
110
|
-
return B(t) && !K(t.getURL());
|
|
111
|
-
});
|
|
112
|
-
n(_(W), e);
|
|
113
|
-
});
|
|
114
|
-
})), {
|
|
115
|
-
editor: i,
|
|
116
|
-
setMarkdown: s,
|
|
117
|
-
format: (e) => {
|
|
118
|
-
i.dispatchCommand(k, e), i.focus();
|
|
119
|
-
},
|
|
120
|
-
block: (e) => {
|
|
121
|
-
e === "paragraph" && i.dispatchCommand(ie, void 0), e === "bullet" || e === "ordered" ? i.dispatchCommand(e === "bullet" ? re : ne, void 0) : i.update(() => ce(C(), () => e === "paragraph" ? x() : e === "code" ? se() : e === "quote" ? ee() : M(e))), i.focus();
|
|
122
|
-
},
|
|
123
|
-
captureSelection: () => i.getEditorState().read(() => {
|
|
124
|
-
o = C()?.clone() ?? null;
|
|
125
|
-
}),
|
|
126
|
-
link: (e) => K(e) ? (i.update(() => {
|
|
127
|
-
o && D(o.clone()), oe(e, { rel: "noopener noreferrer" });
|
|
128
|
-
}), i.focus(), !0) : !1,
|
|
129
|
-
destroy: () => {
|
|
130
|
-
a.forEach((e) => e()), i.setRootElement(null);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
function J(e) {
|
|
135
|
-
let t = j({
|
|
136
|
-
namespace: "RevoMarkdownValidation",
|
|
137
|
-
nodes: [
|
|
138
|
-
F,
|
|
139
|
-
I,
|
|
140
|
-
z,
|
|
141
|
-
R,
|
|
142
|
-
V,
|
|
143
|
-
U
|
|
144
|
-
],
|
|
145
|
-
onError: (e) => {
|
|
146
|
-
throw e;
|
|
147
|
-
}
|
|
148
|
-
}), n = !1;
|
|
149
|
-
return t.update(() => {
|
|
150
|
-
g(e, W), n = S().getAllTextNodes().some((e) => {
|
|
151
|
-
let t = e.getParent();
|
|
152
|
-
return B(t) && !K(t.getURL());
|
|
153
|
-
});
|
|
154
|
-
}, { discrete: !0 }), n;
|
|
155
|
-
}
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/bold.svg?raw
|
|
158
|
-
var pe = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l32 0 0 320-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c70.7 0 128-57.3 128-128 0-46.5-24.8-87.3-62-109.7 18.7-22.3 30-51 30-82.3 0-70.7-57.3-128-128-128L32 32zM288 160c0 35.3-28.7 64-64 64l-96 0 0-128 96 0c35.3 0 64 28.7 64 64zM128 416l0-128 128 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-128 0z\"/></svg>", me = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M128 64c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-58.7 0-133.3 320 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l58.7 0 133.3-320-64 0c-17.7 0-32-14.3-32-32z\"/></svg>", he = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M96 157.5C96 88.2 152.2 32 221.5 32L368 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L221.5 96c-34 0-61.5 27.5-61.5 61.5 0 31 23.1 57.2 53.9 61l44.1 5.5 222 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l83.1 0C103 204.6 96 181.8 96 157.5zM349.2 336l65.5 0c.9 6.1 1.4 12.2 1.4 18.5 0 69.3-56.2 125.5-125.5 125.5L144 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l146.5 0c34 0 61.5-27.5 61.5-61.5 0-6.4-1-12.7-2.8-18.5z\"/></svg>", ge = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M360.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm64.6 136.1c-12.5 12.5-12.5 32.8 0 45.3l73.4 73.4-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0zm-274.7 0c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 150.6 182.6c12.5-12.5 12.5-32.8 0-45.3z\"/></svg>", Y = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 64C0 46.3 14.3 32 32 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 112 224 0 0-112-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 320 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-144-224 0 0 144 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-320-16 0C14.3 96 0 81.7 0 64z\"/></svg>", _e = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l64 0 0 320-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-352c0-17.7-14.3-32-32-32L32 32z\"/></svg>", ve = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M48 64c0-17.7 14.3-32 32-32l171 0c60.2 0 109 48.8 109 109 0 43.8-26.2 83.3-66.4 100.4l-139.1 59C119 315.4 96 350.2 96 388.7l0 27.3 224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32l0-59.3c0-64.2 38.4-122.2 97.5-147.3l139.1-59c16.6-7.1 27.4-23.4 27.4-41.4 0-24.9-20.2-45-45-45L80 96C62.3 96 48 81.7 48 64z\"/></svg>", ye = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M48 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM48 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM96 256a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"/></svg>", be = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 72C0 58.8 10.7 48 24 48l48 0c13.3 0 24 10.7 24 24l0 104 24 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-80-24 0C10.7 96 0 85.3 0 72zM30.4 301.2C41.8 292.6 55.7 288 70 288l4.9 0c33.7 0 61.1 27.4 61.1 61.1 0 19.6-9.4 37.9-25.2 49.4l-24 17.5 33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-90.7 0C13.1 464 0 450.9 0 434.7 0 425.3 4.5 416.5 12.1 411l70.5-51.3c3.4-2.5 5.4-6.4 5.4-10.6 0-7.2-5.9-13.1-13.1-13.1L70 336c-3.9 0-7.7 1.3-10.8 3.6L38.4 355.2c-10.6 8-25.6 5.8-33.6-4.8S-1 324.8 9.6 316.8l20.8-15.6zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"/></svg>", xe = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 216C0 149.7 53.7 96 120 96l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64L0 216zm256 0c0-66.3 53.7-120 120-120l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-136z\"/></svg>", Se = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM154.2 295.6c8.6-10.1 7.5-25.2-2.6-33.8s-25.2-7.5-33.8 2.6l-48 56c-7.7 9-7.7 22.2 0 31.2l48 56c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8l-34.6-40.4 34.6-40.4zm112-31.2c-8.6-10.1-23.8-11.2-33.8-2.6s-11.2 23.8-2.6 33.8l34.6 40.4-34.6 40.4c-8.6 10.1-7.5 25.2 2.6 33.8s25.2 7.5 33.8-2.6l48-56c7.7-9 7.7-22.2 0-31.2l-48-56z\"/></svg>", Ce = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z\"/></svg>";
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/rich-text/toolbar.tsx
|
|
161
|
-
function X({ engine: t, selection: n, text: s, showLink: c, onLink: l }) {
|
|
162
|
-
let u = (t, n, i, a, o) => /* @__PURE__ */ h(r, {
|
|
163
|
-
size: "compact",
|
|
164
|
-
className: "rv-markdown-editor__command",
|
|
165
|
-
"aria-label": t,
|
|
166
|
-
title: t,
|
|
167
|
-
pressed: i,
|
|
168
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
169
|
-
onPressedChange: a,
|
|
170
|
-
children: [/* @__PURE__ */ m(e, { svg: n }), o && /* @__PURE__ */ m(e, {
|
|
171
|
-
svg: o,
|
|
172
|
-
className: "rv-svg-icon rv-markdown-editor__level"
|
|
173
|
-
})]
|
|
174
|
-
}), d = (e, r, i, a) => u(e, r, n.block === i, () => t()?.block(n.block === i ? "paragraph" : i), a);
|
|
175
|
-
return /* @__PURE__ */ h(i, {
|
|
176
|
-
className: "rv-markdown-editor__toolbar",
|
|
177
|
-
label: s.formatting,
|
|
178
|
-
children: [
|
|
179
|
-
/* @__PURE__ */ h(a, {
|
|
180
|
-
label: s.inlineFormatting,
|
|
181
|
-
children: [
|
|
182
|
-
u(s.bold, pe, n.formats.includes("bold"), () => t()?.format("bold")),
|
|
183
|
-
u(s.italic, me, n.formats.includes("italic"), () => t()?.format("italic")),
|
|
184
|
-
u(s.strike, he, n.formats.includes("strikethrough"), () => t()?.format("strikethrough")),
|
|
185
|
-
u(s.code, ge, n.formats.includes("code"), () => t()?.format("code"))
|
|
186
|
-
]
|
|
187
|
-
}),
|
|
188
|
-
/* @__PURE__ */ m(o, {}),
|
|
189
|
-
/* @__PURE__ */ h(a, {
|
|
190
|
-
label: s.headings,
|
|
191
|
-
children: [d(s.heading1, Y, "h1", _e), d(s.heading2, Y, "h2", ve)]
|
|
192
|
-
}),
|
|
193
|
-
/* @__PURE__ */ m(o, {}),
|
|
194
|
-
/* @__PURE__ */ h(a, {
|
|
195
|
-
label: s.structure,
|
|
196
|
-
children: [
|
|
197
|
-
d(s.bullets, ye, "bullet"),
|
|
198
|
-
d(s.numberedList, be, "ordered"),
|
|
199
|
-
d(s.quote, xe, "quote"),
|
|
200
|
-
d(s.codeBlock, Se, "code")
|
|
201
|
-
]
|
|
202
|
-
}),
|
|
203
|
-
/* @__PURE__ */ m(o, {}),
|
|
204
|
-
/* @__PURE__ */ m(a, {
|
|
205
|
-
label: s.links,
|
|
206
|
-
children: u(s.link, Ce, c || n.link, l)
|
|
207
|
-
})
|
|
208
|
-
]
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/rich-text/translations.ts
|
|
213
|
-
var Z = {
|
|
214
|
-
visual: "Visual",
|
|
215
|
-
source: "Markdown",
|
|
216
|
-
label: "Rich text",
|
|
217
|
-
unsupported: "Keep this content in Markdown mode to preserve unsupported syntax:",
|
|
218
|
-
unsafeLink: "Use an HTTP, HTTPS, mailto or relative link.",
|
|
219
|
-
requiredValue: "Enter a value.",
|
|
220
|
-
tooLong: "The value exceeds the maximum length.",
|
|
221
|
-
link: "Add link",
|
|
222
|
-
linkUrl: "Link URL",
|
|
223
|
-
popupLabel: "Edit rich text",
|
|
224
|
-
formatting: "Text formatting",
|
|
225
|
-
inlineFormatting: "Inline formatting",
|
|
226
|
-
headings: "Headings",
|
|
227
|
-
structure: "Lists and blocks",
|
|
228
|
-
links: "Links",
|
|
229
|
-
bold: "Bold",
|
|
230
|
-
italic: "Italic",
|
|
231
|
-
strike: "Strike",
|
|
232
|
-
code: "Code",
|
|
233
|
-
heading1: "H1",
|
|
234
|
-
heading2: "H2",
|
|
235
|
-
bullets: "Bullets",
|
|
236
|
-
numberedList: "Numbered list",
|
|
237
|
-
quote: "Quote",
|
|
238
|
-
codeBlock: "Code block",
|
|
239
|
-
images: "Images",
|
|
240
|
-
tables: "Tables",
|
|
241
|
-
html: "HTML",
|
|
242
|
-
referenceLinks: "Reference links",
|
|
243
|
-
taskLists: "Task lists",
|
|
244
|
-
horizontalRules: "Horizontal rules",
|
|
245
|
-
alternateHeadings: "Alternate headings",
|
|
246
|
-
highlight: "Highlight",
|
|
247
|
-
extensions: "Extensions",
|
|
248
|
-
indentedCode: "Indented code"
|
|
249
|
-
}, we = {
|
|
250
|
-
Images: "images",
|
|
251
|
-
Tables: "tables",
|
|
252
|
-
HTML: "html",
|
|
253
|
-
"Reference links": "referenceLinks",
|
|
254
|
-
"Task lists": "taskLists",
|
|
255
|
-
"Horizontal rules": "horizontalRules",
|
|
256
|
-
"Alternate headings": "alternateHeadings",
|
|
257
|
-
Highlight: "highlight",
|
|
258
|
-
Extensions: "extensions",
|
|
259
|
-
"Indented code": "indentedCode"
|
|
260
|
-
};
|
|
261
|
-
function Q(e, t) {
|
|
262
|
-
return e.map((e) => t[we[e]] ?? e).join(", ");
|
|
263
|
-
}
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/rich-text/render-model.ts
|
|
266
|
-
var $ = /* @__PURE__ */ new Map();
|
|
267
|
-
function Te(e) {
|
|
268
|
-
let t = $.get(e);
|
|
269
|
-
if (t) return t;
|
|
270
|
-
let n;
|
|
271
|
-
if (G(e).length) n = [{ text: e }];
|
|
272
|
-
else {
|
|
273
|
-
let t = j({
|
|
274
|
-
namespace: "RevoMarkdownRenderer",
|
|
275
|
-
nodes: [
|
|
276
|
-
F,
|
|
277
|
-
I,
|
|
278
|
-
z,
|
|
279
|
-
R,
|
|
280
|
-
V,
|
|
281
|
-
U
|
|
282
|
-
],
|
|
283
|
-
onError: (e) => {
|
|
284
|
-
throw e;
|
|
285
|
-
}
|
|
286
|
-
}), r = (e) => {
|
|
287
|
-
if (E(e)) {
|
|
288
|
-
let t = { text: e.getTextContent() };
|
|
289
|
-
for (let [n, r] of [
|
|
290
|
-
["code", "code"],
|
|
291
|
-
["strikethrough", "s"],
|
|
292
|
-
["italic", "em"],
|
|
293
|
-
["bold", "strong"]
|
|
294
|
-
]) e.hasFormat(n) && (t = {
|
|
295
|
-
tag: r,
|
|
296
|
-
children: [t]
|
|
297
|
-
});
|
|
298
|
-
return t;
|
|
299
|
-
}
|
|
300
|
-
if (e.getType() === "linebreak") return { tag: "br" };
|
|
301
|
-
let t = w(e) ? e.getChildren().map(r) : [{ text: e.getTextContent() }];
|
|
302
|
-
if (B(e)) return K(e.getURL()) ? {
|
|
303
|
-
tag: "a",
|
|
304
|
-
attrs: {
|
|
305
|
-
href: e.getURL(),
|
|
306
|
-
rel: "noopener noreferrer"
|
|
307
|
-
},
|
|
308
|
-
children: t
|
|
309
|
-
} : {
|
|
310
|
-
tag: "span",
|
|
311
|
-
children: t
|
|
312
|
-
};
|
|
313
|
-
if (N(e)) return {
|
|
314
|
-
tag: e.getTag(),
|
|
315
|
-
children: t
|
|
316
|
-
};
|
|
317
|
-
if (L(e)) return {
|
|
318
|
-
tag: e.getListType() === "number" ? "ol" : "ul",
|
|
319
|
-
attrs: e.getListType() === "number" ? { start: e.getStart() } : void 0,
|
|
320
|
-
children: t
|
|
321
|
-
};
|
|
322
|
-
switch (e.getType()) {
|
|
323
|
-
case "paragraph": return {
|
|
324
|
-
tag: "p",
|
|
325
|
-
children: t
|
|
326
|
-
};
|
|
327
|
-
case "quote": return {
|
|
328
|
-
tag: "blockquote",
|
|
329
|
-
children: t
|
|
330
|
-
};
|
|
331
|
-
case "listitem": return {
|
|
332
|
-
tag: "li",
|
|
333
|
-
children: t
|
|
334
|
-
};
|
|
335
|
-
case "code": return {
|
|
336
|
-
tag: "pre",
|
|
337
|
-
children: [{
|
|
338
|
-
tag: "code",
|
|
339
|
-
children: t
|
|
340
|
-
}]
|
|
341
|
-
};
|
|
342
|
-
default: return {
|
|
343
|
-
tag: "span",
|
|
344
|
-
children: t
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
t.update(() => {
|
|
349
|
-
g(e, W);
|
|
350
|
-
}, { discrete: !0 }), n = t.getEditorState().read(() => S().getChildren().map(r));
|
|
351
|
-
}
|
|
352
|
-
return e.length <= 5e4 && ($.size >= 100 && $.delete($.keys().next().value), $.set(e, n)), n;
|
|
353
|
-
}
|
|
354
|
-
//#endregion
|
|
355
|
-
//#region src/rich-text/index.tsx
|
|
356
|
-
function Ee(e) {
|
|
357
|
-
let r = {
|
|
358
|
-
...Z,
|
|
359
|
-
...e.text
|
|
360
|
-
}, [i, a] = p(e.value), [o] = p(() => !G(e.value).length && !J(e.value)), [g, _] = p(o ? "visual" : "source"), [v, y] = p(""), [b, x] = p(q), [S, C] = p(""), [w, T] = p(!1), E = f(!1), D = f(null), O = f(), k = f(i);
|
|
361
|
-
k.current = i, d(() => {
|
|
362
|
-
if (D.current) return O.current = fe(D.current, o ? e.value : "", (e, t) => {
|
|
363
|
-
E.current = !0, k.current = e, a(e), y(t ? r.unsafeLink : "");
|
|
364
|
-
}, x), () => {
|
|
365
|
-
O.current?.destroy(), O.current = void 0;
|
|
366
|
-
};
|
|
367
|
-
}, []);
|
|
368
|
-
let A = () => {
|
|
369
|
-
let t = E.current ? k.current : e.value;
|
|
370
|
-
return J(t) ? (y(r.unsafeLink), !1) : e.required && !t.trim() ? (y(r.requiredValue), !1) : e.maxLength !== void 0 && t.length > e.maxLength ? (y(r.tooLong), !1) : (e.onApply(t), !0);
|
|
371
|
-
};
|
|
372
|
-
l(() => !E.current || k.current === e.value || A(), e.autoApply !== !1);
|
|
373
|
-
let j = G(i), M = v === r.unsafeLink || !!e.required && !i.trim() || e.maxLength !== void 0 && i.length > e.maxLength;
|
|
374
|
-
return /* @__PURE__ */ h("div", {
|
|
375
|
-
class: "rv-markdown-editor",
|
|
376
|
-
onKeyDown: (e) => {
|
|
377
|
-
(e.ctrlKey || e.metaKey) && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), A());
|
|
378
|
-
},
|
|
379
|
-
children: [
|
|
380
|
-
/* @__PURE__ */ m(c, {
|
|
381
|
-
value: g,
|
|
382
|
-
ariaLabel: r.label,
|
|
383
|
-
options: [{
|
|
384
|
-
value: "visual",
|
|
385
|
-
label: r.visual
|
|
386
|
-
}, {
|
|
387
|
-
value: "source",
|
|
388
|
-
label: r.source
|
|
389
|
-
}],
|
|
390
|
-
onChange: (e) => {
|
|
391
|
-
if (e === "visual") {
|
|
392
|
-
if (j.length) {
|
|
393
|
-
y(`${r.unsupported} ${Q(j, r)}`);
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
if (J(i)) {
|
|
397
|
-
y(r.unsafeLink);
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
O.current?.setMarkdown(i);
|
|
401
|
-
}
|
|
402
|
-
_(e), y("");
|
|
403
|
-
}
|
|
404
|
-
}),
|
|
405
|
-
g === "visual" && /* @__PURE__ */ m(X, {
|
|
406
|
-
engine: () => O.current,
|
|
407
|
-
selection: b,
|
|
408
|
-
text: r,
|
|
409
|
-
showLink: w,
|
|
410
|
-
onLink: () => {
|
|
411
|
-
O.current?.captureSelection(), T(!w);
|
|
412
|
-
}
|
|
413
|
-
}),
|
|
414
|
-
w && g === "visual" && /* @__PURE__ */ h("div", {
|
|
415
|
-
class: "rv-markdown-editor__link",
|
|
416
|
-
children: [/* @__PURE__ */ m(t, {
|
|
417
|
-
"aria-label": r.linkUrl,
|
|
418
|
-
value: S,
|
|
419
|
-
onInput: (e) => C(e.currentTarget.value)
|
|
420
|
-
}), /* @__PURE__ */ m(s, {
|
|
421
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
422
|
-
onClick: () => {
|
|
423
|
-
O.current?.link(S) ? (T(!1), y("")) : y(r.unsafeLink);
|
|
424
|
-
},
|
|
425
|
-
children: r.link
|
|
426
|
-
})]
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ m("div", {
|
|
429
|
-
ref: D,
|
|
430
|
-
hidden: g !== "visual",
|
|
431
|
-
class: "rv-markdown-editor__visual",
|
|
432
|
-
role: "textbox",
|
|
433
|
-
"aria-label": r.label,
|
|
434
|
-
"aria-multiline": "true",
|
|
435
|
-
"aria-invalid": M || void 0,
|
|
436
|
-
contentEditable: !0,
|
|
437
|
-
onClick: (e) => {
|
|
438
|
-
e.target.closest("a") && e.preventDefault();
|
|
439
|
-
}
|
|
440
|
-
}),
|
|
441
|
-
g === "source" && /* @__PURE__ */ m(n, {
|
|
442
|
-
class: "rv-markdown-editor__source",
|
|
443
|
-
"aria-label": r.source,
|
|
444
|
-
"aria-invalid": M || void 0,
|
|
445
|
-
value: i,
|
|
446
|
-
onInput: (e) => {
|
|
447
|
-
E.current = !0, k.current = e.currentTarget.value, a(e.currentTarget.value), y("");
|
|
448
|
-
}
|
|
449
|
-
}),
|
|
450
|
-
j.length > 0 && g === "source" && /* @__PURE__ */ h("p", {
|
|
451
|
-
role: "status",
|
|
452
|
-
children: [
|
|
453
|
-
r.unsupported,
|
|
454
|
-
" ",
|
|
455
|
-
Q(j, r)
|
|
456
|
-
]
|
|
457
|
-
}),
|
|
458
|
-
v && /* @__PURE__ */ m("p", {
|
|
459
|
-
class: "rv-editor-error",
|
|
460
|
-
role: "alert",
|
|
461
|
-
children: v
|
|
462
|
-
}),
|
|
463
|
-
/* @__PURE__ */ m(u, {
|
|
464
|
-
showConfirm: e.showActions ?? e.autoApply === !1,
|
|
465
|
-
text: e.actions,
|
|
466
|
-
disabled: M,
|
|
467
|
-
cancel: e.onCancel,
|
|
468
|
-
apply: A,
|
|
469
|
-
clear: e.required ? void 0 : () => {
|
|
470
|
-
E.current = !0, k.current = "", a(""), O.current?.setMarkdown(""), y(""), e.autoApply !== !1 && A();
|
|
471
|
-
}
|
|
472
|
-
})
|
|
473
|
-
]
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
//#endregion
|
|
477
|
-
export { G as a, K as i, Te as n, Z as r, Ee as t };
|
package/avatar/index.view.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { h } from 'preact';
|
|
2
|
-
export { AVATAR_CELL_BACKGROUNDS } from '../color-palette/common-palettes';
|
|
3
|
-
export type AvatarTemplateOptions = {
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
index?: number;
|
|
7
|
-
initials?: string;
|
|
8
|
-
key?: string | number;
|
|
9
|
-
label?: string;
|
|
10
|
-
rectangular?: boolean;
|
|
11
|
-
size?: number;
|
|
12
|
-
style?: Record<string, string | number | null | undefined>;
|
|
13
|
-
value?: unknown;
|
|
14
|
-
};
|
|
15
|
-
/** Shared Preact avatar, including image-error fallback. */
|
|
16
|
-
export declare function AvatarElement({ options }: {
|
|
17
|
-
options?: AvatarTemplateOptions;
|
|
18
|
-
}): h.JSX.Element;
|
|
19
|
-
export declare function createAvatarElement(document: Document, options?: AvatarTemplateOptions): HTMLSpanElement;
|
|
20
|
-
export declare function getAvatarCellBackground(index?: number): "linear-gradient(135deg, #7dd3fc, #2563eb)" | "linear-gradient(135deg, #facc15, #b45309)" | "linear-gradient(135deg, #f9a8d4, #be185d)" | "linear-gradient(135deg, #a5b4fc, #4f46e5)" | "linear-gradient(135deg, #86efac, #15803d)" | "linear-gradient(135deg, #fda4af, #be123c)" | "linear-gradient(135deg, #c4b5fd, #7c3aed)" | "linear-gradient(135deg, #fdba74, #c2410c)";
|
|
21
|
-
export declare function getAvatarInitials(value: unknown): string;
|
|
22
|
-
export declare function getAvatarIndex(value: unknown): number;
|
|
23
|
-
export declare function avatarTemplate(h: any, options?: AvatarTemplateOptions): any;
|
|
24
|
-
/** Shared avatar-and-label presentation; resource/row lookup stays with consumers. */
|
|
25
|
-
export declare function avatarWithTextTemplate(h: any, options?: AvatarTemplateOptions): any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface NativeColorPickerProps {
|
|
2
|
-
label: string;
|
|
3
|
-
value?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
optional?: boolean;
|
|
6
|
-
defaultLabel: string;
|
|
7
|
-
customLabel: string;
|
|
8
|
-
invalidColor?: string;
|
|
9
|
-
colorLabels: Readonly<Record<string, string>>;
|
|
10
|
-
onChange(value: string | undefined): void;
|
|
11
|
-
}
|
|
12
|
-
/** Compatibility mount API; palette markup and interaction belong to ColorPicker. */
|
|
13
|
-
export declare function mountColorPicker(host: HTMLElement, props: NativeColorPickerProps): {
|
|
14
|
-
destroy(): void;
|
|
15
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ControlTag, ControlAttributes } from './control-attributes';
|
|
2
|
-
export * from './control-attributes';
|
|
3
|
-
export declare function renderControl<H extends (...args: any[]) => any>(h: H, tag: ControlTag, attributes?: ControlAttributes | null, ...children: any[]): ReturnType<H>;
|
|
4
|
-
export declare function createControl<K extends ControlTag>(document: Document, tag: K, attributes?: ControlAttributes): HTMLElementTagNameMap[K];
|
|
5
|
-
export declare function registerControl<T extends object>(component: T, tag: ControlTag): T;
|
|
6
|
-
export declare function nativeControlTag(type: unknown): string | undefined;
|
|
7
|
-
/** Decorate a native icon control after installing its trusted bundled SVG. */
|
|
8
|
-
export declare function decorateIconAction(element: HTMLElement, label: string): void;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { h } from 'preact';
|
|
2
|
-
import { ElementFactory } from '../native-controls';
|
|
3
|
-
export interface NativeDialogAction {
|
|
4
|
-
label?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
}
|
|
8
|
-
export interface NativeDialogActionFooterProps {
|
|
9
|
-
cancel?: NativeDialogAction | false;
|
|
10
|
-
save?: NativeDialogAction | false;
|
|
11
|
-
deleteAction?: NativeDialogAction | false;
|
|
12
|
-
reset?: NativeDialogAction | false;
|
|
13
|
-
}
|
|
14
|
-
/** One TSX composition for Preact consumers and element-returning host adapters. */
|
|
15
|
-
export declare function ActionFooterView({ cancel, save, deleteAction, reset, start, end, children, actionsClass, class: className, ...props }: Record<string, any>): h.JSX.Element;
|
|
16
|
-
/** Compatibility signature retained for existing Preact consumers. */
|
|
17
|
-
export declare function renderDialogActionFooter<H extends ElementFactory>(_h: H, props: Record<string, any>): ReturnType<H>;
|
|
18
|
-
export declare function mountDialogActionFooter(host: HTMLElement, props: NativeDialogActionFooterProps): {
|
|
19
|
-
destroy(): void;
|
|
20
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DialogButtonVariant, DialogOpenOptions } from './dialog.types';
|
|
2
|
-
export interface DialogElements {
|
|
3
|
-
readonly root: HTMLElement;
|
|
4
|
-
readonly surface: HTMLElement;
|
|
5
|
-
readonly header: HTMLElement;
|
|
6
|
-
readonly body: HTMLElement;
|
|
7
|
-
readonly footer: HTMLElement;
|
|
8
|
-
readonly actions: HTMLElement;
|
|
9
|
-
}
|
|
10
|
-
/** Element-returning compatibility API; shared TSX owns the entire dialog chrome. */
|
|
11
|
-
export declare function createDialogElements(document: Document, options: DialogOpenOptions, close: () => void): DialogElements;
|
|
12
|
-
export declare function createDialogCloseButton(document: Document, label: string, close: () => void): HTMLButtonElement;
|
|
13
|
-
export declare function createDialogButton(document: Document, label: string, action: () => void, variant?: DialogButtonVariant): HTMLButtonElement;
|
|
14
|
-
export declare function trapDialogFocus(root: HTMLElement, event: KeyboardEvent): void;
|
|
15
|
-
export declare function getDialogFocusableElements(root: HTMLElement): HTMLElement[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface FormFieldOptions {
|
|
2
|
-
readonly label: string;
|
|
3
|
-
readonly control: HTMLElement;
|
|
4
|
-
readonly hint?: string;
|
|
5
|
-
readonly className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function createFormField(document: Document, options: FormFieldOptions): HTMLLabelElement;
|
|
8
|
-
export declare function createTextControl(document: Document, placeholder: string): HTMLInputElement;
|
|
9
|
-
export declare function createSelectControl(document: Document, options: readonly {
|
|
10
|
-
value: string;
|
|
11
|
-
label: string;
|
|
12
|
-
}[]): HTMLSelectElement;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { h, TargetedEvent } from 'preact';
|
|
2
|
-
export declare function useControlTooltip(text: string, floating?: boolean, presentation?: {
|
|
3
|
-
className?: string;
|
|
4
|
-
placement?: 'above';
|
|
5
|
-
}): {
|
|
6
|
-
readonly id: string;
|
|
7
|
-
readonly hide: () => void;
|
|
8
|
-
readonly triggerProps: {
|
|
9
|
-
readonly 'aria-describedby': string;
|
|
10
|
-
readonly onFocus: (event: TargetedEvent<HTMLElement>) => void;
|
|
11
|
-
readonly onBlur: () => void;
|
|
12
|
-
readonly onMouseEnter: (event: TargetedEvent<HTMLElement>) => void;
|
|
13
|
-
readonly onMouseLeave: () => void;
|
|
14
|
-
readonly onPointerDown: (event: TargetedEvent<HTMLElement>) => void;
|
|
15
|
-
readonly onPointerCancel: () => void;
|
|
16
|
-
readonly onKeyDown: (event: KeyboardEvent) => void;
|
|
17
|
-
};
|
|
18
|
-
readonly tooltip: h.JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
export declare function ControlTooltip({ id, text, visible, anchor, className, placement, }: {
|
|
21
|
-
readonly id: string;
|
|
22
|
-
readonly text: string;
|
|
23
|
-
readonly visible: boolean;
|
|
24
|
-
readonly anchor?: HTMLElement | null;
|
|
25
|
-
readonly className?: string;
|
|
26
|
-
readonly placement?: 'above';
|
|
27
|
-
}): h.JSX.Element;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/** Renderer-neutral controls shared by native DOM, Stencil and Preact hosts. */
|
|
2
|
-
export type ElementFactory = (...args: any[]) => any;
|
|
3
|
-
export declare function renderLoadingIndicator<H extends ElementFactory>(h: H, options: {
|
|
4
|
-
className?: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
ref?: (element?: HTMLElement) => void;
|
|
7
|
-
showSpinner?: boolean;
|
|
8
|
-
}): ReturnType<H>;
|
|
9
|
-
export declare function createButtonElement(document: Document, options: {
|
|
10
|
-
label: string;
|
|
11
|
-
text?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
className?: string;
|
|
14
|
-
onClick?: (event: MouseEvent) => void;
|
|
15
|
-
}): HTMLButtonElement;
|
|
16
|
-
export declare function renderMenuItem<H extends ElementFactory>(h: H, options: {
|
|
17
|
-
label: string;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
submenu: boolean;
|
|
20
|
-
onActivate: () => void;
|
|
21
|
-
style?: string;
|
|
22
|
-
}): ReturnType<H>;
|
|
23
|
-
export declare function renderRatingStars<H extends ElementFactory>(h: H, value: number, maximum?: number): ReturnType<H>[];
|
|
24
|
-
export interface ScalarSliderOptions {
|
|
25
|
-
min: number;
|
|
26
|
-
max: number;
|
|
27
|
-
step: number;
|
|
28
|
-
value: number;
|
|
29
|
-
hideValue?: boolean;
|
|
30
|
-
displayValue?: string | number;
|
|
31
|
-
formatValue?: (value: number) => string | number;
|
|
32
|
-
thresholdClassNames?: string;
|
|
33
|
-
thresholds?: readonly {
|
|
34
|
-
value: number;
|
|
35
|
-
className: string;
|
|
36
|
-
}[];
|
|
37
|
-
label?: string;
|
|
38
|
-
onChange: (value: number, event: Event) => void;
|
|
39
|
-
onMouseDown?: (event: MouseEvent) => void;
|
|
40
|
-
}
|
|
41
|
-
/** Shared scalar slider presentation; edit commits and threshold policy are caller-owned. */
|
|
42
|
-
export declare function renderScalarSlider<H extends ElementFactory>(h: H, options: ScalarSliderOptions): ReturnType<H>;
|
|
43
|
-
export interface CounterOptions {
|
|
44
|
-
value: number;
|
|
45
|
-
min: number;
|
|
46
|
-
max: number;
|
|
47
|
-
step: number;
|
|
48
|
-
hideValue?: boolean;
|
|
49
|
-
onChange: (value: number, event: MouseEvent) => void;
|
|
50
|
-
decreaseLabel?: string;
|
|
51
|
-
increaseLabel?: string;
|
|
52
|
-
onMouseDown?: (event: MouseEvent) => void;
|
|
53
|
-
}
|
|
54
|
-
export declare function renderCounter<H extends ElementFactory>(h: H, options: CounterOptions): ReturnType<H>;
|