@threadlabs/looma 0.1.5 → 0.1.7

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.
Files changed (62) hide show
  1. package/README.md +5 -4
  2. package/dist/{chunk-3PASQ7DE.js → chunk-UMFO4QNN.js} +26 -26
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/looma.cjs.js +1 -1
  5. package/dist/cjs/ui-dialog.cjs.entry.js +3 -1
  6. package/dist/collection/components/ui-dialog/ui-dialog.js +22 -1
  7. package/dist/components/ui-dialog.js +1 -1
  8. package/dist/esm/loader.js +1 -1
  9. package/dist/esm/looma.js +1 -1
  10. package/dist/esm/ui-dialog.entry.js +3 -1
  11. package/dist/index.cjs +4 -2
  12. package/dist/index.js +2 -2
  13. package/dist/looma/looma.esm.js +1 -1
  14. package/dist/looma/p-5df568d8.entry.js +1 -0
  15. package/dist/types/components/ui-dialog/ui-dialog.d.ts +2 -0
  16. package/dist/types/components.d.ts +9 -0
  17. package/dist/{ui-avatar-group.entry-DBVLQ4KB.js → ui-avatar-group.entry-S6DFXYB7.js} +1 -1
  18. package/dist/{ui-avatar.entry-2WTBM2EC.js → ui-avatar.entry-MDRGXLWQ.js} +1 -1
  19. package/dist/{ui-badge.entry-XKIGBK5V.js → ui-badge.entry-RLL4YKPD.js} +1 -1
  20. package/dist/{ui-button.entry-PWT56MPD.js → ui-button.entry-IYMYLBFY.js} +1 -1
  21. package/dist/{ui-checkbox.entry-QT5S7EEL.js → ui-checkbox.entry-K5FGWDG2.js} +1 -1
  22. package/dist/{ui-context-menu.entry-NGWR3LOZ.js → ui-context-menu.entry-KWXXJ3ZV.js} +1 -1
  23. package/dist/{ui-dialog.entry-PEDDIALQ.js → ui-dialog.entry-RKHLQLQM.js} +4 -2
  24. package/dist/{ui-disclosure.entry-UKO7MAZM.js → ui-disclosure.entry-FRZKGEJP.js} +1 -1
  25. package/dist/{ui-floating-action-button.entry-SSGHRMCO.js → ui-floating-action-button.entry-BH4FDSTL.js} +1 -1
  26. package/dist/{ui-form-field.entry-6TZCWPYL.js → ui-form-field.entry-3CR2KSUH.js} +1 -1
  27. package/dist/{ui-icon-button.entry-WMCYMK2H.js → ui-icon-button.entry-LB54U25M.js} +1 -1
  28. package/dist/{ui-input.entry-AZ5BGQNA.js → ui-input.entry-5PQR37HS.js} +1 -1
  29. package/dist/{ui-menu-item.entry-L4NJDBKF.js → ui-menu-item.entry-2T3QWHLK.js} +1 -1
  30. package/dist/{ui-menu.entry-DGUYAE3Q.js → ui-menu.entry-Q5Z5YO5P.js} +1 -1
  31. package/dist/{ui-popover.entry-A54EKVZG.js → ui-popover.entry-4P2NWWAY.js} +1 -1
  32. package/dist/{ui-radio-group.entry-6YP4LY4N.js → ui-radio-group.entry-QKPRNV26.js} +1 -1
  33. package/dist/{ui-radio.entry-CGYNK7PN.js → ui-radio.entry-O4DOMFNU.js} +1 -1
  34. package/dist/{ui-search-result-row.entry-DGKSI2QM.js → ui-search-result-row.entry-BR5O3UCH.js} +1 -1
  35. package/dist/{ui-search-shell.entry-3F5ASGTW.js → ui-search-shell.entry-2ZBP7SA3.js} +1 -1
  36. package/dist/{ui-select.entry-SXSZPVXA.js → ui-select.entry-L75HQY72.js} +1 -1
  37. package/dist/{ui-switch.entry-AD4EVUWM.js → ui-switch.entry-L5QWD3BT.js} +1 -1
  38. package/dist/{ui-tabs.entry-WLKO5G5N.js → ui-tabs.entry-KWRD6Y7J.js} +1 -1
  39. package/dist/{ui-textarea.entry-IHPC7Q4R.js → ui-textarea.entry-JC3HPEBS.js} +1 -1
  40. package/dist/{ui-toast-region.entry-GCW2LJAC.js → ui-toast-region.entry-C6KK4OM4.js} +1 -1
  41. package/dist/{ui-tooltip.entry-EU2G6BH5.js → ui-tooltip.entry-G5EOCWP4.js} +1 -1
  42. package/dist/{ui-top-bar.entry-NMAFXVET.js → ui-top-bar.entry-YLKVAQFH.js} +1 -1
  43. package/editor/chunk-CX4QDKSV.js +22 -0
  44. package/editor/{chunk-YGJLGDQC.js → chunk-NJ2KAMS2.js} +2203 -17
  45. package/editor/{chunk-CWCXYQMT.js → chunk-OK5NARJI.js} +59 -28
  46. package/editor/extensions/index.d.ts +74 -20
  47. package/editor/extensions/index.js +22 -4
  48. package/editor/index.d.ts +3 -3
  49. package/editor/index.js +25 -5
  50. package/editor/table-overlay-Bq0F5xPg.d.ts +64 -0
  51. package/editor/ui.d.ts +2 -12
  52. package/editor/ui.js +9 -1
  53. package/editor.css +375 -4
  54. package/package.json +9 -2
  55. package/tokens.css +17 -0
  56. package/vue/chunk-KDA4RFLQ.js +203 -0
  57. package/vue/editor/index.d.ts +93 -3
  58. package/vue/editor/index.js +565 -30
  59. package/vue/index.js +38 -82
  60. package/dist/looma/p-a7be33fd.entry.js +0 -1
  61. package/editor/table-overlay-DTr3KC9e.d.ts +0 -12
  62. package/vue/chunk-P72L3GWE.js +0 -84
@@ -1,8 +1,9 @@
1
- import * as vue from 'vue';
2
- import { PropType } from 'vue';
3
1
  import { SlashMenuItem, SlashMenuAnchorRect } from '@threadlabs/looma/editor';
4
2
  export * from '@threadlabs/looma/editor';
3
+ import * as vue from 'vue';
4
+ import { PropType } from 'vue';
5
5
  import { TableContextMenuActionEventDetail, InsertTableEventDetail, TableOverlayActionEventDetail, SlashMenuHighlightEventDetail, SlashMenuSelectEventDetail } from '@threadlabs/looma/editor/ui';
6
+ import { JSONContent, AnyExtension, Editor } from '@tiptap/core';
6
7
 
7
8
  interface VueEditorAdapterEventMap {
8
9
  tableAction: TableContextMenuActionEventDetail;
@@ -86,4 +87,93 @@ declare const EDITOR_ADAPTER_COMPONENT_TAG_MAP: {
86
87
  readonly EditorTableOverlay: "ui-editor-table-overlay";
87
88
  };
88
89
 
89
- export { EDITOR_ADAPTER_COMPONENT_TAG_MAP, EditorInsertTableGrid, EditorSlashMenu, EditorTableContextMenu, EditorTableOverlay, EditorTableToolbar, EditorToolbar, type VueEditorAdapterEventMap };
90
+ interface LoomaImageUploadResult {
91
+ url: string;
92
+ alt?: string;
93
+ }
94
+ type LoomaImageUploader = (file: File) => Promise<string | LoomaImageUploadResult>;
95
+ declare const LoomaEditor: vue.DefineComponent<vue.ExtractPropTypes<{
96
+ modelValue: {
97
+ type: PropType<JSONContent>;
98
+ default: () => {
99
+ [key: string]: any;
100
+ type?: string;
101
+ attrs?: Record<string, any>;
102
+ content?: JSONContent[];
103
+ marks?: {
104
+ type: string;
105
+ attrs?: Record<string, any>;
106
+ [key: string]: any;
107
+ }[];
108
+ text?: string;
109
+ };
110
+ };
111
+ editable: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ placeholder: {
116
+ type: StringConstructor;
117
+ default: string;
118
+ };
119
+ extensions: {
120
+ type: PropType<AnyExtension[]>;
121
+ default: () => never[];
122
+ };
123
+ uploadImage: {
124
+ type: PropType<LoomaImageUploader | undefined>;
125
+ default: undefined;
126
+ };
127
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
128
+ [key: string]: any;
129
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
130
+ "update:modelValue": (_value: JSONContent) => true;
131
+ update: (_value: JSONContent) => true;
132
+ ready: (_editor: Editor) => true;
133
+ uploadError: (_error: unknown, _file: File) => true;
134
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
135
+ modelValue: {
136
+ type: PropType<JSONContent>;
137
+ default: () => {
138
+ [key: string]: any;
139
+ type?: string;
140
+ attrs?: Record<string, any>;
141
+ content?: JSONContent[];
142
+ marks?: {
143
+ type: string;
144
+ attrs?: Record<string, any>;
145
+ [key: string]: any;
146
+ }[];
147
+ text?: string;
148
+ };
149
+ };
150
+ editable: {
151
+ type: BooleanConstructor;
152
+ default: boolean;
153
+ };
154
+ placeholder: {
155
+ type: StringConstructor;
156
+ default: string;
157
+ };
158
+ extensions: {
159
+ type: PropType<AnyExtension[]>;
160
+ default: () => never[];
161
+ };
162
+ uploadImage: {
163
+ type: PropType<LoomaImageUploader | undefined>;
164
+ default: undefined;
165
+ };
166
+ }>> & Readonly<{
167
+ "onUpdate:modelValue"?: (_value: JSONContent) => any;
168
+ onUpdate?: (_value: JSONContent) => any;
169
+ onReady?: (_editor: Editor) => any;
170
+ onUploadError?: (_error: unknown, _file: File) => any;
171
+ }>, {
172
+ placeholder: string;
173
+ modelValue: JSONContent;
174
+ editable: boolean;
175
+ extensions: AnyExtension[];
176
+ uploadImage: LoomaImageUploader | undefined;
177
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
178
+
179
+ export { EDITOR_ADAPTER_COMPONENT_TAG_MAP, EditorInsertTableGrid, EditorSlashMenu, EditorTableContextMenu, EditorTableOverlay, EditorTableToolbar, EditorToolbar, LoomaEditor, type LoomaImageUploadResult, type LoomaImageUploader, type VueEditorAdapterEventMap };