@gramlot/gramlot 0.3.16 → 0.3.18

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 (102) 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 +2126 -506
  21. package/dist/gramlot.min.js +97 -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 +97 -0
  91. package/themes/gramlot-base/theme.css +10 -0
  92. package/themes/gramlot-compact/theme.css +6 -0
  93. package/themes/joanna/theme.css +6 -0
  94. package/themes/mela/theme.css +68 -15
  95. package/themes/mimi/theme.css +6 -0
  96. package/themes/palettes/compact.css +6 -0
  97. package/themes/palettes/joanna.css +6 -0
  98. package/themes/palettes/mimi.css +6 -0
  99. package/src/date-parser/civil.js +0 -61
  100. package/src/date-parser/index.d.ts +0 -18
  101. package/src/date-parser/index.js +0 -196
  102. package/src/date-parser/locales.js +0 -257
@@ -1,2 +1,2 @@
1
1
  export {default} from "./collection.js";
2
- export const buildId = "sha256:3ecdeffd68a408ce9642bfb2e40c0e64b837d804c825f4bf90711c714af47c11";
2
+ export const buildId = "sha256:0086cd5f2bcb2bdde0eadbfee419caf3aa958d79e9a6f7bd7d5ee25171164eeb";
@@ -1377,6 +1377,7 @@
1377
1377
  "gramlot_component": {
1378
1378
  "command": false,
1379
1379
  "dataScope": true,
1380
+ "labelbox": true,
1380
1381
  "parameters": {
1381
1382
  "copy": {
1382
1383
  "binding": "read",
@@ -1410,7 +1411,8 @@
1410
1411
  "dtype": "T",
1411
1412
  "enum": [
1412
1413
  "bar",
1413
- "underline"
1414
+ "underline",
1415
+ "card"
1414
1416
  ]
1415
1417
  }
1416
1418
  },
@@ -1623,6 +1625,9 @@
1623
1625
  "_meta": {
1624
1626
  "gramlot_component": {
1625
1627
  "childParameters": {
1628
+ "detachable": {
1629
+ "dtype": "B"
1630
+ },
1626
1631
  "onClose": {
1627
1632
  "inline": []
1628
1633
  }
@@ -1787,6 +1792,509 @@
1787
1792
  "ns": null,
1788
1793
  "parent_tags": null,
1789
1794
  "sub_tags": "*"
1795
+ },
1796
+ "transformPane": {
1797
+ "_meta": {
1798
+ "gramlot_component": {
1799
+ "command": false,
1800
+ "dataScope": false,
1801
+ "parameters": {
1802
+ "max": {
1803
+ "binding": "read",
1804
+ "default": 3,
1805
+ "dtype": "R"
1806
+ },
1807
+ "min": {
1808
+ "binding": "read",
1809
+ "default": 0.5,
1810
+ "dtype": "R"
1811
+ },
1812
+ "onEnd": {
1813
+ "dtype": "T",
1814
+ "nullable": true
1815
+ },
1816
+ "rotate": {
1817
+ "binding": "read",
1818
+ "default": 0,
1819
+ "dtype": "R"
1820
+ },
1821
+ "step": {
1822
+ "binding": "read",
1823
+ "default": 0.01,
1824
+ "dtype": "R"
1825
+ },
1826
+ "x": {
1827
+ "binding": "read",
1828
+ "default": 0,
1829
+ "dtype": "R"
1830
+ },
1831
+ "y": {
1832
+ "binding": "read",
1833
+ "default": 0,
1834
+ "dtype": "R"
1835
+ },
1836
+ "zoom": {
1837
+ "binding": "read",
1838
+ "default": 1,
1839
+ "dtype": "R"
1840
+ }
1841
+ },
1842
+ "presentationDefaults": [],
1843
+ "sourceContext": true
1844
+ },
1845
+ "render_tag": "gramlot-transform-pane"
1846
+ },
1847
+ "attributes": {
1848
+ "accepts_var_keyword": true,
1849
+ "accepts_var_positional": false,
1850
+ "parameters": [
1851
+ {
1852
+ "annotation": {
1853
+ "items": [
1854
+ {
1855
+ "dtype": "R",
1856
+ "kind": "dtype"
1857
+ },
1858
+ {
1859
+ "base": {
1860
+ "dtype": "T",
1861
+ "kind": "dtype"
1862
+ },
1863
+ "kind": "annotated",
1864
+ "metadata": [
1865
+ {
1866
+ "flags": 0,
1867
+ "kind": "regex",
1868
+ "pattern": "^[\\^=].+"
1869
+ }
1870
+ ]
1871
+ }
1872
+ ],
1873
+ "kind": "union"
1874
+ },
1875
+ "default": 0,
1876
+ "has_default": true,
1877
+ "kind": "keyword_only",
1878
+ "name": "x",
1879
+ "role": "attribute"
1880
+ },
1881
+ {
1882
+ "annotation": {
1883
+ "items": [
1884
+ {
1885
+ "dtype": "R",
1886
+ "kind": "dtype"
1887
+ },
1888
+ {
1889
+ "base": {
1890
+ "dtype": "T",
1891
+ "kind": "dtype"
1892
+ },
1893
+ "kind": "annotated",
1894
+ "metadata": [
1895
+ {
1896
+ "flags": 0,
1897
+ "kind": "regex",
1898
+ "pattern": "^[\\^=].+"
1899
+ }
1900
+ ]
1901
+ }
1902
+ ],
1903
+ "kind": "union"
1904
+ },
1905
+ "default": 0,
1906
+ "has_default": true,
1907
+ "kind": "keyword_only",
1908
+ "name": "y",
1909
+ "role": "attribute"
1910
+ },
1911
+ {
1912
+ "annotation": {
1913
+ "items": [
1914
+ {
1915
+ "dtype": "R",
1916
+ "kind": "dtype"
1917
+ },
1918
+ {
1919
+ "base": {
1920
+ "dtype": "T",
1921
+ "kind": "dtype"
1922
+ },
1923
+ "kind": "annotated",
1924
+ "metadata": [
1925
+ {
1926
+ "flags": 0,
1927
+ "kind": "regex",
1928
+ "pattern": "^[\\^=].+"
1929
+ }
1930
+ ]
1931
+ }
1932
+ ],
1933
+ "kind": "union"
1934
+ },
1935
+ "default": 0,
1936
+ "has_default": true,
1937
+ "kind": "keyword_only",
1938
+ "name": "rotate",
1939
+ "role": "attribute"
1940
+ },
1941
+ {
1942
+ "annotation": {
1943
+ "items": [
1944
+ {
1945
+ "dtype": "R",
1946
+ "kind": "dtype"
1947
+ },
1948
+ {
1949
+ "base": {
1950
+ "dtype": "T",
1951
+ "kind": "dtype"
1952
+ },
1953
+ "kind": "annotated",
1954
+ "metadata": [
1955
+ {
1956
+ "flags": 0,
1957
+ "kind": "regex",
1958
+ "pattern": "^[\\^=].+"
1959
+ }
1960
+ ]
1961
+ }
1962
+ ],
1963
+ "kind": "union"
1964
+ },
1965
+ "default": 1,
1966
+ "has_default": true,
1967
+ "kind": "keyword_only",
1968
+ "name": "zoom",
1969
+ "role": "attribute"
1970
+ },
1971
+ {
1972
+ "annotation": {
1973
+ "items": [
1974
+ {
1975
+ "dtype": "R",
1976
+ "kind": "dtype"
1977
+ },
1978
+ {
1979
+ "base": {
1980
+ "dtype": "T",
1981
+ "kind": "dtype"
1982
+ },
1983
+ "kind": "annotated",
1984
+ "metadata": [
1985
+ {
1986
+ "flags": 0,
1987
+ "kind": "regex",
1988
+ "pattern": "^[\\^=].+"
1989
+ }
1990
+ ]
1991
+ }
1992
+ ],
1993
+ "kind": "union"
1994
+ },
1995
+ "default": 0.5,
1996
+ "has_default": true,
1997
+ "kind": "keyword_only",
1998
+ "name": "min",
1999
+ "role": "attribute"
2000
+ },
2001
+ {
2002
+ "annotation": {
2003
+ "items": [
2004
+ {
2005
+ "dtype": "R",
2006
+ "kind": "dtype"
2007
+ },
2008
+ {
2009
+ "base": {
2010
+ "dtype": "T",
2011
+ "kind": "dtype"
2012
+ },
2013
+ "kind": "annotated",
2014
+ "metadata": [
2015
+ {
2016
+ "flags": 0,
2017
+ "kind": "regex",
2018
+ "pattern": "^[\\^=].+"
2019
+ }
2020
+ ]
2021
+ }
2022
+ ],
2023
+ "kind": "union"
2024
+ },
2025
+ "default": 3,
2026
+ "has_default": true,
2027
+ "kind": "keyword_only",
2028
+ "name": "max",
2029
+ "role": "attribute"
2030
+ },
2031
+ {
2032
+ "annotation": {
2033
+ "items": [
2034
+ {
2035
+ "dtype": "R",
2036
+ "kind": "dtype"
2037
+ },
2038
+ {
2039
+ "base": {
2040
+ "dtype": "T",
2041
+ "kind": "dtype"
2042
+ },
2043
+ "kind": "annotated",
2044
+ "metadata": [
2045
+ {
2046
+ "flags": 0,
2047
+ "kind": "regex",
2048
+ "pattern": "^[\\^=].+"
2049
+ }
2050
+ ]
2051
+ }
2052
+ ],
2053
+ "kind": "union"
2054
+ },
2055
+ "default": 0.01,
2056
+ "has_default": true,
2057
+ "kind": "keyword_only",
2058
+ "name": "step",
2059
+ "role": "attribute"
2060
+ },
2061
+ {
2062
+ "annotation": {
2063
+ "items": [
2064
+ {
2065
+ "dtype": "T",
2066
+ "kind": "dtype"
2067
+ },
2068
+ {
2069
+ "dtype": "NN",
2070
+ "kind": "dtype"
2071
+ }
2072
+ ],
2073
+ "kind": "union"
2074
+ },
2075
+ "default": null,
2076
+ "has_default": true,
2077
+ "kind": "keyword_only",
2078
+ "name": "onEnd",
2079
+ "role": "attribute"
2080
+ },
2081
+ {
2082
+ "annotation": {
2083
+ "kind": "any"
2084
+ },
2085
+ "has_default": false,
2086
+ "kind": "var_keyword",
2087
+ "name": "attr",
2088
+ "role": "attribute"
2089
+ }
2090
+ ]
2091
+ },
2092
+ "collection_key": null,
2093
+ "doc": null,
2094
+ "inherits_from": null,
2095
+ "node_label": null,
2096
+ "ns": null,
2097
+ "parent_tags": null,
2098
+ "sub_tags": "*"
2099
+ },
2100
+ "trayPane": {
2101
+ "_meta": {
2102
+ "gramlot_component": {
2103
+ "bagStore": true,
2104
+ "childParameters": {
2105
+ "minHeight": {
2106
+ "default": 64,
2107
+ "dtype": "N"
2108
+ },
2109
+ "minWidth": {
2110
+ "default": 100,
2111
+ "dtype": "N"
2112
+ }
2113
+ },
2114
+ "command": false,
2115
+ "dataScope": false,
2116
+ "parameters": {
2117
+ "gridStep": {
2118
+ "binding": "read",
2119
+ "default": 10,
2120
+ "dtype": "L"
2121
+ },
2122
+ "gridVisible": {
2123
+ "binding": "read",
2124
+ "default": false,
2125
+ "dtype": "B"
2126
+ },
2127
+ "locked": {
2128
+ "binding": "read",
2129
+ "default": false,
2130
+ "dtype": "B"
2131
+ },
2132
+ "rotationStep": {
2133
+ "binding": "read",
2134
+ "default": 15,
2135
+ "dtype": "N"
2136
+ },
2137
+ "storepath": {
2138
+ "dtype": "T"
2139
+ }
2140
+ },
2141
+ "presentationDefaults": []
2142
+ },
2143
+ "render_tag": "gramlot-tray-pane"
2144
+ },
2145
+ "attributes": {
2146
+ "accepts_var_keyword": true,
2147
+ "accepts_var_positional": false,
2148
+ "parameters": [
2149
+ {
2150
+ "annotation": {
2151
+ "dtype": "T",
2152
+ "kind": "dtype"
2153
+ },
2154
+ "default": null,
2155
+ "has_default": true,
2156
+ "kind": "keyword_only",
2157
+ "name": "storepath",
2158
+ "role": "attribute"
2159
+ },
2160
+ {
2161
+ "annotation": {
2162
+ "items": [
2163
+ {
2164
+ "dtype": "B",
2165
+ "kind": "dtype"
2166
+ },
2167
+ {
2168
+ "base": {
2169
+ "dtype": "T",
2170
+ "kind": "dtype"
2171
+ },
2172
+ "kind": "annotated",
2173
+ "metadata": [
2174
+ {
2175
+ "flags": 0,
2176
+ "kind": "regex",
2177
+ "pattern": "^[\\^=].+"
2178
+ }
2179
+ ]
2180
+ }
2181
+ ],
2182
+ "kind": "union"
2183
+ },
2184
+ "default": false,
2185
+ "has_default": true,
2186
+ "kind": "keyword_only",
2187
+ "name": "locked",
2188
+ "role": "attribute"
2189
+ },
2190
+ {
2191
+ "annotation": {
2192
+ "items": [
2193
+ {
2194
+ "dtype": "L",
2195
+ "kind": "dtype"
2196
+ },
2197
+ {
2198
+ "base": {
2199
+ "dtype": "T",
2200
+ "kind": "dtype"
2201
+ },
2202
+ "kind": "annotated",
2203
+ "metadata": [
2204
+ {
2205
+ "flags": 0,
2206
+ "kind": "regex",
2207
+ "pattern": "^[\\^=].+"
2208
+ }
2209
+ ]
2210
+ }
2211
+ ],
2212
+ "kind": "union"
2213
+ },
2214
+ "default": 10,
2215
+ "has_default": true,
2216
+ "kind": "keyword_only",
2217
+ "name": "gridStep",
2218
+ "role": "attribute"
2219
+ },
2220
+ {
2221
+ "annotation": {
2222
+ "items": [
2223
+ {
2224
+ "dtype": "B",
2225
+ "kind": "dtype"
2226
+ },
2227
+ {
2228
+ "base": {
2229
+ "dtype": "T",
2230
+ "kind": "dtype"
2231
+ },
2232
+ "kind": "annotated",
2233
+ "metadata": [
2234
+ {
2235
+ "flags": 0,
2236
+ "kind": "regex",
2237
+ "pattern": "^[\\^=].+"
2238
+ }
2239
+ ]
2240
+ }
2241
+ ],
2242
+ "kind": "union"
2243
+ },
2244
+ "default": false,
2245
+ "has_default": true,
2246
+ "kind": "keyword_only",
2247
+ "name": "gridVisible",
2248
+ "role": "attribute"
2249
+ },
2250
+ {
2251
+ "annotation": {
2252
+ "items": [
2253
+ {
2254
+ "dtype": "N",
2255
+ "kind": "dtype"
2256
+ },
2257
+ {
2258
+ "base": {
2259
+ "dtype": "T",
2260
+ "kind": "dtype"
2261
+ },
2262
+ "kind": "annotated",
2263
+ "metadata": [
2264
+ {
2265
+ "flags": 0,
2266
+ "kind": "regex",
2267
+ "pattern": "^[\\^=].+"
2268
+ }
2269
+ ]
2270
+ }
2271
+ ],
2272
+ "kind": "union"
2273
+ },
2274
+ "default": 15,
2275
+ "has_default": true,
2276
+ "kind": "keyword_only",
2277
+ "name": "rotationStep",
2278
+ "role": "attribute"
2279
+ },
2280
+ {
2281
+ "annotation": {
2282
+ "kind": "any"
2283
+ },
2284
+ "has_default": false,
2285
+ "kind": "var_keyword",
2286
+ "name": "attr",
2287
+ "role": "attribute"
2288
+ }
2289
+ ]
2290
+ },
2291
+ "collection_key": null,
2292
+ "doc": null,
2293
+ "inherits_from": null,
2294
+ "node_label": null,
2295
+ "ns": null,
2296
+ "parent_tags": null,
2297
+ "sub_tags": "*"
1790
2298
  }
1791
2299
  },
1792
2300
  "grammar": {
@@ -8,6 +8,6 @@ mygramlot = GramlotCollection(
8
8
  module="assets/index.js",
9
9
  css=(),
10
10
  dependencies=(),
11
- build_id="sha256:851b839f522346e7b92f46d6de8f1645b6409f28c03385b3889cff8f9d772ac3",
11
+ build_id="sha256:7626a8b2e60d71cc4f2c839ae1e727184cecf06e3497874d7d648506049ace12",
12
12
  files=("assets/collection.js", "assets/index.js", "commands.json", "grammar.json",),
13
13
  )