@threadlabs/looma 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/chunk-G53JEAQK.js +94 -0
  4. package/dist/chunk-OF57X5AR.js +10 -0
  5. package/dist/chunk-UL7UIUJZ.js +20 -0
  6. package/dist/chunk-YK4MTZGJ.js +1580 -0
  7. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  8. package/dist/cjs/events-TcQIzpNv.js +19 -0
  9. package/dist/cjs/id-CYbKpaYr.js +9 -0
  10. package/dist/cjs/index-D07f6BOw.js +1569 -0
  11. package/dist/cjs/index.cjs.js +2 -0
  12. package/dist/cjs/loader.cjs.js +13 -0
  13. package/dist/cjs/looma.cjs.js +25 -0
  14. package/dist/cjs/manager-BOpVXb92.js +93 -0
  15. package/dist/cjs/ui-avatar-group.cjs.entry.js +51 -0
  16. package/dist/cjs/ui-avatar.cjs.entry.js +50 -0
  17. package/dist/cjs/ui-badge.cjs.entry.js +19 -0
  18. package/dist/cjs/ui-button.cjs.entry.js +62 -0
  19. package/dist/cjs/ui-checkbox.cjs.entry.js +91 -0
  20. package/dist/cjs/ui-context-menu.cjs.entry.js +201 -0
  21. package/dist/cjs/ui-dialog.cjs.entry.js +93 -0
  22. package/dist/cjs/ui-disclosure.cjs.entry.js +109 -0
  23. package/dist/cjs/ui-floating-action-button.cjs.entry.js +20 -0
  24. package/dist/cjs/ui-form-field.cjs.entry.js +59 -0
  25. package/dist/cjs/ui-icon-button.cjs.entry.js +21 -0
  26. package/dist/cjs/ui-input.cjs.entry.js +101 -0
  27. package/dist/cjs/ui-menu-item.cjs.entry.js +19 -0
  28. package/dist/cjs/ui-menu.cjs.entry.js +96 -0
  29. package/dist/cjs/ui-popover.cjs.entry.js +92 -0
  30. package/dist/cjs/ui-radio-group.cjs.entry.js +134 -0
  31. package/dist/cjs/ui-radio.cjs.entry.js +85 -0
  32. package/dist/cjs/ui-search-result-row.cjs.entry.js +47 -0
  33. package/dist/cjs/ui-search-shell.cjs.entry.js +39 -0
  34. package/dist/cjs/ui-select.cjs.entry.js +100 -0
  35. package/dist/cjs/ui-switch.cjs.entry.js +65 -0
  36. package/dist/cjs/ui-tabs.cjs.entry.js +117 -0
  37. package/dist/cjs/ui-textarea.cjs.entry.js +106 -0
  38. package/dist/cjs/ui-toast-region.cjs.entry.js +67 -0
  39. package/dist/cjs/ui-tooltip.cjs.entry.js +133 -0
  40. package/dist/cjs/ui-top-bar.cjs.entry.js +43 -0
  41. package/dist/collection/collection-manifest.json +38 -0
  42. package/dist/collection/components/ui-avatar/ui-avatar.css +35 -0
  43. package/dist/collection/components/ui-avatar/ui-avatar.js +130 -0
  44. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +32 -0
  45. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +103 -0
  46. package/dist/collection/components/ui-badge/ui-badge.css +74 -0
  47. package/dist/collection/components/ui-badge/ui-badge.js +62 -0
  48. package/dist/collection/components/ui-button/ui-button.css +101 -0
  49. package/dist/collection/components/ui-button/ui-button.js +127 -0
  50. package/dist/collection/components/ui-checkbox/ui-checkbox.css +24 -0
  51. package/dist/collection/components/ui-checkbox/ui-checkbox.js +223 -0
  52. package/dist/collection/components/ui-context-menu/ui-context-menu.css +17 -0
  53. package/dist/collection/components/ui-context-menu/ui-context-menu.js +272 -0
  54. package/dist/collection/components/ui-dialog/ui-dialog.css +65 -0
  55. package/dist/collection/components/ui-dialog/ui-dialog.js +185 -0
  56. package/dist/collection/components/ui-disclosure/ui-disclosure.css +7 -0
  57. package/dist/collection/components/ui-disclosure/ui-disclosure.js +182 -0
  58. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +70 -0
  59. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +85 -0
  60. package/dist/collection/components/ui-form-field/ui-form-field.css +21 -0
  61. package/dist/collection/components/ui-form-field/ui-form-field.js +125 -0
  62. package/dist/collection/components/ui-icon-button/ui-icon-button.css +92 -0
  63. package/dist/collection/components/ui-icon-button/ui-icon-button.js +106 -0
  64. package/dist/collection/components/ui-input/ui-input.css +46 -0
  65. package/dist/collection/components/ui-input/ui-input.js +213 -0
  66. package/dist/collection/components/ui-menu/ui-menu.css +37 -0
  67. package/dist/collection/components/ui-menu/ui-menu.js +149 -0
  68. package/dist/collection/components/ui-menu-item/ui-menu-item.css +26 -0
  69. package/dist/collection/components/ui-menu-item/ui-menu-item.js +64 -0
  70. package/dist/collection/components/ui-popover/ui-popover.css +8 -0
  71. package/dist/collection/components/ui-popover/ui-popover.js +144 -0
  72. package/dist/collection/components/ui-radio/ui-radio.css +22 -0
  73. package/dist/collection/components/ui-radio/ui-radio.js +213 -0
  74. package/dist/collection/components/ui-radio-group/ui-radio-group.css +10 -0
  75. package/dist/collection/components/ui-radio-group/ui-radio-group.js +247 -0
  76. package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +80 -0
  77. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +100 -0
  78. package/dist/collection/components/ui-search-shell/ui-search-shell.css +61 -0
  79. package/dist/collection/components/ui-search-shell/ui-search-shell.js +46 -0
  80. package/dist/collection/components/ui-select/ui-select.css +62 -0
  81. package/dist/collection/components/ui-select/ui-select.js +212 -0
  82. package/dist/collection/components/ui-switch/ui-switch.css +63 -0
  83. package/dist/collection/components/ui-switch/ui-switch.js +177 -0
  84. package/dist/collection/components/ui-tabs/ui-tabs.css +65 -0
  85. package/dist/collection/components/ui-tabs/ui-tabs.js +190 -0
  86. package/dist/collection/components/ui-textarea/ui-textarea.css +48 -0
  87. package/dist/collection/components/ui-textarea/ui-textarea.js +238 -0
  88. package/dist/collection/components/ui-toast-region/ui-toast-region.css +52 -0
  89. package/dist/collection/components/ui-toast-region/ui-toast-region.js +100 -0
  90. package/dist/collection/components/ui-tooltip/ui-tooltip.css +14 -0
  91. package/dist/collection/components/ui-tooltip/ui-tooltip.js +205 -0
  92. package/dist/collection/components/ui-top-bar/ui-top-bar.css +43 -0
  93. package/dist/collection/components/ui-top-bar/ui-top-bar.js +52 -0
  94. package/dist/collection/overlay/manager.js +90 -0
  95. package/dist/collection/utils/events.js +13 -0
  96. package/dist/collection/utils/id.js +5 -0
  97. package/dist/collection/utils/initials.js +11 -0
  98. package/dist/components/index.d.ts +88 -0
  99. package/dist/components/index.js +1 -0
  100. package/dist/components/p-CIA4RyEp.js +1 -0
  101. package/dist/components/p-CR7f2MQC.js +1 -0
  102. package/dist/components/p-JwSoedEO.js +1 -0
  103. package/dist/components/p-WvL4iAhX.js +1 -0
  104. package/dist/components/p-hgBUJRDa.js +1 -0
  105. package/dist/components/ui-avatar-group.d.ts +11 -0
  106. package/dist/components/ui-avatar-group.js +1 -0
  107. package/dist/components/ui-avatar.d.ts +11 -0
  108. package/dist/components/ui-avatar.js +1 -0
  109. package/dist/components/ui-badge.d.ts +11 -0
  110. package/dist/components/ui-badge.js +1 -0
  111. package/dist/components/ui-button.d.ts +11 -0
  112. package/dist/components/ui-button.js +1 -0
  113. package/dist/components/ui-checkbox.d.ts +11 -0
  114. package/dist/components/ui-checkbox.js +1 -0
  115. package/dist/components/ui-context-menu.d.ts +11 -0
  116. package/dist/components/ui-context-menu.js +1 -0
  117. package/dist/components/ui-dialog.d.ts +11 -0
  118. package/dist/components/ui-dialog.js +1 -0
  119. package/dist/components/ui-disclosure.d.ts +11 -0
  120. package/dist/components/ui-disclosure.js +1 -0
  121. package/dist/components/ui-floating-action-button.d.ts +11 -0
  122. package/dist/components/ui-floating-action-button.js +1 -0
  123. package/dist/components/ui-form-field.d.ts +11 -0
  124. package/dist/components/ui-form-field.js +1 -0
  125. package/dist/components/ui-icon-button.d.ts +11 -0
  126. package/dist/components/ui-icon-button.js +1 -0
  127. package/dist/components/ui-input.d.ts +11 -0
  128. package/dist/components/ui-input.js +1 -0
  129. package/dist/components/ui-menu-item.d.ts +11 -0
  130. package/dist/components/ui-menu-item.js +1 -0
  131. package/dist/components/ui-menu.d.ts +11 -0
  132. package/dist/components/ui-menu.js +1 -0
  133. package/dist/components/ui-popover.d.ts +11 -0
  134. package/dist/components/ui-popover.js +1 -0
  135. package/dist/components/ui-radio-group.d.ts +11 -0
  136. package/dist/components/ui-radio-group.js +1 -0
  137. package/dist/components/ui-radio.d.ts +11 -0
  138. package/dist/components/ui-radio.js +1 -0
  139. package/dist/components/ui-search-result-row.d.ts +11 -0
  140. package/dist/components/ui-search-result-row.js +1 -0
  141. package/dist/components/ui-search-shell.d.ts +11 -0
  142. package/dist/components/ui-search-shell.js +1 -0
  143. package/dist/components/ui-select.d.ts +11 -0
  144. package/dist/components/ui-select.js +1 -0
  145. package/dist/components/ui-switch.d.ts +11 -0
  146. package/dist/components/ui-switch.js +1 -0
  147. package/dist/components/ui-tabs.d.ts +11 -0
  148. package/dist/components/ui-tabs.js +1 -0
  149. package/dist/components/ui-textarea.d.ts +11 -0
  150. package/dist/components/ui-textarea.js +1 -0
  151. package/dist/components/ui-toast-region.d.ts +11 -0
  152. package/dist/components/ui-toast-region.js +1 -0
  153. package/dist/components/ui-tooltip.d.ts +11 -0
  154. package/dist/components/ui-tooltip.js +1 -0
  155. package/dist/components/ui-top-bar.d.ts +11 -0
  156. package/dist/components/ui-top-bar.js +1 -0
  157. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  158. package/dist/esm/events-JwSoedEO.js +15 -0
  159. package/dist/esm/id-hgBUJRDa.js +7 -0
  160. package/dist/esm/index-CEeiinfk.js +1561 -0
  161. package/dist/esm/index.js +1 -0
  162. package/dist/esm/loader.js +11 -0
  163. package/dist/esm/looma.js +21 -0
  164. package/dist/esm/manager-CR7f2MQC.js +89 -0
  165. package/dist/esm/ui-avatar-group.entry.js +49 -0
  166. package/dist/esm/ui-avatar.entry.js +48 -0
  167. package/dist/esm/ui-badge.entry.js +17 -0
  168. package/dist/esm/ui-button.entry.js +60 -0
  169. package/dist/esm/ui-checkbox.entry.js +89 -0
  170. package/dist/esm/ui-context-menu.entry.js +199 -0
  171. package/dist/esm/ui-dialog.entry.js +91 -0
  172. package/dist/esm/ui-disclosure.entry.js +107 -0
  173. package/dist/esm/ui-floating-action-button.entry.js +18 -0
  174. package/dist/esm/ui-form-field.entry.js +57 -0
  175. package/dist/esm/ui-icon-button.entry.js +19 -0
  176. package/dist/esm/ui-input.entry.js +99 -0
  177. package/dist/esm/ui-menu-item.entry.js +17 -0
  178. package/dist/esm/ui-menu.entry.js +94 -0
  179. package/dist/esm/ui-popover.entry.js +90 -0
  180. package/dist/esm/ui-radio-group.entry.js +132 -0
  181. package/dist/esm/ui-radio.entry.js +83 -0
  182. package/dist/esm/ui-search-result-row.entry.js +45 -0
  183. package/dist/esm/ui-search-shell.entry.js +37 -0
  184. package/dist/esm/ui-select.entry.js +98 -0
  185. package/dist/esm/ui-switch.entry.js +63 -0
  186. package/dist/esm/ui-tabs.entry.js +115 -0
  187. package/dist/esm/ui-textarea.entry.js +104 -0
  188. package/dist/esm/ui-toast-region.entry.js +65 -0
  189. package/dist/esm/ui-tooltip.entry.js +131 -0
  190. package/dist/esm/ui-top-bar.entry.js +41 -0
  191. package/dist/index.cjs +4062 -0
  192. package/dist/index.cjs.js +1 -0
  193. package/dist/index.d.cts +16 -0
  194. package/dist/index.d.ts +16 -0
  195. package/dist/index.js +129 -0
  196. package/dist/looma/index.esm.js +0 -0
  197. package/dist/looma/looma.esm.js +1 -0
  198. package/dist/looma/p-03f0594b.entry.js +1 -0
  199. package/dist/looma/p-15e619fd.entry.js +1 -0
  200. package/dist/looma/p-201243dc.entry.js +1 -0
  201. package/dist/looma/p-24d7aa5b.entry.js +1 -0
  202. package/dist/looma/p-341ba64a.entry.js +1 -0
  203. package/dist/looma/p-41d62a83.entry.js +1 -0
  204. package/dist/looma/p-4742e6b4.entry.js +1 -0
  205. package/dist/looma/p-4c54d489.entry.js +1 -0
  206. package/dist/looma/p-52c537fa.entry.js +1 -0
  207. package/dist/looma/p-5a645647.entry.js +1 -0
  208. package/dist/looma/p-610b2eca.entry.js +1 -0
  209. package/dist/looma/p-649dad92.entry.js +1 -0
  210. package/dist/looma/p-66a203a1.entry.js +1 -0
  211. package/dist/looma/p-754cfff3.entry.js +1 -0
  212. package/dist/looma/p-93ce1c62.entry.js +1 -0
  213. package/dist/looma/p-955fb814.entry.js +1 -0
  214. package/dist/looma/p-96de71ad.entry.js +1 -0
  215. package/dist/looma/p-CEeiinfk.js +2 -0
  216. package/dist/looma/p-CR7f2MQC.js +1 -0
  217. package/dist/looma/p-DQuL1Twl.js +1 -0
  218. package/dist/looma/p-JwSoedEO.js +1 -0
  219. package/dist/looma/p-ab4151d5.entry.js +1 -0
  220. package/dist/looma/p-c14233bc.entry.js +1 -0
  221. package/dist/looma/p-dc857ed4.entry.js +1 -0
  222. package/dist/looma/p-dfcb2cca.entry.js +1 -0
  223. package/dist/looma/p-dff144bd.entry.js +1 -0
  224. package/dist/looma/p-ebb74106.entry.js +1 -0
  225. package/dist/looma/p-ecb5739b.entry.js +1 -0
  226. package/dist/looma/p-ee31c7b4.entry.js +1 -0
  227. package/dist/looma/p-fa4659c4.entry.js +1 -0
  228. package/dist/looma/p-hgBUJRDa.js +1 -0
  229. package/dist/types/components/ui-avatar/ui-avatar.d.ts +11 -0
  230. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +12 -0
  231. package/dist/types/components/ui-badge/ui-badge.d.ts +5 -0
  232. package/dist/types/components/ui-button/ui-button.d.ts +13 -0
  233. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +19 -0
  234. package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +37 -0
  235. package/dist/types/components/ui-dialog/ui-dialog.d.ts +19 -0
  236. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +20 -0
  237. package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +6 -0
  238. package/dist/types/components/ui-form-field/ui-form-field.d.ts +10 -0
  239. package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +7 -0
  240. package/dist/types/components/ui-input/ui-input.d.ts +19 -0
  241. package/dist/types/components/ui-menu/ui-menu.d.ts +14 -0
  242. package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +5 -0
  243. package/dist/types/components/ui-popover/ui-popover.d.ts +16 -0
  244. package/dist/types/components/ui-radio/ui-radio.d.ts +17 -0
  245. package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +21 -0
  246. package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +15 -0
  247. package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +9 -0
  248. package/dist/types/components/ui-select/ui-select.d.ts +19 -0
  249. package/dist/types/components/ui-switch/ui-switch.d.ts +15 -0
  250. package/dist/types/components/ui-tabs/ui-tabs.d.ts +17 -0
  251. package/dist/types/components/ui-textarea/ui-textarea.d.ts +20 -0
  252. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +12 -0
  253. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +24 -0
  254. package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +12 -0
  255. package/dist/types/components.d.ts +1148 -0
  256. package/dist/types/overlay/manager.d.ts +14 -0
  257. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  258. package/dist/types/utils/events.d.ts +4 -0
  259. package/dist/types/utils/id.d.ts +1 -0
  260. package/dist/types/utils/initials.d.ts +1 -0
  261. package/dist/ui-avatar-group.entry-BZGXBOSE.js +59 -0
  262. package/dist/ui-avatar.entry-S2O2W5SA.js +51 -0
  263. package/dist/ui-badge.entry-CVJDISCR.js +22 -0
  264. package/dist/ui-button.entry-LNJBEJFE.js +72 -0
  265. package/dist/ui-checkbox.entry-5RA2CB43.js +102 -0
  266. package/dist/ui-context-menu.entry-UUOCT75F.js +211 -0
  267. package/dist/ui-dialog.entry-OEPJTEES.js +106 -0
  268. package/dist/ui-disclosure.entry-LRRISGUD.js +120 -0
  269. package/dist/ui-floating-action-button.entry-7TSAZRXP.js +23 -0
  270. package/dist/ui-form-field.entry-73YOVICF.js +67 -0
  271. package/dist/ui-icon-button.entry-MNXGPG36.js +24 -0
  272. package/dist/ui-input.entry-UWRVAOSW.js +112 -0
  273. package/dist/ui-menu-item.entry-5AOJO5MP.js +22 -0
  274. package/dist/ui-menu.entry-YDS6UMB5.js +98 -0
  275. package/dist/ui-popover.entry-PGWDCQIX.js +104 -0
  276. package/dist/ui-radio-group.entry-RHP5GNWU.js +142 -0
  277. package/dist/ui-radio.entry-5WRWPSTK.js +96 -0
  278. package/dist/ui-search-result-row.entry-IKJB2SJJ.js +50 -0
  279. package/dist/ui-search-shell.entry-ZIWF4ZHH.js +41 -0
  280. package/dist/ui-select.entry-N5TIKHR7.js +111 -0
  281. package/dist/ui-switch.entry-WUSZTXIR.js +75 -0
  282. package/dist/ui-tabs.entry-UFAVAQIF.js +124 -0
  283. package/dist/ui-textarea.entry-BYT47RAQ.js +117 -0
  284. package/dist/ui-toast-region.entry-6UYR3ZU2.js +78 -0
  285. package/dist/ui-tooltip.entry-YS7UX4FS.js +145 -0
  286. package/dist/ui-top-bar.entry-V27H6NFO.js +49 -0
  287. package/editor/chunk-JKRA4D4W.js +435 -0
  288. package/editor/chunk-NOOV344H.js +783 -0
  289. package/editor/extensions/index.d.ts +78 -0
  290. package/editor/extensions/index.js +28 -0
  291. package/editor/index.d.ts +7 -0
  292. package/editor/index.js +29 -0
  293. package/editor/table-overlay-DTr3KC9e.d.ts +12 -0
  294. package/editor/ui.d.ts +48 -0
  295. package/editor/ui.js +1 -0
  296. package/editor.css +662 -0
  297. package/layout/index.cjs +207 -0
  298. package/layout/index.css +166 -0
  299. package/layout/index.d.cts +3 -0
  300. package/layout/index.d.ts +3 -0
  301. package/layout/index.js +182 -0
  302. package/layout.css +124 -0
  303. package/loader/cdn.js +1 -0
  304. package/loader/index.cjs.js +1 -0
  305. package/loader/index.d.ts +24 -0
  306. package/loader/index.es2017.js +1 -0
  307. package/loader/index.js +2 -0
  308. package/package.json +244 -0
  309. package/styles.css +899 -0
  310. package/theme-dark.css +59 -0
  311. package/theme-high-contrast.css +21 -0
  312. package/theme-light.css +30 -0
  313. package/tokens.css +148 -0
  314. package/vue/chunk-J4UBEIIL.js +83 -0
  315. package/vue/editor/index.d.ts +89 -0
  316. package/vue/editor/index.js +125 -0
  317. package/vue/index.d.ts +167 -0
  318. package/vue/index.js +113 -0
package/theme-dark.css ADDED
@@ -0,0 +1,59 @@
1
+ @layer base {
2
+ @media (prefers-color-scheme: dark) {
3
+ :root:not([data-theme]) {
4
+ color-scheme: dark;
5
+ --ui-surface-canvas: #1a1a1a;
6
+ --ui-surface-default: #1a1a1a;
7
+ --ui-surface-muted: #242424;
8
+ --ui-surface-subtle: #2e2e2e;
9
+ --ui-surface-elevated: #2a2a2a;
10
+
11
+ --ui-text-primary: #f0f0ec;
12
+ --ui-text-secondary: #a0a09c;
13
+ --ui-text-muted: #6a6a66;
14
+ --ui-text-on-accent: #ffffff;
15
+
16
+ --ui-border-subtle: #2b2b28;
17
+ --ui-border-default: #333330;
18
+ --ui-border-strong: #4a4a46;
19
+
20
+ --ui-danger-solid: #ff6644;
21
+ --ui-danger-hover: #ff7755;
22
+ --ui-danger-soft: #2d1a16;
23
+ --ui-success-solid: #33cc66;
24
+ --ui-success-soft: #162a1f;
25
+ --ui-warning-solid: #ffaa22;
26
+ --ui-warning-soft: #2d2410;
27
+ --ui-info-solid: #4d9fff;
28
+ --ui-info-soft: #1a2a3d;
29
+ }
30
+ }
31
+
32
+ [data-theme="dark"] {
33
+ color-scheme: dark;
34
+ --ui-surface-canvas: #1a1a1a;
35
+ --ui-surface-default: #1a1a1a;
36
+ --ui-surface-muted: #242424;
37
+ --ui-surface-subtle: #2e2e2e;
38
+ --ui-surface-elevated: #2a2a2a;
39
+
40
+ --ui-text-primary: #f0f0ec;
41
+ --ui-text-secondary: #a0a09c;
42
+ --ui-text-muted: #6a6a66;
43
+ --ui-text-on-accent: #ffffff;
44
+
45
+ --ui-border-subtle: #2b2b28;
46
+ --ui-border-default: #333330;
47
+ --ui-border-strong: #4a4a46;
48
+
49
+ --ui-danger-solid: #ff6644;
50
+ --ui-danger-hover: #ff7755;
51
+ --ui-danger-soft: #2d1a16;
52
+ --ui-success-solid: #33cc66;
53
+ --ui-success-soft: #162a1f;
54
+ --ui-warning-solid: #ffaa22;
55
+ --ui-warning-soft: #2d2410;
56
+ --ui-info-solid: #4d9fff;
57
+ --ui-info-soft: #1a2a3d;
58
+ }
59
+ }
@@ -0,0 +1,21 @@
1
+ @layer base {
2
+ @media (prefers-contrast: more) {
3
+ :root:not([data-contrast]) {
4
+ --ui-text-primary: #000000;
5
+ --ui-text-secondary: #111111;
6
+ --ui-text-muted: #222222;
7
+ --ui-border-default: #000000;
8
+ --ui-border-strong: #000000;
9
+ --ui-focus-ring: #0000ff;
10
+ }
11
+ }
12
+
13
+ [data-contrast="high"] {
14
+ --ui-text-primary: #000000;
15
+ --ui-text-secondary: #111111;
16
+ --ui-text-muted: #222222;
17
+ --ui-border-default: #000000;
18
+ --ui-border-strong: #000000;
19
+ --ui-focus-ring: #0000ff;
20
+ }
21
+ }
@@ -0,0 +1,30 @@
1
+ @layer base {
2
+ :root,
3
+ [data-theme="light"] {
4
+ color-scheme: light;
5
+ --ui-surface-canvas: #ffffff;
6
+ --ui-surface-default: #ffffff;
7
+ --ui-surface-muted: #f8f8f6;
8
+ --ui-surface-subtle: #f0f0ec;
9
+ --ui-surface-elevated: #ffffff;
10
+
11
+ --ui-text-primary: #1a1a1a;
12
+ --ui-text-secondary: #5c5c5c;
13
+ --ui-text-muted: #9b9b9b;
14
+ --ui-text-on-accent: #ffffff;
15
+
16
+ --ui-border-subtle: #ecece8;
17
+ --ui-border-default: #e4e4e0;
18
+ --ui-border-strong: #c8c8c4;
19
+
20
+ --ui-danger-solid: #cc3300;
21
+ --ui-danger-hover: #a32900;
22
+ --ui-danger-soft: #fdf0ed;
23
+ --ui-success-solid: #007a33;
24
+ --ui-success-soft: #edf7f1;
25
+ --ui-warning-solid: #cc8800;
26
+ --ui-warning-soft: #fdf7e6;
27
+ --ui-info-solid: #0066cc;
28
+ --ui-info-soft: #e8f0fb;
29
+ }
30
+ }
package/tokens.css ADDED
@@ -0,0 +1,148 @@
1
+ @layer tokens {
2
+ :root {
3
+ --ui-font-stack-system: system-ui, sans-serif;
4
+ --ui-font-stack-neo-grotesque:
5
+ Inter,
6
+ Roboto,
7
+ "Helvetica Neue",
8
+ "Arial Nova",
9
+ "Nimbus Sans",
10
+ Arial,
11
+ sans-serif;
12
+ --ui-font-stack-humanist:
13
+ Seravek,
14
+ "Gill Sans Nova",
15
+ Ubuntu,
16
+ Calibri,
17
+ "DejaVu Sans",
18
+ source-sans-pro,
19
+ sans-serif;
20
+ --ui-font-stack-rounded:
21
+ ui-rounded,
22
+ "Hiragino Maru Gothic ProN",
23
+ Quicksand,
24
+ Comfortaa,
25
+ Manjari,
26
+ "Arial Rounded MT",
27
+ "Arial Rounded MT Bold",
28
+ Calibri,
29
+ source-sans-pro,
30
+ sans-serif;
31
+ --ui-font-family-sans: var(--ui-font-stack-neo-grotesque);
32
+ --ui-font-size-xs: 0.75rem;
33
+ --ui-font-size-sm: 0.875rem;
34
+ --ui-font-size-md: 1rem;
35
+ --ui-font-size-lg: 1.125rem;
36
+ --ui-font-size-xl: 1.25rem;
37
+ --ui-font-size-2xl: 1.5rem;
38
+ --ui-line-height-tight: 1.2;
39
+ --ui-line-height-md: 1.4;
40
+ --ui-line-height-relaxed: 1.6;
41
+
42
+ --ui-font-normal: 400;
43
+ --ui-font-medium: 500;
44
+ --ui-font-semibold: 600;
45
+ --ui-font-bold: 700;
46
+
47
+ --ui-space-1: 0.25rem;
48
+ --ui-space-2: 0.5rem;
49
+ --ui-space-3: 0.75rem;
50
+ --ui-space-4: 1rem;
51
+ --ui-space-5: 1.5rem;
52
+ --ui-space-6: 2rem;
53
+ --ui-space-7: 2.5rem;
54
+ --ui-space-8: 3rem;
55
+
56
+ --ui-radius-1: 0.25rem;
57
+ --ui-radius-2: 0.5rem;
58
+ --ui-radius-3: 0.75rem;
59
+ --ui-radius-4: 1rem;
60
+ --ui-radius-dialog: 1rem;
61
+ --ui-radius-round: 999px;
62
+
63
+ --ui-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
64
+ --ui-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
65
+ --ui-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
66
+ --ui-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
67
+ --ui-shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.14), 0 8px 16px rgba(0, 0, 0, 0.08);
68
+ --ui-shadow-dialog: var(--ui-shadow-xl);
69
+ --ui-overlay-backdrop: rgba(0, 0, 0, 0.4);
70
+
71
+ --ui-motion-fast: 120ms;
72
+ --ui-motion-base: 180ms;
73
+ --ui-motion-ease: cubic-bezier(0.2, 0, 0.2, 1);
74
+
75
+ --ui-surface-canvas: #ffffff;
76
+ --ui-surface-default: #ffffff;
77
+ --ui-surface-muted: #f8f8f6;
78
+ --ui-surface-subtle: #f0f0ec;
79
+ --ui-surface-elevated: #ffffff;
80
+
81
+ --ui-text-primary: #1a1a1a;
82
+ --ui-text-secondary: #5c5c5c;
83
+ --ui-text-muted: #9b9b9b;
84
+ --ui-text-on-accent: #ffffff;
85
+
86
+ --ui-border-subtle: #ecece8;
87
+ --ui-border-default: #e4e4e0;
88
+ --ui-border-strong: #c8c8c4;
89
+ --ui-focus-ring: #0066cc;
90
+
91
+ --ui-accent-solid: #0066cc;
92
+ --ui-accent-hover: #0052a3;
93
+ --ui-accent-active: #003d7a;
94
+ --ui-accent-soft: #e8f0fb;
95
+
96
+ --ui-danger-solid: #cc3300;
97
+ --ui-danger-hover: #a32900;
98
+ --ui-danger-soft: #fdf0ed;
99
+ --ui-success-solid: #007a33;
100
+ --ui-success-soft: #edf7f1;
101
+ --ui-warning-solid: #cc8800;
102
+ --ui-warning-soft: #fdf7e6;
103
+ --ui-info-solid: #0066cc;
104
+ --ui-info-soft: #e8f0fb;
105
+ }
106
+
107
+ @supports (color: oklch(0.5 0.1 240)) {
108
+ :root {
109
+ --ui-surface-canvas: oklch(0.99 0.01 250);
110
+ --ui-surface-default: oklch(1 0 0);
111
+ --ui-surface-muted: oklch(0.97 0.01 250);
112
+ --ui-surface-subtle: oklch(0.95 0.01 250);
113
+ --ui-surface-elevated: oklch(1 0 0);
114
+
115
+ --ui-text-primary: oklch(0.23 0.02 260);
116
+ --ui-text-secondary: oklch(0.36 0.02 260);
117
+ --ui-text-muted: oklch(0.5 0.02 260);
118
+ --ui-text-on-accent: oklch(0.99 0.01 250);
119
+
120
+ --ui-border-subtle: oklch(0.9 0.01 250);
121
+ --ui-border-default: oklch(0.84 0.01 250);
122
+ --ui-border-strong: oklch(0.7 0.02 250);
123
+ --ui-focus-ring: oklch(0.62 0.18 250);
124
+
125
+ --ui-accent-solid: oklch(0.62 0.18 250);
126
+ --ui-accent-hover: oklch(0.57 0.2 250);
127
+ --ui-accent-active: oklch(0.52 0.2 250);
128
+ --ui-accent-soft: oklch(0.95 0.03 250);
129
+
130
+ --ui-danger-solid: oklch(0.55 0.2 25);
131
+ --ui-danger-hover: oklch(0.5 0.2 25);
132
+ --ui-danger-soft: oklch(0.97 0.02 25);
133
+ --ui-success-solid: oklch(0.5 0.15 145);
134
+ --ui-success-soft: oklch(0.96 0.03 145);
135
+ --ui-warning-solid: oklch(0.7 0.15 85);
136
+ --ui-warning-soft: oklch(0.97 0.04 85);
137
+ --ui-info-solid: oklch(0.62 0.18 250);
138
+ --ui-info-soft: oklch(0.95 0.03 250);
139
+ }
140
+ }
141
+
142
+ @media (prefers-reduced-motion: reduce) {
143
+ :root {
144
+ --ui-motion-fast: 0ms;
145
+ --ui-motion-base: 0ms;
146
+ }
147
+ }
148
+ }
@@ -0,0 +1,83 @@
1
+ // src/adapter.ts
2
+ import {
3
+ cloneVNode,
4
+ defineComponent,
5
+ h,
6
+ isVNode,
7
+ shallowRef,
8
+ watchEffect
9
+ } from "vue";
10
+ var BASE_EVENT_BINDINGS = [
11
+ ["open", "onOpen"],
12
+ ["close", "onClose"],
13
+ ["select", "onSelect"],
14
+ ["change", "onChange"],
15
+ ["input", "onInput"],
16
+ ["dismiss", "onDismiss"]
17
+ ];
18
+ function toHTMLElement(value) {
19
+ if (!value) return null;
20
+ if (value instanceof HTMLElement) return value;
21
+ return null;
22
+ }
23
+ function createAdapterComponent(tagName, displayName, additionalEventBindings = []) {
24
+ const eventBindings = [...BASE_EVENT_BINDINGS, ...additionalEventBindings];
25
+ const callbackAttrs = new Set(eventBindings.map(([, callbackAttr]) => callbackAttr));
26
+ return defineComponent({
27
+ name: displayName,
28
+ inheritAttrs: false,
29
+ setup(_props, { attrs, slots }) {
30
+ const elementRef = shallowRef(null);
31
+ watchEffect((onCleanup) => {
32
+ const element = elementRef.value;
33
+ if (!element) return;
34
+ const adapterAttrs = attrs;
35
+ const handlers = eventBindings.map(
36
+ ([eventName, callbackAttr]) => {
37
+ const callback = adapterAttrs[callbackAttr];
38
+ return [
39
+ eventName,
40
+ typeof callback === "function" ? (event) => callback(event.detail) : void 0
41
+ ];
42
+ }
43
+ );
44
+ for (const [eventName, handler] of handlers) {
45
+ if (handler) element.addEventListener(eventName, handler);
46
+ }
47
+ onCleanup(() => {
48
+ for (const [eventName, handler] of handlers) {
49
+ if (handler) element.removeEventListener(eventName, handler);
50
+ }
51
+ });
52
+ });
53
+ return () => {
54
+ const forwardedAttrs = Object.fromEntries(
55
+ Object.entries(attrs).filter(([name]) => !callbackAttrs.has(name))
56
+ );
57
+ const children = Object.entries(slots).flatMap(([slotName, slotFn]) => {
58
+ if (!slotFn) return [];
59
+ return slotFn().map((node) => {
60
+ if (slotName === "default") return node;
61
+ if (isVNode(node)) return cloneVNode(node, { slot: slotName });
62
+ return h("span", { slot: slotName }, node);
63
+ });
64
+ });
65
+ return h(
66
+ tagName,
67
+ {
68
+ ...forwardedAttrs,
69
+ ref: (value) => {
70
+ elementRef.value = toHTMLElement(value);
71
+ }
72
+ },
73
+ children.length > 0 ? children : void 0
74
+ );
75
+ };
76
+ }
77
+ });
78
+ }
79
+
80
+ export {
81
+ toHTMLElement,
82
+ createAdapterComponent
83
+ };
@@ -0,0 +1,89 @@
1
+ import * as vue from 'vue';
2
+ import { PropType } from 'vue';
3
+ import { SlashMenuItem, SlashMenuAnchorRect } from '@threadlabs/looma/editor';
4
+ export * from '@threadlabs/looma/editor';
5
+ import { TableContextMenuActionEventDetail, InsertTableEventDetail, TableOverlayActionEventDetail, SlashMenuHighlightEventDetail, SlashMenuSelectEventDetail } from '@threadlabs/looma/editor/ui';
6
+
7
+ interface VueEditorAdapterEventMap {
8
+ tableAction: TableContextMenuActionEventDetail;
9
+ insertTable: InsertTableEventDetail;
10
+ tableOverlayAction: TableOverlayActionEventDetail;
11
+ slashMenuHighlight: SlashMenuHighlightEventDetail;
12
+ slashMenuSelect: SlashMenuSelectEventDetail;
13
+ }
14
+ declare const EditorSlashMenu: vue.DefineComponent<vue.ExtractPropTypes<{
15
+ open: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ query: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ items: {
24
+ type: PropType<SlashMenuItem[]>;
25
+ default: () => never[];
26
+ };
27
+ selectedIndex: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ anchorRect: {
32
+ type: PropType<SlashMenuAnchorRect | null>;
33
+ default: null;
34
+ };
35
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
36
+ [key: string]: any;
37
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
38
+ open: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ query: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ items: {
47
+ type: PropType<SlashMenuItem[]>;
48
+ default: () => never[];
49
+ };
50
+ selectedIndex: {
51
+ type: NumberConstructor;
52
+ default: number;
53
+ };
54
+ anchorRect: {
55
+ type: PropType<SlashMenuAnchorRect | null>;
56
+ default: null;
57
+ };
58
+ }>> & Readonly<{}>, {
59
+ open: boolean;
60
+ query: string;
61
+ items: SlashMenuItem[];
62
+ selectedIndex: number;
63
+ anchorRect: SlashMenuAnchorRect | null;
64
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
65
+ declare const EditorToolbar: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
66
+ [key: string]: any;
67
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
68
+ declare const EditorTableContextMenu: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
69
+ [key: string]: any;
70
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
71
+ declare const EditorTableToolbar: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
72
+ [key: string]: any;
73
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
74
+ declare const EditorInsertTableGrid: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
75
+ [key: string]: any;
76
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
77
+ declare const EditorTableOverlay: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
78
+ [key: string]: any;
79
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
80
+ declare const EDITOR_ADAPTER_COMPONENT_TAG_MAP: {
81
+ readonly EditorToolbar: "ui-editor-toolbar";
82
+ readonly EditorSlashMenu: "ui-editor-slash-menu";
83
+ readonly EditorTableContextMenu: "ui-editor-table-context-menu";
84
+ readonly EditorTableToolbar: "ui-editor-table-toolbar";
85
+ readonly EditorInsertTableGrid: "ui-editor-insert-table-grid";
86
+ readonly EditorTableOverlay: "ui-editor-table-overlay";
87
+ };
88
+
89
+ export { EDITOR_ADAPTER_COMPONENT_TAG_MAP, EditorInsertTableGrid, EditorSlashMenu, EditorTableContextMenu, EditorTableOverlay, EditorTableToolbar, EditorToolbar, type VueEditorAdapterEventMap };
@@ -0,0 +1,125 @@
1
+ import {
2
+ createAdapterComponent,
3
+ toHTMLElement
4
+ } from "../chunk-J4UBEIIL.js";
5
+
6
+ // src/editor/index.ts
7
+ import "@threadlabs/looma/editor";
8
+ export * from "@threadlabs/looma/editor";
9
+ import {
10
+ defineComponent,
11
+ h,
12
+ shallowRef,
13
+ watchEffect
14
+ } from "vue";
15
+ var EDITOR_EVENT_BINDINGS = [
16
+ ["looma-editor-table-action", "onTableAction"],
17
+ ["looma-editor-insert-table", "onInsertTable"],
18
+ ["looma-editor-table-overlay-action", "onTableOverlayAction"]
19
+ ];
20
+ var EditorSlashMenu = defineComponent({
21
+ name: "EditorSlashMenu",
22
+ inheritAttrs: false,
23
+ props: {
24
+ open: { type: Boolean, default: false },
25
+ query: { type: String, default: "" },
26
+ items: { type: Array, default: () => [] },
27
+ selectedIndex: { type: Number, default: 0 },
28
+ anchorRect: { type: Object, default: null }
29
+ },
30
+ setup(props, { attrs }) {
31
+ const elementRef = shallowRef(null);
32
+ watchEffect(() => {
33
+ const element = elementRef.value;
34
+ if (!element) return;
35
+ if (element.open !== props.open) element.open = props.open;
36
+ if (element.query !== props.query) element.query = props.query;
37
+ if (element.items !== props.items) element.items = props.items;
38
+ if (element.selectedIndex !== props.selectedIndex) {
39
+ element.selectedIndex = props.selectedIndex;
40
+ }
41
+ if (element.anchorRect !== props.anchorRect) element.anchorRect = props.anchorRect;
42
+ });
43
+ watchEffect((onCleanup) => {
44
+ const element = elementRef.value;
45
+ if (!element) return;
46
+ const callbackAttrs = attrs;
47
+ const handlers = [
48
+ [
49
+ "looma-editor-slash-menu-highlight",
50
+ typeof callbackAttrs.onSlashMenuHighlight === "function" ? (event) => callbackAttrs.onSlashMenuHighlight?.(
51
+ event.detail
52
+ ) : void 0
53
+ ],
54
+ [
55
+ "looma-editor-slash-menu-select",
56
+ typeof callbackAttrs.onSlashMenuSelect === "function" ? (event) => callbackAttrs.onSlashMenuSelect?.(
57
+ event.detail
58
+ ) : void 0
59
+ ]
60
+ ];
61
+ for (const [eventName, handler] of handlers) {
62
+ if (handler) element.addEventListener(eventName, handler);
63
+ }
64
+ onCleanup(() => {
65
+ for (const [eventName, handler] of handlers) {
66
+ if (handler) element.removeEventListener(eventName, handler);
67
+ }
68
+ });
69
+ });
70
+ return () => {
71
+ const callbackAttrs = attrs;
72
+ const { onSlashMenuHighlight, onSlashMenuSelect, ...forwardedAttrs } = callbackAttrs;
73
+ void onSlashMenuHighlight;
74
+ void onSlashMenuSelect;
75
+ return h("ui-editor-slash-menu", {
76
+ ...forwardedAttrs,
77
+ ref: (value) => {
78
+ elementRef.value = toHTMLElement(value);
79
+ }
80
+ });
81
+ };
82
+ }
83
+ });
84
+ var EditorToolbar = createAdapterComponent(
85
+ "ui-editor-toolbar",
86
+ "EditorToolbar",
87
+ EDITOR_EVENT_BINDINGS
88
+ );
89
+ var EditorTableContextMenu = createAdapterComponent(
90
+ "ui-editor-table-context-menu",
91
+ "EditorTableContextMenu",
92
+ EDITOR_EVENT_BINDINGS
93
+ );
94
+ var EditorTableToolbar = createAdapterComponent(
95
+ "ui-editor-table-toolbar",
96
+ "EditorTableToolbar",
97
+ EDITOR_EVENT_BINDINGS
98
+ );
99
+ var EditorInsertTableGrid = createAdapterComponent(
100
+ "ui-editor-insert-table-grid",
101
+ "EditorInsertTableGrid",
102
+ EDITOR_EVENT_BINDINGS
103
+ );
104
+ var EditorTableOverlay = createAdapterComponent(
105
+ "ui-editor-table-overlay",
106
+ "EditorTableOverlay",
107
+ EDITOR_EVENT_BINDINGS
108
+ );
109
+ var EDITOR_ADAPTER_COMPONENT_TAG_MAP = {
110
+ EditorToolbar: "ui-editor-toolbar",
111
+ EditorSlashMenu: "ui-editor-slash-menu",
112
+ EditorTableContextMenu: "ui-editor-table-context-menu",
113
+ EditorTableToolbar: "ui-editor-table-toolbar",
114
+ EditorInsertTableGrid: "ui-editor-insert-table-grid",
115
+ EditorTableOverlay: "ui-editor-table-overlay"
116
+ };
117
+ export {
118
+ EDITOR_ADAPTER_COMPONENT_TAG_MAP,
119
+ EditorInsertTableGrid,
120
+ EditorSlashMenu,
121
+ EditorTableContextMenu,
122
+ EditorTableOverlay,
123
+ EditorTableToolbar,
124
+ EditorToolbar
125
+ };