@arcgis/coding-components 5.0.0-next.39 → 5.0.0-next.41

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 (119) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/3WIRROBH.js +4 -0
  3. package/dist/cdn/{AFUBHK37.js → 42JQRIXR.js} +5 -5
  4. package/dist/cdn/4R4DUTCV.js +6 -0
  5. package/dist/cdn/5PJI5QQB.js +37 -0
  6. package/dist/cdn/{A3HSJCES.js → 5UEEUMXL.js} +2 -2
  7. package/dist/cdn/6CKRGIHZ.js +6 -0
  8. package/dist/cdn/7EJZH64Z.js +4 -0
  9. package/dist/cdn/7XW6IKKV.js +4 -0
  10. package/dist/cdn/{IQRXXWGC.js → A3TLL6LG.js} +2 -2
  11. package/dist/cdn/AKWJLYC3.js +4 -0
  12. package/dist/cdn/ASRHMURK.js +4 -0
  13. package/dist/cdn/{V2PRLYOK.js → BMXVKJ7B.js} +2 -2
  14. package/dist/cdn/{32D5TXZE.js → CJ65XLTF.js} +2 -2
  15. package/dist/cdn/{22UJ2NCC.js → D726IUEN.js} +2 -2
  16. package/dist/cdn/DRX5YPAV.js +4 -0
  17. package/dist/cdn/DUJT7B4V.js +4 -0
  18. package/dist/cdn/{LWCU6T2S.js → E2PW5KNS.js} +2 -2
  19. package/dist/cdn/FF6CRCZF.js +4 -0
  20. package/dist/cdn/{5A2OAIPG.js → FYVNN5SL.js} +2 -2
  21. package/dist/cdn/GACCOEJE.js +4 -0
  22. package/dist/cdn/GUM3FUHK.js +4 -0
  23. package/dist/cdn/{XQUZTH64.js → HPZKKREG.js} +2 -2
  24. package/dist/cdn/{HW6JQO5U.js → I2ZZVQNR.js} +2 -2
  25. package/dist/cdn/{65R5LFH4.js → IDPVSJSA.js} +1 -1
  26. package/dist/cdn/JJXU7RKH.js +4 -0
  27. package/dist/cdn/KVOGU23G.js +4 -0
  28. package/dist/cdn/MG7IUFZ5.js +4 -0
  29. package/dist/cdn/{B7UCVBR4.js → MPI3VJ27.js} +2 -2
  30. package/dist/cdn/{463DHUPJ.js → NRSCYJ4X.js} +2 -2
  31. package/dist/cdn/{MSV35DG3.js → NSG3IIH4.js} +1 -1
  32. package/dist/cdn/{SO6A33RQ.js → QB4B762H.js} +1 -1
  33. package/dist/cdn/SNG6BXOJ.js +4 -0
  34. package/dist/cdn/TA3A544D.js +69 -0
  35. package/dist/cdn/TDR5QOYK.js +4 -0
  36. package/dist/cdn/{YVZP32LA.js → UNGROWHP.js} +2 -2
  37. package/dist/cdn/{NBILS2PA.js → UOMZGMYC.js} +2 -2
  38. package/dist/cdn/V3QS3R7T.js +6 -0
  39. package/dist/cdn/{LUBHSH6S.js → VOYE3SWE.js} +15 -15
  40. package/dist/cdn/{PNX3P5LX.js → VRR5O4LN.js} +2 -2
  41. package/dist/cdn/{5AE3XQBB.js → W3FWYOGY.js} +1 -1
  42. package/dist/cdn/WB62GWRN.js +4 -0
  43. package/dist/cdn/{GYFX6FDB.js → WS4TV7BI.js} +2 -2
  44. package/dist/cdn/{6DXNKA5R.js → WXEVTZGW.js} +2 -2
  45. package/dist/cdn/{WPDOXZMT.js → XNU7TDA3.js} +2 -2
  46. package/dist/cdn/{KMM2L2UC.js → XSTPZUAO.js} +2 -2
  47. package/dist/cdn/{QV5P6IW2.js → XV2IY5HJ.js} +2 -2
  48. package/dist/cdn/{DJBX4N35.js → YIFRYPQP.js} +2 -2
  49. package/dist/cdn/assets/code-editor/sql-expr.worker.js +2107 -2107
  50. package/dist/cdn/index.js +3 -3
  51. package/dist/cdn/main.css +1 -1
  52. package/dist/chunks/arcade-contribution.js +97 -0
  53. package/dist/chunks/arcade-defaults.js +1 -1
  54. package/dist/chunks/arcade-executor.js +1 -1
  55. package/dist/chunks/arcade-mode.js +1 -1
  56. package/dist/chunks/arcade-service-accessors.js +75 -6
  57. package/dist/chunks/colorize.js +26 -0
  58. package/dist/chunks/editor.js +1 -1
  59. package/dist/chunks/fields.js +1 -1
  60. package/dist/chunks/language-defaults-base.js +37 -36
  61. package/dist/chunks/markdown.js +64 -91
  62. package/dist/chunks/monaco-importer.js +8 -93
  63. package/dist/chunks/runtime.js +1 -1
  64. package/dist/chunks/sql-expr-defaults.js +1 -1
  65. package/dist/chunks/sql-expr-mode.js +1 -1
  66. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  67. package/dist/chunks/useT9n.js +1 -1
  68. package/dist/chunks/utilities.js +90 -0
  69. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +3 -3
  70. package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +1 -0
  71. package/dist/components/arcgis-arcade-coding-assistant/index.js +1 -0
  72. package/dist/components/arcgis-arcade-editor/customElement.js +2 -3
  73. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  74. package/dist/components/arcgis-arcade-suggestions/customElement.js +6 -5
  75. package/dist/components/arcgis-code-editor/customElement.js +3 -3
  76. package/dist/components/arcgis-code-viewer/customElement.d.ts +63 -0
  77. package/dist/components/arcgis-code-viewer/customElement.js +119 -0
  78. package/dist/components/arcgis-code-viewer/index.d.ts +1 -0
  79. package/dist/components/arcgis-code-viewer/index.js +1 -0
  80. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  81. package/dist/components/arcgis-language-api-panel/customElement.js +24 -28
  82. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  83. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  84. package/dist/docs/api.json +144 -2
  85. package/dist/docs/docs.json +116 -2
  86. package/dist/docs/vscode.html-custom-data.json +22 -0
  87. package/dist/docs/web-types.json +40 -1
  88. package/dist/index.d.ts +5 -0
  89. package/dist/index.js +1 -1
  90. package/dist/loader.js +5 -4
  91. package/dist/monacoStyles.js +1 -1
  92. package/dist/types/lumina.d.ts +5 -0
  93. package/dist/types/preact.d.ts +6 -0
  94. package/dist/types/preact10.d.ts +7 -0
  95. package/dist/types/react.d.ts +7 -0
  96. package/dist/types/stencil.d.ts +5 -0
  97. package/dist/utils/colorize.d.ts +1 -1
  98. package/dist/utils/monaco-languages.d.ts +4 -0
  99. package/package.json +6 -5
  100. package/dist/cdn/36J7OXKL.js +0 -4
  101. package/dist/cdn/5HDJXUGY.js +0 -4
  102. package/dist/cdn/77G2EUBD.js +0 -4
  103. package/dist/cdn/BC25UYFG.js +0 -4
  104. package/dist/cdn/BEW42V7C.js +0 -4
  105. package/dist/cdn/DQFS5S4N.js +0 -4
  106. package/dist/cdn/FNKWDH6V.js +0 -4
  107. package/dist/cdn/FZYOFX2D.js +0 -6
  108. package/dist/cdn/GQJM6PDN.js +0 -104
  109. package/dist/cdn/IJJXIW5Z.js +0 -4
  110. package/dist/cdn/KFRXV3AL.js +0 -4
  111. package/dist/cdn/LPXQ3NWM.js +0 -4
  112. package/dist/cdn/M4276KFE.js +0 -4
  113. package/dist/cdn/SPZVHSF2.js +0 -4
  114. package/dist/cdn/TIYSNFGO.js +0 -4
  115. package/dist/cdn/USHS6Y7V.js +0 -6
  116. package/dist/cdn/X2NBZ5GC.js +0 -4
  117. package/dist/cdn/XAAE3RER.js +0 -4
  118. package/dist/chunks/setup-monaco.js +0 -74
  119. package/dist/chunks/sql-expr-contribution.js +0 -85
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-10-31T04:38:11",
2
+ "timestamp": "2025-11-02T04:36:00",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "5.0.0-next.39",
5
+ "version": "5.0.0-next.41",
6
6
  "typescriptVersion": "5.8.3"
7
7
  },
8
8
  "schemaVersion": "1.0.0",
@@ -983,6 +983,148 @@
983
983
  }
984
984
  ]
985
985
  },
986
+ {
987
+ "kind": "javascript-module",
988
+ "path": "src/components/code-viewer/code-viewer.tsx",
989
+ "declarations": [
990
+ {
991
+ "kind": "class",
992
+ "customElement": true,
993
+ "name": "ArcgisCodeViewer",
994
+ "tagName": "arcgis-code-viewer",
995
+ "description": "A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.",
996
+ "demos": [
997
+ {
998
+ "description": "Docs",
999
+ "url": "https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-code-viewer/"
1000
+ }
1001
+ ],
1002
+ "docsTags": [
1003
+ {
1004
+ "name": "example",
1005
+ "text": "```tsx\n<arcgis-code-viewer language=\"javascript\">\nfunction greet() {\n console.log(\"Hello, World!\");\n}\n</arcgis-code-viewer>\n```"
1006
+ },
1007
+ {
1008
+ "name": "example",
1009
+ "text": "HTML snippets (preserve markup)\n```tsx\n<arcgis-code-viewer language=\"html\">\n<template>\n<div class=\"greeting\"><span>Hello</span> World!</div>\n</template>\n</arcgis-code-viewer>\n```\nWhen `language=\"html\"`, the component will attempt to preserve your original markup instead of reducing it\nto plain text. For safety and to prevent the markup from rendering in-page, wrap the snippet in a `<template>`.\nIf no `<template>` is provided, the component falls back to concatenating the `outerHTML` of element nodes and the\nraw text of text nodes. Script contents are treated as inert string data; they are never executed."
1010
+ },
1011
+ {
1012
+ "name": "internal"
1013
+ }
1014
+ ],
1015
+ "superclass": {
1016
+ "name": "LitElement",
1017
+ "package": "@arcgis/lumina"
1018
+ },
1019
+ "pascalCaseName": "ArcgisCodeViewer",
1020
+ "importPath": "components/arcgis-code-viewer",
1021
+ "members": [
1022
+ {
1023
+ "kind": "method",
1024
+ "name": "componentOnReady",
1025
+ "return": {
1026
+ "type": {
1027
+ "text": "Promise<void>",
1028
+ "references": [
1029
+ {
1030
+ "module": "lib/lib.es5.d.ts",
1031
+ "name": "Promise",
1032
+ "package": "typescript",
1033
+ "start": 0,
1034
+ "end": 7
1035
+ }
1036
+ ]
1037
+ }
1038
+ },
1039
+ "description": "Create a promise that resolves once component is fully loaded.",
1040
+ "signature": "(): Promise<void>",
1041
+ "async": true,
1042
+ "inheritedFrom": {
1043
+ "name": "LitElement",
1044
+ "package": "@arcgis/lumina"
1045
+ },
1046
+ "docsTags": [
1047
+ {
1048
+ "name": "example",
1049
+ "text": "```js\nconst arcgisCodeViewer = document.querySelector(\"arcgis-code-viewer\");\ndocument.body.append(arcgisCodeViewer);\nawait arcgisCodeViewer.componentOnReady();\nconsole.log(\"arcgis-code-viewer is ready to go!\");\n```"
1050
+ }
1051
+ ]
1052
+ },
1053
+ {
1054
+ "kind": "field",
1055
+ "name": "language",
1056
+ "description": "The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.",
1057
+ "type": {
1058
+ "text": "string",
1059
+ "values": [
1060
+ {
1061
+ "type": "string"
1062
+ }
1063
+ ]
1064
+ },
1065
+ "default": "\"arcade\"",
1066
+ "attribute": "language"
1067
+ },
1068
+ {
1069
+ "kind": "field",
1070
+ "name": "round",
1071
+ "description": "When `true`, adds a round style to the component.",
1072
+ "type": {
1073
+ "text": "boolean",
1074
+ "values": [
1075
+ {
1076
+ "type": "boolean"
1077
+ }
1078
+ ]
1079
+ },
1080
+ "default": "false",
1081
+ "attribute": "round",
1082
+ "reflects": true
1083
+ }
1084
+ ],
1085
+ "attributes": [
1086
+ {
1087
+ "name": "language",
1088
+ "description": "The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.",
1089
+ "type": {
1090
+ "text": "string",
1091
+ "values": [
1092
+ {
1093
+ "type": "string"
1094
+ }
1095
+ ]
1096
+ },
1097
+ "default": "\"arcade\"",
1098
+ "fieldName": "language"
1099
+ },
1100
+ {
1101
+ "name": "round",
1102
+ "description": "When `true`, adds a round style to the component.",
1103
+ "type": {
1104
+ "text": "boolean",
1105
+ "values": [
1106
+ {
1107
+ "type": "boolean"
1108
+ }
1109
+ ]
1110
+ },
1111
+ "default": "false",
1112
+ "fieldName": "round"
1113
+ }
1114
+ ]
1115
+ }
1116
+ ],
1117
+ "exports": [
1118
+ {
1119
+ "kind": "custom-element-definition",
1120
+ "name": "arcgis-code-viewer",
1121
+ "declaration": {
1122
+ "name": "ArcgisCodeViewer",
1123
+ "module": "src/components/code-viewer/code-viewer.tsx"
1124
+ }
1125
+ }
1126
+ ]
1127
+ },
986
1128
  {
987
1129
  "kind": "javascript-module",
988
1130
  "path": "src/components/sql-expression-editor/sql-expression-editor.tsx",
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-10-31T04:38:11",
2
+ "timestamp": "2025-11-02T04:36:00",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "5.0.0-next.39",
5
+ "version": "5.0.0-next.41",
6
6
  "typescriptVersion": "5.8.3"
7
7
  },
8
8
  "components": [
@@ -943,6 +943,120 @@
943
943
  "parts": [],
944
944
  "listeners": []
945
945
  },
946
+ {
947
+ "filePath": "src/components/code-viewer/code-viewer.tsx",
948
+ "tag": "arcgis-code-viewer",
949
+ "overview": "",
950
+ "readme": "",
951
+ "usage": {},
952
+ "docs": "A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.",
953
+ "docsTags": [
954
+ {
955
+ "name": "example",
956
+ "text": "```tsx\n<arcgis-code-viewer language=\"javascript\">\nfunction greet() {\n console.log(\"Hello, World!\");\n}\n</arcgis-code-viewer>\n```"
957
+ },
958
+ {
959
+ "name": "example",
960
+ "text": "HTML snippets (preserve markup)\n```tsx\n<arcgis-code-viewer language=\"html\">\n<template>\n<div class=\"greeting\"><span>Hello</span> World!</div>\n</template>\n</arcgis-code-viewer>\n```\nWhen `language=\"html\"`, the component will attempt to preserve your original markup instead of reducing it\nto plain text. For safety and to prevent the markup from rendering in-page, wrap the snippet in a `<template>`.\nIf no `<template>` is provided, the component falls back to concatenating the `outerHTML` of element nodes and the\nraw text of text nodes. Script contents are treated as inert string data; they are never executed."
961
+ },
962
+ {
963
+ "name": "internal"
964
+ },
965
+ {
966
+ "name": "superclass",
967
+ "text": "{\"name\":\"LitElement\",\"package\":\"@arcgis/lumina\"}"
968
+ }
969
+ ],
970
+ "encapsulation": "shadow",
971
+ "dependents": [],
972
+ "dependencies": [],
973
+ "dependencyGraph": {},
974
+ "props": [
975
+ {
976
+ "name": "language",
977
+ "type": "string",
978
+ "complexType": {
979
+ "original": "string",
980
+ "resolved": "string",
981
+ "references": {}
982
+ },
983
+ "mutable": true,
984
+ "attr": "language",
985
+ "reflectToAttr": false,
986
+ "docs": "The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.",
987
+ "docsTags": [],
988
+ "default": "\"arcade\"",
989
+ "values": [
990
+ {
991
+ "type": "string"
992
+ }
993
+ ],
994
+ "optional": true,
995
+ "required": false
996
+ },
997
+ {
998
+ "name": "round",
999
+ "type": "boolean",
1000
+ "complexType": {
1001
+ "original": "boolean",
1002
+ "resolved": "boolean",
1003
+ "references": {}
1004
+ },
1005
+ "mutable": true,
1006
+ "attr": "round",
1007
+ "reflectToAttr": true,
1008
+ "docs": "When `true`, adds a round style to the component.",
1009
+ "docsTags": [],
1010
+ "default": "false",
1011
+ "values": [
1012
+ {
1013
+ "type": "boolean"
1014
+ }
1015
+ ],
1016
+ "optional": true,
1017
+ "required": false
1018
+ }
1019
+ ],
1020
+ "methods": [
1021
+ {
1022
+ "name": "componentOnReady",
1023
+ "returns": {
1024
+ "type": "Promise<void>",
1025
+ "docs": ""
1026
+ },
1027
+ "complexType": {
1028
+ "signature": "(): Promise<void>",
1029
+ "parameters": [],
1030
+ "return": "Promise<void>",
1031
+ "references": {
1032
+ "Promise": {
1033
+ "location": "import",
1034
+ "path": "typescript/lib/lib.es5.d.ts",
1035
+ "id": "notImplemented"
1036
+ }
1037
+ }
1038
+ },
1039
+ "signature": "componentOnReady(): Promise<void>",
1040
+ "parameters": [],
1041
+ "docs": "Create a promise that resolves once component is fully loaded.",
1042
+ "docsTags": [
1043
+ {
1044
+ "name": "example",
1045
+ "text": "```js\nconst arcgisCodeViewer = document.querySelector(\"arcgis-code-viewer\");\ndocument.body.append(arcgisCodeViewer);\nawait arcgisCodeViewer.componentOnReady();\nconsole.log(\"arcgis-code-viewer is ready to go!\");\n```"
1046
+ },
1047
+ {
1048
+ "name": "inheritedFrom",
1049
+ "text": "{\"name\":\"LitElement\",\"package\":\"@arcgis/lumina\"}"
1050
+ }
1051
+ ]
1052
+ }
1053
+ ],
1054
+ "events": [],
1055
+ "styles": [],
1056
+ "slots": [],
1057
+ "parts": [],
1058
+ "listeners": []
1059
+ },
946
1060
  {
947
1061
  "filePath": "src/components/sql-expression-editor/sql-expression-editor.tsx",
948
1062
  "tag": "arcgis-sql-expression-editor",
@@ -60,6 +60,28 @@
60
60
  }
61
61
  ]
62
62
  },
63
+ {
64
+ "name": "arcgis-code-viewer",
65
+ "description": "A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.\n--\n\n### Methods\n- `componentOnReady(): Promise<void>` - Create a promise that resolves once component is fully loaded.",
66
+ "attributes": [
67
+ {
68
+ "name": "language",
69
+ "description": "The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.",
70
+ "values": []
71
+ },
72
+ {
73
+ "name": "round",
74
+ "description": "When `true`, adds a round style to the component.",
75
+ "values": []
76
+ }
77
+ ],
78
+ "references": [
79
+ {
80
+ "name": "Docs",
81
+ "url": "https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-code-viewer/"
82
+ }
83
+ ]
84
+ },
63
85
  {
64
86
  "name": "arcgis-sql-expression-editor",
65
87
  "description": "The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.\nIt supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the\n[standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.\n--\n\n### Events\n- **arcgisDiagnosticsChange** - Emitted when the diagnostics collection has changed.\n- **arcgisScriptChange** - Emitted when the script string has changed.\n\n### Methods\n- `componentOnReady(): Promise<void>` - Create a promise that resolves once component is fully loaded.",
@@ -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": "5.0.0-next.39",
4
+ "version": "5.0.0-next.41",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -208,6 +208,45 @@
208
208
  ]
209
209
  }
210
210
  },
211
+ {
212
+ "name": "arcgis-code-viewer",
213
+ "description": "A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.\n--\n\n### Methods\n- `componentOnReady(): Promise<void>` - Create a promise that resolves once component is fully loaded.",
214
+ "doc-url": "https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-code-viewer/",
215
+ "attributes": [
216
+ {
217
+ "name": "language",
218
+ "description": "The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.",
219
+ "default": "\"arcade\"",
220
+ "value": {
221
+ "type": "string"
222
+ }
223
+ },
224
+ {
225
+ "name": "round",
226
+ "description": "When `true`, adds a round style to the component.",
227
+ "default": "false",
228
+ "value": {
229
+ "type": "boolean"
230
+ }
231
+ }
232
+ ],
233
+ "events": [],
234
+ "js": {
235
+ "properties": [
236
+ {
237
+ "name": "language",
238
+ "description": "The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.",
239
+ "type": "string"
240
+ },
241
+ {
242
+ "name": "round",
243
+ "description": "When `true`, adds a round style to the component.",
244
+ "type": "boolean"
245
+ }
246
+ ],
247
+ "events": []
248
+ }
249
+ },
211
250
  {
212
251
  "name": "arcgis-sql-expression-editor",
213
252
  "description": "The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.\nIt supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the\n[standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.\n--\n\n### Events\n- **arcgisDiagnosticsChange** - Emitted when the diagnostics collection has changed.\n- **arcgisScriptChange** - Emitted when the script string has changed.\n\n### Methods\n- `componentOnReady(): Promise<void>` - Create a promise that resolves once component is fully loaded.",
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { ArcgisArcadeEditor } from "./components/arcgis-arcade-editor";
2
2
  import type { ArcgisCodeEditor } from "./components/arcgis-code-editor";
3
+ import type { ArcgisCodeViewer } from "./components/arcgis-code-viewer";
3
4
  import type { ArcgisSqlExpressionEditor } from "./components/arcgis-sql-expression-editor";
4
5
 
5
6
  export { getAssetPath, setAssetPath } from './runtime';
@@ -40,6 +41,7 @@ declare global {
40
41
  interface HTMLElementTagNameMap {
41
42
  "arcgis-arcade-editor": HTMLArcgisArcadeEditorElement;
42
43
  "arcgis-code-editor": HTMLArcgisCodeEditorElement;
44
+ "arcgis-code-viewer": HTMLArcgisCodeViewerElement;
43
45
  "arcgis-sql-expression-editor": HTMLArcgisSqlExpressionEditorElement;
44
46
  }
45
47
 
@@ -68,6 +70,9 @@ declare global {
68
70
  removeEventListener<K extends keyof HTMLArcgisCodeEditorElementEventMap>(type: K, listener: (this: HTMLArcgisCodeEditorElement, ev: ArcgisCodeEditorCustomEvent<HTMLArcgisCodeEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
69
71
  removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
70
72
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
73
+ }
74
+ interface HTMLArcgisCodeViewerElement extends ArcgisCodeViewer {
75
+
71
76
  }
72
77
  interface HTMLArcgisSqlExpressionEditorElementEventMap {
73
78
  "arcgisDiagnosticsChange": ArcgisSqlExpressionEditor["arcgisDiagnosticsChange"]["detail"];
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
3
3
  import { s as p } from "./chunks/sql-expr-defaults.js";
4
4
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
6
- v5.0.0-next.39 */
6
+ v5.0.0-next.41 */
7
7
  const a = s, r = t;
8
8
  export {
9
9
  c as arcade,
package/dist/loader.js CHANGED
@@ -1,19 +1,20 @@
1
1
  import { r as e } from "./chunks/runtime.js";
2
- import { makeDefineCustomElements as s } from "@arcgis/lumina";
2
+ import { makeDefineCustomElements as i } from "@arcgis/lumina";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
5
- v5.0.0-next.39 */
6
- const a = s(e, {
5
+ v5.0.0-next.41 */
6
+ const r = i(e, {
7
7
  "arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
8
8
  "arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
9
9
  "arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
10
10
  "arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "closed,suggestions:"],
11
11
  "arcgis-code-editor": [() => import("./components/arcgis-code-editor/customElement.js"), "editorInstance:,editorOptions:,language,modelId:,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],
12
+ "arcgis-code-viewer": [() => import("./components/arcgis-code-viewer/customElement.js"), "language,round"],
12
13
  "arcgis-editor-variables": [() => import("./components/arcgis-editor-variables/customElement.js"), "closed,loading,modelId,variable:"],
13
14
  "arcgis-language-api-panel": [() => import("./components/arcgis-language-api-panel/customElement.js"), "apiLibrary:,closed,hideDocumentationActions,languageId,loading"],
14
15
  "arcgis-sql-expression-editor": [() => import("./components/arcgis-sql-expression-editor/customElement.js"), "hideSideBar,profile:,script"],
15
16
  "arcgis-sql-expression-fields": [() => import("./components/arcgis-sql-expression-fields/customElement.js"), "loading,modelId"]
16
17
  });
17
18
  export {
18
- a as defineCustomElements
19
+ r as defineCustomElements
19
20
  };
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.39 */
3
+ v5.0.0-next.41 */
4
4
  const A = `/*!-----------------------------------------------------------
5
5
  * Copyright (c) Microsoft Corporation. All rights reserved.
6
6
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,6 +1,7 @@
1
1
  /// <reference types="../index.d.ts" />
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
3
3
  import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
+ import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer";
4
5
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
6
  import type { h, EventHandler } from "@arcgis/lumina";
6
7
 
@@ -14,6 +15,9 @@ interface LuminaArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editorO
14
15
  onarcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
15
16
  }
16
17
 
18
+ interface LuminaArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, 'language' | 'round'>>, h.JSX.HTMLAttributes<HTMLArcgisCodeViewerElement> {
19
+ }
20
+
17
21
  interface LuminaArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, h.JSX.HTMLAttributes<HTMLArcgisSqlExpressionEditorElement> {
18
22
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisDiagnosticsChange"]>;
19
23
  onarcgisScriptChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>;
@@ -24,6 +28,7 @@ declare module "@arcgis/lumina" {
24
28
  interface IntrinsicElements {
25
29
  "arcgis-arcade-editor": LuminaArcgisArcadeEditor;
26
30
  "arcgis-code-editor": LuminaArcgisCodeEditor;
31
+ "arcgis-code-viewer": LuminaArcgisCodeViewer;
27
32
  "arcgis-sql-expression-editor": LuminaArcgisSqlExpressionEditor;
28
33
  }
29
34
  }
@@ -1,6 +1,7 @@
1
1
  /// <reference types="../index.d.ts" />
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
3
3
  import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
+ import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer";
4
5
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
6
  import { HTMLAttributes } from "preact";
6
7
  import type { EventHandler } from "@arcgis/lumina";
@@ -15,6 +16,9 @@ interface PreactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editorO
15
16
  onarcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
16
17
  }
17
18
 
19
+ interface PreactArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, 'language' | 'round'>>, HTMLAttributes<HTMLArcgisCodeViewerElement> {
20
+ }
21
+
18
22
  interface PreactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, HTMLAttributes<HTMLArcgisSqlExpressionEditorElement> {
19
23
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisDiagnosticsChange"]>;
20
24
  onarcgisScriptChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>;
@@ -25,6 +29,7 @@ declare module 'preact' {
25
29
  interface IntrinsicElements {
26
30
  "arcgis-arcade-editor": PreactArcgisArcadeEditor;
27
31
  "arcgis-code-editor": PreactArcgisCodeEditor;
32
+ "arcgis-code-viewer": PreactArcgisCodeViewer;
28
33
  "arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor;
29
34
  }
30
35
  }
@@ -32,6 +37,7 @@ declare module 'preact' {
32
37
  interface IntrinsicElements {
33
38
  "arcgis-arcade-editor": PreactArcgisArcadeEditor;
34
39
  "arcgis-code-editor": PreactArcgisCodeEditor;
40
+ "arcgis-code-viewer": PreactArcgisCodeViewer;
35
41
  "arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor;
36
42
  }
37
43
  }
@@ -1,6 +1,7 @@
1
1
  /// <reference types="../index.d.ts" />
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
3
3
  import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
+ import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer";
4
5
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
6
  import { JSX as PreactJsx } from "preact";
6
7
  import type { EventHandler } from "@arcgis/lumina";
@@ -17,6 +18,10 @@ interface PreactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editorO
17
18
  onarcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
18
19
  }
19
20
 
21
+ /** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
22
+ interface PreactArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, 'language' | 'round'>>, PreactJsx.HTMLAttributes<HTMLArcgisCodeViewerElement> {
23
+ }
24
+
20
25
  /** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
21
26
  interface PreactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, PreactJsx.HTMLAttributes<HTMLArcgisSqlExpressionEditorElement> {
22
27
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisDiagnosticsChange"]>;
@@ -28,6 +33,7 @@ declare module 'preact' {
28
33
  interface IntrinsicElements {
29
34
  "arcgis-arcade-editor": PreactArcgisArcadeEditor;
30
35
  "arcgis-code-editor": PreactArcgisCodeEditor;
36
+ "arcgis-code-viewer": PreactArcgisCodeViewer;
31
37
  "arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor;
32
38
  }
33
39
  }
@@ -35,6 +41,7 @@ declare module 'preact' {
35
41
  interface IntrinsicElements {
36
42
  "arcgis-arcade-editor": PreactArcgisArcadeEditor;
37
43
  "arcgis-code-editor": PreactArcgisCodeEditor;
44
+ "arcgis-code-viewer": PreactArcgisCodeViewer;
38
45
  "arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor;
39
46
  }
40
47
  }
@@ -1,6 +1,7 @@
1
1
  /// <reference types="../index.d.ts" />
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
3
3
  import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
+ import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer";
4
5
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
6
  import type { HTMLProps } from 'react';
6
7
  import type { EventHandler } from "@arcgis/lumina";
@@ -15,6 +16,9 @@ interface ReactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editorOp
15
16
  onarcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
16
17
  }
17
18
 
19
+ interface ReactArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, 'language' | 'round'>>, HTMLProps<HTMLArcgisCodeViewerElement> {
20
+ }
21
+
18
22
  interface ReactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, HTMLProps<HTMLArcgisSqlExpressionEditorElement> {
19
23
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisDiagnosticsChange"]>;
20
24
  onarcgisScriptChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>;
@@ -25,6 +29,7 @@ declare module "react" {
25
29
  interface IntrinsicElements {
26
30
  "arcgis-arcade-editor": ReactArcgisArcadeEditor;
27
31
  "arcgis-code-editor": ReactArcgisCodeEditor;
32
+ "arcgis-code-viewer": ReactArcgisCodeViewer;
28
33
  "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
29
34
  }
30
35
  }
@@ -34,6 +39,7 @@ declare module "react/jsx-runtime" {
34
39
  interface IntrinsicElements {
35
40
  "arcgis-arcade-editor": ReactArcgisArcadeEditor;
36
41
  "arcgis-code-editor": ReactArcgisCodeEditor;
42
+ "arcgis-code-viewer": ReactArcgisCodeViewer;
37
43
  "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
38
44
  }
39
45
  }
@@ -43,6 +49,7 @@ declare module "react/jsx-dev-runtime" {
43
49
  interface IntrinsicElements {
44
50
  "arcgis-arcade-editor": ReactArcgisArcadeEditor;
45
51
  "arcgis-code-editor": ReactArcgisCodeEditor;
52
+ "arcgis-code-viewer": ReactArcgisCodeViewer;
46
53
  "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
47
54
  }
48
55
  }
@@ -1,6 +1,7 @@
1
1
  /// <reference types="../index.d.ts" />
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
3
3
  import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
+ import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer";
4
5
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
6
  import { JSXBase as StencilJsx } from "@stencil/core/internal";
6
7
  import type { EventHandler } from "@arcgis/lumina";
@@ -15,6 +16,9 @@ interface StencilArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editor
15
16
  onArcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
16
17
  }
17
18
 
19
+ interface StencilArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, 'language' | 'round'>>, StencilJsx.HTMLAttributes<HTMLArcgisCodeViewerElement> {
20
+ }
21
+
18
22
  interface StencilArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, StencilJsx.HTMLAttributes<HTMLArcgisSqlExpressionEditorElement> {
19
23
  onArcgisDiagnosticsChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisDiagnosticsChange"]>;
20
24
  onArcgisScriptChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>;
@@ -23,6 +27,7 @@ interface StencilArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpress
23
27
  interface ExposedElements {
24
28
  "arcgis-arcade-editor": StencilArcgisArcadeEditor;
25
29
  "arcgis-code-editor": StencilArcgisCodeEditor;
30
+ "arcgis-code-viewer": StencilArcgisCodeViewer;
26
31
  "arcgis-sql-expression-editor": StencilArcgisSqlExpressionEditor;
27
32
  }
28
33
 
@@ -1,5 +1,5 @@
1
1
  import { IDisposable } from 'monaco-editor';
2
- export declare function colorizedAllCodeElements(e: HTMLElement, languageId: string): Promise<void>;
2
+ export declare function colorizeCode(code: string, languageId: string): Promise<string>;
3
3
  export declare function colorizeCodeElement(e: Element | null | undefined, text: string | null | undefined, languageId: string): Promise<void>;
4
4
  export declare function generateColorizeStyles(): string;
5
5
  export declare function onColorizeThemeChanged(func: () => void): IDisposable;
@@ -1,3 +1,7 @@
1
+ /** Mark a language as fully initialized (should be called after mode.setupMode). */
2
+ export declare function markLanguageReady(languageId: string): void;
3
+ /** Await the full initialization of the language (tokens/providers registered). */
4
+ export declare function whenLanguageReady(languageId: string): Promise<void>;
1
5
  /**
2
6
  * helper to track the languages that have been encountered in monaco-editor.
3
7
  * Useful for wrapping callbacks passed to monaco's languages.onLanguage function.