@walkeros/explorer 2.1.0 → 2.1.1

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 (92) hide show
  1. package/AGENT.md +14 -0
  2. package/STYLE.md +6 -0
  3. package/dist/chunk-4AJX6MFW.mjs +573 -0
  4. package/dist/chunk-4AJX6MFW.mjs.map +1 -0
  5. package/dist/components/atoms/button-link.stories.d.ts +1 -3
  6. package/dist/components/atoms/button-link.stories.d.ts.map +1 -1
  7. package/dist/components/atoms/button-link.stories.js +1 -15
  8. package/dist/components/atoms/button-link.stories.js.map +1 -1
  9. package/dist/components/atoms/code.d.ts +29 -1
  10. package/dist/components/atoms/code.d.ts.map +1 -1
  11. package/dist/components/atoms/code.js +76 -8
  12. package/dist/components/atoms/code.js.map +1 -1
  13. package/dist/components/atoms/code.stories.d.ts +0 -7
  14. package/dist/components/atoms/code.stories.d.ts.map +1 -1
  15. package/dist/components/atoms/code.stories.js +0 -34
  16. package/dist/components/atoms/code.stories.js.map +1 -1
  17. package/dist/components/molecules/code-box.d.ts +6 -1
  18. package/dist/components/molecules/code-box.d.ts.map +1 -1
  19. package/dist/components/molecules/code-box.js +45 -3
  20. package/dist/components/molecules/code-box.js.map +1 -1
  21. package/dist/components/molecules/code-box.stories.d.ts +45 -9
  22. package/dist/components/molecules/code-box.stories.d.ts.map +1 -1
  23. package/dist/components/molecules/code-box.stories.js +106 -45
  24. package/dist/components/molecules/code-box.stories.js.map +1 -1
  25. package/dist/components/molecules/code-snippet.stories.d.ts +0 -8
  26. package/dist/components/molecules/code-snippet.stories.d.ts.map +1 -1
  27. package/dist/components/molecules/code-snippet.stories.js +0 -19
  28. package/dist/components/molecules/code-snippet.stories.js.map +1 -1
  29. package/dist/components/molecules/flow-map/FlowMap.stories.d.ts +0 -32
  30. package/dist/components/molecules/flow-map/FlowMap.stories.d.ts.map +1 -1
  31. package/dist/components/molecules/flow-map/FlowMap.stories.js +0 -330
  32. package/dist/components/molecules/flow-map/FlowMap.stories.js.map +1 -1
  33. package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts +0 -16
  34. package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts.map +1 -1
  35. package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js +0 -78
  36. package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js.map +1 -1
  37. package/dist/components/molecules/preview.d.ts.map +1 -1
  38. package/dist/components/molecules/preview.js +32 -22
  39. package/dist/components/molecules/preview.js.map +1 -1
  40. package/dist/index.d.cts +180 -3
  41. package/dist/index.d.ts +9 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +11 -0
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +1052 -49
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/{monaco-types-OLSF6MIE.mjs → monaco-types-KN2DINPW.mjs} +2 -2
  48. package/dist/styles.css +31 -0
  49. package/dist/types/intellisense.d.ts +31 -0
  50. package/dist/types/intellisense.d.ts.map +1 -0
  51. package/dist/types/intellisense.js +2 -0
  52. package/dist/types/intellisense.js.map +1 -0
  53. package/dist/utils/monaco-intellisense-flow-extractor.d.ts +13 -0
  54. package/dist/utils/monaco-intellisense-flow-extractor.d.ts.map +1 -0
  55. package/dist/utils/monaco-intellisense-flow-extractor.js +161 -0
  56. package/dist/utils/monaco-intellisense-flow-extractor.js.map +1 -0
  57. package/dist/utils/monaco-schema-contract.d.ts +8 -0
  58. package/dist/utils/monaco-schema-contract.d.ts.map +1 -0
  59. package/dist/utils/monaco-schema-contract.js +73 -0
  60. package/dist/utils/monaco-schema-contract.js.map +1 -0
  61. package/dist/utils/monaco-schema-enrichment.d.ts +26 -0
  62. package/dist/utils/monaco-schema-enrichment.d.ts.map +1 -0
  63. package/dist/utils/monaco-schema-enrichment.js +31 -0
  64. package/dist/utils/monaco-schema-enrichment.js.map +1 -0
  65. package/dist/utils/monaco-schema-flow-setup.d.ts +10 -0
  66. package/dist/utils/monaco-schema-flow-setup.d.ts.map +1 -0
  67. package/dist/utils/monaco-schema-flow-setup.js +201 -0
  68. package/dist/utils/monaco-schema-flow-setup.js.map +1 -0
  69. package/dist/utils/monaco-schema-variables.d.ts +4 -0
  70. package/dist/utils/monaco-schema-variables.d.ts.map +1 -0
  71. package/dist/utils/monaco-schema-variables.js +26 -0
  72. package/dist/utils/monaco-schema-variables.js.map +1 -0
  73. package/dist/utils/monaco-walkeros-completions.d.ts +15 -0
  74. package/dist/utils/monaco-walkeros-completions.d.ts.map +1 -0
  75. package/dist/utils/monaco-walkeros-completions.js +65 -0
  76. package/dist/utils/monaco-walkeros-completions.js.map +1 -0
  77. package/dist/utils/monaco-walkeros-decorations.d.ts +29 -0
  78. package/dist/utils/monaco-walkeros-decorations.d.ts.map +1 -0
  79. package/dist/utils/monaco-walkeros-decorations.js +87 -0
  80. package/dist/utils/monaco-walkeros-decorations.js.map +1 -0
  81. package/dist/utils/monaco-walkeros-markers.d.ts +13 -0
  82. package/dist/utils/monaco-walkeros-markers.d.ts.map +1 -0
  83. package/dist/utils/monaco-walkeros-markers.js +69 -0
  84. package/dist/utils/monaco-walkeros-markers.js.map +1 -0
  85. package/dist/utils/monaco-walkeros-providers.d.ts +19 -0
  86. package/dist/utils/monaco-walkeros-providers.d.ts.map +1 -0
  87. package/dist/utils/monaco-walkeros-providers.js +229 -0
  88. package/dist/utils/monaco-walkeros-providers.js.map +1 -0
  89. package/package.json +1 -1
  90. package/dist/chunk-YKT4D7MG.mjs +0 -3087
  91. package/dist/chunk-YKT4D7MG.mjs.map +0 -1
  92. /package/dist/{monaco-types-OLSF6MIE.mjs.map → monaco-types-KN2DINPW.mjs.map} +0 -0
@@ -14,7 +14,7 @@ import {
14
14
  removeDestinationType,
15
15
  removeTypeLibrary,
16
16
  updateTypeLibrary
17
- } from "./chunk-YKT4D7MG.mjs";
17
+ } from "./chunk-4AJX6MFW.mjs";
18
18
  export {
19
19
  addDestinationType,
20
20
  addFunctionContextTypes,
@@ -31,4 +31,4 @@ export {
31
31
  removeTypeLibrary,
32
32
  updateTypeLibrary
33
33
  };
34
- //# sourceMappingURL=monaco-types-OLSF6MIE.mjs.map
34
+ //# sourceMappingURL=monaco-types-KN2DINPW.mjs.map
package/dist/styles.css CHANGED
@@ -1981,6 +1981,37 @@
1981
1981
  margin: 0;
1982
1982
  cursor: pointer;
1983
1983
  }
1984
+ .elb-codebox-marker-badge {
1985
+ display: flex;
1986
+ align-items: center;
1987
+ gap: 3px;
1988
+ padding: 2px 6px;
1989
+ border: none;
1990
+ border-radius: var(--radius-button);
1991
+ cursor: pointer;
1992
+ font-size: calc(var(--font-size-base) - 2px);
1993
+ font-weight: var(--font-weight-semibold);
1994
+ font-family: var(--font-mono);
1995
+ line-height: 1;
1996
+ transition: all 0.15s;
1997
+ }
1998
+ .elb-codebox-marker-badge svg {
1999
+ flex-shrink: 0;
2000
+ }
2001
+ .elb-codebox-marker-badge--error {
2002
+ color: var(--color-alert-error-text);
2003
+ background: var(--color-alert-error-bg);
2004
+ }
2005
+ .elb-codebox-marker-badge--error:hover {
2006
+ background: var(--color-alert-error-border);
2007
+ }
2008
+ .elb-codebox-marker-badge--warning {
2009
+ color: var(--color-alert-warning-text);
2010
+ background: var(--color-alert-warning-bg);
2011
+ }
2012
+ .elb-codebox-marker-badge--warning:hover {
2013
+ background: var(--color-alert-warning-border);
2014
+ }
1984
2015
  .elb-code-snippet {
1985
2016
  min-height: var(--height-snippet-min);
1986
2017
  }
@@ -0,0 +1,31 @@
1
+ export interface PackageInfo {
2
+ package: string;
3
+ shortName: string;
4
+ type: 'source' | 'destination' | 'transformer';
5
+ platform: 'web' | 'server';
6
+ description?: string;
7
+ }
8
+ export interface IntelliSenseContext {
9
+ /** Variable names and values from the flow's `variables` section */
10
+ variables?: Record<string, string | number | boolean>;
11
+ /** Definition names from the flow's `definitions` section */
12
+ definitions?: Record<string, unknown>;
13
+ /** Secret names available in the project (values are NOT included) */
14
+ secrets?: string[];
15
+ /** Step names from the current flow config, by type */
16
+ stepNames?: {
17
+ sources?: string[];
18
+ destinations?: string[];
19
+ transformers?: string[];
20
+ };
21
+ /** Contract entities and their actions */
22
+ contract?: Array<{
23
+ entity: string;
24
+ actions: string[];
25
+ }>;
26
+ /** Available packages for autocomplete */
27
+ packages?: PackageInfo[];
28
+ /** Current platform context (web or server) */
29
+ platform?: 'web' | 'server';
30
+ }
31
+ //# sourceMappingURL=intellisense.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intellisense.d.ts","sourceRoot":"","sources":["../../src/types/intellisense.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,CAAC;IAC/C,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAEtD,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEtC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,uDAAuD;IACvD,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IAEF,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;IAEH,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAEzB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=intellisense.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intellisense.js","sourceRoot":"","sources":["../../src/types/intellisense.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import type { IntelliSenseContext } from '../types/intellisense';
2
+ /**
3
+ * Extract IntelliSense context from a Flow.Setup JSON string.
4
+ *
5
+ * Parses the JSON, walks setup → configs → steps, and collects
6
+ * all discoverable variables, definitions, step names, packages,
7
+ * platform, and contract entities.
8
+ *
9
+ * Returns `{}` for invalid JSON or non-Flow structures.
10
+ * Pure function — no side effects, no state.
11
+ */
12
+ export declare function extractFlowIntelliSenseContext(json: string): Partial<IntelliSenseContext>;
13
+ //# sourceMappingURL=monaco-intellisense-flow-extractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-intellisense-flow-extractor.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-intellisense-flow-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,uBAAuB,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,mBAAmB,CAAC,CA4G9B"}
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Extract IntelliSense context from a Flow.Setup JSON string.
3
+ *
4
+ * Parses the JSON, walks setup → configs → steps, and collects
5
+ * all discoverable variables, definitions, step names, packages,
6
+ * platform, and contract entities.
7
+ *
8
+ * Returns `{}` for invalid JSON or non-Flow structures.
9
+ * Pure function — no side effects, no state.
10
+ */
11
+ export function extractFlowIntelliSenseContext(json) {
12
+ let parsed;
13
+ try {
14
+ parsed = JSON.parse(json);
15
+ }
16
+ catch {
17
+ return {};
18
+ }
19
+ if (!isFlowSetup(parsed))
20
+ return {};
21
+ const variables = {};
22
+ const definitions = {};
23
+ const sources = [];
24
+ const destinations = [];
25
+ const transformers = [];
26
+ const packages = [];
27
+ const contractEntities = [];
28
+ let platform;
29
+ // Setup-level
30
+ mergeVars(variables, parsed.variables);
31
+ mergeDefs(definitions, parsed.definitions);
32
+ extractContract(contractEntities, parsed.contract);
33
+ // Walk each flow config
34
+ for (const config of Object.values(parsed.flows)) {
35
+ if (!isObject(config))
36
+ continue;
37
+ // Platform detection (first match wins)
38
+ if (!platform) {
39
+ if ('web' in config)
40
+ platform = 'web';
41
+ else if ('server' in config)
42
+ platform = 'server';
43
+ }
44
+ // Config-level variables/definitions/contract
45
+ mergeVars(variables, config.variables);
46
+ mergeDefs(definitions, config.definitions);
47
+ extractContract(contractEntities, config.contract);
48
+ // Sources
49
+ if (isObject(config.sources)) {
50
+ for (const [name, ref] of Object.entries(config.sources)) {
51
+ sources.push(name);
52
+ if (isObject(ref)) {
53
+ mergeVars(variables, ref.variables);
54
+ mergeDefs(definitions, ref.definitions);
55
+ if (typeof ref.package === 'string') {
56
+ packages.push({
57
+ package: ref.package,
58
+ shortName: name,
59
+ type: 'source',
60
+ platform: platform || 'web',
61
+ });
62
+ }
63
+ }
64
+ }
65
+ }
66
+ // Destinations
67
+ if (isObject(config.destinations)) {
68
+ for (const [name, ref] of Object.entries(config.destinations)) {
69
+ destinations.push(name);
70
+ if (isObject(ref)) {
71
+ mergeVars(variables, ref.variables);
72
+ mergeDefs(definitions, ref.definitions);
73
+ if (typeof ref.package === 'string') {
74
+ packages.push({
75
+ package: ref.package,
76
+ shortName: name,
77
+ type: 'destination',
78
+ platform: platform || 'web',
79
+ });
80
+ }
81
+ }
82
+ }
83
+ }
84
+ // Transformers
85
+ if (isObject(config.transformers)) {
86
+ for (const [name, ref] of Object.entries(config.transformers)) {
87
+ transformers.push(name);
88
+ if (isObject(ref)) {
89
+ mergeVars(variables, ref.variables);
90
+ mergeDefs(definitions, ref.definitions);
91
+ if (typeof ref.package === 'string') {
92
+ packages.push({
93
+ package: ref.package,
94
+ shortName: name,
95
+ type: 'transformer',
96
+ platform: platform || 'web',
97
+ });
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ const result = {
104
+ variables,
105
+ definitions,
106
+ stepNames: { sources, destinations, transformers },
107
+ };
108
+ if (platform)
109
+ result.platform = platform;
110
+ if (packages.length > 0)
111
+ result.packages = packages;
112
+ if (contractEntities.length > 0)
113
+ result.contract = contractEntities;
114
+ return result;
115
+ }
116
+ // --- Helpers ---
117
+ function isObject(v) {
118
+ return typeof v === 'object' && v !== null && !Array.isArray(v);
119
+ }
120
+ function isFlowSetup(v) {
121
+ return isObject(v) && 'version' in v && 'flows' in v && isObject(v.flows);
122
+ }
123
+ function isPrimitive(v) {
124
+ return (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean');
125
+ }
126
+ function mergeVars(target, source) {
127
+ if (!isObject(source))
128
+ return;
129
+ for (const [k, v] of Object.entries(source)) {
130
+ if (isPrimitive(v))
131
+ target[k] = v;
132
+ }
133
+ }
134
+ function mergeDefs(target, source) {
135
+ if (!isObject(source))
136
+ return;
137
+ for (const [k, v] of Object.entries(source)) {
138
+ target[k] = v;
139
+ }
140
+ }
141
+ function extractContract(target, contract) {
142
+ if (!isObject(contract))
143
+ return;
144
+ for (const [key, value] of Object.entries(contract)) {
145
+ if (key.startsWith('$') || !isObject(value))
146
+ continue;
147
+ // Avoid duplicates when merging setup + config contracts
148
+ const existing = target.find((e) => e.entity === key);
149
+ const actions = Object.keys(value);
150
+ if (existing) {
151
+ for (const a of actions) {
152
+ if (!existing.actions.includes(a))
153
+ existing.actions.push(a);
154
+ }
155
+ }
156
+ else {
157
+ target.push({ entity: key, actions });
158
+ }
159
+ }
160
+ }
161
+ //# sourceMappingURL=monaco-intellisense-flow-extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-intellisense-flow-extractor.js","sourceRoot":"","sources":["../../src/utils/monaco-intellisense-flow-extractor.ts"],"names":[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AAC;AAED,SAAS,eAAe,CACtB,MAAoD,EACpD,QAAiB;IAEjB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO;IAChC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,SAAS;QACtD,yDAAyD;QACzD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;gBACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9D,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ type AnySchema = Record<string, any>;
2
+ /**
3
+ * Returns an enriched JSON Schema for the walkerOS Contract editor.
4
+ * Structure: { $tagging: number, entity: { action: JSONSchema } }
5
+ */
6
+ export declare function getEnrichedContractSchema(): AnySchema;
7
+ export {};
8
+ //# sourceMappingURL=monaco-schema-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-schema-contract.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-contract.ts"],"names":[],"mappings":"AACA,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErC;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,CAsErD"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Returns an enriched JSON Schema for the walkerOS Contract editor.
3
+ * Structure: { $tagging: number, entity: { action: JSONSchema } }
4
+ */
5
+ export function getEnrichedContractSchema() {
6
+ return {
7
+ type: 'object',
8
+ markdownDescription: 'walkerOS Data Contract. Defines entity→action schemas for event validation.\n\n' +
9
+ '```json\n{\n "$tagging": 1,\n "page": {\n' +
10
+ ' "view": {\n "type": "object",\n "properties": {\n' +
11
+ ' "title": { "type": "string" }\n }\n }\n }\n}\n```',
12
+ properties: {
13
+ $tagging: {
14
+ type: 'number',
15
+ markdownDescription: 'Contract version number. Increment when making breaking changes.\n\n```json\n"$tagging": 1\n```',
16
+ },
17
+ },
18
+ additionalProperties: {
19
+ type: 'object',
20
+ markdownDescription: 'Entity name. Contains action→schema mappings.',
21
+ additionalProperties: {
22
+ type: 'object',
23
+ markdownDescription: 'Action schema (JSON Schema). Defines valid event data for this entity+action.\n\n' +
24
+ '```json\n{\n "type": "object",\n "properties": {\n' +
25
+ ' "name": { "type": "string" },\n "price": { "type": "number" }\n' +
26
+ ' },\n "required": ["name"]\n}\n```',
27
+ defaultSnippets: [
28
+ {
29
+ label: 'Object schema',
30
+ description: 'Schema with typed properties',
31
+ body: {
32
+ type: 'object',
33
+ properties: {
34
+ '${1:name}': { type: '${2:string}' },
35
+ },
36
+ },
37
+ },
38
+ ],
39
+ },
40
+ defaultSnippets: [
41
+ {
42
+ label: 'Add action',
43
+ description: 'Action with event data schema',
44
+ body: {
45
+ '${1:action}': {
46
+ type: 'object',
47
+ properties: {
48
+ '${2:property}': { type: '${3:string}' },
49
+ },
50
+ },
51
+ },
52
+ },
53
+ ],
54
+ },
55
+ defaultSnippets: [
56
+ {
57
+ label: 'Entity with action',
58
+ description: 'New entity with one action and properties',
59
+ body: {
60
+ '${1:entity}': {
61
+ '${2:action}': {
62
+ type: 'object',
63
+ properties: {
64
+ '${3:property}': { type: '${4:string}' },
65
+ },
66
+ },
67
+ },
68
+ },
69
+ },
70
+ ],
71
+ };
72
+ }
73
+ //# sourceMappingURL=monaco-schema-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-schema-contract.js","sourceRoot":"","sources":["../../src/utils/monaco-schema-contract.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,mBAAmB,EACjB,iFAAiF;YACjF,6CAA6C;YAC7C,iEAAiE;YACjE,8DAA8D;QAChE,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,mBAAmB,EACjB,iGAAiG;aACpG;SACF;QACD,oBAAoB,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,mBAAmB,EAAE,+CAA+C;YACpE,oBAAoB,EAAE;gBACpB,IAAI,EAAE,QAAQ;gBACd,mBAAmB,EACjB,mFAAmF;oBACnF,sDAAsD;oBACtD,wEAAwE;oBACxE,sCAAsC;gBACxC,eAAe,EAAE;oBACf;wBACE,KAAK,EAAE,eAAe;wBACtB,WAAW,EAAE,8BAA8B;wBAC3C,IAAI,EAAE;4BACJ,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,WAAW,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;6BACrC;yBACF;qBACF;iBACF;aACF;YACD,eAAe,EAAE;gBACf;oBACE,KAAK,EAAE,YAAY;oBACnB,WAAW,EAAE,+BAA+B;oBAC5C,IAAI,EAAE;wBACJ,aAAa,EAAE;4BACb,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,eAAe,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;6BACzC;yBACF;qBACF;iBACF;aACF;SACF;QACD,eAAe,EAAE;YACf;gBACE,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,2CAA2C;gBACxD,IAAI,EAAE;oBACJ,aAAa,EAAE;wBACb,aAAa,EAAE;4BACb,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,eAAe,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;6BACzC;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ export interface MonacoSchemaExtension {
2
+ defaultSnippets?: Array<{
3
+ label: string;
4
+ description?: string;
5
+ markdownDescription?: string;
6
+ body?: unknown;
7
+ bodyText?: string;
8
+ }>;
9
+ markdownDescription?: string;
10
+ enumDescriptions?: string[];
11
+ markdownEnumDescriptions?: string[];
12
+ deprecationMessage?: string;
13
+ errorMessage?: string;
14
+ patternErrorMessage?: string;
15
+ doNotSuggest?: boolean;
16
+ suggestSortText?: string;
17
+ }
18
+ type EnrichmentMap = Record<string, MonacoSchemaExtension>;
19
+ /**
20
+ * Deep-merges Monaco-specific JSON Schema extensions into a base schema.
21
+ * Keys in the enrichment map are dot-paths (e.g., 'properties.sources').
22
+ * Empty string '' targets the root. Does not mutate the original.
23
+ */
24
+ export declare function enrichSchema(baseSchema: Record<string, unknown>, enrichments: EnrichmentMap): Record<string, unknown>;
25
+ export {};
26
+ //# sourceMappingURL=monaco-schema-enrichment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-schema-enrichment.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-enrichment.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,WAAW,EAAE,aAAa,GACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Deep-merges Monaco-specific JSON Schema extensions into a base schema.
3
+ * Keys in the enrichment map are dot-paths (e.g., 'properties.sources').
4
+ * Empty string '' targets the root. Does not mutate the original.
5
+ */
6
+ export function enrichSchema(baseSchema, enrichments) {
7
+ const schema = JSON.parse(JSON.stringify(baseSchema));
8
+ for (const [path, extensions] of Object.entries(enrichments)) {
9
+ const target = path === '' ? schema : getNestedObject(schema, path);
10
+ if (target && typeof target === 'object') {
11
+ Object.assign(target, extensions);
12
+ }
13
+ }
14
+ return schema;
15
+ }
16
+ function getNestedObject(obj, path) {
17
+ const keys = path.split('.');
18
+ let current = obj;
19
+ for (const key of keys) {
20
+ if (current &&
21
+ typeof current === 'object' &&
22
+ key in current) {
23
+ current = current[key];
24
+ }
25
+ else {
26
+ return undefined;
27
+ }
28
+ }
29
+ return current;
30
+ }
31
+ //# sourceMappingURL=monaco-schema-enrichment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-schema-enrichment.js","sourceRoot":"","sources":["../../src/utils/monaco-schema-enrichment.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAmC,EACnC,WAA0B;IAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAEtD,KAAK,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACpE,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACzC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,eAAe,CACtB,GAA4B,EAC5B,IAAY;IAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,OAAO,GAAY,GAAG,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IACE,OAAO;YACP,OAAO,OAAO,KAAK,QAAQ;YAC3B,GAAG,IAAK,OAAmC,EAC3C,CAAC;YACD,OAAO,GAAI,OAAmC,CAAC,GAAG,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,OAA8C,CAAC;AACxD,CAAC"}
@@ -0,0 +1,10 @@
1
+ type AnySchema = Record<string, any>;
2
+ /**
3
+ * Takes the base Flow.Setup JSON Schema (from @walkeros/core z.toJSONSchema())
4
+ * and returns an enriched version with Monaco-specific extensions.
5
+ *
6
+ * The actual schema uses anyOf[0] at the top level.
7
+ */
8
+ export declare function enrichFlowSetupSchema(baseSchema: AnySchema): AnySchema;
9
+ export {};
10
+ //# sourceMappingURL=monaco-schema-flow-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-schema-flow-setup.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-flow-setup.ts"],"names":[],"mappings":"AAGA,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,SAAS,GAAG,SAAS,CA8MtE"}
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Takes the base Flow.Setup JSON Schema (from @walkeros/core z.toJSONSchema())
3
+ * and returns an enriched version with Monaco-specific extensions.
4
+ *
5
+ * The actual schema uses anyOf[0] at the top level.
6
+ */
7
+ export function enrichFlowSetupSchema(baseSchema) {
8
+ // The schema structure is { anyOf: [{ type: 'object', properties: {...} }] }
9
+ // We need to enrich inside anyOf[0]
10
+ const schema = JSON.parse(JSON.stringify(baseSchema));
11
+ if (!schema.anyOf?.[0]?.properties)
12
+ return schema;
13
+ const root = schema.anyOf[0];
14
+ const props = root.properties;
15
+ const flowConfig = props.flows?.additionalProperties?.properties;
16
+ // Enrich version
17
+ if (props.version) {
18
+ props.version.markdownDescription =
19
+ 'Schema version number. Must be `1` for the current format.\n\n```json\n"version": 1\n```';
20
+ }
21
+ // Enrich $schema
22
+ if (props.$schema) {
23
+ props.$schema.markdownDescription =
24
+ 'JSON Schema URI for IDE validation.\n\n```json\n"$schema": "https://walkeros.io/schema/flow/v1.json"\n```';
25
+ }
26
+ // Enrich include
27
+ if (props.include) {
28
+ props.include.markdownDescription =
29
+ 'Folders to include in the bundle output.\n\n```json\n"include": ["./src", "./lib"]\n```';
30
+ }
31
+ // Enrich variables
32
+ if (props.variables) {
33
+ props.variables.markdownDescription =
34
+ 'Shared variables for `$var.name` interpolation across all flows.\n\n' +
35
+ '```json\n"variables": {\n "measurementId": "G-XXXXXXXXXX",\n "debug": false\n}\n```\n\n' +
36
+ 'Reference in any config value: `"$var.measurementId"`';
37
+ props.variables.defaultSnippets = [
38
+ {
39
+ label: 'Add variable',
40
+ description: 'New key-value variable',
41
+ body: { '${1:name}': '${2:value}' },
42
+ },
43
+ ];
44
+ }
45
+ // Enrich definitions
46
+ if (props.definitions) {
47
+ props.definitions.markdownDescription =
48
+ 'Reusable configuration fragments for `$def.name` references.\n\n' +
49
+ '```json\n"definitions": {\n "gaConfig": {\n "measurementId": "$var.trackingId"\n }\n}\n```\n\n' +
50
+ 'Reference in any config: `"$def.gaConfig"`';
51
+ props.definitions.defaultSnippets = [
52
+ {
53
+ label: 'Add definition',
54
+ description: 'New reusable config fragment',
55
+ body: { '${1:name}': { '${2:key}': '${3:value}' } },
56
+ },
57
+ ];
58
+ }
59
+ // Enrich flows with scaffolding snippets
60
+ if (props.flows) {
61
+ props.flows.markdownDescription =
62
+ 'Flow configurations keyed by name. Each flow defines a complete event pipeline.\n\n' +
63
+ '```json\n"flows": {\n "myFlow": {\n "web": {},\n "sources": { ... },\n "destinations": { ... }\n }\n}\n```';
64
+ props.flows.defaultSnippets = [
65
+ {
66
+ label: 'Web flow (basic)',
67
+ description: 'Minimal web flow with browser source',
68
+ body: {
69
+ '${1:myFlow}': {
70
+ web: {},
71
+ sources: {
72
+ browser: { package: '@walkeros/web-source-browser' },
73
+ },
74
+ destinations: {},
75
+ },
76
+ },
77
+ },
78
+ {
79
+ label: 'Server flow (basic)',
80
+ description: 'Minimal server flow with Express source',
81
+ body: {
82
+ '${1:myFlow}': {
83
+ server: {},
84
+ sources: {
85
+ express: { package: '@walkeros/server-source-express' },
86
+ },
87
+ destinations: {},
88
+ },
89
+ },
90
+ },
91
+ {
92
+ label: 'Web + GA4 flow',
93
+ description: 'Web flow with browser source and GA4 destination',
94
+ body: {
95
+ '${1:myFlow}': {
96
+ web: {},
97
+ sources: {
98
+ browser: { package: '@walkeros/web-source-browser' },
99
+ },
100
+ destinations: {
101
+ ga4: {
102
+ package: '@walkeros/web-destination-ga4',
103
+ config: {
104
+ measurementId: '$var.${2:measurementId}',
105
+ },
106
+ },
107
+ },
108
+ },
109
+ },
110
+ },
111
+ ];
112
+ }
113
+ // Enrich FlowConfig sub-properties
114
+ if (flowConfig) {
115
+ if (flowConfig.sources) {
116
+ flowConfig.sources.markdownDescription =
117
+ 'Source configurations for data capture, keyed by step name.\n\n' +
118
+ '```json\n"sources": {\n "browser": { "package": "@walkeros/web-source-browser" }\n}\n```';
119
+ flowConfig.sources.defaultSnippets = [
120
+ {
121
+ label: 'Add web source',
122
+ description: 'Browser source for web tracking',
123
+ body: {
124
+ '${1:browser}': {
125
+ package: '@walkeros/web-source-browser',
126
+ },
127
+ },
128
+ },
129
+ {
130
+ label: 'Add server source',
131
+ description: 'Express source for server tracking',
132
+ body: {
133
+ '${1:express}': {
134
+ package: '@walkeros/server-source-express',
135
+ },
136
+ },
137
+ },
138
+ ];
139
+ }
140
+ if (flowConfig.destinations) {
141
+ flowConfig.destinations.markdownDescription =
142
+ 'Destination configurations for data output, keyed by step name.\n\n' +
143
+ '```json\n"destinations": {\n "ga4": {\n "package": "@walkeros/web-destination-ga4",\n "config": { "measurementId": "$var.trackingId" }\n }\n}\n```';
144
+ flowConfig.destinations.defaultSnippets = [
145
+ {
146
+ label: 'Add GA4 destination',
147
+ description: 'Google Analytics 4 destination',
148
+ body: {
149
+ '${1:ga4}': {
150
+ package: '@walkeros/web-destination-ga4',
151
+ config: {
152
+ measurementId: '$var.${2:measurementId}',
153
+ },
154
+ },
155
+ },
156
+ },
157
+ {
158
+ label: 'Add custom destination',
159
+ description: 'Custom destination with inline code',
160
+ body: {
161
+ '${1:custom}': {
162
+ code: {
163
+ push: '$code:(event) => { ${2:// handle event} }',
164
+ },
165
+ },
166
+ },
167
+ },
168
+ ];
169
+ }
170
+ if (flowConfig.transformers) {
171
+ flowConfig.transformers.markdownDescription =
172
+ 'Transformer configurations for event transformation, keyed by step name.\n\n' +
173
+ '```json\n"transformers": {\n "validator": {\n "code": { "push": "$code:(event) => event" }\n }\n}\n```';
174
+ flowConfig.transformers.defaultSnippets = [
175
+ {
176
+ label: 'Add transformer',
177
+ description: 'Inline transformer with code',
178
+ body: {
179
+ '${1:transformer}': {
180
+ code: {
181
+ push: '$code:(event) => { ${2:return event;} }',
182
+ },
183
+ },
184
+ },
185
+ },
186
+ ];
187
+ }
188
+ if (flowConfig.web) {
189
+ flowConfig.web.markdownDescription =
190
+ 'Web platform configuration (browser-based). Mutually exclusive with `server`.\n\n' +
191
+ '```json\n"web": {\n "windowCollector": "collector",\n "windowElb": "elb"\n}\n```';
192
+ }
193
+ if (flowConfig.server) {
194
+ flowConfig.server.markdownDescription =
195
+ 'Server platform configuration (Node.js). Mutually exclusive with `web`.\n\n' +
196
+ '```json\n"server": {}\n```';
197
+ }
198
+ }
199
+ return schema;
200
+ }
201
+ //# sourceMappingURL=monaco-schema-flow-setup.js.map