@arcgis/coding-components 4.31.0-next.6 → 4.31.0-next.60

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 (218) hide show
  1. package/README.md +22 -3
  2. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  3. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +1 -1
  4. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +1 -1
  5. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +1 -1
  6. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +6 -6
  7. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +1 -1
  8. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +1 -1
  9. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +1 -1
  10. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +1 -1
  11. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +1 -1
  12. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +1 -1
  13. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +1 -1
  14. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +1 -1
  15. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +1 -1
  16. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +1 -1
  17. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +1 -1
  18. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +1 -1
  19. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +1 -1
  20. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +1 -1
  21. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +1 -1
  22. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +1 -1
  23. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +1 -1
  24. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +1 -1
  25. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +1 -1
  26. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +1 -1
  27. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +1 -1
  28. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +1 -1
  29. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +1 -1
  30. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +1 -1
  31. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +1 -1
  32. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +5 -5
  33. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +1 -1
  34. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +1 -1
  35. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +1 -1
  36. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +1 -1
  37. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.ca.json +2 -2
  38. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.de.json +1 -1
  39. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.he.json +1 -1
  40. package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.ca.json +1 -1
  41. package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.it.json +1 -1
  42. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +3 -3
  43. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +460 -7
  44. package/dist/arcgis-coding-components/assets/language-api-panel/t9n/language-api-panel.t9n.ca.json +1 -1
  45. package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +30 -30
  46. package/dist/arcgis-coding-components/assets/sql-expression-editor/t9n/sql-expression-editor.t9n.en.json +4 -0
  47. package/dist/arcgis-coding-components/assets/sql-expression-fields/t9n/sql-expression-fields.t9n.en.json +4 -0
  48. package/dist/arcgis-coding-components/index.esm.js +2 -2
  49. package/dist/arcgis-coding-components/p-0dfb0b51.js +6 -0
  50. package/dist/arcgis-coding-components/p-15ab1669.entry.js +6 -0
  51. package/dist/arcgis-coding-components/{p-41c932b5.js → p-2ce01944.js} +3 -3
  52. package/dist/arcgis-coding-components/p-324d3441.js +6 -0
  53. package/dist/arcgis-coding-components/{p-022df536.js → p-32f69143.js} +1 -1
  54. package/dist/arcgis-coding-components/p-48a82879.js +7 -0
  55. package/dist/arcgis-coding-components/p-49d247b3.js +68 -0
  56. package/dist/arcgis-coding-components/p-4aacb744.js +6 -0
  57. package/dist/arcgis-coding-components/p-65666d7d.entry.js +6 -0
  58. package/dist/arcgis-coding-components/{p-19b4f0e9.js → p-b67f1c54.js} +2 -2
  59. package/dist/arcgis-coding-components/{p-14ab3ed5.js → p-bd510fac.js} +1 -1
  60. package/dist/arcgis-coding-components/{p-10cab8d9.js → p-c02b5cb7.js} +2 -2
  61. package/dist/arcgis-coding-components/{p-e11999af.js → p-c79a1a66.js} +2 -2
  62. package/dist/arcgis-coding-components/{p-38534c31.js → p-d339d7c5.js} +3 -3
  63. package/dist/arcgis-coding-components/p-d39b4fa7.entry.js +6 -0
  64. package/dist/arcgis-coding-components/{p-8c6a6176.js → p-d3e821fe.js} +3 -3
  65. package/dist/arcgis-coding-components/p-ee4ad3e1.js +6 -0
  66. package/dist/arcgis-coding-components/{p-2a7ef2fd.js → p-f8728f4d.js} +2 -2
  67. package/dist/cjs/{app-globals-8991f48d.js → app-globals-2c78c6b1.js} +1 -1
  68. package/dist/cjs/arcade-defaults-8f210819.js +350 -0
  69. package/dist/cjs/{arcade-mode-ee5f5a57.js → arcade-mode-ba7da99f.js} +18 -5
  70. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +59 -103
  71. package/dist/cjs/arcgis-coding-components.cjs.js +5 -5
  72. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +32 -11
  73. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +16 -10
  74. package/dist/cjs/{css-c0ad88d7.js → css-7588aae5.js} +1 -1
  75. package/dist/cjs/{cssMode-deeb6f90.js → cssMode-0be00954.js} +2 -3
  76. package/dist/cjs/{html-be08d94a.js → html-310c2662.js} +2 -3
  77. package/dist/cjs/{htmlMode-f5b8239a.js → htmlMode-30d8e99b.js} +2 -3
  78. package/dist/cjs/{index-358de60d.js → index-cba76501.js} +203 -156
  79. package/dist/cjs/index.cjs.js +4 -4
  80. package/dist/cjs/{javascript-37d3d13f.js → javascript-2094999f.js} +3 -4
  81. package/dist/cjs/{jsonMode-12a2a091.js → jsonMode-389bdf05.js} +2 -3
  82. package/dist/cjs/{language-defaults-base-1f082ad7.js → language-defaults-base-7cb3bee2.js} +812 -1036
  83. package/dist/cjs/loader.cjs.js +4 -4
  84. package/dist/cjs/{sql-expr-defaults-dca57c68.js → sql-expr-defaults-50a75e9d.js} +226 -75
  85. package/dist/cjs/sql-expr-mode-0b3d7972.js +480 -0
  86. package/dist/cjs/{tsMode-d33a7021.js → tsMode-1ef47d68.js} +2 -3
  87. package/dist/cjs/{typescript-f3be2ce7.js → typescript-e19c8c21.js} +2 -3
  88. package/dist/components/arcade-defaults.js +239 -4
  89. package/dist/components/arcade-mode.js +18 -4
  90. package/dist/components/arcade-results.js +3 -3
  91. package/dist/components/arcade-suggestions.js +2 -2
  92. package/dist/components/arcade-variables.js +2 -2
  93. package/dist/components/arcgis-arcade-editor.js +21 -13
  94. package/dist/components/arcgis-arcade-results.js +1 -1
  95. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  96. package/dist/components/arcgis-arcade-variables.js +1 -1
  97. package/dist/components/arcgis-assets.d.ts +26 -26
  98. package/dist/components/arcgis-assets.js +2 -2
  99. package/dist/components/arcgis-code-editor.js +1 -1
  100. package/dist/components/arcgis-language-api-panel.js +1 -1
  101. package/dist/components/arcgis-sql-expression-editor.js +33 -11
  102. package/dist/components/arcgis-sql-expression-fields.js +1 -1
  103. package/dist/components/{chunk-3IUJHIAA.js → chunk-WEX2VUZV.js} +87 -92
  104. package/dist/components/code-editor.js +17 -23
  105. package/dist/components/fields.js +4 -4
  106. package/dist/components/index.js +1 -1
  107. package/dist/components/index2.js +4 -4
  108. package/dist/components/language-api-panel.js +22 -4
  109. package/dist/components/language-defaults-base.js +61 -287
  110. package/dist/components/markdown.js +1 -1
  111. package/dist/components/sql-expr-defaults.js +77 -24
  112. package/dist/components/sql-expr-mode.js +294 -24950
  113. package/dist/components/sql-expression-fields.js +15 -8
  114. package/dist/components/useT9n.js +41 -2
  115. package/dist/components/utilities.js +1 -1
  116. package/dist/esm/{app-globals-3e4e0353.js → app-globals-ad05b915.js} +1 -1
  117. package/dist/esm/arcade-defaults-84c53fa5.js +345 -0
  118. package/dist/esm/{arcade-mode-4a83348d.js → arcade-mode-6fbd4168.js} +18 -5
  119. package/dist/esm/arcgis-arcade-editor_6.entry.js +55 -99
  120. package/dist/esm/arcgis-coding-components.js +6 -6
  121. package/dist/esm/arcgis-sql-expression-editor.entry.js +32 -11
  122. package/dist/esm/arcgis-sql-expression-fields.entry.js +16 -10
  123. package/dist/esm/{css-bad8d1c3.js → css-9731ed75.js} +1 -1
  124. package/dist/esm/{cssMode-68a5f601.js → cssMode-6a20bb2b.js} +2 -3
  125. package/dist/esm/{html-9b27df1a.js → html-b32a642f.js} +2 -3
  126. package/dist/esm/{htmlMode-361ad282.js → htmlMode-e39916d3.js} +2 -3
  127. package/dist/esm/{index-8a552796.js → index-3c00d77e.js} +203 -156
  128. package/dist/esm/index.js +4 -4
  129. package/dist/esm/{javascript-8004e14f.js → javascript-e3306e60.js} +3 -4
  130. package/dist/esm/{jsonMode-91a0be74.js → jsonMode-2ba190f8.js} +2 -3
  131. package/dist/esm/{language-defaults-base-df906b3d.js → language-defaults-base-9d97d855.js} +809 -1036
  132. package/dist/esm/loader.js +5 -5
  133. package/dist/esm/{sql-expr-defaults-ae0be602.js → sql-expr-defaults-49ca931c.js} +225 -74
  134. package/dist/esm/sql-expr-mode-b1ab06a1.js +476 -0
  135. package/dist/esm/{tsMode-2756c213.js → tsMode-6fe69b0a.js} +2 -3
  136. package/dist/esm/{typescript-1aaf3ddd.js → typescript-d757eb0b.js} +2 -3
  137. package/dist/loader/cdn.js +2 -3
  138. package/dist/loader/index.cjs.js +2 -3
  139. package/dist/loader/index.d.ts +3 -0
  140. package/dist/loader/index.es2017.js +2 -3
  141. package/dist/loader/index.js +2 -3
  142. package/dist/types/components/arcade-editor/arcade-editor.d.ts +16 -5
  143. package/dist/types/components/code-editor/code-editor.d.ts +14 -4
  144. package/dist/types/components/language-api-panel/language-api-panel.d.ts +1 -0
  145. package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +31 -3
  146. package/dist/types/components/sql-expression-fields/sql-expression-fields.d.ts +17 -0
  147. package/dist/types/components.d.ts +40 -13
  148. package/dist/types/data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
  149. package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +8 -1
  150. package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +5 -1
  151. package/dist/types/stencil-public-runtime.d.ts +3 -10
  152. package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +1 -0
  153. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -0
  154. package/dist/types/utils/arcade-monaco/arcade-profile-strategy.d.ts +9 -0
  155. package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +6 -0
  156. package/dist/types/utils/fields.d.ts +2 -2
  157. package/dist/types/utils/profile/editor-profile.d.ts +7 -6
  158. package/dist/types/utils/profile/types.d.ts +28 -0
  159. package/dist/types/utils/profile/utils.d.ts +5 -1
  160. package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +56 -5
  161. package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +61 -0
  162. package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +1 -11
  163. package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +0 -1
  164. package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +18 -534
  165. package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +34 -1
  166. package/dist/types/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +30 -0
  167. package/dist/types/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +19 -0
  168. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -7
  169. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +73 -77
  170. package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +5 -6
  171. package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +8 -0
  172. package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +11 -8
  173. package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +13 -0
  174. package/dist/types/utils/sql-expr-monaco/types.d.ts +30 -28
  175. package/package.json +19 -19
  176. package/dist/arcgis-coding-components/p-1baf3624.entry.js +0 -6
  177. package/dist/arcgis-coding-components/p-8e61744c.js +0 -68
  178. package/dist/arcgis-coding-components/p-933de2b5.entry.js +0 -6
  179. package/dist/arcgis-coding-components/p-9dfc06ea.js +0 -6
  180. package/dist/arcgis-coding-components/p-a536144e.js +0 -6
  181. package/dist/arcgis-coding-components/p-cd67026d.js +0 -6
  182. package/dist/arcgis-coding-components/p-d7e83ea1.entry.js +0 -6
  183. package/dist/arcgis-coding-components/p-e055c041.js +0 -6
  184. package/dist/arcgis-coding-components/p-f1fab45e.js +0 -7
  185. package/dist/cjs/arcade-defaults-2d36c400.js +0 -116
  186. package/dist/cjs/sql-expr-mode-c644220d.js +0 -25135
  187. package/dist/esm/arcade-defaults-1adb5004.js +0 -111
  188. package/dist/esm/polyfills/core-js.js +0 -11
  189. package/dist/esm/polyfills/dom.js +0 -79
  190. package/dist/esm/polyfills/es5-html-element.js +0 -1
  191. package/dist/esm/polyfills/index.js +0 -34
  192. package/dist/esm/polyfills/system.js +0 -6
  193. package/dist/esm/sql-expr-mode-1821b2b9.js +0 -25132
  194. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
  195. package/dist/types/utils/profile/predefined-profile.d.ts +0 -4
  196. package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +0 -41
  197. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +0 -16
  198. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +0 -26
  199. package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +0 -37
  200. package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +0 -11
  201. package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +0 -122
  202. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +0 -5
  203. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +0 -18
  204. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +0 -6
  205. package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +0 -156
  206. package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +0 -150
  207. package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +0 -1397
  208. package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +0 -59
  209. package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +0 -295
  210. package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +0 -135
  211. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +0 -3
  212. package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +0 -2
  213. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +0 -0
  214. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/sql-expression-editor/sql-expression-editor.stories.d.ts +0 -0
  215. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +0 -0
  216. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -0
  217. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -0
  218. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -0
@@ -1,11 +1,12 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.60
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
7
- import { u as useControllerManager } from './chunk-3IUJHIAA.js';
7
+ import { u as useControllerManager } from './chunk-WEX2VUZV.js';
8
8
  import { s as sqlExprDefaults } from './sql-expr-defaults.js';
9
+ import { u as useT9n } from './useT9n.js';
9
10
  import "@esri/calcite-components/dist/components/calcite-block.js";
10
11
  import "@esri/calcite-components/dist/components/calcite-flow.js";
11
12
  import "@esri/calcite-components/dist/components/calcite-flow-item.js";
@@ -27,22 +28,28 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
27
28
  this.arcgisClose = createEvent(this, "arcgisClose", 3);
28
29
  this.arcgisFieldSelected = createEvent(this, "arcgisFieldSelected", 3);
29
30
  this.manager = useControllerManager(this,forceUpdate);
31
+ this.messages = useT9n();
30
32
  // #endregion
31
33
  // #region Private Methods
32
34
  this._handleSelectField = (event) => {
33
35
  if (event.target instanceof HTMLElement) {
34
36
  const tagName = event.target.tagName;
35
37
  switch (tagName.toLowerCase()) {
36
- case "calcite-list-item":
37
- // TODO: why is value missing from HTMLCalciteListElement type?
38
- this.arcgisFieldSelected.emit(event.target.value ?? "");
38
+ case "calcite-list-item": {
39
+ const value = event.target.value;
40
+ this.arcgisFieldSelected.emit(value ?? "");
39
41
  break;
42
+ }
40
43
  case "calcite-action":
41
44
  event.stopPropagation();
42
45
  break;
43
46
  }
44
47
  }
45
48
  };
49
+ this._handleSelectDomain = (event) => {
50
+ const value = event.target.value;
51
+ this.arcgisFieldSelected.emit(value ? `'${value}'` : "");
52
+ };
46
53
  this._emitClose = () => {
47
54
  this.arcgisClose.emit();
48
55
  };
@@ -65,14 +72,14 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
65
72
  render() {
66
73
  const layer = sqlExprDefaults.getFeatureLayerForModel(this.modelId ?? "");
67
74
  if (this.loading || !this.modelId || !layer) {
68
- return h("calcite-block", { heading: "Available Fields" });
75
+ return h("calcite-block", { heading: this.messages.availablefields ?? "" });
69
76
  }
70
- return (h("calcite-flow", null, h("calcite-flow-item", { heading: "Available Fields", closable: true, description: "Select a field to insert into the expression", onCalciteFlowItemClose: this._emitClose }, h("calcite-list", { filterEnabled: true }, layer.fields.map((field) => (h("calcite-list-item", { key: field.name, onClick: this._handleSelectField, label: field.name, description: field.alias, value: field.name }, field.domain && (h("calcite-action", { slot: "actions-end", text: "open", icon: "chevron-right", onClick: () => {
77
+ return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.availablefields ?? "", closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-list", { filterEnabled: true }, layer.fields.map((field) => (h("calcite-list-item", { key: field.name, onClick: this._handleSelectField, label: field.name, description: field.alias, value: field.name }, field.domain && (h("calcite-action", { slot: "actions-end", text: "open", icon: "chevron-right", onClick: () => {
71
78
  const domain = field.domain;
72
79
  if (domain.type === "coded-value") {
73
80
  this._flowItemRenderers = [
74
81
  ...this._flowItemRenderers,
75
- () => (h("calcite-flow-item", { closable: true, heading: "Domains", description: field.name, onCalciteFlowItemClose: this._emitClose }, h("calcite-list", null, domain.codedValues.map((value) => (h("calcite-list-item", { key: value.code, onClick: this._handleSelectField, label: value.name, description: String(value.code), value: value.code })))))),
82
+ () => (h("calcite-flow-item", { closable: true, heading: this.messages.domainvalues ?? "", description: field.name, onCalciteFlowItemClose: this._emitClose }, h("calcite-list", null, domain.codedValues.map((value) => (h("calcite-list-item", { key: value.code, onClick: this._handleSelectDomain, label: value.name, description: String(value.code), value: String(value.code) })))))),
76
83
  ];
77
84
  }
78
85
  } }))))))), this._flowItemRenderers.map((renderer) => renderer())));
@@ -1,12 +1,51 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.60
5
5
  */
6
- import { m as makeController, w as watch } from './chunk-3IUJHIAA.js';
6
+ import { p as proxyExports, w as watch, C as Controller, s as setAmbientComponent } from './chunk-WEX2VUZV.js';
7
7
  import { n as startLocaleObserver, p as getElementLocales } from './index2.js';
8
8
  import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
9
9
 
10
+ // src/functional.ts
11
+ var makeController = (constructor) => proxy(void 0, constructor);
12
+ var FunctionalController = class extends Controller {
13
+ constructor(component, constructor) {
14
+ super(component);
15
+ const originalExports = this.exports;
16
+ try {
17
+ setAmbientComponent(this.component);
18
+ const value = constructor(this.component, this);
19
+ const constructorChangedExports = this.exports !== originalExports;
20
+ if (value instanceof Promise) {
21
+ if (!constructorChangedExports) {
22
+ this.setProvisionalExports(value);
23
+ }
24
+ const resolved = value.then((result) => {
25
+ this.exports = result;
26
+ super.catchUpLifecycle();
27
+ }).catch((error) => {
28
+ this._ready.reject(error);
29
+ console.error(error);
30
+ });
31
+ this.onLoad(async () => await resolved);
32
+ } else {
33
+ if (!constructorChangedExports || value !== void 0) {
34
+ this.exports = value;
35
+ }
36
+ queueMicrotask(() => super.catchUpLifecycle());
37
+ }
38
+ } catch (error) {
39
+ this._ready.reject(error);
40
+ console.error(error);
41
+ }
42
+ }
43
+ /** Noop - will be called in the constructor instead */
44
+ catchUpLifecycle() {
45
+ return;
46
+ }
47
+ };
48
+ var proxy = proxyExports(FunctionalController);
10
49
  var makeT9nController = (getAssetPath) => (options = {}) => (
11
50
  // eslint-disable-next-line @typescript-eslint/promise-function-async
12
51
  makeController((component, controller) => {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.60
5
5
  */
6
6
  import { d as createFilterExpression } from './index2.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.60
5
5
  */
6
6
  const globalScripts = () => {};
7
7
 
@@ -0,0 +1,345 @@
1
+ /*!
2
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ * v4.31.0-next.60
5
+ */
6
+ import { m as main, f as fieldsToProfileValues, i as isPredefinedProfile, a as isFeatureSetCollectionDefinition, b as isFeatureSetDefinition, c as isFeatureDefinition, s as supportedLocales, L as LanguageDefaultsBase, d as fetchT9nStringsBundle, E as EditorProfile, U as Uri } from './language-defaults-base-9d97d855.js';
7
+ import { g as getAssetPath } from './index-3c00d77e.js';
8
+
9
+ /**
10
+ * Returns the arcade diagnostic service.
11
+ * Example:
12
+ * ```ts
13
+ * const diagnosticService = await getArcadeDiagnosticService();
14
+ * diagnosticService.onDidChangeDiagnostics(({uri, diaganostics }) => {
15
+ * // Filter the diagnostics for the uri of interest
16
+ * // Do something with the diagnostics
17
+ * });
18
+ * ```
19
+ */
20
+ async function getArcadeDiagnosticService() {
21
+ const mode = await getMode();
22
+ return mode.getArcadeDiagnosticService();
23
+ }
24
+ /**
25
+ * Returns the arcade worker for the model.
26
+ * Example:
27
+ * ```ts
28
+ * const arcadeWorker = await getArcadeWorker(model.uri);
29
+ * ```
30
+ * @returns arcade worker
31
+ */
32
+ async function getArcadeWorker(uri) {
33
+ const mode = await getMode();
34
+ return await mode.getArcadeWorker(uri);
35
+ }
36
+ /**
37
+ * Request the arcade mode
38
+ * @returns arcade mode module
39
+ */
40
+ async function getMode() {
41
+ return await import('./arcade-mode-6fbd4168.js');
42
+ }
43
+
44
+ // #region convert editor profile to apiProfile
45
+ /**
46
+ * Converts an editor profile to an api profile.
47
+ * The api profile is an optimized version of the editor profile designed for minimal data transfer between the main thread and the worker.
48
+ */
49
+ async function arcadeEditorToApiProfile(editorProfile) {
50
+ const { apiVersion, bundles, hiddenApiItems } = editorProfile.toEditorProfileDefinition();
51
+ const variables = await variablesToLSVariable(editorProfile.dictionaryVariables);
52
+ return { apiVersion, bundles, variables, hiddenApiItems: hiddenApiItems?.map((s) => s.toLowerCase()) };
53
+ }
54
+ async function variablesToLSVariable(editorVariables, kind = main.exports.CompletionItemKind.Variable) {
55
+ return await Promise.all(editorVariables.map(async (editorVariable) => {
56
+ switch (editorVariable.type) {
57
+ case "dictionary":
58
+ return await dictionaryToLSDictionary(editorVariable, kind);
59
+ case "feature":
60
+ return await featureToLSFeature(editorVariable, kind);
61
+ default:
62
+ return variableToLSVariable(editorVariable, kind);
63
+ }
64
+ }));
65
+ }
66
+ function variableToLSVariable(editorVariable, kind) {
67
+ const { name, type } = editorVariable;
68
+ const description = editorVariable.getDescription();
69
+ return {
70
+ name,
71
+ description,
72
+ type,
73
+ completion: {
74
+ label: name,
75
+ detail: name,
76
+ insertText: name,
77
+ insertTextMode: main.exports.InsertTextMode.asIs,
78
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
79
+ kind,
80
+ documentation: { kind: "markdown", value: description },
81
+ },
82
+ };
83
+ }
84
+ async function featureToLSFeature(editorFeature, kind) {
85
+ // Get the source for the definition
86
+ const source = await editorFeature.loadSource();
87
+ const { name } = editorFeature;
88
+ const description = editorFeature.getDescription();
89
+ const resultCompletion = {
90
+ label: name,
91
+ detail: name,
92
+ insertText: name,
93
+ insertTextMode: main.exports.InsertTextMode.asIs,
94
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
95
+ kind,
96
+ };
97
+ const result = {
98
+ name,
99
+ description,
100
+ type: "dictionary",
101
+ properties: [],
102
+ completion: resultCompletion,
103
+ };
104
+ // No source definition, then it will be a feature without any known fields
105
+ if (!source) {
106
+ return result;
107
+ }
108
+ // Create properties for the fields and the aliases
109
+ // Also improve the feature completion documentation
110
+ const [properties, featureCompletionDescription] = fieldsToProfileValues(source.fields, description, true);
111
+ result.properties = properties;
112
+ resultCompletion.documentation = { kind: "markdown", value: featureCompletionDescription };
113
+ return result;
114
+ }
115
+ async function dictionaryToLSDictionary(editorDictionary, kind) {
116
+ const { name, dictionaryVariables: variables } = editorDictionary;
117
+ const description = editorDictionary.getDescription();
118
+ const completionDescription = variables.reduce((previous, p) => {
119
+ if (previous !== "") {
120
+ previous += " \n \n";
121
+ }
122
+ previous += `**${p.name}** \n${p.type}`;
123
+ const description = p.getDescription();
124
+ if (description) {
125
+ previous += ` \n${description}`;
126
+ }
127
+ return previous;
128
+ }, description);
129
+ return {
130
+ name,
131
+ description,
132
+ type: "dictionary",
133
+ properties: await variablesToLSVariable(variables, main.exports.CompletionItemKind.Field),
134
+ completion: {
135
+ label: name,
136
+ detail: name,
137
+ insertText: name,
138
+ insertTextMode: main.exports.InsertTextMode.asIs,
139
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
140
+ kind,
141
+ documentation: { kind: "markdown", value: completionDescription },
142
+ },
143
+ };
144
+ }
145
+ // #endregion
146
+ // #region predefined profile to editor profile definition
147
+ /**
148
+ * Get a PredefinedProfile for a locale. If not already loaded then fetch it.
149
+ * If the locale doesn't exist or the locale profile file doesn't exist then returns
150
+ * the english version of the profile.
151
+ */
152
+ async function getSdkPredefinedProfiles(locale = "en") {
153
+ const profiles = sdkPredefinedProfilesMap.get(locale);
154
+ if (profiles) {
155
+ return profiles;
156
+ }
157
+ if (!supportedLocales.has(locale)) {
158
+ return await getSdkPredefinedProfiles("en");
159
+ }
160
+ try {
161
+ const response = await fetch(getAssetPath(`./assets/arcade-language/profiles/arcade-profiles.t9n.${locale}.json`));
162
+ if (response.ok) {
163
+ return cacheSdkPredefinedProfiles(locale, (await response.json()));
164
+ }
165
+ if (locale === "en") {
166
+ return null;
167
+ }
168
+ return await getSdkPredefinedProfiles("en");
169
+ }
170
+ catch {
171
+ return null;
172
+ }
173
+ }
174
+ const sdkPredefinedProfilesMap = new Map();
175
+ /**
176
+ * Convert a stored profile into a PredefinedProfile and add it to the in-memory
177
+ * Map of profiles per locale.
178
+ */
179
+ function cacheSdkPredefinedProfiles(locale, profiles) {
180
+ const map = new Map();
181
+ profiles.forEach((profile) => {
182
+ map.set(profile.id, profile);
183
+ });
184
+ sdkPredefinedProfilesMap.set(locale, map);
185
+ return map;
186
+ }
187
+ async function getSdkPredefinedProfile(id, locale = "en") {
188
+ const profiles = await getSdkPredefinedProfiles(locale);
189
+ return profiles?.get(id) ?? null;
190
+ }
191
+ function isExtendedPredefinedProfileDefinition(item) {
192
+ return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
193
+ }
194
+ function convertApiVariables(variables) {
195
+ return variables?.map(convertApiVariable);
196
+ }
197
+ function convertApiVariable(variable) {
198
+ switch (variable.type) {
199
+ case "dictionary":
200
+ return {
201
+ ...variable,
202
+ type: variable.type,
203
+ properties: convertApiVariables(variable.properties),
204
+ };
205
+ case "array": {
206
+ return {
207
+ ...variable,
208
+ type: variable.type,
209
+ elementType: { type: "number", name: "number" },
210
+ };
211
+ }
212
+ default:
213
+ return { ...variable, type: variable.type };
214
+ }
215
+ }
216
+ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en") {
217
+ if (!isPredefinedProfile(predefinedProfile)) {
218
+ return undefined;
219
+ }
220
+ const sdkPredefinedProfile = await getSdkPredefinedProfile(predefinedProfile.id, locale);
221
+ if (!sdkPredefinedProfile) {
222
+ return undefined;
223
+ }
224
+ const editorProfile = {
225
+ bundles: [...sdkPredefinedProfile.bundles],
226
+ variables: [],
227
+ hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
228
+ };
229
+ // Merge the SDK variables' definitions/properties with the predefined profile definitions.
230
+ sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
231
+ // Don't include disabled variables
232
+ if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
233
+ return;
234
+ }
235
+ // Try to get a definition from the predefined profile, for the variable that needs one.
236
+ const definition = predefinedProfile.definitions[predefinedVariable.name];
237
+ // Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
238
+ // despite the type checking from the switch statement.
239
+ switch (predefinedVariable.type) {
240
+ case "dictionary": {
241
+ // For dictionary, we support properties overrride
242
+ return editorProfile.variables.push(convertApiVariable({
243
+ ...predefinedVariable,
244
+ type: predefinedVariable.type,
245
+ properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
246
+ }));
247
+ }
248
+ case "feature":
249
+ // If the definition is not valid, then we don't include it.
250
+ if (!isFeatureDefinition(definition)) {
251
+ return;
252
+ }
253
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
254
+ case "featureSet":
255
+ // If the definition is not valid, then we don't include it.
256
+ if (!isFeatureSetDefinition(definition)) {
257
+ return;
258
+ }
259
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
260
+ case "featureSetCollection":
261
+ // If the definition is not valid, then we don't include it.
262
+ if (!isFeatureSetCollectionDefinition(definition)) {
263
+ return;
264
+ }
265
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
266
+ default:
267
+ return editorProfile.variables.push(convertApiVariable(predefinedVariable));
268
+ }
269
+ });
270
+ if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
271
+ editorProfile.variables.push(...(predefinedProfile.additionalVariables ?? []));
272
+ }
273
+ return editorProfile;
274
+ }
275
+ // #endregion
276
+
277
+ const arcadeLanguageId = "arcade";
278
+ class ArcadeLanguageServiceDefaults extends LanguageDefaultsBase {
279
+ constructor() {
280
+ super(...arguments);
281
+ this._languageId = arcadeLanguageId;
282
+ this._languageOptions = {};
283
+ }
284
+ /**
285
+ * Create an EditorProfile for the given model id using the given definition and locale.
286
+ * The EditorProfile is used by the the Arcade Language service as well by the cosing components.
287
+ * The definition can be a pre-defined profile or an editor profile definition.
288
+ * If the locale is not provided then the 'en' locale is used.
289
+ * @param modelId The model id for which to create the context.
290
+ * @param definition The definition to use for the model context.
291
+ * @param locale The locale to use for the model context.
292
+ * @returns The EditorProfile for the model.
293
+ */
294
+ async setProfileForModel(modelId, definition, apiContext = { locale: "en" }) {
295
+ // Convert pre-defined profile to a runtime profile
296
+ if (isPredefinedProfile(definition)) {
297
+ definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
298
+ }
299
+ const profileStrings = await fetchT9nStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
300
+ if (!profileStrings) {
301
+ throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
302
+ }
303
+ this.disposeForModel(modelId);
304
+ const key = this._getApiKey(modelId);
305
+ const editorProfile = new EditorProfile(definition, profileStrings);
306
+ this._profileMap.set(key, editorProfile);
307
+ const apiProfile = await arcadeEditorToApiProfile(editorProfile);
308
+ this.updateApiContextForModel(modelId, {
309
+ locale: apiContext.locale,
310
+ profile: apiProfile,
311
+ snippets: apiContext.snippets,
312
+ });
313
+ }
314
+ /**
315
+ * Set or update the Arcade language service options.
316
+ * @param languageOptions The language options to set.
317
+ */
318
+ setLanguageOptions(languageOptions = {}) {
319
+ // Check if options have actually changed.
320
+ // Avoid restarting the worker when no updates.
321
+ // Today we only have the 'assetsPath' as a property
322
+ if (this._languageOptions.assetsPath === languageOptions.assetsPath) {
323
+ return;
324
+ }
325
+ this._languageOptions = { ...this._languageOptions, ...languageOptions };
326
+ this._onDidChange.fire(this);
327
+ }
328
+ /**
329
+ * Gets the API library for the given model id.
330
+ * @param modelId The model id for which to get the API library.
331
+ * @returns The API library for the model.
332
+ */
333
+ async getApiLibrary(modelId) {
334
+ const uri = Uri.parse(modelId);
335
+ const worker = await getArcadeWorker(uri);
336
+ return await worker.getApiLibrary(this.getApiContextForModel(uri));
337
+ }
338
+ }
339
+ const arcadeDefaults = new ArcadeLanguageServiceDefaults();
340
+ const arcade = {
341
+ setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
342
+ getApiLibrary: arcadeDefaults.getApiLibrary.bind(arcadeDefaults),
343
+ };
344
+
345
+ export { arcade as a, arcadeDefaults as b, getMode as c, getArcadeDiagnosticService as g };
@@ -1,12 +1,11 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.60
5
5
  */
6
- import { F as main, e as editor, M as MarkerSeverity, R as Range, u as languages, J as debounce, N as Emitter } from './language-defaults-base-df906b3d.js';
7
- import './index-8a552796.js';
6
+ import { m as main, g as editor, O as MarkerSeverity, R as Range, x as languages, P as debounce, D as Deferred, Q as Emitter } from './language-defaults-base-9d97d855.js';
8
7
 
9
- var V={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Ee=["++","--"],Je=["-","+","!","~"],Qe=["=","/=","*=","%=","+=","-="],Ze=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Ee.forEach(t=>U[t.length-1]?.push(t));Je.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ft=Object.values(f),gt=Object.values(V);gt.map(t=>({label:t,kind:main.exports.CompletionItemKind.Constant}));ft.map(t=>({label:t,kind:main.exports.CompletionItemKind.Keyword}));
8
+ var V={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Ee=["++","--"],Je=["-","+","!","~"],Qe=["=","/=","*=","%=","+=","-="],Ze=["||","&&"],Bt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Ee.forEach(t=>U[t.length-1]?.push(t));Je.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Bt.forEach(t=>U[t.length-1]?.push(t));var ft=Object.values(f),gt=Object.values(V);gt.map(t=>({label:t,kind:main.exports.CompletionItemKind.Constant}));ft.map(t=>({label:t,kind:main.exports.CompletionItemKind.Keyword}));
10
9
 
11
10
  const operators = [
12
11
  "<=",
@@ -343,6 +342,7 @@ function isInsertReplaceEdit(edit) {
343
342
  return (typeof edit.insert !== "undefined" &&
344
343
  typeof edit.replace !== "undefined");
345
344
  }
345
+ // TODO: extract this function to common util
346
346
  function toCompletionItemKind(kind) {
347
347
  const mItemKind = languages.CompletionItemKind;
348
348
  switch (kind) {
@@ -476,6 +476,8 @@ class FormattingProvider {
476
476
  }
477
477
  //#endregion
478
478
 
479
+ // hold onto a promise that resolves when the worker is ready
480
+ let deferredWorker = new Deferred();
479
481
  /**
480
482
  * Manager to create our arcade worker and client proxy
481
483
  */
@@ -495,9 +497,17 @@ class WorkerManager {
495
497
  if (this._worker) {
496
498
  this._worker.dispose();
497
499
  this._worker = null;
500
+ deferredWorker = new Deferred();
498
501
  }
499
502
  this._client = null;
500
503
  }
504
+ /**
505
+ * Wait for the worker to be ready.
506
+ * @returns A promise that resolves when the worker is ready.
507
+ */
508
+ static async waitForWorker() {
509
+ return await deferredWorker.promise;
510
+ }
501
511
  async _getClientProxy() {
502
512
  // We used createWebWorker to create or run the web worker if it isn’t already created.
503
513
  // Otherwise, we get and return the proxy client.
@@ -511,6 +521,7 @@ class WorkerManager {
511
521
  languageOptions,
512
522
  },
513
523
  });
524
+ deferredWorker.resolve(this._worker);
514
525
  this._client = this._worker.getProxy();
515
526
  }
516
527
  return await this._client;
@@ -529,9 +540,11 @@ let arcadeWorker;
529
540
  * @returns The arcade worker.
530
541
  */
531
542
  async function getArcadeWorker(...uris) {
543
+ // ensures the worker is registered
544
+ await WorkerManager.waitForWorker();
532
545
  return await new Promise((resolve, reject) => {
533
546
  if (!arcadeWorker) {
534
- reject(new Error("TypeScript not registered!"));
547
+ reject(new Error("Arcade not registered!"));
535
548
  return;
536
549
  }
537
550
  resolve(arcadeWorker(...uris));