@gramlot/gramlot 0.3.16 → 0.3.17

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 (96) hide show
  1. package/dist/components/editors/__init__.py +1 -1
  2. package/dist/components/editors/assets/collection.js +16162 -11689
  3. package/dist/components/editors/assets/index.js +1 -1
  4. package/dist/components/editors/grammar.json +3 -0
  5. package/dist/components/inputs/__init__.py +1 -1
  6. package/dist/components/inputs/assets/collection.js +134 -179
  7. package/dist/components/inputs/assets/index.js +1 -1
  8. package/dist/components/inputs/grammar.json +19 -0
  9. package/dist/components/layout/__init__.py +1 -1
  10. package/dist/components/layout/assets/collection.js +4643 -3481
  11. package/dist/components/layout/assets/index.js +1 -1
  12. package/dist/components/layout/grammar.json +509 -1
  13. package/dist/components/tree/__init__.py +1 -1
  14. package/dist/components/tree/assets/collection.js +306 -94
  15. package/dist/components/tree/assets/index.js +1 -1
  16. package/dist/components/tree/grammar.json +16 -0
  17. package/dist/components/typst/__init__.py +1 -1
  18. package/dist/components/typst/assets/collection.js +2 -2
  19. package/dist/components/typst/assets/index.js +1 -1
  20. package/dist/gramlot.js +2124 -506
  21. package/dist/gramlot.min.js +95 -40
  22. package/dist/runtime-notices.json +4 -0
  23. package/package.json +12 -8
  24. package/src/binding/device-resolver.js +27 -0
  25. package/src/binding/error-notifications.js +84 -0
  26. package/src/binding/remote-resolver.d.ts +18 -0
  27. package/src/binding/remote.js +11 -4
  28. package/src/binding/runtime.js +6 -2
  29. package/src/bootstrap.js +4 -4
  30. package/src/components/buttons.js +10 -3
  31. package/src/components/code-mirror-engine.js +14 -4
  32. package/src/components/code-mirror.js +2 -3
  33. package/src/components/container.js +1 -1
  34. package/src/components/date-calendar.js +1 -1
  35. package/src/components/formlet-labels.js +5 -4
  36. package/src/components/html-document.js +4 -2
  37. package/src/components/html-editor.js +2 -2
  38. package/src/components/jodit-engine.js +72 -11
  39. package/src/components/labelbox.js +19 -63
  40. package/src/components/layout.js +31 -19
  41. package/src/components/markdown-document.js +1 -1
  42. package/src/components/markdown-editor.js +2 -2
  43. package/src/components/menus.js +7 -6
  44. package/src/components/prose-mirror-engine.js +14 -1
  45. package/src/components/registry.js +2 -0
  46. package/src/components/selected-container.js +107 -14
  47. package/src/components/toolbar-overflow.js +9 -8
  48. package/src/components/transform-pane.js +140 -0
  49. package/src/components/tray-geometry.js +87 -0
  50. package/src/components/tray-pane.js +435 -0
  51. package/src/components/tray-settings.js +62 -0
  52. package/src/components/tree.js +115 -21
  53. package/src/components/typed-editor.js +1 -1
  54. package/src/components/typst-client.js +14 -13
  55. package/src/components/validation.js +1 -1
  56. package/src/components/window-surface.js +281 -0
  57. package/src/components/windows.js +32 -261
  58. package/src/device-frames.js +195 -0
  59. package/src/filesystem.d.ts +12 -5
  60. package/src/filesystem.js +8 -8
  61. package/src/gramlot.d.ts +3 -1
  62. package/src/gramlot.js +11 -4
  63. package/src/handlers/device-handler.d.ts +75 -0
  64. package/src/handlers/device-handler.js +1037 -0
  65. package/src/handlers/dom-handler.d.ts +2 -0
  66. package/src/handlers/dom-handler.js +9 -0
  67. package/src/handlers/rpc-handler.d.ts +2 -2
  68. package/src/http-transport.d.ts +3 -3
  69. package/src/http-transport.js +17 -11
  70. package/src/ide-documents.js +6 -4
  71. package/src/ide-runtime.d.ts +14 -3
  72. package/src/ide-runtime.js +123 -94
  73. package/src/index-page-runtime.d.ts +2 -2
  74. package/src/index-page-runtime.js +91 -43
  75. package/src/index-page-styles.js +1 -1
  76. package/src/index.d.ts +7 -2
  77. package/src/index.js +5 -1
  78. package/src/inout.d.ts +1 -1
  79. package/src/inout.js +5 -1
  80. package/src/mobile-environment.d.ts +6 -0
  81. package/src/mobile-environment.js +52 -0
  82. package/src/navigation-resolver.d.ts +14 -2
  83. package/src/renderer/attributes.js +5 -2
  84. package/src/renderer/drag-drop.js +5 -4
  85. package/src/renderer/gramlot-renderer.d.ts +13 -2
  86. package/src/renderer/gramlot-renderer.js +49 -13
  87. package/src/server/index-page.js +4 -4
  88. package/src/view/controls.js +48 -23
  89. package/src/view/html.js +85 -4
  90. package/src/view/labelbox.js +95 -0
  91. package/themes/gramlot-base/theme.css +4 -0
  92. package/themes/mela/theme.css +62 -15
  93. package/src/date-parser/civil.js +0 -61
  94. package/src/date-parser/index.d.ts +0 -18
  95. package/src/date-parser/index.js +0 -196
  96. package/src/date-parser/locales.js +0 -257
@@ -1,257 +0,0 @@
1
- // Copyright 2026 Softwell S.r.l. - SPDX-License-Identifier: Apache-2.0
2
- // Vocabulary from genro-toolbox dfb7322a53a2f9030d6baaadfbb87028559672fd.
3
- // Keep the upstream JSON contents unchanged; see PORT-0009 for refresh/fixture provenance.
4
- const locales = {
5
- "it": {
6
- "months": {
7
- "gennaio": 1,
8
- "febbraio": 2,
9
- "marzo": 3,
10
- "aprile": 4,
11
- "maggio": 5,
12
- "giugno": 6,
13
- "luglio": 7,
14
- "agosto": 8,
15
- "settembre": 9,
16
- "ottobre": 10,
17
- "novembre": 11,
18
- "dicembre": 12,
19
- "gen": 1,
20
- "feb": 2,
21
- "mar": 3,
22
- "apr": 4,
23
- "mag": 5,
24
- "giu": 6,
25
- "lug": 7,
26
- "ago": 8,
27
- "set": 9,
28
- "ott": 10,
29
- "nov": 11,
30
- "dic": 12
31
- },
32
- "weekdays": {
33
- "lunedì": 0,
34
- "martedì": 1,
35
- "mercoledì": 2,
36
- "giovedì": 3,
37
- "venerdì": 4,
38
- "sabato": 5,
39
- "domenica": 6,
40
- "lun": 0,
41
- "mar": 1,
42
- "mer": 2,
43
- "gio": 3,
44
- "ven": 4,
45
- "sab": 5,
46
- "dom": 6
47
- },
48
- "quarters": {
49
- "1º trimestre": 1,
50
- "2º trimestre": 2,
51
- "3º trimestre": 3,
52
- "4º trimestre": 4,
53
- "1° trimestre": 1,
54
- "2° trimestre": 2,
55
- "3° trimestre": 3,
56
- "4° trimestre": 4,
57
- "t1": 1,
58
- "t2": 2,
59
- "t3": 3,
60
- "t4": 4,
61
- "q1": 1,
62
- "q2": 2,
63
- "q3": 3,
64
- "q4": 4
65
- },
66
- "keywords": {
67
- "today": [
68
- "oggi"
69
- ],
70
- "yesterday": [
71
- "ieri"
72
- ],
73
- "tomorrow": [
74
- "domani"
75
- ],
76
- "this_week": [
77
- "questa settimana",
78
- "settimana"
79
- ],
80
- "last_week": [
81
- "settimana scorsa"
82
- ],
83
- "next_week": [
84
- "settimana prossima"
85
- ],
86
- "this_month": [
87
- "questo mese",
88
- "mese"
89
- ],
90
- "last_month": [
91
- "mese scorso"
92
- ],
93
- "next_month": [
94
- "mese prossimo"
95
- ],
96
- "last": [
97
- "scorso",
98
- "scorsa"
99
- ],
100
- "next": [
101
- "prossimo",
102
- "prossima"
103
- ],
104
- "articles": [
105
- "il",
106
- "lo",
107
- "la"
108
- ],
109
- "from": [
110
- "da",
111
- "dal",
112
- "dalla",
113
- "tra",
114
- "fra"
115
- ],
116
- "to": [
117
- "a",
118
- "al",
119
- "alla",
120
- "e"
121
- ],
122
- "no_period": [
123
- "-",
124
- "senza periodo",
125
- "sempre"
126
- ]
127
- },
128
- "date_order": {
129
- "default": "DMY"
130
- }
131
- },
132
- "en": {
133
- "months": {
134
- "january": 1,
135
- "february": 2,
136
- "march": 3,
137
- "april": 4,
138
- "may": 5,
139
- "june": 6,
140
- "july": 7,
141
- "august": 8,
142
- "september": 9,
143
- "october": 10,
144
- "november": 11,
145
- "december": 12,
146
- "jan": 1,
147
- "feb": 2,
148
- "mar": 3,
149
- "apr": 4,
150
- "jun": 6,
151
- "jul": 7,
152
- "aug": 8,
153
- "sep": 9,
154
- "oct": 10,
155
- "nov": 11,
156
- "dec": 12
157
- },
158
- "weekdays": {
159
- "monday": 0,
160
- "tuesday": 1,
161
- "wednesday": 2,
162
- "thursday": 3,
163
- "friday": 4,
164
- "saturday": 5,
165
- "sunday": 6,
166
- "mon": 0,
167
- "tue": 1,
168
- "wed": 2,
169
- "thu": 3,
170
- "fri": 4,
171
- "sat": 5,
172
- "sun": 6
173
- },
174
- "quarters": {
175
- "1st quarter": 1,
176
- "2nd quarter": 2,
177
- "3rd quarter": 3,
178
- "4th quarter": 4,
179
- "q1": 1,
180
- "q2": 2,
181
- "q3": 3,
182
- "q4": 4
183
- },
184
- "keywords": {
185
- "today": [
186
- "today"
187
- ],
188
- "yesterday": [
189
- "yesterday"
190
- ],
191
- "tomorrow": [
192
- "tomorrow"
193
- ],
194
- "this_week": [
195
- "this week",
196
- "week"
197
- ],
198
- "last_week": [
199
- "last week"
200
- ],
201
- "next_week": [
202
- "next week"
203
- ],
204
- "this_month": [
205
- "this month",
206
- "month"
207
- ],
208
- "last_month": [
209
- "last month"
210
- ],
211
- "next_month": [
212
- "next month"
213
- ],
214
- "last": [
215
- "last"
216
- ],
217
- "next": [
218
- "next"
219
- ],
220
- "articles": [
221
- "the"
222
- ],
223
- "from": [
224
- "from",
225
- "between"
226
- ],
227
- "to": [
228
- "to",
229
- "and"
230
- ],
231
- "no_period": [
232
- "no period",
233
- "always"
234
- ]
235
- },
236
- "date_order": {
237
- "default": "MDY",
238
- "GB": "DMY",
239
- "AU": "DMY",
240
- "IE": "DMY",
241
- "NZ": "DMY",
242
- "IN": "DMY"
243
- }
244
- }
245
- };
246
-
247
- export function localeContext(locale) {
248
- if (typeof locale !== 'string') throw new RangeError('A supported locale is required.');
249
- const tag = locale.replaceAll('-', '_');
250
- const split = tag.indexOf('_');
251
- const language = (split < 0 ? tag : tag.slice(0, split)).toLowerCase();
252
- const region = (split < 0 ? '' : tag.slice(split + 1)).toUpperCase();
253
- if (!Object.hasOwn(locales, language)) throw new RangeError(`Unsupported locale: ${locale}`);
254
- const dictionary = locales[language];
255
- const phrases = key => [...new Set([...dictionary.keywords[key], ...locales.en.keywords[key]])];
256
- return {dictionary, phrases, order: dictionary.date_order[region] ?? dictionary.date_order.default};
257
- }