@threadlabs/looma 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3K45IWIJ.js +4733 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-UHHA4WT5.js +2916 -0
- package/dist/declarative-generated.cjs +135 -0
- package/dist/declarative-generated.d.cts +10 -0
- package/dist/declarative-generated.d.ts +10 -0
- package/dist/declarative-generated.js +111 -0
- package/dist/declarative.cjs +2944 -0
- package/dist/declarative.d.cts +27 -0
- package/dist/declarative.d.ts +27 -0
- package/dist/declarative.js +13 -0
- package/dist/index.cjs +7480 -6457
- package/dist/index.d.cts +4 -58
- package/dist/index.d.ts +4 -58
- package/dist/index.js +15 -27
- package/dist/loader.cjs +7654 -0
- package/dist/loader.d.cts +4 -0
- package/dist/loader.d.ts +4 -0
- package/dist/loader.js +16 -0
- package/dist/valibot.cjs +31 -0
- package/dist/valibot.d.cts +10 -0
- package/dist/valibot.d.ts +1 -43
- package/dist/valibot.js +2 -0
- package/dist/{types/field/validation.d.ts → validation-bxcou-l-.d.cts} +13 -11
- package/dist/validation-bxcou-l-.d.ts +58 -0
- package/editor/{chunk-B5WVJOPV.js → chunk-BXICJBWS.js} +118 -8
- package/editor/{chunk-ZOUKEZ77.js → chunk-JK53ENSG.js} +8 -21
- package/editor/chunk-WI7ZA44X.js +2558 -0
- package/editor/extensions/index.d.ts +11 -2
- package/editor/extensions/index.js +9 -7
- package/editor/index.d.ts +1 -1
- package/editor/index.js +10 -8
- package/editor/ui.js +2 -2
- package/editor.css +32 -0
- package/layout/index.cjs +466 -400
- package/layout/index.d.cts +1 -2
- package/layout/index.d.ts +1 -2
- package/layout/index.js +471 -395
- package/package.json +14 -5
- package/styles.css +8 -8
- package/vue/chunk-4DPYH3IT.js +3538 -0
- package/vue/editor/index.d.ts +17 -7
- package/vue/editor/index.js +53 -35
- package/vue/index.d.ts +48 -31
- package/vue/index.js +1 -1
- package/dist/chunk-24OTMNIU.js +0 -1617
- package/dist/chunk-D5WRORG6.js +0 -366
- package/dist/chunk-HNFCGIBP.js +0 -8
- package/dist/chunk-NB6DBRXQ.js +0 -323
- package/dist/chunk-OF57X5AR.js +0 -10
- package/dist/chunk-TL4FIE7X.js +0 -93
- package/dist/chunk-UL7UIUJZ.js +0 -20
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/controlled-state-BFya8rAX.js +0 -9
- package/dist/cjs/events-TcQIzpNv.js +0 -19
- package/dist/cjs/icons-BAdjrnhS.js +0 -680
- package/dist/cjs/id-CYbKpaYr.js +0 -9
- package/dist/cjs/index-BHG9Rpil.js +0 -1602
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/cjs/looma.cjs.js +0 -25
- package/dist/cjs/manager-Ce25WRtl.js +0 -95
- package/dist/cjs/positioning-CCR6ifPj.js +0 -426
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +0 -43
- package/dist/cjs/ui-avatar-group.cjs.entry.js +0 -43
- package/dist/cjs/ui-avatar.cjs.entry.js +0 -50
- package/dist/cjs/ui-badge.cjs.entry.js +0 -19
- package/dist/cjs/ui-button.cjs.entry.js +0 -75
- package/dist/cjs/ui-callout.cjs.entry.js +0 -27
- package/dist/cjs/ui-checkbox.cjs.entry.js +0 -97
- package/dist/cjs/ui-chip_2.cjs.entry.js +0 -258
- package/dist/cjs/ui-combobox.cjs.entry.js +0 -708
- package/dist/cjs/ui-context-menu.cjs.entry.js +0 -239
- package/dist/cjs/ui-dialog.cjs.entry.js +0 -131
- package/dist/cjs/ui-disclosure.cjs.entry.js +0 -112
- package/dist/cjs/ui-editable.cjs.entry.js +0 -100
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +0 -20
- package/dist/cjs/ui-form-field.cjs.entry.js +0 -114
- package/dist/cjs/ui-icon-button.cjs.entry.js +0 -23
- package/dist/cjs/ui-input.cjs.entry.js +0 -106
- package/dist/cjs/ui-menu-item.cjs.entry.js +0 -19
- package/dist/cjs/ui-menu.cjs.entry.js +0 -182
- package/dist/cjs/ui-popover.cjs.entry.js +0 -135
- package/dist/cjs/ui-radio-group.cjs.entry.js +0 -134
- package/dist/cjs/ui-radio.cjs.entry.js +0 -94
- package/dist/cjs/ui-search-result-row.cjs.entry.js +0 -47
- package/dist/cjs/ui-search-shell.cjs.entry.js +0 -39
- package/dist/cjs/ui-select.cjs.entry.js +0 -108
- package/dist/cjs/ui-switch.cjs.entry.js +0 -74
- package/dist/cjs/ui-tabs.cjs.entry.js +0 -118
- package/dist/cjs/ui-textarea.cjs.entry.js +0 -110
- package/dist/cjs/ui-toast-region.cjs.entry.js +0 -93
- package/dist/cjs/ui-top-bar.cjs.entry.js +0 -43
- package/dist/cjs/ui-tree-item.cjs.entry.js +0 -135
- package/dist/cjs/ui-tree.cjs.entry.js +0 -500
- package/dist/collection/collection-manifest.json +0 -45
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +0 -8
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +0 -70
- package/dist/collection/components/ui-avatar/ui-avatar.css +0 -35
- package/dist/collection/components/ui-avatar/ui-avatar.js +0 -130
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +0 -32
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +0 -95
- package/dist/collection/components/ui-badge/ui-badge.css +0 -90
- package/dist/collection/components/ui-badge/ui-badge.js +0 -62
- package/dist/collection/components/ui-button/ui-button.css +0 -121
- package/dist/collection/components/ui-button/ui-button.js +0 -141
- package/dist/collection/components/ui-callout/ui-callout.css +0 -74
- package/dist/collection/components/ui-callout/ui-callout.js +0 -59
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +0 -24
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +0 -228
- package/dist/collection/components/ui-chip/ui-chip.css +0 -57
- package/dist/collection/components/ui-chip/ui-chip.js +0 -67
- package/dist/collection/components/ui-combobox/ui-combobox.css +0 -47
- package/dist/collection/components/ui-combobox/ui-combobox.js +0 -1295
- package/dist/collection/components/ui-context-menu/ui-context-menu.css +0 -34
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +0 -311
- package/dist/collection/components/ui-dialog/ui-dialog.css +0 -72
- package/dist/collection/components/ui-dialog/ui-dialog.js +0 -242
- package/dist/collection/components/ui-disclosure/ui-disclosure.css +0 -7
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +0 -184
- package/dist/collection/components/ui-editable/ui-editable.css +0 -2
- package/dist/collection/components/ui-editable/ui-editable.js +0 -196
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +0 -73
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +0 -85
- package/dist/collection/components/ui-form-field/ui-form-field.css +0 -25
- package/dist/collection/components/ui-form-field/ui-form-field.js +0 -180
- package/dist/collection/components/ui-icon-button/ui-icon-button.css +0 -145
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +0 -128
- package/dist/collection/components/ui-input/ui-input.css +0 -48
- package/dist/collection/components/ui-input/ui-input.js +0 -217
- package/dist/collection/components/ui-menu/ui-menu.css +0 -73
- package/dist/collection/components/ui-menu/ui-menu.js +0 -280
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +0 -32
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +0 -64
- package/dist/collection/components/ui-popover/ui-popover.css +0 -58
- package/dist/collection/components/ui-popover/ui-popover.js +0 -232
- package/dist/collection/components/ui-radio/ui-radio.css +0 -22
- package/dist/collection/components/ui-radio/ui-radio.js +0 -226
- package/dist/collection/components/ui-radio-group/ui-radio-group.css +0 -10
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +0 -247
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +0 -80
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +0 -100
- package/dist/collection/components/ui-search-shell/ui-search-shell.css +0 -63
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +0 -46
- package/dist/collection/components/ui-select/ui-select.css +0 -64
- package/dist/collection/components/ui-select/ui-select.js +0 -218
- package/dist/collection/components/ui-switch/ui-switch.css +0 -63
- package/dist/collection/components/ui-switch/ui-switch.js +0 -185
- package/dist/collection/components/ui-tabs/ui-tabs.css +0 -68
- package/dist/collection/components/ui-tabs/ui-tabs.js +0 -190
- package/dist/collection/components/ui-textarea/ui-textarea.css +0 -49
- package/dist/collection/components/ui-textarea/ui-textarea.js +0 -241
- package/dist/collection/components/ui-toast-region/ui-toast-region.css +0 -59
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +0 -126
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +0 -43
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +0 -430
- package/dist/collection/components/ui-top-bar/ui-top-bar.css +0 -51
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +0 -52
- package/dist/collection/components/ui-tree/ui-tree.css +0 -12
- package/dist/collection/components/ui-tree/ui-tree.js +0 -515
- package/dist/collection/components/ui-tree-item/ui-tree-item.css +0 -217
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +0 -406
- package/dist/collection/field/combobox.js +0 -4
- package/dist/collection/field/editable.js +0 -1
- package/dist/collection/field/multi-combobox.js +0 -1
- package/dist/collection/field/valibot.js +0 -5
- package/dist/collection/field/validation.js +0 -62
- package/dist/collection/icons.js +0 -71
- package/dist/collection/input-modality.js +0 -24
- package/dist/collection/overlay/manager.js +0 -92
- package/dist/collection/overlay/positioning.js +0 -424
- package/dist/collection/utils/controlled-state.js +0 -4
- package/dist/collection/utils/drag-drop.js +0 -51
- package/dist/collection/utils/events.js +0 -13
- package/dist/collection/utils/id.js +0 -5
- package/dist/collection/utils/initials.js +0 -11
- package/dist/components/index.d.ts +0 -102
- package/dist/components/index.js +0 -1
- package/dist/components/p-6SWSrfmW.js +0 -1
- package/dist/components/p-B_DaIVEY.js +0 -1
- package/dist/components/p-Bh_1GxOD.js +0 -1
- package/dist/components/p-BnGhGgTH.js +0 -1
- package/dist/components/p-BzaB_bXo.js +0 -1
- package/dist/components/p-C-0syqXZ.js +0 -1
- package/dist/components/p-CoFximGM.js +0 -13
- package/dist/components/p-JwSoedEO.js +0 -1
- package/dist/components/p-Vc4ExHFc.js +0 -1
- package/dist/components/p-hgBUJRDa.js +0 -1
- package/dist/components/ui-affordance-scope.d.ts +0 -11
- package/dist/components/ui-affordance-scope.js +0 -1
- package/dist/components/ui-avatar-group.d.ts +0 -11
- package/dist/components/ui-avatar-group.js +0 -1
- package/dist/components/ui-avatar.d.ts +0 -11
- package/dist/components/ui-avatar.js +0 -1
- package/dist/components/ui-badge.d.ts +0 -11
- package/dist/components/ui-badge.js +0 -1
- package/dist/components/ui-button.d.ts +0 -11
- package/dist/components/ui-button.js +0 -1
- package/dist/components/ui-callout.d.ts +0 -11
- package/dist/components/ui-callout.js +0 -1
- package/dist/components/ui-checkbox.d.ts +0 -11
- package/dist/components/ui-checkbox.js +0 -1
- package/dist/components/ui-chip.d.ts +0 -11
- package/dist/components/ui-chip.js +0 -1
- package/dist/components/ui-combobox.d.ts +0 -11
- package/dist/components/ui-combobox.js +0 -1
- package/dist/components/ui-context-menu.d.ts +0 -11
- package/dist/components/ui-context-menu.js +0 -1
- package/dist/components/ui-dialog.d.ts +0 -11
- package/dist/components/ui-dialog.js +0 -1
- package/dist/components/ui-disclosure.d.ts +0 -11
- package/dist/components/ui-disclosure.js +0 -1
- package/dist/components/ui-editable.d.ts +0 -11
- package/dist/components/ui-editable.js +0 -1
- package/dist/components/ui-floating-action-button.d.ts +0 -11
- package/dist/components/ui-floating-action-button.js +0 -1
- package/dist/components/ui-form-field.d.ts +0 -11
- package/dist/components/ui-form-field.js +0 -1
- package/dist/components/ui-icon-button.d.ts +0 -11
- package/dist/components/ui-icon-button.js +0 -1
- package/dist/components/ui-input.d.ts +0 -11
- package/dist/components/ui-input.js +0 -1
- package/dist/components/ui-menu-item.d.ts +0 -11
- package/dist/components/ui-menu-item.js +0 -1
- package/dist/components/ui-menu.d.ts +0 -11
- package/dist/components/ui-menu.js +0 -1
- package/dist/components/ui-popover.d.ts +0 -11
- package/dist/components/ui-popover.js +0 -1
- package/dist/components/ui-radio-group.d.ts +0 -11
- package/dist/components/ui-radio-group.js +0 -1
- package/dist/components/ui-radio.d.ts +0 -11
- package/dist/components/ui-radio.js +0 -1
- package/dist/components/ui-search-result-row.d.ts +0 -11
- package/dist/components/ui-search-result-row.js +0 -1
- package/dist/components/ui-search-shell.d.ts +0 -11
- package/dist/components/ui-search-shell.js +0 -1
- package/dist/components/ui-select.d.ts +0 -11
- package/dist/components/ui-select.js +0 -1
- package/dist/components/ui-switch.d.ts +0 -11
- package/dist/components/ui-switch.js +0 -1
- package/dist/components/ui-tabs.d.ts +0 -11
- package/dist/components/ui-tabs.js +0 -1
- package/dist/components/ui-textarea.d.ts +0 -11
- package/dist/components/ui-textarea.js +0 -1
- package/dist/components/ui-toast-region.d.ts +0 -11
- package/dist/components/ui-toast-region.js +0 -1
- package/dist/components/ui-tooltip.d.ts +0 -11
- package/dist/components/ui-tooltip.js +0 -1
- package/dist/components/ui-top-bar.d.ts +0 -11
- package/dist/components/ui-top-bar.js +0 -1
- package/dist/components/ui-tree-item.d.ts +0 -11
- package/dist/components/ui-tree-item.js +0 -1
- package/dist/components/ui-tree.d.ts +0 -11
- package/dist/components/ui-tree.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/controlled-state-BnGhGgTH.js +0 -6
- package/dist/esm/events-JwSoedEO.js +0 -15
- package/dist/esm/icons-CoFximGM.js +0 -678
- package/dist/esm/id-hgBUJRDa.js +0 -7
- package/dist/esm/index-8BGiMGQ0.js +0 -1593
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -11
- package/dist/esm/looma.js +0 -21
- package/dist/esm/manager-C-0syqXZ.js +0 -91
- package/dist/esm/positioning-ZOr-2PSe.js +0 -421
- package/dist/esm/ui-affordance-scope.entry.js +0 -41
- package/dist/esm/ui-avatar-group.entry.js +0 -41
- package/dist/esm/ui-avatar.entry.js +0 -48
- package/dist/esm/ui-badge.entry.js +0 -17
- package/dist/esm/ui-button.entry.js +0 -73
- package/dist/esm/ui-callout.entry.js +0 -25
- package/dist/esm/ui-checkbox.entry.js +0 -95
- package/dist/esm/ui-chip_2.entry.js +0 -255
- package/dist/esm/ui-combobox.entry.js +0 -706
- package/dist/esm/ui-context-menu.entry.js +0 -237
- package/dist/esm/ui-dialog.entry.js +0 -129
- package/dist/esm/ui-disclosure.entry.js +0 -110
- package/dist/esm/ui-editable.entry.js +0 -98
- package/dist/esm/ui-floating-action-button.entry.js +0 -18
- package/dist/esm/ui-form-field.entry.js +0 -112
- package/dist/esm/ui-icon-button.entry.js +0 -21
- package/dist/esm/ui-input.entry.js +0 -104
- package/dist/esm/ui-menu-item.entry.js +0 -17
- package/dist/esm/ui-menu.entry.js +0 -180
- package/dist/esm/ui-popover.entry.js +0 -133
- package/dist/esm/ui-radio-group.entry.js +0 -132
- package/dist/esm/ui-radio.entry.js +0 -92
- package/dist/esm/ui-search-result-row.entry.js +0 -45
- package/dist/esm/ui-search-shell.entry.js +0 -37
- package/dist/esm/ui-select.entry.js +0 -106
- package/dist/esm/ui-switch.entry.js +0 -72
- package/dist/esm/ui-tabs.entry.js +0 -116
- package/dist/esm/ui-textarea.entry.js +0 -108
- package/dist/esm/ui-toast-region.entry.js +0 -91
- package/dist/esm/ui-top-bar.entry.js +0 -41
- package/dist/esm/ui-tree-item.entry.js +0 -133
- package/dist/esm/ui-tree.entry.js +0 -498
- package/dist/index.cjs.js +0 -1
- package/dist/looma/index.esm.js +0 -0
- package/dist/looma/looma.esm.js +0 -1
- package/dist/looma/p-08f80207.entry.js +0 -1
- package/dist/looma/p-0b5b8d9e.entry.js +0 -1
- package/dist/looma/p-1249a806.entry.js +0 -1
- package/dist/looma/p-16e0669d.entry.js +0 -1
- package/dist/looma/p-1c00670f.entry.js +0 -1
- package/dist/looma/p-1c5a7522.entry.js +0 -1
- package/dist/looma/p-22842f8c.entry.js +0 -1
- package/dist/looma/p-2915d5c0.entry.js +0 -1
- package/dist/looma/p-3b2961a6.entry.js +0 -1
- package/dist/looma/p-3f60f4c8.entry.js +0 -1
- package/dist/looma/p-424d6719.entry.js +0 -1
- package/dist/looma/p-4caccfce.entry.js +0 -1
- package/dist/looma/p-5fdcee1d.entry.js +0 -1
- package/dist/looma/p-6d8b99ee.entry.js +0 -1
- package/dist/looma/p-6f20d470.entry.js +0 -1
- package/dist/looma/p-7c0b5364.entry.js +0 -1
- package/dist/looma/p-8BGiMGQ0.js +0 -2
- package/dist/looma/p-8bdd9495.entry.js +0 -1
- package/dist/looma/p-99116a72.entry.js +0 -1
- package/dist/looma/p-9cfbf722.entry.js +0 -1
- package/dist/looma/p-9d2662ca.entry.js +0 -1
- package/dist/looma/p-9ff2fa19.entry.js +0 -1
- package/dist/looma/p-BnGhGgTH.js +0 -1
- package/dist/looma/p-C-0syqXZ.js +0 -1
- package/dist/looma/p-CoFximGM.js +0 -13
- package/dist/looma/p-DQuL1Twl.js +0 -1
- package/dist/looma/p-JwSoedEO.js +0 -1
- package/dist/looma/p-ZOr-2PSe.js +0 -1
- package/dist/looma/p-a2dd4c6c.entry.js +0 -1
- package/dist/looma/p-add67e4c.entry.js +0 -1
- package/dist/looma/p-b6ede6bb.entry.js +0 -1
- package/dist/looma/p-b76e2111.entry.js +0 -1
- package/dist/looma/p-ca2a54fd.entry.js +0 -1
- package/dist/looma/p-d372b0db.entry.js +0 -1
- package/dist/looma/p-d4825822.entry.js +0 -1
- package/dist/looma/p-d56571a2.entry.js +0 -1
- package/dist/looma/p-d5c3954f.entry.js +0 -1
- package/dist/looma/p-e604e906.entry.js +0 -1
- package/dist/looma/p-f1f7c5cb.entry.js +0 -1
- package/dist/looma/p-hgBUJRDa.js +0 -1
- package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +0 -11
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +0 -11
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +0 -11
- package/dist/types/components/ui-badge/ui-badge.d.ts +0 -5
- package/dist/types/components/ui-button/ui-button.d.ts +0 -13
- package/dist/types/components/ui-callout/ui-callout.d.ts +0 -6
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +0 -20
- package/dist/types/components/ui-chip/ui-chip.d.ts +0 -8
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +0 -128
- package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +0 -43
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +0 -27
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +0 -21
- package/dist/types/components/ui-editable/ui-editable.d.ts +0 -24
- package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +0 -6
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +0 -18
- package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +0 -9
- package/dist/types/components/ui-input/ui-input.d.ts +0 -19
- package/dist/types/components/ui-menu/ui-menu.d.ts +0 -28
- package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +0 -5
- package/dist/types/components/ui-popover/ui-popover.d.ts +0 -26
- package/dist/types/components/ui-radio/ui-radio.d.ts +0 -20
- package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +0 -21
- package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +0 -15
- package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +0 -9
- package/dist/types/components/ui-select/ui-select.d.ts +0 -20
- package/dist/types/components/ui-switch/ui-switch.d.ts +0 -16
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +0 -18
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +0 -20
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +0 -16
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +0 -57
- package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +0 -12
- package/dist/types/components/ui-tree/ui-tree.d.ts +0 -53
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +0 -44
- package/dist/types/components.d.ts +0 -1889
- package/dist/types/field/combobox.d.ts +0 -46
- package/dist/types/field/editable.d.ts +0 -5
- package/dist/types/field/multi-combobox.d.ts +0 -11
- package/dist/types/field/valibot.d.ts +0 -7
- package/dist/types/icons.d.ts +0 -53
- package/dist/types/input-modality.d.ts +0 -6
- package/dist/types/overlay/manager.d.ts +0 -17
- package/dist/types/overlay/positioning.d.ts +0 -74
- package/dist/types/stencil-public-runtime.d.ts +0 -1860
- package/dist/types/utils/controlled-state.d.ts +0 -4
- package/dist/types/utils/drag-drop.d.ts +0 -15
- package/dist/types/utils/events.d.ts +0 -4
- package/dist/types/utils/id.d.ts +0 -1
- package/dist/types/utils/initials.d.ts +0 -1
- package/dist/ui-affordance-scope.entry-L6TIXYOP.js +0 -54
- package/dist/ui-avatar-group.entry-TCAA6P72.js +0 -51
- package/dist/ui-avatar.entry-52DQ7VXA.js +0 -51
- package/dist/ui-badge.entry-2XCAA6LL.js +0 -22
- package/dist/ui-button.entry-MNFBMNSX.js +0 -83
- package/dist/ui-callout.entry-SSHT5TH2.js +0 -32
- package/dist/ui-checkbox.entry-LOWIWIWI.js +0 -111
- package/dist/ui-chip_2.entry-BIMTSF6C.js +0 -272
- package/dist/ui-combobox.entry-25Z4MN7N.js +0 -717
- package/dist/ui-context-menu.entry-YZDL5Y4M.js +0 -248
- package/dist/ui-dialog.entry-HIXZX5AB.js +0 -146
- package/dist/ui-disclosure.entry-2JZHZNDQ.js +0 -126
- package/dist/ui-editable.entry-U3VR3XPT.js +0 -110
- package/dist/ui-floating-action-button.entry-6S3QN3KJ.js +0 -23
- package/dist/ui-form-field.entry-GQOSMLHT.js +0 -120
- package/dist/ui-icon-button.entry-QJXKVDM6.js +0 -26
- package/dist/ui-input.entry-UWMQ6JMP.js +0 -114
- package/dist/ui-menu-item.entry-NHNZKKJS.js +0 -22
- package/dist/ui-menu.entry-D53RUJND.js +0 -192
- package/dist/ui-popover.entry-7ZSIWCFQ.js +0 -152
- package/dist/ui-radio-group.entry-37MSYIH4.js +0 -142
- package/dist/ui-radio.entry-7YGCDHXT.js +0 -108
- package/dist/ui-search-result-row.entry-6FCCLGAS.js +0 -50
- package/dist/ui-search-shell.entry-HSBEXPER.js +0 -41
- package/dist/ui-select.entry-GIDIAYRD.js +0 -117
- package/dist/ui-switch.entry-MYAL6XPC.js +0 -87
- package/dist/ui-tabs.entry-R4TEXQSD.js +0 -128
- package/dist/ui-textarea.entry-FW32JNDV.js +0 -119
- package/dist/ui-toast-region.entry-BTMFPKZF.js +0 -104
- package/dist/ui-top-bar.entry-5DQGJF3B.js +0 -49
- package/dist/ui-tree-item.entry-ADT7DSOS.js +0 -145
- package/dist/ui-tree.entry-7PYQ5RIN.js +0 -470
- package/editor/chunk-64GLF274.js +0 -1271
- package/layout/index.css +0 -387
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
- package/vue/chunk-ROMBQS2L.js +0 -352
package/dist/loader.d.ts
ADDED
package/dist/loader.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
records,
|
|
3
|
+
styles
|
|
4
|
+
} from "./chunk-3K45IWIJ.js";
|
|
5
|
+
import {
|
|
6
|
+
registerLoomaPackage
|
|
7
|
+
} from "./chunk-UHHA4WT5.js";
|
|
8
|
+
import "./chunk-MLKGABMK.js";
|
|
9
|
+
|
|
10
|
+
// src/loader.ts
|
|
11
|
+
function defineCustomElements() {
|
|
12
|
+
registerLoomaPackage("core", records, styles);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
defineCustomElements
|
|
16
|
+
};
|
package/dist/valibot.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/field/valibot.ts
|
|
20
|
+
var valibot_exports = {};
|
|
21
|
+
__export(valibot_exports, {
|
|
22
|
+
valibotField: () => valibotField
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(valibot_exports);
|
|
25
|
+
function valibotField(schema, options = {}) {
|
|
26
|
+
return { ...options, schema };
|
|
27
|
+
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
valibotField
|
|
31
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GenericSchema, GenericSchemaAsync, InferOutput } from 'valibot';
|
|
2
|
+
import { F as FieldValidation, f as FieldSchema } from './validation-bxcou-l-.cjs';
|
|
3
|
+
|
|
4
|
+
/** Valibot's Standard Schema implementation preserves async transforms and issue paths.
|
|
5
|
+
* Type-only Valibot imports keep the adapter free of a schema-library runtime. */
|
|
6
|
+
declare function valibotField<T extends GenericSchema | GenericSchemaAsync>(schema: T, options?: Omit<FieldValidation, 'schema'>): FieldValidation & {
|
|
7
|
+
schema: FieldSchema<InferOutput<T>>;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { valibotField };
|
package/dist/valibot.d.ts
CHANGED
|
@@ -1,47 +1,5 @@
|
|
|
1
1
|
import { GenericSchema, GenericSchemaAsync, InferOutput } from 'valibot';
|
|
2
|
-
|
|
3
|
-
/** Structural Standard Schema v1 boundary; no schema-library runtime dependency. */
|
|
4
|
-
interface FieldSchema<Output = unknown> {
|
|
5
|
-
readonly '~standard': {
|
|
6
|
-
readonly version: 1;
|
|
7
|
-
readonly vendor: string;
|
|
8
|
-
readonly validate: (value: unknown) => FieldSchemaResult<Output> | Promise<FieldSchemaResult<Output>>;
|
|
9
|
-
readonly types?: {
|
|
10
|
-
readonly input: unknown;
|
|
11
|
-
readonly output: Output;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
interface FieldIssue {
|
|
16
|
-
readonly message: string;
|
|
17
|
-
readonly path?: ReadonlyArray<PropertyKey | {
|
|
18
|
-
readonly key: PropertyKey;
|
|
19
|
-
}>;
|
|
20
|
-
readonly severity?: 'error' | 'warning';
|
|
21
|
-
}
|
|
22
|
-
type FieldSchemaResult<T = unknown> = {
|
|
23
|
-
readonly value: T;
|
|
24
|
-
readonly issues?: undefined;
|
|
25
|
-
} | {
|
|
26
|
-
readonly issues: readonly FieldIssue[];
|
|
27
|
-
};
|
|
28
|
-
interface FieldRequest<Context = unknown> {
|
|
29
|
-
raw: string;
|
|
30
|
-
value: string | null;
|
|
31
|
-
context: Context;
|
|
32
|
-
signal: AbortSignal;
|
|
33
|
-
}
|
|
34
|
-
interface FieldResult<Output = unknown> {
|
|
35
|
-
output?: Output;
|
|
36
|
-
issues: readonly FieldIssue[];
|
|
37
|
-
}
|
|
38
|
-
interface FieldValidation {
|
|
39
|
-
schema?: FieldSchema;
|
|
40
|
-
parse?: (raw: string, request: FieldRequest) => unknown | Promise<unknown>;
|
|
41
|
-
normalize?: (value: unknown, request: FieldRequest) => unknown | Promise<unknown>;
|
|
42
|
-
validator?: (value: unknown, request: FieldRequest) => Partial<FieldResult> | Promise<Partial<FieldResult>>;
|
|
43
|
-
issues?: readonly FieldIssue[];
|
|
44
|
-
}
|
|
2
|
+
import { F as FieldValidation, f as FieldSchema } from './validation-bxcou-l-.js';
|
|
45
3
|
|
|
46
4
|
/** Valibot's Standard Schema implementation preserves async transforms and issue paths.
|
|
47
5
|
* Type-only Valibot imports keep the adapter free of a schema-library runtime. */
|
package/dist/valibot.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Structural Standard Schema v1 boundary; no schema-library runtime dependency. */
|
|
2
|
-
|
|
2
|
+
interface FieldSchema<Output = unknown> {
|
|
3
3
|
readonly '~standard': {
|
|
4
4
|
readonly version: 1;
|
|
5
5
|
readonly vendor: string;
|
|
@@ -10,47 +10,49 @@ export interface FieldSchema<Output = unknown> {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
interface FieldIssue {
|
|
14
14
|
readonly message: string;
|
|
15
15
|
readonly path?: ReadonlyArray<PropertyKey | {
|
|
16
16
|
readonly key: PropertyKey;
|
|
17
17
|
}>;
|
|
18
18
|
readonly severity?: 'error' | 'warning';
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type FieldSchemaResult<T = unknown> = {
|
|
21
21
|
readonly value: T;
|
|
22
22
|
readonly issues?: undefined;
|
|
23
23
|
} | {
|
|
24
24
|
readonly issues: readonly FieldIssue[];
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
interface FieldRequest<Context = unknown> {
|
|
27
27
|
raw: string;
|
|
28
28
|
value: string | null;
|
|
29
29
|
context: Context;
|
|
30
30
|
signal: AbortSignal;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
interface FieldResult<Output = unknown> {
|
|
33
33
|
output?: Output;
|
|
34
34
|
issues: readonly FieldIssue[];
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
interface FieldValidation {
|
|
37
37
|
schema?: FieldSchema;
|
|
38
38
|
parse?: (raw: string, request: FieldRequest) => unknown | Promise<unknown>;
|
|
39
39
|
normalize?: (value: unknown, request: FieldRequest) => unknown | Promise<unknown>;
|
|
40
40
|
validator?: (value: unknown, request: FieldRequest) => Partial<FieldResult> | Promise<Partial<FieldResult>>;
|
|
41
41
|
issues?: readonly FieldIssue[];
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
interface FieldSelection {
|
|
44
44
|
start: number;
|
|
45
45
|
end: number;
|
|
46
46
|
direction?: 'forward' | 'backward' | 'none';
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
interface FieldFormat {
|
|
49
49
|
display: string;
|
|
50
50
|
selection: FieldSelection;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
type FieldFormatter = (raw: string, selection: FieldSelection) => FieldFormat | undefined;
|
|
53
53
|
/** Formatting is additive: every original character must survive in order.
|
|
54
54
|
* Normalization belongs to submitted output, never the visible editing buffer. */
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
declare function formatEditingValue(raw: string, selection: FieldSelection, format?: FieldFormatter): FieldFormat;
|
|
56
|
+
declare function validateField(request: FieldRequest, config: FieldValidation): Promise<FieldResult>;
|
|
57
|
+
|
|
58
|
+
export { type FieldValidation as F, type FieldFormatter as a, type FieldIssue as b, type FieldFormat as c, type FieldRequest as d, type FieldResult as e, type FieldSchema as f, type FieldSchemaResult as g, type FieldSelection as h, formatEditingValue as i, validateField as v };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Structural Standard Schema v1 boundary; no schema-library runtime dependency. */
|
|
2
|
+
interface FieldSchema<Output = unknown> {
|
|
3
|
+
readonly '~standard': {
|
|
4
|
+
readonly version: 1;
|
|
5
|
+
readonly vendor: string;
|
|
6
|
+
readonly validate: (value: unknown) => FieldSchemaResult<Output> | Promise<FieldSchemaResult<Output>>;
|
|
7
|
+
readonly types?: {
|
|
8
|
+
readonly input: unknown;
|
|
9
|
+
readonly output: Output;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface FieldIssue {
|
|
14
|
+
readonly message: string;
|
|
15
|
+
readonly path?: ReadonlyArray<PropertyKey | {
|
|
16
|
+
readonly key: PropertyKey;
|
|
17
|
+
}>;
|
|
18
|
+
readonly severity?: 'error' | 'warning';
|
|
19
|
+
}
|
|
20
|
+
type FieldSchemaResult<T = unknown> = {
|
|
21
|
+
readonly value: T;
|
|
22
|
+
readonly issues?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
readonly issues: readonly FieldIssue[];
|
|
25
|
+
};
|
|
26
|
+
interface FieldRequest<Context = unknown> {
|
|
27
|
+
raw: string;
|
|
28
|
+
value: string | null;
|
|
29
|
+
context: Context;
|
|
30
|
+
signal: AbortSignal;
|
|
31
|
+
}
|
|
32
|
+
interface FieldResult<Output = unknown> {
|
|
33
|
+
output?: Output;
|
|
34
|
+
issues: readonly FieldIssue[];
|
|
35
|
+
}
|
|
36
|
+
interface FieldValidation {
|
|
37
|
+
schema?: FieldSchema;
|
|
38
|
+
parse?: (raw: string, request: FieldRequest) => unknown | Promise<unknown>;
|
|
39
|
+
normalize?: (value: unknown, request: FieldRequest) => unknown | Promise<unknown>;
|
|
40
|
+
validator?: (value: unknown, request: FieldRequest) => Partial<FieldResult> | Promise<Partial<FieldResult>>;
|
|
41
|
+
issues?: readonly FieldIssue[];
|
|
42
|
+
}
|
|
43
|
+
interface FieldSelection {
|
|
44
|
+
start: number;
|
|
45
|
+
end: number;
|
|
46
|
+
direction?: 'forward' | 'backward' | 'none';
|
|
47
|
+
}
|
|
48
|
+
interface FieldFormat {
|
|
49
|
+
display: string;
|
|
50
|
+
selection: FieldSelection;
|
|
51
|
+
}
|
|
52
|
+
type FieldFormatter = (raw: string, selection: FieldSelection) => FieldFormat | undefined;
|
|
53
|
+
/** Formatting is additive: every original character must survive in order.
|
|
54
|
+
* Normalization belongs to submitted output, never the visible editing buffer. */
|
|
55
|
+
declare function formatEditingValue(raw: string, selection: FieldSelection, format?: FieldFormatter): FieldFormat;
|
|
56
|
+
declare function validateField(request: FieldRequest, config: FieldValidation): Promise<FieldResult>;
|
|
57
|
+
|
|
58
|
+
export { type FieldValidation as F, type FieldFormatter as a, type FieldIssue as b, type FieldFormat as c, type FieldRequest as d, type FieldResult as e, type FieldSchema as f, type FieldSchemaResult as g, type FieldSelection as h, formatEditingValue as i, validateField as v };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
TABLE_CELL_BACKGROUND_PRESETS
|
|
3
|
-
|
|
4
|
-
normalizeMentionResultLimit
|
|
5
|
-
} from "./chunk-ZOUKEZ77.js";
|
|
2
|
+
TABLE_CELL_BACKGROUND_PRESETS
|
|
3
|
+
} from "./chunk-JK53ENSG.js";
|
|
6
4
|
|
|
7
5
|
// src/extensions/callout.ts
|
|
8
6
|
import { mergeAttributes, Node } from "@tiptap/core";
|
|
@@ -54,7 +52,7 @@ var LoomaCallout = Node.create({
|
|
|
54
52
|
});
|
|
55
53
|
|
|
56
54
|
// src/extensions/preset.ts
|
|
57
|
-
import { Extension as
|
|
55
|
+
import { Extension as Extension8 } from "@tiptap/core";
|
|
58
56
|
|
|
59
57
|
// ../../node_modules/.pnpm/@tiptap+extension-document@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-document/dist/index.js
|
|
60
58
|
import { Node as Node2 } from "@tiptap/core";
|
|
@@ -5377,6 +5375,24 @@ var Mention = Node17.create({
|
|
|
5377
5375
|
|
|
5378
5376
|
// src/extensions/mention.ts
|
|
5379
5377
|
import { PluginKey as PluginKey7 } from "@tiptap/pm/state";
|
|
5378
|
+
|
|
5379
|
+
// src/mention-contract.ts
|
|
5380
|
+
var DEFAULT_MENTION_RESULT_LIMIT = 8;
|
|
5381
|
+
var MAX_MENTION_RESULT_LIMIT = 20;
|
|
5382
|
+
function normalizeMentionResultLimit(limit = DEFAULT_MENTION_RESULT_LIMIT) {
|
|
5383
|
+
if (!Number.isFinite(limit)) return DEFAULT_MENTION_RESULT_LIMIT;
|
|
5384
|
+
return Math.min(MAX_MENTION_RESULT_LIMIT, Math.max(1, Math.trunc(limit)));
|
|
5385
|
+
}
|
|
5386
|
+
function filterLoomaMentionItems(items, query, limit = DEFAULT_MENTION_RESULT_LIMIT) {
|
|
5387
|
+
const normalized = query.trim().toLocaleLowerCase();
|
|
5388
|
+
const boundedLimit = normalizeMentionResultLimit(limit);
|
|
5389
|
+
return items.filter((item) => {
|
|
5390
|
+
if (!normalized) return true;
|
|
5391
|
+
return item.label.toLocaleLowerCase().includes(normalized) || item.detail?.toLocaleLowerCase().includes(normalized);
|
|
5392
|
+
}).slice(0, boundedLimit);
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
// src/extensions/mention.ts
|
|
5380
5396
|
var EMPTY_STATE = {
|
|
5381
5397
|
active: false,
|
|
5382
5398
|
items: [],
|
|
@@ -5555,6 +5571,94 @@ function createLoomaMentionExtension(options = {}) {
|
|
|
5555
5571
|
});
|
|
5556
5572
|
}
|
|
5557
5573
|
|
|
5574
|
+
// src/extensions/smart-paste.ts
|
|
5575
|
+
import { Extension as Extension7 } from "@tiptap/core";
|
|
5576
|
+
import { DOMParser as ProseMirrorDOMParser } from "@tiptap/pm/model";
|
|
5577
|
+
import { Plugin as Plugin6 } from "@tiptap/pm/state";
|
|
5578
|
+
import MarkdownIt from "markdown-it";
|
|
5579
|
+
var DOCUMENT_MARKUP_MODES = /* @__PURE__ */ new Set(["html", "markdown", "md", "mdx"]);
|
|
5580
|
+
var MARKDOWN_MODES = /* @__PURE__ */ new Set(["markdown", "md", "mdx"]);
|
|
5581
|
+
var DOCUMENT_HTML_PATTERN = /<(?:html|body|main|article|section|header|footer|h[1-6]|p|ul|ol|li|blockquote|table|thead|tbody|tfoot|tr|th|td|figure|figcaption|img|hr|aside)\b/i;
|
|
5582
|
+
var MARKDOWN_STRUCTURE_PATTERN = /(?:^|\n)(?:#{1,6}\s+|>\s+|(?:[-+*]|\d+\.)\s+|```|~~~)|!\[[^\]]*]\([^)]*\)|\[[^\]]+]\([^)]*\)/;
|
|
5583
|
+
var UNSAFE_HTML_SELECTOR = "script, style, noscript, iframe, object, embed, template";
|
|
5584
|
+
var markdown = new MarkdownIt({
|
|
5585
|
+
html: false,
|
|
5586
|
+
linkify: true,
|
|
5587
|
+
typographer: false
|
|
5588
|
+
});
|
|
5589
|
+
function sourceEditorMode(event) {
|
|
5590
|
+
const metadata = event.clipboardData?.getData("vscode-editor-data");
|
|
5591
|
+
if (!metadata) return null;
|
|
5592
|
+
try {
|
|
5593
|
+
const value = JSON.parse(metadata);
|
|
5594
|
+
return typeof value.mode === "string" ? value.mode.toLowerCase() : null;
|
|
5595
|
+
} catch {
|
|
5596
|
+
return null;
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5599
|
+
function selectionIsInsideCodeBlock(parentTypeName) {
|
|
5600
|
+
return parentTypeName === "codeBlock";
|
|
5601
|
+
}
|
|
5602
|
+
function looksLikeDocumentHtml(value) {
|
|
5603
|
+
return /<!doctype\s+html/i.test(value) || DOCUMENT_HTML_PATTERN.test(value);
|
|
5604
|
+
}
|
|
5605
|
+
function looksLikeMarkdown(value) {
|
|
5606
|
+
return MARKDOWN_STRUCTURE_PATTERN.test(value);
|
|
5607
|
+
}
|
|
5608
|
+
function parseHtmlSlice(schema, value) {
|
|
5609
|
+
const parsed = new globalThis.DOMParser().parseFromString(value, "text/html");
|
|
5610
|
+
parsed.querySelectorAll(UNSAFE_HTML_SELECTOR).forEach((element) => element.remove());
|
|
5611
|
+
const container = document.createElement("div");
|
|
5612
|
+
container.append(...Array.from(parsed.body.childNodes, (node) => node.cloneNode(true)));
|
|
5613
|
+
if (!container.textContent?.trim() && !container.querySelector("img, hr")) return null;
|
|
5614
|
+
return ProseMirrorDOMParser.fromSchema(schema).parseSlice(container, {
|
|
5615
|
+
preserveWhitespace: false
|
|
5616
|
+
});
|
|
5617
|
+
}
|
|
5618
|
+
function documentSlice(schema, plainText, richHtml, mode) {
|
|
5619
|
+
if (mode && MARKDOWN_MODES.has(mode)) {
|
|
5620
|
+
return parseHtmlSlice(schema, markdown.render(plainText));
|
|
5621
|
+
}
|
|
5622
|
+
if (mode === "html") {
|
|
5623
|
+
return parseHtmlSlice(schema, plainText);
|
|
5624
|
+
}
|
|
5625
|
+
if (!mode && !richHtml && looksLikeDocumentHtml(plainText)) {
|
|
5626
|
+
return parseHtmlSlice(schema, plainText);
|
|
5627
|
+
}
|
|
5628
|
+
if (!mode && !richHtml && looksLikeMarkdown(plainText)) {
|
|
5629
|
+
return parseHtmlSlice(schema, markdown.render(plainText));
|
|
5630
|
+
}
|
|
5631
|
+
return null;
|
|
5632
|
+
}
|
|
5633
|
+
var LoomaSmartPaste = Extension7.create({
|
|
5634
|
+
name: "loomaSmartPaste",
|
|
5635
|
+
priority: 1100,
|
|
5636
|
+
addProseMirrorPlugins() {
|
|
5637
|
+
return [
|
|
5638
|
+
new Plugin6({
|
|
5639
|
+
props: {
|
|
5640
|
+
handlePaste: (view, event) => {
|
|
5641
|
+
if (!event.clipboardData) return false;
|
|
5642
|
+
if (selectionIsInsideCodeBlock(view.state.selection.$from.parent.type.name)) {
|
|
5643
|
+
return false;
|
|
5644
|
+
}
|
|
5645
|
+
const plainText = event.clipboardData.getData("text/plain");
|
|
5646
|
+
if (!plainText.trim()) return false;
|
|
5647
|
+
const richHtml = event.clipboardData.getData("text/html");
|
|
5648
|
+
const mode = sourceEditorMode(event);
|
|
5649
|
+
if (mode && !DOCUMENT_MARKUP_MODES.has(mode)) return false;
|
|
5650
|
+
const slice = documentSlice(view.state.schema, plainText, richHtml, mode);
|
|
5651
|
+
if (!slice) return false;
|
|
5652
|
+
const transaction = view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste");
|
|
5653
|
+
view.dispatch(transaction);
|
|
5654
|
+
return true;
|
|
5655
|
+
}
|
|
5656
|
+
}
|
|
5657
|
+
})
|
|
5658
|
+
];
|
|
5659
|
+
}
|
|
5660
|
+
});
|
|
5661
|
+
|
|
5558
5662
|
// ../../node_modules/.pnpm/@tiptap+extension-table@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-table/dist/index.js
|
|
5559
5663
|
import { findParentNodeClosestToPos, Node as Node18, mergeAttributes as mergeAttributes23, callOrReturn as callOrReturn2, getExtensionField as getExtensionField2 } from "@tiptap/core";
|
|
5560
5664
|
import { TextSelection as TextSelection3 } from "@tiptap/pm/state";
|
|
@@ -6082,7 +6186,7 @@ function setActiveTableCellBackground(editor, backgroundColor) {
|
|
|
6082
6186
|
|
|
6083
6187
|
// src/extensions/preset.ts
|
|
6084
6188
|
var lowlight = createLowlight(common);
|
|
6085
|
-
var LoomaTableKit =
|
|
6189
|
+
var LoomaTableKit = Extension8.create({
|
|
6086
6190
|
name: "loomaTableKit",
|
|
6087
6191
|
addExtensions() {
|
|
6088
6192
|
return [LoomaTable, TableRow, LoomaTableHeader, LoomaTableCell];
|
|
@@ -6126,6 +6230,7 @@ function getDefaultEditorExtensions(options = {}) {
|
|
|
6126
6230
|
Image.configure({ inline: imageInline }),
|
|
6127
6231
|
Highlight.configure({ multicolor: false }),
|
|
6128
6232
|
Code,
|
|
6233
|
+
LoomaSmartPaste,
|
|
6129
6234
|
CodeBlockLowlight.configure({ lowlight }),
|
|
6130
6235
|
Typography,
|
|
6131
6236
|
Placeholder.configure({
|
|
@@ -6448,7 +6553,7 @@ function handleTableOverlayAction(editor, detail) {
|
|
|
6448
6553
|
}
|
|
6449
6554
|
|
|
6450
6555
|
// src/extensions/slash-command.ts
|
|
6451
|
-
import { Extension as
|
|
6556
|
+
import { Extension as Extension9 } from "@tiptap/core";
|
|
6452
6557
|
var CALLOUT_COMMANDS = [
|
|
6453
6558
|
{
|
|
6454
6559
|
title: "Info",
|
|
@@ -6593,7 +6698,7 @@ var EMPTY_STATE2 = {
|
|
|
6593
6698
|
rect: null,
|
|
6594
6699
|
select: null
|
|
6595
6700
|
};
|
|
6596
|
-
var LoomaSlashCommand =
|
|
6701
|
+
var LoomaSlashCommand = Extension9.create({
|
|
6597
6702
|
name: "loomaSlashCommand",
|
|
6598
6703
|
addOptions() {
|
|
6599
6704
|
return {
|
|
@@ -6692,8 +6797,13 @@ function createLoomaSlashCommandExtension(options = {}) {
|
|
|
6692
6797
|
export {
|
|
6693
6798
|
LOOMA_CALLOUT_TONES,
|
|
6694
6799
|
LoomaCallout,
|
|
6800
|
+
DEFAULT_MENTION_RESULT_LIMIT,
|
|
6801
|
+
MAX_MENTION_RESULT_LIMIT,
|
|
6802
|
+
normalizeMentionResultLimit,
|
|
6803
|
+
filterLoomaMentionItems,
|
|
6695
6804
|
LoomaMentionSuggestionPluginKey,
|
|
6696
6805
|
createLoomaMentionExtension,
|
|
6806
|
+
LoomaSmartPaste,
|
|
6697
6807
|
LoomaTable,
|
|
6698
6808
|
LoomaTableHeader,
|
|
6699
6809
|
LoomaTableCell,
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// src/table-backgrounds.ts
|
|
2
8
|
var TABLE_CELL_BACKGROUND_PRESETS = {
|
|
3
9
|
none: null,
|
|
@@ -16,27 +22,8 @@ var TABLE_CELL_BACKGROUND_OPTIONS = [
|
|
|
16
22
|
{ action: "background-red", label: "Red", value: TABLE_CELL_BACKGROUND_PRESETS.red, swatch: TABLE_CELL_BACKGROUND_PRESETS.red }
|
|
17
23
|
];
|
|
18
24
|
|
|
19
|
-
// src/mention-contract.ts
|
|
20
|
-
var DEFAULT_MENTION_RESULT_LIMIT = 8;
|
|
21
|
-
var MAX_MENTION_RESULT_LIMIT = 20;
|
|
22
|
-
function normalizeMentionResultLimit(limit = DEFAULT_MENTION_RESULT_LIMIT) {
|
|
23
|
-
if (!Number.isFinite(limit)) return DEFAULT_MENTION_RESULT_LIMIT;
|
|
24
|
-
return Math.min(MAX_MENTION_RESULT_LIMIT, Math.max(1, Math.trunc(limit)));
|
|
25
|
-
}
|
|
26
|
-
function filterLoomaMentionItems(items, query, limit = DEFAULT_MENTION_RESULT_LIMIT) {
|
|
27
|
-
const normalized = query.trim().toLocaleLowerCase();
|
|
28
|
-
const boundedLimit = normalizeMentionResultLimit(limit);
|
|
29
|
-
return items.filter((item) => {
|
|
30
|
-
if (!normalized) return true;
|
|
31
|
-
return item.label.toLocaleLowerCase().includes(normalized) || item.detail?.toLocaleLowerCase().includes(normalized);
|
|
32
|
-
}).slice(0, boundedLimit);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
25
|
export {
|
|
26
|
+
__export,
|
|
36
27
|
TABLE_CELL_BACKGROUND_PRESETS,
|
|
37
|
-
TABLE_CELL_BACKGROUND_OPTIONS
|
|
38
|
-
DEFAULT_MENTION_RESULT_LIMIT,
|
|
39
|
-
MAX_MENTION_RESULT_LIMIT,
|
|
40
|
-
normalizeMentionResultLimit,
|
|
41
|
-
filterLoomaMentionItems
|
|
28
|
+
TABLE_CELL_BACKGROUND_OPTIONS
|
|
42
29
|
};
|