@coorax/core 0.0.0-canary.1 → 0.0.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/base/types/field/field.blockquote.types.d.ts +4 -0
  2. package/dist/base/types/field/field.d.ts +14 -3
  3. package/dist/base/types/field/field.image.types.d.ts +3 -0
  4. package/dist/base/types/field/field.video.types.d.ts +8 -0
  5. package/dist/base/types/field/fields.iframe.types.d.ts +7 -0
  6. package/dist/base/types/global.types.d.ts +2 -0
  7. package/dist/base/types/tree/tree.d.ts +2 -1
  8. package/dist/constants/field.constants.d.ts +1 -0
  9. package/dist/constants/index.d.ts +1 -0
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1174 -388
  12. package/dist/modules/caption/caption.module.d.ts +35 -0
  13. package/dist/modules/caption/caption.test.d.ts +1 -0
  14. package/dist/modules/code/code.module.d.ts +37 -0
  15. package/dist/modules/deletion/deletion.module.d.ts +26 -0
  16. package/dist/modules/focus/focus.module.d.ts +1 -1
  17. package/dist/modules/history/history.module.d.ts +14 -0
  18. package/dist/modules/hover/hover.module.d.ts +1 -1
  19. package/dist/modules/index.d.ts +3 -1
  20. package/dist/modules/insertion/insertion.module.d.ts +18 -1
  21. package/dist/modules/modules-manager.d.ts +2 -0
  22. package/dist/modules/selection/selection.module.d.ts +1 -1
  23. package/dist/modules/text-editing/text-editing.constants.d.ts +1 -1
  24. package/dist/modules/text-editing/text-editing.module.d.ts +1 -2
  25. package/dist/modules/text-editing/text-editing.utils.d.ts +1 -1
  26. package/dist/services/document/document.d.ts +1 -2
  27. package/dist/services/eventbus/eventbus.d.ts +4 -4
  28. package/dist/services/eventbus/eventbus.test.d.ts +1 -1
  29. package/dist/services/eventbus/subscriber.d.ts +4 -4
  30. package/dist/services/mutations/mutations.d.ts +10 -5
  31. package/dist/services/tasks/tasks.service.d.ts +1 -1
  32. package/dist/services/text-marks/index.d.ts +0 -1
  33. package/dist/services/text-marks/text-marks.d.ts +1 -1
  34. package/dist/services/ui/contributions.types.d.ts +79 -0
  35. package/dist/services/ui/default-styles.d.ts +1 -1
  36. package/dist/services/ui/index.d.ts +0 -1
  37. package/dist/services/ui/ui.d.ts +7 -6
  38. package/dist/services/ui/ui.types.d.ts +7 -95
  39. package/dist/styles.css +1 -536
  40. package/dist/utils/fields.utils.d.ts +10 -2
  41. package/dist/utils/index.d.ts +0 -6
  42. package/package.json +6 -2
  43. package/styles.css +4 -2
package/dist/styles.css CHANGED
@@ -1,537 +1,2 @@
1
1
  /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
- @import url("https://fonts.googleapis.com/css2?family=Geist+Mono:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
3
- @layer properties;
4
- @font-face {
5
- font-family: 'Geist Variable';
6
- font-style: normal;
7
- font-display: swap;
8
- font-weight: 100 900;
9
- src: url(./files/geist-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
10
- unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
11
- }
12
- @font-face {
13
- font-family: 'Geist Variable';
14
- font-style: normal;
15
- font-display: swap;
16
- font-weight: 100 900;
17
- src: url(./files/geist-cyrillic-wght-normal.woff2) format('woff2-variations');
18
- unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
19
- }
20
- @font-face {
21
- font-family: 'Geist Variable';
22
- font-style: normal;
23
- font-display: swap;
24
- font-weight: 100 900;
25
- src: url(./files/geist-vietnamese-wght-normal.woff2) format('woff2-variations');
26
- unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
27
- }
28
- @font-face {
29
- font-family: 'Geist Variable';
30
- font-style: normal;
31
- font-display: swap;
32
- font-weight: 100 900;
33
- src: url(./files/geist-latin-ext-wght-normal.woff2) format('woff2-variations');
34
- unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
35
- }
36
- @font-face {
37
- font-family: 'Geist Variable';
38
- font-style: normal;
39
- font-display: swap;
40
- font-weight: 100 900;
41
- src: url(./files/geist-latin-wght-normal.woff2) format('woff2-variations');
42
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
43
- }
44
- @layer theme, base, components, utilities;
45
- @layer theme {
46
- :root, :host {
47
- --font-sans: var(--font-sans);
48
- --font-serif: var(--font-serif);
49
- --font-mono: var(--font-mono);
50
- --color-amber-500: oklch(76.9% 0.188 70.08);
51
- --shadow-2xs: var(--shadow-2xs);
52
- --shadow-xs: var(--shadow-xs);
53
- --shadow-sm: var(--shadow-sm);
54
- --shadow-md: var(--shadow-md);
55
- --shadow-lg: var(--shadow-lg);
56
- --shadow-xl: var(--shadow-xl);
57
- --shadow-2xl: var(--shadow-2xl);
58
- --default-font-family: var(--font-sans);
59
- --default-mono-font-family: var(--font-mono);
60
- --shadow: var(--shadow);
61
- --color-muted-foreground: var(--muted-foreground);
62
- }
63
- }
64
- @layer base {
65
- *, ::after, ::before, ::backdrop, ::file-selector-button {
66
- box-sizing: border-box;
67
- margin: 0;
68
- padding: 0;
69
- border: 0 solid;
70
- }
71
- html, :host {
72
- line-height: 1.5;
73
- -webkit-text-size-adjust: 100%;
74
- tab-size: 4;
75
- font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
76
- font-feature-settings: var(--default-font-feature-settings, normal);
77
- font-variation-settings: var(--default-font-variation-settings, normal);
78
- -webkit-tap-highlight-color: transparent;
79
- }
80
- hr {
81
- height: 0;
82
- color: inherit;
83
- border-top-width: 1px;
84
- }
85
- abbr:where([title]) {
86
- -webkit-text-decoration: underline dotted;
87
- text-decoration: underline dotted;
88
- }
89
- h1, h2, h3, h4, h5, h6 {
90
- font-size: inherit;
91
- font-weight: inherit;
92
- }
93
- a {
94
- color: inherit;
95
- -webkit-text-decoration: inherit;
96
- text-decoration: inherit;
97
- }
98
- b, strong {
99
- font-weight: bolder;
100
- }
101
- code, kbd, samp, pre {
102
- font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
103
- font-feature-settings: var(--default-mono-font-feature-settings, normal);
104
- font-variation-settings: var(--default-mono-font-variation-settings, normal);
105
- font-size: 1em;
106
- }
107
- small {
108
- font-size: 80%;
109
- }
110
- sub, sup {
111
- font-size: 75%;
112
- line-height: 0;
113
- position: relative;
114
- vertical-align: baseline;
115
- }
116
- sub {
117
- bottom: -0.25em;
118
- }
119
- sup {
120
- top: -0.5em;
121
- }
122
- table {
123
- text-indent: 0;
124
- border-color: inherit;
125
- border-collapse: collapse;
126
- }
127
- :-moz-focusring:where(:not(iframe)) {
128
- outline: auto;
129
- }
130
- progress {
131
- vertical-align: baseline;
132
- }
133
- summary {
134
- display: list-item;
135
- }
136
- ol, ul, menu {
137
- list-style: none;
138
- }
139
- img, svg, video, canvas, audio, iframe, embed, object {
140
- display: block;
141
- vertical-align: middle;
142
- }
143
- img, video {
144
- max-width: 100%;
145
- height: auto;
146
- }
147
- button, input, select, optgroup, textarea, ::file-selector-button {
148
- font: inherit;
149
- font-feature-settings: inherit;
150
- font-variation-settings: inherit;
151
- letter-spacing: inherit;
152
- color: inherit;
153
- border-radius: 0;
154
- background-color: transparent;
155
- opacity: 1;
156
- }
157
- :where(select:is([multiple], [size])) optgroup {
158
- font-weight: bolder;
159
- }
160
- :where(select:is([multiple], [size])) optgroup option {
161
- padding-inline-start: 20px;
162
- }
163
- ::file-selector-button {
164
- margin-inline-end: 4px;
165
- }
166
- ::placeholder {
167
- opacity: 1;
168
- }
169
- @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
170
- ::placeholder {
171
- color: currentcolor;
172
- @supports (color: color-mix(in lab, red, red)) {
173
- color: color-mix(in oklab, currentcolor 50%, transparent);
174
- }
175
- }
176
- }
177
- textarea {
178
- resize: vertical;
179
- }
180
- ::-webkit-search-decoration {
181
- -webkit-appearance: none;
182
- }
183
- ::-webkit-date-and-time-value {
184
- min-height: 1lh;
185
- text-align: inherit;
186
- }
187
- ::-webkit-datetime-edit {
188
- display: inline-flex;
189
- }
190
- ::-webkit-datetime-edit-fields-wrapper {
191
- padding: 0;
192
- }
193
- ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
194
- padding-block: 0;
195
- }
196
- ::-webkit-calendar-picker-indicator {
197
- line-height: 1;
198
- }
199
- :-moz-ui-invalid {
200
- box-shadow: none;
201
- }
202
- button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
203
- appearance: button;
204
- }
205
- ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
206
- height: auto;
207
- }
208
- [hidden]:where(:not([hidden="until-found"])) {
209
- display: none !important;
210
- }
211
- }
212
- @layer utilities {
213
- .visible {
214
- visibility: visible;
215
- }
216
- .absolute {
217
- position: absolute;
218
- }
219
- .relative {
220
- position: relative;
221
- }
222
- .container {
223
- width: 100%;
224
- @media (width >= 40rem) {
225
- max-width: 40rem;
226
- }
227
- @media (width >= 48rem) {
228
- max-width: 48rem;
229
- }
230
- @media (width >= 64rem) {
231
- max-width: 64rem;
232
- }
233
- @media (width >= 80rem) {
234
- max-width: 80rem;
235
- }
236
- @media (width >= 96rem) {
237
- max-width: 96rem;
238
- }
239
- }
240
- .block {
241
- display: block;
242
- }
243
- .hidden {
244
- display: none;
245
- }
246
- .transform {
247
- transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
248
- }
249
- .border {
250
- border-style: var(--tw-border-style);
251
- border-width: 1px;
252
- }
253
- .bg-amber-500\/10 {
254
- background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 10%, transparent);
255
- @supports (color: color-mix(in lab, red, red)) {
256
- background-color: color-mix(in oklab, var(--color-amber-500) 10%, transparent);
257
- }
258
- }
259
- .italic {
260
- font-style: italic;
261
- }
262
- .underline {
263
- text-decoration-line: underline;
264
- }
265
- .ring {
266
- --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
267
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
268
- }
269
- .ring-transparent {
270
- --tw-ring-color: transparent;
271
- }
272
- .outline {
273
- outline-style: var(--tw-outline-style);
274
- outline-width: 1px;
275
- }
276
- .focus\:ring-primary:focus {
277
- --tw-ring-color: var(--primary);
278
- }
279
- .\[\&\:empty\:before\]\:pointer-events-none:empty:before {
280
- pointer-events: none;
281
- }
282
- .\[\&\:empty\:before\]\:text-muted-foreground:empty:before {
283
- color: var(--muted-foreground);
284
- }
285
- .\[\&\:empty\:before\]\:content-\[attr\(data-placeholder\)\]:empty:before {
286
- --tw-content: attr(data-placeholder);
287
- content: var(--tw-content);
288
- }
289
- }
290
- :root {
291
- --background: oklch(0.9232 0.0026 48.7171);
292
- --foreground: oklch(0.2795 0.0368 260.031);
293
- --card: oklch(0.9699 0.0013 106.4238);
294
- --card-foreground: oklch(0.2795 0.0368 260.031);
295
- --popover: oklch(0.9699 0.0013 106.4238);
296
- --popover-foreground: oklch(0.2795 0.0368 260.031);
297
- --primary: #6366f1;
298
- --primary-foreground: oklch(1 0 0);
299
- --secondary: oklch(0.8687 0.0043 56.366);
300
- --secondary-foreground: oklch(0.4461 0.0263 256.8018);
301
- --muted: oklch(0.9232 0.0026 48.7171);
302
- --muted-foreground: oklch(0.551 0.0234 264.3637);
303
- --accent: oklch(0.9376 0.026 321.9388);
304
- --accent-foreground: oklch(0.3729 0.0306 259.7328);
305
- --destructive: oklch(0.6368 0.2078 25.3313);
306
- --destructive-foreground: oklch(1 0 0);
307
- --border: oklch(0.8687 0.0043 56.366);
308
- --input: oklch(0.8687 0.0043 56.366);
309
- --ring: oklch(0.5854 0.2041 277.1173);
310
- --chart-1: oklch(0.5854 0.2041 277.1173);
311
- --chart-2: oklch(0.5106 0.2301 276.9656);
312
- --chart-3: oklch(0.4568 0.2146 277.0229);
313
- --chart-4: oklch(0.3984 0.1773 277.3662);
314
- --chart-5: oklch(0.3588 0.1354 278.6973);
315
- --sidebar: oklch(0.8687 0.0043 56.366);
316
- --sidebar-foreground: oklch(0.2795 0.0368 260.031);
317
- --sidebar-primary: oklch(0.5854 0.2041 277.1173);
318
- --sidebar-primary-foreground: oklch(1 0 0);
319
- --sidebar-accent: oklch(0.9376 0.026 321.9388);
320
- --sidebar-accent-foreground: oklch(0.3729 0.0306 259.7328);
321
- --sidebar-border: oklch(0.8687 0.0043 56.366);
322
- --sidebar-ring: oklch(0.5854 0.2041 277.1173);
323
- --font-sans: Inter, sans-serif;
324
- --font-mono: Geist Mono, monospace;
325
- --radius: 1.25rem;
326
- --shadow-x: 2px;
327
- --shadow-y: 2px;
328
- --shadow-blur: 10px;
329
- --shadow-spread: 4px;
330
- --shadow-opacity: 0.18;
331
- --shadow-color: hsl(240 4% 60%);
332
- --shadow-2xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
333
- --shadow-xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
334
- --shadow-sm: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 1px 2px 3px hsl(240 4% 60% / 0.18);
335
- --shadow: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 1px 2px 3px hsl(240 4% 60% / 0.18);
336
- --shadow-md: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 2px 4px 3px hsl(240 4% 60% / 0.18);
337
- --shadow-lg: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 4px 6px 3px hsl(240 4% 60% / 0.18);
338
- --shadow-xl: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 8px 10px 3px hsl(240 4% 60% / 0.18);
339
- --shadow-2xl: 2px 2px 10px 4px hsl(240 4% 60% / 0.45);
340
- --tracking-normal: 0em;
341
- --spacing: 0.25rem;
342
- }
343
- .dark {
344
- --background: oklch(0.2244 0.0074 67.437);
345
- --foreground: oklch(0.9288 0.0126 255.5078);
346
- --card: oklch(0.2801 0.008 59.3379);
347
- --card-foreground: oklch(0.9288 0.0126 255.5078);
348
- --popover: oklch(0.2801 0.008 59.3379);
349
- --popover-foreground: oklch(0.9288 0.0126 255.5078);
350
- --primary: oklch(0.6801 0.1583 276.9349);
351
- --primary-foreground: oklch(0.2244 0.0074 67.437);
352
- --secondary: oklch(0.3359 0.0077 59.4197);
353
- --secondary-foreground: oklch(0.8717 0.0093 258.3382);
354
- --muted: oklch(0.2287 0.0074 67.4469);
355
- --muted-foreground: oklch(0.7137 0.0192 261.3246);
356
- --accent: oklch(0.3896 0.0074 59.4734);
357
- --accent-foreground: oklch(0.8717 0.0093 258.3382);
358
- --destructive: oklch(0.6368 0.2078 25.3313);
359
- --destructive-foreground: oklch(0.2244 0.0074 67.437);
360
- --border: oklch(0.3359 0.0077 59.4197);
361
- --input: oklch(0.3359 0.0077 59.4197);
362
- --ring: oklch(0.6801 0.1583 276.9349);
363
- --chart-1: oklch(0.6801 0.1583 276.9349);
364
- --chart-2: oklch(0.5854 0.2041 277.1173);
365
- --chart-3: oklch(0.5106 0.2301 276.9656);
366
- --chart-4: oklch(0.4568 0.2146 277.0229);
367
- --chart-5: oklch(0.3984 0.1773 277.3662);
368
- --sidebar: oklch(0.3359 0.0077 59.4197);
369
- --sidebar-foreground: oklch(0.9288 0.0126 255.5078);
370
- --sidebar-primary: oklch(0.6801 0.1583 276.9349);
371
- --sidebar-primary-foreground: oklch(0.2244 0.0074 67.437);
372
- --sidebar-accent: oklch(0.3896 0.0074 59.4734);
373
- --sidebar-accent-foreground: oklch(0.8717 0.0093 258.3382);
374
- --sidebar-border: oklch(0.3359 0.0077 59.4197);
375
- --sidebar-ring: oklch(0.6801 0.1583 276.9349);
376
- --font-sans: Inter, sans-serif;
377
- --font-mono: Geist Mono, monospace;
378
- --radius: 1.25rem;
379
- --shadow-x: 2px;
380
- --shadow-y: 2px;
381
- --shadow-blur: 10px;
382
- --shadow-spread: 4px;
383
- --shadow-opacity: 0.18;
384
- --shadow-color: hsl(0 0% 0%);
385
- --shadow-2xs: 2px 2px 10px 4px hsl(0 0% 0% / 0.09);
386
- --shadow-xs: 2px 2px 10px 4px hsl(0 0% 0% / 0.09);
387
- --shadow-sm: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 1px 2px 3px hsl(0 0% 0% / 0.18);
388
- --shadow: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 1px 2px 3px hsl(0 0% 0% / 0.18);
389
- --shadow-md: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 2px 4px 3px hsl(0 0% 0% / 0.18);
390
- --shadow-lg: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 4px 6px 3px hsl(0 0% 0% / 0.18);
391
- --shadow-xl: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 8px 10px 3px hsl(0 0% 0% / 0.18);
392
- --shadow-2xl: 2px 2px 10px 4px hsl(0 0% 0% / 0.45);
393
- }
394
- @layer base {
395
- * {
396
- border-color: var(--border);
397
- outline-color: var(--ring);
398
- @supports (color: color-mix(in lab, red, red)) {
399
- outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
400
- }
401
- }
402
- body {
403
- background-color: var(--background);
404
- color: var(--foreground);
405
- }
406
- html {
407
- font-family: var(--font-sans);
408
- }
409
- }
410
- @property --tw-rotate-x {
411
- syntax: "*";
412
- inherits: false;
413
- }
414
- @property --tw-rotate-y {
415
- syntax: "*";
416
- inherits: false;
417
- }
418
- @property --tw-rotate-z {
419
- syntax: "*";
420
- inherits: false;
421
- }
422
- @property --tw-skew-x {
423
- syntax: "*";
424
- inherits: false;
425
- }
426
- @property --tw-skew-y {
427
- syntax: "*";
428
- inherits: false;
429
- }
430
- @property --tw-border-style {
431
- syntax: "*";
432
- inherits: false;
433
- initial-value: solid;
434
- }
435
- @property --tw-shadow {
436
- syntax: "*";
437
- inherits: false;
438
- initial-value: 0 0 #0000;
439
- }
440
- @property --tw-shadow-color {
441
- syntax: "*";
442
- inherits: false;
443
- }
444
- @property --tw-shadow-alpha {
445
- syntax: "<percentage>";
446
- inherits: false;
447
- initial-value: 100%;
448
- }
449
- @property --tw-inset-shadow {
450
- syntax: "*";
451
- inherits: false;
452
- initial-value: 0 0 #0000;
453
- }
454
- @property --tw-inset-shadow-color {
455
- syntax: "*";
456
- inherits: false;
457
- }
458
- @property --tw-inset-shadow-alpha {
459
- syntax: "<percentage>";
460
- inherits: false;
461
- initial-value: 100%;
462
- }
463
- @property --tw-ring-color {
464
- syntax: "*";
465
- inherits: false;
466
- }
467
- @property --tw-ring-shadow {
468
- syntax: "*";
469
- inherits: false;
470
- initial-value: 0 0 #0000;
471
- }
472
- @property --tw-inset-ring-color {
473
- syntax: "*";
474
- inherits: false;
475
- }
476
- @property --tw-inset-ring-shadow {
477
- syntax: "*";
478
- inherits: false;
479
- initial-value: 0 0 #0000;
480
- }
481
- @property --tw-ring-inset {
482
- syntax: "*";
483
- inherits: false;
484
- }
485
- @property --tw-ring-offset-width {
486
- syntax: "<length>";
487
- inherits: false;
488
- initial-value: 0px;
489
- }
490
- @property --tw-ring-offset-color {
491
- syntax: "*";
492
- inherits: false;
493
- initial-value: #fff;
494
- }
495
- @property --tw-ring-offset-shadow {
496
- syntax: "*";
497
- inherits: false;
498
- initial-value: 0 0 #0000;
499
- }
500
- @property --tw-outline-style {
501
- syntax: "*";
502
- inherits: false;
503
- initial-value: solid;
504
- }
505
- @property --tw-content {
506
- syntax: "*";
507
- inherits: false;
508
- initial-value: "";
509
- }
510
- @layer properties {
511
- @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
512
- *, ::before, ::after, ::backdrop {
513
- --tw-rotate-x: initial;
514
- --tw-rotate-y: initial;
515
- --tw-rotate-z: initial;
516
- --tw-skew-x: initial;
517
- --tw-skew-y: initial;
518
- --tw-border-style: solid;
519
- --tw-shadow: 0 0 #0000;
520
- --tw-shadow-color: initial;
521
- --tw-shadow-alpha: 100%;
522
- --tw-inset-shadow: 0 0 #0000;
523
- --tw-inset-shadow-color: initial;
524
- --tw-inset-shadow-alpha: 100%;
525
- --tw-ring-color: initial;
526
- --tw-ring-shadow: 0 0 #0000;
527
- --tw-inset-ring-color: initial;
528
- --tw-inset-ring-shadow: 0 0 #0000;
529
- --tw-ring-inset: initial;
530
- --tw-ring-offset-width: 0px;
531
- --tw-ring-offset-color: #fff;
532
- --tw-ring-offset-shadow: 0 0 #0000;
533
- --tw-outline-style: solid;
534
- --tw-content: "";
535
- }
536
- }
537
- }
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-content:""}}}@layer theme{:root,:host{--font-sans:var(--font-sans);--font-serif:var(--font-serif);--font-mono:var(--font-mono);--color-amber-500:oklch(76.9% .188 70.08);--shadow-2xs:var(--shadow-2xs);--shadow-xs:var(--shadow-xs);--shadow-sm:var(--shadow-sm);--shadow-md:var(--shadow-md);--shadow-lg:var(--shadow-lg);--shadow-xl:var(--shadow-xl);--shadow-2xl:var(--shadow-2xl);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--shadow:var(--shadow);--color-muted-foreground:var(--muted-foreground)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);color:var(--foreground)}html{font-family:var(--font-sans)}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.static{position:static}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-flex{display:inline-flex}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.border{border-style:var(--tw-border-style);border-width:1px}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.italic{font-style:italic}.underline{text-decoration-line:underline}.ring{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-transparent{--tw-ring-color:transparent}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.focus\:ring-primary:focus{--tw-ring-color:var(--primary)}.dark\:bg-transparent:is(.dark *){background-color:#0000}.\[\&\:empty\:before\]\:pointer-events-none:empty:before{pointer-events:none}.\[\&\:empty\:before\]\:text-muted-foreground:empty:before{color:var(--muted-foreground)}.\[\&\:empty\:before\]\:content-\[attr\(data-placeholder\)\]:empty:before{--tw-content:attr(data-placeholder);content:var(--tw-content)}}:root{--background:oklch(92.32% .0026 48.7171);--foreground:oklch(27.95% .0368 260.031);--card:oklch(96.99% .0013 106.424);--card-foreground:oklch(27.95% .0368 260.031);--popover:oklch(96.99% .0013 106.424);--popover-foreground:oklch(27.95% .0368 260.031);--primary:#6366f1;--primary-foreground:oklch(100% 0 0);--secondary:oklch(86.87% .0043 56.366);--secondary-foreground:oklch(44.61% .0263 256.802);--muted:oklch(92.32% .0026 48.7171);--muted-foreground:oklch(55.1% .0234 264.364);--accent:oklch(93.76% .026 321.939);--accent-foreground:oklch(37.29% .0306 259.733);--destructive:oklch(63.68% .2078 25.3313);--destructive-foreground:oklch(100% 0 0);--border:oklch(86.87% .0043 56.366);--input:oklch(86.87% .0043 56.366);--ring:oklch(58.54% .2041 277.117);--chart-1:oklch(58.54% .2041 277.117);--chart-2:oklch(51.06% .2301 276.966);--chart-3:oklch(45.68% .2146 277.023);--chart-4:oklch(39.84% .1773 277.366);--chart-5:oklch(35.88% .1354 278.697);--sidebar:oklch(86.87% .0043 56.366);--sidebar-foreground:oklch(27.95% .0368 260.031);--sidebar-primary:oklch(58.54% .2041 277.117);--sidebar-primary-foreground:oklch(100% 0 0);--sidebar-accent:oklch(93.76% .026 321.939);--sidebar-accent-foreground:oklch(37.29% .0306 259.733);--sidebar-border:oklch(86.87% .0043 56.366);--sidebar-ring:oklch(58.54% .2041 277.117);--font-sans:Inter, sans-serif;--font-mono:Geist Mono, monospace;--radius:1.25rem;--shadow-x:2px;--shadow-y:2px;--shadow-blur:10px;--shadow-spread:4px;--shadow-opacity:.18;--shadow-color:#95959d;--shadow-2xs:2px 2px 10px 4px #95959d17;--shadow-xs:2px 2px 10px 4px #95959d17;--shadow-sm:2px 2px 10px 4px #95959d2e, 2px 1px 2px 3px #95959d2e;--shadow:2px 2px 10px 4px #95959d2e, 2px 1px 2px 3px #95959d2e;--shadow-md:2px 2px 10px 4px #95959d2e, 2px 2px 4px 3px #95959d2e;--shadow-lg:2px 2px 10px 4px #95959d2e, 2px 4px 6px 3px #95959d2e;--shadow-xl:2px 2px 10px 4px #95959d2e, 2px 8px 10px 3px #95959d2e;--shadow-2xl:2px 2px 10px 4px #95959d73;--tracking-normal:0em;--spacing:.25rem}.dark{--background:oklch(22.44% .0074 67.437);--foreground:oklch(92.88% .0126 255.508);--card:oklch(28.01% .008 59.3379);--card-foreground:oklch(92.88% .0126 255.508);--popover:oklch(28.01% .008 59.3379);--popover-foreground:oklch(92.88% .0126 255.508);--primary:oklch(68.01% .1583 276.935);--primary-foreground:oklch(22.44% .0074 67.437);--secondary:oklch(33.59% .0077 59.4197);--secondary-foreground:oklch(87.17% .0093 258.338);--muted:oklch(22.87% .0074 67.4469);--muted-foreground:oklch(71.37% .0192 261.325);--accent:oklch(38.96% .0074 59.4734);--accent-foreground:oklch(87.17% .0093 258.338);--destructive:oklch(63.68% .2078 25.3313);--destructive-foreground:oklch(22.44% .0074 67.437);--border:oklch(33.59% .0077 59.4197);--input:oklch(33.59% .0077 59.4197);--ring:oklch(68.01% .1583 276.935);--chart-1:oklch(68.01% .1583 276.935);--chart-2:oklch(58.54% .2041 277.117);--chart-3:oklch(51.06% .2301 276.966);--chart-4:oklch(45.68% .2146 277.023);--chart-5:oklch(39.84% .1773 277.366);--sidebar:oklch(33.59% .0077 59.4197);--sidebar-foreground:oklch(92.88% .0126 255.508);--sidebar-primary:oklch(68.01% .1583 276.935);--sidebar-primary-foreground:oklch(22.44% .0074 67.437);--sidebar-accent:oklch(38.96% .0074 59.4734);--sidebar-accent-foreground:oklch(87.17% .0093 258.338);--sidebar-border:oklch(33.59% .0077 59.4197);--sidebar-ring:oklch(68.01% .1583 276.935);--font-sans:Inter, sans-serif;--font-mono:Geist Mono, monospace;--radius:1.25rem;--shadow-x:2px;--shadow-y:2px;--shadow-blur:10px;--shadow-spread:4px;--shadow-opacity:.18;--shadow-color:#000;--shadow-2xs:2px 2px 10px 4px #00000017;--shadow-xs:2px 2px 10px 4px #00000017;--shadow-sm:2px 2px 10px 4px #0000002e, 2px 1px 2px 3px #0000002e;--shadow:2px 2px 10px 4px #0000002e, 2px 1px 2px 3px #0000002e;--shadow-md:2px 2px 10px 4px #0000002e, 2px 2px 4px 3px #0000002e;--shadow-lg:2px 2px 10px 4px #0000002e, 2px 4px 6px 3px #0000002e;--shadow-xl:2px 2px 10px 4px #0000002e, 2px 8px 10px 3px #0000002e;--shadow-2xl:2px 2px 10px 4px #00000073}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}
@@ -1,11 +1,17 @@
1
1
  import type { Block } from "../base";
2
- import type { DividerField, Field, FieldTag, FieldType } from "../base/types/field/field";
2
+ import type { Field, FieldTag, FieldType } from "../base/types/field/field";
3
3
  import type { OmitFieldsMethods } from "../base/types/global.types";
4
4
  export declare function isEditableField<T extends Field = Field>(block: Block): block is T;
5
+ export declare function isEditableType<T extends FieldType = FieldType>(type: T): boolean;
6
+ export declare function isMediaField<T extends Field = Field>(block: Block): block is T;
7
+ export declare function isMediaType<T extends FieldType = FieldType>(type: T): boolean;
8
+ export declare function getIframeSrc(value: string): string | null;
5
9
  declare function NewTextField(defaultValue?: Partial<OmitFieldsMethods<Field<"text", FieldTag>>>): Field<"text">;
6
10
  declare function NewHeadingField(defaultValue?: Partial<OmitFieldsMethods<Field<"heading", FieldTag>>>): Field<"heading">;
7
11
  declare function NewImageField(defaultValue?: Partial<OmitFieldsMethods<Field<"image", FieldTag>>>): Field<"image">;
8
- declare function NewDividerField(defaultValue?: Partial<OmitFieldsMethods<DividerField>>): DividerField;
12
+ declare function NewIFrameField(defaultValue?: Partial<OmitFieldsMethods<Field<"iframe", FieldTag>>>): Field<"iframe">;
13
+ declare function NewBlockquoteField(defaultValue?: Partial<OmitFieldsMethods<Field<"blockquote", FieldTag>>>): Field<"blockquote">;
14
+ declare function NewDividerField(defaultValue?: Partial<OmitFieldsMethods<Field<"divider", FieldTag>>>): Field<"divider">;
9
15
  declare function NewField<T extends FieldType = FieldType, A extends FieldTag = FieldTag>(type: T, defaultValue?: Partial<OmitFieldsMethods<Field<T, A>>>): Field;
10
16
  declare function DeserializeField(field: OmitFieldsMethods<Field>): Field;
11
17
  export declare const FieldsUtils: {
@@ -15,5 +21,7 @@ export declare const FieldsUtils: {
15
21
  NewHeadingField: typeof NewHeadingField;
16
22
  NewImageField: typeof NewImageField;
17
23
  NewDividerField: typeof NewDividerField;
24
+ NewIFrameField: typeof NewIFrameField;
25
+ NewBlockquoteField: typeof NewBlockquoteField;
18
26
  };
19
27
  export {};
@@ -1,7 +1 @@
1
- export * from "./components.utils";
2
- export * from "./container.utils";
3
- export * from "./fields.utils";
4
- export * from "./global.utils";
5
1
  export * from "./modules.utils";
6
- export * from "./tnode.utils";
7
- export * from "./tree.utils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorax/core",
3
- "version": "0.0.0-canary.1",
3
+ "version": "0.0.0-canary.2",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -12,6 +12,7 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "exports": {
14
14
  ".": {
15
+ "source": "./src/index.ts",
15
16
  "types": "./dist/index.d.ts",
16
17
  "import": "./dist/index.js",
17
18
  "default": "./dist/index.js"
@@ -28,13 +29,16 @@
28
29
  "fmt:check": "oxfmt --check",
29
30
  "vtest": "vitest",
30
31
  "typecheck": "tsc --noEmit",
32
+ "build:css": "bunx @tailwindcss/cli -i ./styles.css -o ./dist/styles.css --minify",
31
33
  "build:types": "tsc --emitDeclarationOnly",
32
34
  "build:js": "bun build ./src/index.ts --outdir ./dist --target browser --external lodash --external cn",
33
- "build": "bun run build:types && bun run build:js",
35
+ "build": "bun run build:types && bun run build:js && bun run build:css",
34
36
  "prepublishOnly": "bun run build"
35
37
  },
36
38
  "dependencies": {
39
+ "@coorax/schema": "0.0.0-canary.1",
37
40
  "@fontsource-variable/geist": "^5.3.0",
41
+ "@tailwindcss/cli": "^4.3.5",
38
42
  "cn": "^0.4.0",
39
43
  "lodash": "^4.18.1"
40
44
  },
package/styles.css CHANGED
@@ -1,6 +1,6 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&family=Inter:opsz,wght@14..32,100..900&display=swap");
2
1
  @import "tailwindcss";
3
- @source "./src/services/ui";
2
+ @source "./src";
3
+ @source "../schema/src";
4
4
 
5
5
  @custom-variant dark (&:is(.dark *));
6
6
 
@@ -161,6 +161,8 @@
161
161
  --shadow-lg: var(--shadow-lg);
162
162
  --shadow-xl: var(--shadow-xl);
163
163
  --shadow-2xl: var(--shadow-2xl);
164
+
165
+ --ease-damping: cubic-bezier(0.34, 1.56, 0.64, 1);
164
166
  }
165
167
 
166
168
  @layer base {