@arcgis/coding-components 4.32.0-next.23 → 4.32.0-next.25
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.
- package/dist/arcgis-coding-components/{K3C6KFFJ.js → 3WFDPDKQ.js} +2 -2
- package/dist/arcgis-coding-components/{X5Y5WKIV.js → 5MCVJSAI.js} +1 -1
- package/dist/arcgis-coding-components/{LACNDO4R.js → 5XCCTH27.js} +2 -2
- package/dist/arcgis-coding-components/{I2MJOT2Q.js → 64DP7IOJ.js} +2 -2
- package/dist/arcgis-coding-components/{3OORJX5Y.js → 6YVXIZ7U.js} +2 -2
- package/dist/arcgis-coding-components/{OWMVNOHT.js → A472BR5Q.js} +2 -2
- package/dist/arcgis-coding-components/{W6FPHOHM.js → A5H3ENJV.js} +2 -2
- package/dist/arcgis-coding-components/{R6S7L7WV.js → ACYNEB2A.js} +2 -2
- package/dist/arcgis-coding-components/{JRS7WYA5.js → BEBA4ZHU.js} +2 -2
- package/dist/arcgis-coding-components/{ZWQ6P5WC.js → EPHSATFN.js} +2 -2
- package/dist/arcgis-coding-components/{YH4PY2LV.js → EZBUVQRS.js} +1 -1
- package/dist/arcgis-coding-components/{XGZPKCPR.js → FOC2DNVY.js} +2 -2
- package/dist/arcgis-coding-components/{T62PZZEH.js → FZLNQLY5.js} +2 -2
- package/dist/arcgis-coding-components/{OZGTUDHQ.js → GBD5KEMW.js} +2 -2
- package/dist/arcgis-coding-components/{3LQ6FR2E.js → GDOMACPT.js} +2 -2
- package/dist/arcgis-coding-components/{H2OBH2V2.js → HFBNY3ZZ.js} +1 -1
- package/dist/arcgis-coding-components/{VRPXOIRF.js → JCRSUHVS.js} +2 -2
- package/dist/arcgis-coding-components/{Z3FOQIK3.js → JIYPI2Z3.js} +3 -3
- package/dist/arcgis-coding-components/{RC6FHVU4.js → LV7EVO7H.js} +2 -2
- package/dist/arcgis-coding-components/{MLGC6O35.js → MFRGI6YL.js} +2 -2
- package/dist/arcgis-coding-components/{FP4HYAEI.js → MMUON6QW.js} +2 -2
- package/dist/arcgis-coding-components/{ZTUEEUVD.js → NC3PN2NR.js} +2 -2
- package/dist/arcgis-coding-components/{ALO4GNDM.js → NHA4D3BI.js} +2 -2
- package/dist/arcgis-coding-components/{L4BIWCQK.js → OAEZNZNN.js} +2 -2
- package/dist/arcgis-coding-components/{JLWB6PL7.js → OQ2BKV5O.js} +2 -2
- package/dist/arcgis-coding-components/PHUJOJZX.js +20 -0
- package/dist/arcgis-coding-components/{4N67HYU5.js → VIUXAXQM.js} +2 -2
- package/dist/arcgis-coding-components/{VMQOO2QX.js → VZ5QREO7.js} +2 -2
- package/dist/arcgis-coding-components/{5TNW7MXP.js → WLD6MFDT.js} +2 -2
- package/dist/arcgis-coding-components/{B3A2ZKBF.js → WQMOBCBC.js} +2 -2
- package/dist/arcgis-coding-components/{BCIK6JGR.js → X5XMNTF3.js} +1 -1
- package/dist/arcgis-coding-components/{P4OLUGLY.js → Y5FMMVG7.js} +2 -2
- package/dist/arcgis-coding-components/{7PD55Z7G.js → Y63SEDWY.js} +2 -2
- package/dist/arcgis-coding-components/{7FT2RAPI.js → Y6FGFD3R.js} +2 -2
- package/dist/arcgis-coding-components/{2YWXZQZQ.js → ZWJVQOGA.js} +2 -2
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +13 -13
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +38 -38
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +3 -3
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +5 -5
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +2 -1
- package/dist/types/stencil.d.ts +2 -1
- package/package.json +7 -7
- package/dist/arcgis-coding-components/AZXDRPJG.js +0 -20
|
@@ -5,7 +5,7 @@ import { CompletionItemKind as w, InsertTextMode as f, InsertTextFormat as d } f
|
|
|
5
5
|
/*!
|
|
6
6
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
7
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
8
|
-
* v4.32.0-next.
|
|
8
|
+
* v4.32.0-next.25
|
|
9
9
|
*/
|
|
10
10
|
async function S(e) {
|
|
11
11
|
const { apiVersion: i, bundles: t, hiddenApiItems: r } = e.toEditorProfileDefinition(), n = await h(e.dictionaryVariables);
|
|
@@ -2,7 +2,7 @@ import { importArcade as C } from "@arcgis/core-adapter";
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
5
|
-
* v4.32.0-next.
|
|
5
|
+
* v4.32.0-next.25
|
|
6
6
|
*/
|
|
7
7
|
const G = "https://developers.arcgis.com/arcade/", O = 100, A = 100;
|
|
8
8
|
function u(t) {
|
|
@@ -9,7 +9,7 @@ import { debounce as T, Deferred as _ } from "@arcgis/components-utils";
|
|
|
9
9
|
/*!
|
|
10
10
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
12
|
-
* v4.32.0-next.
|
|
12
|
+
* v4.32.0-next.25
|
|
13
13
|
*/
|
|
14
14
|
const y = [
|
|
15
15
|
"<=",
|
|
@@ -81,8 +81,8 @@ const y = [
|
|
|
81
81
|
ignoreCase: !0,
|
|
82
82
|
// builtinFunctions: [...arcadeService.FunctionNames],
|
|
83
83
|
// Arcade keywords. 'from' is a special case as we want to treat it as a keyword in
|
|
84
|
-
// import statement but as an
|
|
85
|
-
keywords: F
|
|
84
|
+
// import statement but as an identifier in var statement.
|
|
85
|
+
keywords: F,
|
|
86
86
|
operators: y,
|
|
87
87
|
constants: ["true", "false", "null"],
|
|
88
88
|
// we include these common regular expressions
|
|
@@ -3,7 +3,7 @@ import { isURL as i, hasSameOrigin as c } from "@arcgis/components-utils";
|
|
|
3
3
|
/*!
|
|
4
4
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
6
|
-
* v4.32.0-next.
|
|
6
|
+
* v4.32.0-next.25
|
|
7
7
|
*/
|
|
8
8
|
function a() {
|
|
9
9
|
return !!window.MonacoEnvironment?.getWorkerUrl;
|
package/dist/chunks/fields.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Emitter as $, Uri as A } from "monaco-editor";
|
|
|
9
9
|
/*!
|
|
10
10
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
12
|
-
* v4.32.0-next.
|
|
12
|
+
* v4.32.0-next.25
|
|
13
13
|
*/
|
|
14
14
|
function B(t) {
|
|
15
15
|
return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && g(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
|
package/dist/chunks/markdown.js
CHANGED
|
@@ -5,7 +5,7 @@ import { generateTokensCSSForColorMap as te } from "monaco-editor/esm/vs/editor/
|
|
|
5
5
|
/*!
|
|
6
6
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
7
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
8
|
-
* v4.32.0-next.
|
|
8
|
+
* v4.32.0-next.25
|
|
9
9
|
*/
|
|
10
10
|
async function ne(l) {
|
|
11
11
|
return await (await ee()).colorize(l, "arcade", { tabSize: 2 });
|
|
@@ -6,7 +6,7 @@ import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
|
|
|
6
6
|
/*!
|
|
7
7
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
9
|
-
* v4.32.0-next.
|
|
9
|
+
* v4.32.0-next.25
|
|
10
10
|
*/
|
|
11
11
|
function g(r, t, n, m) {
|
|
12
12
|
if (!t)
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -2,7 +2,7 @@ import { makeRuntime as t } from "@arcgis/lumina";
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
5
|
-
* v4.32.0-next.
|
|
5
|
+
* v4.32.0-next.25
|
|
6
6
|
*/
|
|
7
7
|
const s = t({ defaultAssetPath: "https://jsdev.arcgis.com/coding-components/next/", hydratedAttribute: "hydrated" }), { customElement: a, getAssetPath: o, setAssetPath: m } = s;
|
|
8
8
|
export {
|
|
@@ -5,7 +5,7 @@ import { g as b } from "./runtime.js";
|
|
|
5
5
|
/*!
|
|
6
6
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
7
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
8
|
-
* v4.32.0-next.
|
|
8
|
+
* v4.32.0-next.25
|
|
9
9
|
*/
|
|
10
10
|
const x = (r) => {
|
|
11
11
|
const e = r.variables[0], i = e && e.type === "featureSet" ? A(e) : void 0, { apiVersion: t, bundles: o, hiddenApiItems: s } = r.toEditorProfileDefinition();
|
|
@@ -8,7 +8,7 @@ import { a as d } from "./sql-expr-defaults.js";
|
|
|
8
8
|
/*!
|
|
9
9
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
* v4.32.0-next.
|
|
11
|
+
* v4.32.0-next.25
|
|
12
12
|
*/
|
|
13
13
|
let h = new _();
|
|
14
14
|
class k {
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -15,7 +15,7 @@ import { css as w } from "@lit/reactive-element/css-tag.js";
|
|
|
15
15
|
/*!
|
|
16
16
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
17
17
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
18
|
-
* v4.32.0-next.
|
|
18
|
+
* v4.32.0-next.25
|
|
19
19
|
*/
|
|
20
20
|
const $ = w`arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}`;
|
|
21
21
|
class y extends _ {
|
|
@@ -9,7 +9,7 @@ import { css as M } from "@lit/reactive-element/css-tag.js";
|
|
|
9
9
|
/*!
|
|
10
10
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
12
|
-
* v4.32.0-next.
|
|
12
|
+
* v4.32.0-next.25
|
|
13
13
|
*/
|
|
14
14
|
const A = M`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, a = {
|
|
15
15
|
lines: !0,
|
|
@@ -10,7 +10,7 @@ import { css as b } from "@lit/reactive-element/css-tag.js";
|
|
|
10
10
|
/*!
|
|
11
11
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
13
|
-
* v4.32.0-next.
|
|
13
|
+
* v4.32.0-next.25
|
|
14
14
|
*/
|
|
15
15
|
function v(o) {
|
|
16
16
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
@@ -14,7 +14,7 @@ import { load as D } from "@arcgis/components-controllers";
|
|
|
14
14
|
/*!
|
|
15
15
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
16
16
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
17
|
-
* v4.32.0-next.
|
|
17
|
+
* v4.32.0-next.25
|
|
18
18
|
*/
|
|
19
19
|
c.register({
|
|
20
20
|
id: n.languageId,
|
|
@@ -8,7 +8,7 @@ import { css as u } from "@lit/reactive-element/css-tag.js";
|
|
|
8
8
|
/*!
|
|
9
9
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
* v4.32.0-next.
|
|
11
|
+
* v4.32.0-next.25
|
|
12
12
|
*/
|
|
13
13
|
const f = u`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
14
14
|
function g(r) {
|
|
@@ -10,7 +10,7 @@ import { css as b } from "@lit/reactive-element/css-tag.js";
|
|
|
10
10
|
/*!
|
|
11
11
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
13
|
-
* v4.32.0-next.
|
|
13
|
+
* v4.32.0-next.25
|
|
14
14
|
*/
|
|
15
15
|
const _ = b`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
16
16
|
class v extends h {
|
|
@@ -9,7 +9,7 @@ import { css as h } from "@lit/reactive-element/css-tag.js";
|
|
|
9
9
|
/*!
|
|
10
10
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
12
|
-
* v4.32.0-next.
|
|
12
|
+
* v4.32.0-next.25
|
|
13
13
|
*/
|
|
14
14
|
const g = h`arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}}`;
|
|
15
15
|
class f extends s {
|
|
@@ -8,7 +8,7 @@ import { css as d } from "@lit/reactive-element/css-tag.js";
|
|
|
8
8
|
/*!
|
|
9
9
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
11
|
-
* v4.32.0-next.
|
|
11
|
+
* v4.32.0-next.25
|
|
12
12
|
*/
|
|
13
13
|
const h = d`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
14
14
|
class f extends r {
|
package/dist/docs/api.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-11-
|
|
2
|
+
"timestamp": "2024-11-23T12:50:52",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@arcgis/lumina-compiler",
|
|
5
|
-
"version": "4.32.0-next.
|
|
5
|
+
"version": "4.32.0-next.25",
|
|
6
6
|
"typescriptVersion": "5.6.3"
|
|
7
7
|
},
|
|
8
8
|
"schemaVersion": "1.0.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"package": "@arcgis/lumina"
|
|
22
22
|
},
|
|
23
23
|
"encapsulation": "none",
|
|
24
|
-
"
|
|
24
|
+
"pascalCaseName": "ArcgisArcadeEditor",
|
|
25
25
|
"importPath": "components/arcgis-arcade-editor",
|
|
26
26
|
"members": [
|
|
27
27
|
{
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
"package": "@arcgis/lumina"
|
|
596
596
|
},
|
|
597
597
|
"encapsulation": "none",
|
|
598
|
-
"
|
|
598
|
+
"pascalCaseName": "ArcgisCodeEditor",
|
|
599
599
|
"importPath": "components/arcgis-code-editor",
|
|
600
600
|
"members": [
|
|
601
601
|
{
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
"package": "@arcgis/lumina"
|
|
988
988
|
},
|
|
989
989
|
"encapsulation": "none",
|
|
990
|
-
"
|
|
990
|
+
"pascalCaseName": "ArcgisSqlExpressionEditor",
|
|
991
991
|
"importPath": "components/arcgis-sql-expression-editor",
|
|
992
992
|
"members": [
|
|
993
993
|
{
|
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "4.32.0-next.
|
|
4
|
+
"version": "4.32.0-next.25",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.d.ts
CHANGED
|
@@ -21,14 +21,17 @@ export declare const getArcgisAssetPath: (suffix: string) => string;
|
|
|
21
21
|
export interface ArcgisArcadeEditorCustomEvent<T> extends CustomEvent<T> {
|
|
22
22
|
detail: T;
|
|
23
23
|
target: HTMLArcgisArcadeEditorElement;
|
|
24
|
+
currentTarget: HTMLArcgisArcadeEditorElement;
|
|
24
25
|
}
|
|
25
26
|
export interface ArcgisCodeEditorCustomEvent<T> extends CustomEvent<T> {
|
|
26
27
|
detail: T;
|
|
27
28
|
target: HTMLArcgisCodeEditorElement;
|
|
29
|
+
currentTarget: HTMLArcgisCodeEditorElement;
|
|
28
30
|
}
|
|
29
31
|
export interface ArcgisSqlExpressionEditorCustomEvent<T> extends CustomEvent<T> {
|
|
30
32
|
detail: T;
|
|
31
33
|
target: HTMLArcgisSqlExpressionEditorElement;
|
|
34
|
+
currentTarget: HTMLArcgisSqlExpressionEditorElement;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
export { ToEvents } from "@arcgis/lumina";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
|
4
4
|
/*!
|
|
5
5
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
7
|
-
* v4.32.0-next.
|
|
7
|
+
* v4.32.0-next.25
|
|
8
8
|
*/
|
|
9
9
|
const a = s, r = t;
|
|
10
10
|
export {
|
package/dist/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ import { makeDefineCustomElements as i } from "@arcgis/lumina";
|
|
|
3
3
|
/*!
|
|
4
4
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
6
|
-
* v4.32.0-next.
|
|
6
|
+
* v4.32.0-next.25
|
|
7
7
|
*/
|
|
8
8
|
const o = i(e, {
|
|
9
9
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
package/dist/types/lumina.d.ts
CHANGED
|
@@ -8,9 +8,10 @@ type EventHandler<E> = { bivarianceHack(event: E): void }["bivarianceHack"];
|
|
|
8
8
|
|
|
9
9
|
type TargetedEvent<Target extends EventTarget = EventTarget, TypedEvent extends Event = Event> = Omit<
|
|
10
10
|
TypedEvent,
|
|
11
|
-
"currentTarget"
|
|
11
|
+
"currentTarget" | "target"
|
|
12
12
|
> & {
|
|
13
13
|
readonly currentTarget: Target;
|
|
14
|
+
readonly target: Target;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
interface LuminaArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, h.JSX.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
|
package/dist/types/stencil.d.ts
CHANGED
|
@@ -8,9 +8,10 @@ type EventHandler<E> = { bivarianceHack(event: E): void }["bivarianceHack"];
|
|
|
8
8
|
|
|
9
9
|
type TargetedEvent<Target extends EventTarget = EventTarget, TypedEvent extends Event = Event> = Omit<
|
|
10
10
|
TypedEvent,
|
|
11
|
-
"currentTarget"
|
|
11
|
+
"currentTarget" | "target"
|
|
12
12
|
> & {
|
|
13
13
|
readonly currentTarget: Target;
|
|
14
|
+
readonly target: Target;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
interface StencilArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, StencilJsx.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.32.0-next.
|
|
3
|
+
"version": "4.32.0-next.25",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
],
|
|
37
37
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@arcgis/arcade-languageservice": "4.32.0-next.
|
|
40
|
-
"@arcgis/components-controllers": "4.32.0-next.
|
|
41
|
-
"@arcgis/components-utils": "4.32.0-next.
|
|
42
|
-
"@arcgis/core-adapter": "4.32.0-next.
|
|
43
|
-
"@arcgis/languages-api-utils": "4.32.0-next.
|
|
44
|
-
"@arcgis/lumina": "4.32.0-next.
|
|
39
|
+
"@arcgis/arcade-languageservice": "4.32.0-next.25",
|
|
40
|
+
"@arcgis/components-controllers": "4.32.0-next.25",
|
|
41
|
+
"@arcgis/components-utils": "4.32.0-next.25",
|
|
42
|
+
"@arcgis/core-adapter": "4.32.0-next.25",
|
|
43
|
+
"@arcgis/languages-api-utils": "4.32.0-next.25",
|
|
44
|
+
"@arcgis/lumina": "4.32.0-next.25",
|
|
45
45
|
"monaco-editor": "0.45.0",
|
|
46
46
|
"tslib": "^2.7.0",
|
|
47
47
|
"vscode-languageserver-types": "^3.17.5"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.23
|
|
5
|
-
*/
|
|
6
|
-
import{a as C,c as i,d as l,e as h}from"./YH4PY2LV.js";import{c as F}from"./Z3FOQIK3.js";import"./FP4HYAEI.js";import{a as y,u as T}from"./X5Y5WKIV.js";import{ek as P,ik as k,lk as g,qk as f,uj as z}from"./L4BIWCQK.js";import"./H2OBH2V2.js";z();var j={False:"false",Null:"null",True:"true"},$={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"};var O=["++","--"],V=["-","+","!","~"],W=["=","/=","*=","%=","+=","-="],R=["||","&&"],K=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var s={InvalidModuleUri:"InvalidModuleUri",ForInOfLoopInitializer:"ForInOfLoopInitializer",IdentiferExpected:"IdentiferExpected",InvalidEscapedReservedWord:"InvalidEscapedReservedWord",InvalidExpression:"InvalidExpression",InvalidFunctionIdentifier:"InvalidFunctionIdentifier",InvalidHexEscapeSequence:"InvalidHexEscapeSequence",InvalidLeftHandSideInAssignment:"InvalidLeftHandSideInAssignment",InvalidLeftHandSideInForIn:"InvalidLeftHandSideInForIn",InvalidTemplateHead:"InvalidTemplateHead",InvalidVariableAssignment:"InvalidVariableAssignment",KeyMustBeString:"KeyMustBeString",NoFunctionInsideBlock:"NoFunctionInsideBlock",NoFunctionInsideFunction:"NoFunctionInsideFunction",ModuleExportRootOnly:"ModuleExportRootOnly",ModuleImportRootOnly:"ModuleImportRootOnly",PunctuatorExpected:"PunctuatorExpected",TemplateOctalLiteral:"TemplateOctalLiteral",UnexpectedBoolean:"UnexpectedBoolean",UnexpectedEndOfScript:"UnexpectedEndOfScript",UnexpectedIdentifier:"UnexpectedIdentifier",UnexpectedKeyword:"UnexpectedKeyword",UnexpectedNull:"UnexpectedNull",UnexpectedNumber:"UnexpectedNumber",UnexpectedPunctuator:"UnexpectedPunctuator",UnexpectedString:"UnexpectedString",UnexpectedTemplate:"UnexpectedTemplate",UnexpectedToken:"UnexpectedToken"},H={[s.InvalidModuleUri]:"Module uri must be a text literal.",[s.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[s.IdentiferExpected]:"'${value}' is an invalid identifier.",[s.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[s.InvalidExpression]:"Invalid expression.",[s.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[s.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[s.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[s.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[s.InvalidTemplateHead]:"Invalid template structure.",[s.InvalidVariableAssignment]:"Invalid variable assignment.",[s.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[s.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[s.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[s.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[s.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[s.PunctuatorExpected]:"'${value}' expected.",[s.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[s.UnexpectedBoolean]:"Unexpected boolean literal.",[s.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[s.UnexpectedIdentifier]:"Unexpected identifier.",[s.UnexpectedKeyword]:"Unexpected keyword.",[s.UnexpectedNull]:"Unexpected null literal.",[s.UnexpectedNumber]:"Unexpected number.",[s.UnexpectedPunctuator]:"Unexpected ponctuator.",[s.UnexpectedString]:"Unexpected text literal.",[s.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[s.UnexpectedToken]:"Unexpected token '${value}'."};var E=[[],[],[]];O.forEach(t=>E[t.length-1]?.push(t));V.forEach(t=>E[t.length-1]?.push(t));R.forEach(t=>E[t.length-1]?.push(t));W.forEach(t=>E[t.length-1]?.push(t));K.forEach(t=>E[t.length-1]?.push(t));var a={AlreadyDefined:"AlreadyDefined",ApiConflict:"ApiConflict",AssignedNeverUsed:"AssignedNeverUsed",DefinedNeverAssigned:"DefinedNeverAssigned",DefinedNeverUsed:"DefinedNeverUsed",EmptyBlockStatement:"EmptyBlockStatement",ExecutionError:"ExecutionError",InvalidApiFunctionUsage:"InvalidApiFunctionUsage",InvalidConstantIdentifier:"InvalidConstantIdentifier",InvalidPropertyIdentifier:"InvalidPropertyIdentifier",NoArgumentExpected:"NoArgumentExpected",NotADictionary:"NotADictionary",NotDefined:"NotDefined",NotEnoughArguments:"NotEnoughArguments",ProfileVariablesAreImmutable:"ProfileVariablesAreImmutable",ProfileVariablesConflict:"ProfileVariablesConflict",ReservedKeyword:"ReservedKeyword",TooManyArguments:"TooManyArguments",UnexpectedEmptyFunction:"UnexpectedEmptyFunction",UnexpectedPropertyIdentifier:"UnexpectedPropertyIdentifier",UnknownPropertyIdentifier:"UnknownPropertyIdentifier"},se={[a.AlreadyDefined]:"'${identifier}' is already defined.",[a.ApiConflict]:"'${identifier}' is already defined as an Arcade constant or function.",[a.AssignedNeverUsed]:"'${identifier}' is assigned but never used.",[a.DefinedNeverAssigned]:"'${identifier}' is defined but never assigned.",[a.DefinedNeverUsed]:"'${identifier}' is defined but never used.",[a.EmptyBlockStatement]:"Empty block statement.",[a.ExecutionError]:"Execution Error: '${stack}'",[a.InvalidApiFunctionUsage]:"Arcade function '${identifier}' not used in a call expression.",[a.InvalidConstantIdentifier]:"Invalid constant identifier, expecting ${list}.",[a.InvalidPropertyIdentifier]:"Invalid property identifier, expecting ${list}.",[a.NoArgumentExpected]:"Expecting no argument.",[a.NotADictionary]:"'${identifier}' doesn't have properties.",[a.NotDefined]:"'${identifier}' is not defined.",[a.NotEnoughArguments]:"Expecting at least ${min} argument(s).",[a.ProfileVariablesAreImmutable]:"Profile variables cannot be modified.",[a.ProfileVariablesConflict]:"'${identifier}' is already defined as a profile variable.",[a.ReservedKeyword]:"'${identifier}' is a reserved keyword.",[a.TooManyArguments]:"Too many arguments, expecting ${max}.",[a.UnexpectedEmptyFunction]:"Unexpected empty function '${identifier}'.",[a.UnexpectedPropertyIdentifier]:"Unexpected property identifier.",[a.UnknownPropertyIdentifier]:"Unknown property identifier '${identifier}'.",...H};var w=Object.values($),q=Object.values(j);var le=q.map(t=>({label:t,kind:i.Constant})),ce=w.map(t=>({label:t,kind:i.Keyword})),he=[{label:"exportfunction",kind:i.Snippet,detail:"Export Function Statement",insertText:`export function \${1:functionName} ($2) {
|
|
7
|
-
$0
|
|
8
|
-
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"exportvar",kind:i.Snippet,detail:"Export Variable Statement",insertText:"export var ${0:variableName}\n",insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"for",kind:i.Snippet,detail:"For Loop Statement",insertText:"for (var ${1:i} = 0; ${1:i} < ${2:array.length}; ${1:i}++) {\n $0\n}",insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"forin",kind:i.Snippet,detail:"For-In Loop Statement",insertText:"for (var ${1:i} in ${2:arrayOrObject}) {\n $0\n}",insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"function",kind:i.Snippet,detail:"Function Statement",insertText:`function \${1:functionName} ($2) {
|
|
9
|
-
$0
|
|
10
|
-
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"if",kind:i.Snippet,detail:"If Statement",insertText:`if (\${1:1==1}) {
|
|
11
|
-
$0
|
|
12
|
-
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"ifelse",kind:i.Snippet,detail:"If-Else Statement",insertText:`if (\${1:1==1}) {
|
|
13
|
-
$0
|
|
14
|
-
} else {
|
|
15
|
-
|
|
16
|
-
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"else",kind:i.Snippet,detail:"Else Statement",insertText:`else {
|
|
17
|
-
$0
|
|
18
|
-
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"import",kind:i.Snippet,detail:"Import Statement",insertText:'import ${1:namespace} from "${0:uri}"',insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"while",kind:i.Snippet,detail:"While Loop Statement",insertText:`while (\${1:false}) {
|
|
19
|
-
$0
|
|
20
|
-
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet}];var G=["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],J={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n ",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},Z={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:w.filter(t=>t!=="from"),operators:G,constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}},b=class{constructor(e,r,{defaults:c,diagnosticsService:D}){this._languageId=e,this._worker=r,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=D,this._defaults=c,F().then(d=>{let p=u=>{let n=u.getLanguageId();if(n!==this._languageId)return;let o=T(()=>{this._doValidate(u,n).catch(_=>{throw _})}),M=u.onDidChangeContent(o),U=u.onDidChangeAttached(o);this._modelListeners.set(u.uri.toString(),[M,U]),this._doValidate(u,n).catch(console.error)},m=u=>{let n=u.uri.toString();d.setModelMarkers(u,this._languageId,[]);let o=this._modelListeners.get(n);if(o){for(;o.length;)o.pop()?.dispose();this._modelListeners.delete(n)}};this._disposables.push(d.onDidCreateModel(p)),this._disposables.push(d.onWillDisposeModel(u=>{m(u)})),this._disposables.push(d.onDidChangeModelLanguage(u=>{m(u.model),p(u.model)})),this._disposables.push(c.onDidChange(()=>{d.getModels().forEach(u=>{u.getLanguageId()===this._languageId&&(m(u),p(u))})})),this._disposables.push(c.onModelContextDidChange(u=>{d.getModels().forEach(n=>{n.getLanguageId()===this._languageId&&n.uri.toString()===u&&this._doValidate(n,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(u=>u.forEach(n=>n.dispose())),this._modelListeners.clear()}}),d.getModels().forEach(p)})}dispose(){this._disposables.forEach(e=>e.dispose()),this._disposables=[]}async _doValidate(e,r){if(e.isAttachedToEditor())try{let c=await F(),D=await this._worker(e.uri),d=this._defaults.getApiContextForModel(e.uri),p=await D.doValidation(e.uri.toString(),d),m=p.map(u=>Y(e.uri,u));this._diagnosticsService.fireDiagnosticsChange(e.uri,p),c.setModelMarkers(e,r,m)}catch(c){console.error(c)}}};function X(t){switch(t){case C.Error:return g.Error;case C.Warning:return g.Warning;case C.Information:return g.Info;case C.Hint:return g.Hint;default:return g.Info}}function Y(t,e){return{severity:X(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message}}function Q(t){return{character:t.column-1,line:t.lineNumber-1}}function x(t){return new k(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function ee(t){return{range:x(t.range),text:t.newText}}function te(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function ie(t){let e=f.CompletionItemKind;switch(t){case i.Text:return e.Text;case i.Method:return e.Method;case i.Function:return e.Function;case i.Constructor:return e.Constructor;case i.Field:return e.Field;case i.Variable:return e.Variable;case i.Class:return e.Class;case i.Interface:return e.Interface;case i.Module:return e.Module;case i.Property:return e.Property;case i.Unit:return e.Unit;case i.Value:return e.Value;case i.Enum:return e.Enum;case i.Keyword:return e.Keyword;case i.Snippet:return e.Snippet;case i.Color:return e.Color;case i.File:return e.File;case i.Reference:return e.Reference;case i.Folder:return e.Folder;case i.EnumMember:return e.EnumMember;case i.Constant:return e.Constant;case i.Struct:return e.Struct;case i.Event:return e.Event;case i.Operator:return e.Operator;case i.TypeParameter:return e.TypeParameter;default:return e.Property}}var I=class{constructor(e,r){this._worker=e,this._defaults=r,this.triggerCharacters=[".","("]}async provideCompletionItems(e,r){let c=await this._worker(e.uri),D=this._defaults.getApiContextForModel(e.uri),d=await c.doComplete(e.uri.toString(),Q(r),D),p=e.getWordUntilPosition(r),m=new k(r.lineNumber,p.startColumn,r.lineNumber,p.endColumn),u=d.items.map(n=>{let o={label:n.label,insertText:n.insertText||n.label,sortText:n.sortText,filterText:n.filterText,detail:n.detail,range:m,kind:ie(n.kind)};return n.textEdit&&(te(n.textEdit)?o.range={insert:x(n.textEdit.insert),replace:x(n.textEdit.replace)}:o.range=x(n.textEdit.range),o.insertText=n.textEdit.newText),n.additionalTextEdits&&(o.additionalTextEdits=n.additionalTextEdits.map(ee)),n.insertTextFormat===l.Snippet&&(o.insertTextRules=f.CompletionItemInsertTextRule.InsertAsSnippet),n.documentation&&(typeof n.documentation=="string"?o.documentation=n.documentation:o.documentation={supportThemeIcons:!1,value:n.documentation.value,supportHtml:!0}),o});return{incomplete:d.isIncomplete,suggestions:u}}},S=class{constructor(e,r){this._worker=e,this._defaults=r}async provideDocumentFormattingEdits(e){let r=await this._worker(e.uri),c=this._defaults.getApiContextForModel(e.uri.toString());return(await r.doFormat(e.uri.toString(),c)).map(D=>({range:x(D.range),text:D.newText}))}},B=new y,A=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,B=new y),this._client=null}static async waitForWorker(){return await B.promise}async _getClientProxy(){let e=await F();if(!this._client){let{languageId:r}=this._defaults;this._worker=e.createWebWorker({moduleId:"ArcadeWorker",label:r,createData:{languageId:r},host:this._defaults.workerHost}),B.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let r=await this._getClientProxy();return await this._worker?.withSyncedResources(e),r}},L;async function we(...t){return await A.waitForWorker(),await new Promise((e,r)=>{if(!L){r(new Error("Arcade not registered!"));return}e(L(...t))})}var v=class{constructor(){this._onDiagnosticsChange=new P}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,r){this._onDiagnosticsChange.fire({uri:e,diagnostics:r})}},N=new v;function Be(){return N}function be(t){let e=new A(t),r=async(...c)=>await e.getLanguageServiceWorker(...c);L=r,f.setMonarchTokensProvider(t.languageId,Z),f.setLanguageConfiguration(t.languageId,J),f.registerCompletionItemProvider(t.languageId,new I(r,t)),f.registerDocumentFormattingEditProvider(t.languageId,new S(r,t)),new b(t.languageId,r,{defaults:t,diagnosticsService:N})}export{Be as getArcadeDiagnosticService,we as getArcadeWorker,be as setupMode};
|