@pixerate/editor 0.46.1 → 0.48.0

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 (98) hide show
  1. package/THIRD_PARTY_NOTICES.md +20 -0
  2. package/dist/agent/index.cjs +252 -34
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +19 -7
  5. package/dist/agent/index.d.ts +19 -7
  6. package/dist/agent/index.js +228 -10
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/{builtins-CZW-aYKS.d.cts → builtins-1kqwLUnb.d.cts} +2 -2
  9. package/dist/{builtins-DghNQbT-.d.ts → builtins-BKYlHH1s.d.ts} +2 -2
  10. package/dist/chart/index.cjs +1596 -1849
  11. package/dist/chart/index.cjs.map +1 -1
  12. package/dist/chart/index.d.cts +760 -548
  13. package/dist/chart/index.d.ts +760 -548
  14. package/dist/chart/index.js +1499 -1752
  15. package/dist/chart/index.js.map +1 -1
  16. package/dist/{chunk-3RPOW4CS.js → chunk-2CJ3LPYQ.js} +12 -10
  17. package/dist/{chunk-3RPOW4CS.js.map → chunk-2CJ3LPYQ.js.map} +1 -1
  18. package/dist/{chunk-PQM5W7ZN.js → chunk-4FX5ACVG.js} +29 -2
  19. package/dist/{chunk-PQM5W7ZN.js.map → chunk-4FX5ACVG.js.map} +1 -1
  20. package/dist/{chunk-HHQ4XJWT.js → chunk-AMWXSYCI.js} +2 -2
  21. package/dist/chunk-EKYHKQPG.js +1895 -0
  22. package/dist/chunk-EKYHKQPG.js.map +1 -0
  23. package/dist/chunk-HXUL3LS7.js +113 -0
  24. package/dist/chunk-HXUL3LS7.js.map +1 -0
  25. package/dist/{chunk-ZRNHGAQT.js → chunk-JQ3BB3E6.js} +43 -1891
  26. package/dist/chunk-JQ3BB3E6.js.map +1 -0
  27. package/dist/chunk-LTUM52X6.js +4074 -0
  28. package/dist/chunk-LTUM52X6.js.map +1 -0
  29. package/dist/{chunk-J3R2OWOE.cjs → chunk-MUCYWI6W.cjs} +608 -15
  30. package/dist/chunk-MUCYWI6W.cjs.map +1 -0
  31. package/dist/chunk-PIMCHMZE.cjs +521 -0
  32. package/dist/chunk-PIMCHMZE.cjs.map +1 -0
  33. package/dist/{chunk-TK2XZK6Z.js → chunk-PKBWLEL7.js} +594 -1
  34. package/dist/chunk-PKBWLEL7.js.map +1 -0
  35. package/dist/chunk-PRSJJZBS.cjs +4074 -0
  36. package/dist/chunk-PRSJJZBS.cjs.map +1 -0
  37. package/dist/{chunk-EFDCLENW.cjs → chunk-RIWPYSKU.cjs} +29 -2
  38. package/dist/chunk-RIWPYSKU.cjs.map +1 -0
  39. package/dist/chunk-U6IZKC7B.cjs +113 -0
  40. package/dist/chunk-U6IZKC7B.cjs.map +1 -0
  41. package/dist/{chunk-EWCOFSCQ.cjs → chunk-UN33YOXW.cjs} +252 -2100
  42. package/dist/chunk-UN33YOXW.cjs.map +1 -0
  43. package/dist/{chunk-Q25ZS4F7.js → chunk-VKPEPWKZ.js} +72 -92
  44. package/dist/chunk-VKPEPWKZ.js.map +1 -0
  45. package/dist/{chunk-N4MLNJPO.cjs → chunk-WXEHCVJQ.cjs} +160 -180
  46. package/dist/chunk-WXEHCVJQ.cjs.map +1 -0
  47. package/dist/{chunk-K2LVZ4FA.cjs → chunk-XFYUFVAX.cjs} +3 -3
  48. package/dist/{chunk-K2LVZ4FA.cjs.map → chunk-XFYUFVAX.cjs.map} +1 -1
  49. package/dist/chunk-XP5IUZUO.cjs +1895 -0
  50. package/dist/chunk-XP5IUZUO.cjs.map +1 -0
  51. package/dist/chunk-XUUD43OV.js +521 -0
  52. package/dist/chunk-XUUD43OV.js.map +1 -0
  53. package/dist/{chunk-U7VGDSNY.cjs → chunk-YU4WQE5M.cjs} +101 -99
  54. package/dist/chunk-YU4WQE5M.cjs.map +1 -0
  55. package/dist/commands/index.cjs +93 -11
  56. package/dist/commands/index.cjs.map +1 -1
  57. package/dist/commands/index.d.cts +9 -7
  58. package/dist/commands/index.d.ts +9 -7
  59. package/dist/commands/index.js +92 -10
  60. package/dist/commands/index.js.map +1 -1
  61. package/dist/controller-ChjCCMLl.d.cts +822 -0
  62. package/dist/controller-DtbEo3om.d.ts +822 -0
  63. package/dist/extensions/index.cjs +32 -3
  64. package/dist/extensions/index.cjs.map +1 -1
  65. package/dist/extensions/index.d.cts +5 -2
  66. package/dist/extensions/index.d.ts +5 -2
  67. package/dist/extensions/index.js +31 -2
  68. package/dist/generation/index.cjs +2 -2
  69. package/dist/generation/index.js +1 -1
  70. package/dist/{index-CfOQf70b.d.cts → index-DoHqT1mq.d.cts} +222 -5
  71. package/dist/{index-jwJ_onWf.d.ts → index-YLZ0fKqE.d.ts} +222 -5
  72. package/dist/index.cjs +38 -10
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.cts +13 -5
  75. package/dist/index.d.ts +13 -5
  76. package/dist/index.js +52 -24
  77. package/dist/index.js.map +1 -1
  78. package/dist/parameters/index.d.cts +1 -1
  79. package/dist/parameters/index.d.ts +1 -1
  80. package/dist/{registry-vz6HOiiy.d.cts → registry-CaR7LC6W.d.cts} +2 -0
  81. package/dist/{registry-BfVD-vVg.d.ts → registry-rVtFJjRM.d.ts} +2 -0
  82. package/dist/spreadsheet/index.cjs +5 -3
  83. package/dist/spreadsheet/index.cjs.map +1 -1
  84. package/dist/spreadsheet/index.js +24 -22
  85. package/dist/tools/index.cjs +3 -3
  86. package/dist/tools/index.js +2 -2
  87. package/dist/vector/index.d.cts +1 -1
  88. package/dist/vector/index.d.ts +1 -1
  89. package/package.json +2 -1
  90. package/dist/chunk-EFDCLENW.cjs.map +0 -1
  91. package/dist/chunk-EWCOFSCQ.cjs.map +0 -1
  92. package/dist/chunk-J3R2OWOE.cjs.map +0 -1
  93. package/dist/chunk-N4MLNJPO.cjs.map +0 -1
  94. package/dist/chunk-Q25ZS4F7.js.map +0 -1
  95. package/dist/chunk-TK2XZK6Z.js.map +0 -1
  96. package/dist/chunk-U7VGDSNY.cjs.map +0 -1
  97. package/dist/chunk-ZRNHGAQT.js.map +0 -1
  98. /package/dist/{chunk-HHQ4XJWT.js.map → chunk-AMWXSYCI.js.map} +0 -0
@@ -152,7 +152,7 @@ function validateJsonSchema(value, schema, path = "", root = schema, refDepth =
152
152
  const known = Object.keys(properties);
153
153
  errors.push({
154
154
  path: `${path}/${key}`,
155
- message: `Unknown property "${key}".${known.length ? ` Allowed: ${known.join(", ")}.` : ""}`
155
+ message: `Unknown property "${key}".${closestName(key, known)}${known.length ? ` Allowed: ${known.join(", ")}.` : ""}`
156
156
  });
157
157
  } else if (typeof schema.additionalProperties === "object") {
158
158
  errors.push(...recurse(child, schema.additionalProperties, `${path}/${key}`));
@@ -161,8 +161,35 @@ function validateJsonSchema(value, schema, path = "", root = schema, refDepth =
161
161
  }
162
162
  return errors;
163
163
  }
164
+ function editDistance(a, b) {
165
+ a = a.toLowerCase();
166
+ b = b.toLowerCase();
167
+ const row = Array.from({ length: b.length + 1 }, (_, j) => j);
168
+ for (let i = 1; i <= a.length; i++) {
169
+ let prev = row[0];
170
+ row[0] = i;
171
+ for (let j = 1; j <= b.length; j++) {
172
+ const tmp = row[j];
173
+ row[j] = Math.min(row[j] + 1, row[j - 1] + 1, prev + (a[i - 1] === b[j - 1] ? 0 : 1));
174
+ prev = tmp;
175
+ }
176
+ }
177
+ return row[b.length];
178
+ }
179
+ function closestName(name, known) {
180
+ let best = "";
181
+ let bestDistance = Infinity;
182
+ for (const k of known) {
183
+ const d = editDistance(name, k);
184
+ if (d < bestDistance) {
185
+ best = k;
186
+ bestDistance = d;
187
+ }
188
+ }
189
+ return best && bestDistance <= Math.max(1, Math.min(2, Math.floor(name.length / 2))) ? ` Did you mean "${best}"?` : "";
190
+ }
164
191
 
165
192
 
166
193
 
167
194
  exports.validateJsonSchema = validateJsonSchema;
168
- //# sourceMappingURL=chunk-EFDCLENW.cjs.map
195
+ //# sourceMappingURL=chunk-RIWPYSKU.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,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AA;AACb,MAAA;AACmB,QAAA;AACxB,QAAA;AACS,UAAA;AACkB,UAAA;AACtC,QAAA;AACuB,MAAA;AACa,QAAA;AACtC,MAAA;AACD,IAAA;AACD,EAAA;AAEO,EAAA;AACR;AAGoD;AACjC,EAAA;AACA,EAAA;AAC4B,EAAA;AACV,EAAA;AACnB,IAAA;AACP,IAAA;AAC2B,IAAA;AAClB,MAAA;AACsB,MAAA;AAChC,MAAA;AACR,IAAA;AACD,EAAA;AACmB,EAAA;AACpB;AAGqE;AACzD,EAAA;AACQ,EAAA;AACI,EAAA;AACQ,IAAA;AACR,IAAA;AACd,MAAA;AACQ,MAAA;AAChB,IAAA;AACD,EAAA;AAC2C,EAAA;AAC5C;ADrFgD;AACA;AACA;AACA","file":"/home/runner/work/editor/editor/packages/core/dist/chunk-RIWPYSKU.cjs","sourcesContent":[null,"/**\n * JSON-Schema-lite: the subset of JSON Schema used by MCP tool `inputSchema`s,\n * plus a small validator for tool-call arguments. Unknown keywords are ignored.\n */\nexport type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';\n\nexport interface JsonSchema {\n\ttype?: JsonSchemaType | readonly JsonSchemaType[];\n\tdescription?: string;\n\ttitle?: string;\n\tenum?: readonly unknown[];\n\tconst?: unknown;\n\tdefault?: unknown;\n\tproperties?: { readonly [key: string]: JsonSchema };\n\trequired?: readonly string[];\n\tadditionalProperties?: boolean | JsonSchema;\n\titems?: JsonSchema;\n\tminItems?: number;\n\tmaxItems?: number;\n\tminimum?: number;\n\tmaximum?: number;\n\texclusiveMinimum?: number;\n\texclusiveMaximum?: number;\n\tmultipleOf?: number;\n\tuniqueItems?: boolean;\n\tanyOf?: readonly JsonSchema[];\n\toneOf?: readonly JsonSchema[];\n\tallOf?: readonly JsonSchema[];\n\tnot?: JsonSchema;\n\t/** Local reference only: `#`, `#/$defs/<name>` or `#/definitions/<name>`. */\n\t$ref?: string;\n\t$defs?: { readonly [key: string]: JsonSchema };\n\tdefinitions?: { readonly [key: string]: JsonSchema };\n\tminLength?: number;\n\tmaxLength?: number;\n\tpattern?: string;\n\t[keyword: string]: unknown;\n}\n\nexport interface SchemaValidationError {\n\t/** JSON-pointer-like path to the offending value, e.g. `/node/id` (`\"\"` is the root). */\n\tpath: string;\n\tmessage: string;\n}\n\nfunction typeOf(value: unknown): JsonSchemaType | 'undefined' {\n\tif (value === null) return 'null';\n\tif (Array.isArray(value)) return 'array';\n\tif (typeof value === 'number') return Number.isInteger(value) ? 'integer' : 'number';\n\tif (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'object') {\n\t\treturn typeof value as JsonSchemaType;\n\t}\n\treturn 'undefined';\n}\n\nfunction matchesType(value: unknown, type: JsonSchemaType): boolean {\n\tconst actual = typeOf(value);\n\tif (type === 'number') return actual === 'number' || actual === 'integer';\n\treturn actual === type;\n}\n\nconst isEqual = (a: unknown, b: unknown) => a === b || JSON.stringify(a) === JSON.stringify(b);\n\n/** Resolves a local `$ref` (`#`, `#/$defs/a`, `#/definitions/a/properties/b`, ...) against `root`. */\nfunction resolveRef(ref: string, root: JsonSchema): JsonSchema | undefined {\n\tif (ref === '#') return root;\n\tif (!ref.startsWith('#/')) return undefined;\n\tlet node: unknown = root;\n\tfor (const raw of ref.slice(2).split('/')) {\n\t\tconst key = decodeURIComponent(raw).replace(/~1/g, '/').replace(/~0/g, '~');\n\t\tif (!node || typeof node !== 'object') return undefined;\n\t\tnode = (node as Record<string, unknown>)[key];\n\t}\n\treturn node && typeof node === 'object' ? (node as JsonSchema) : undefined;\n}\n\n/** Most `$ref` hops followed before a reference cycle is reported. */\nconst MAX_REF_DEPTH = 32;\n\n/**\n * Validates `value` against `schema` and returns every error found (an empty\n * array means valid). Supports `type` (incl. arrays of types), `enum`, `const`,\n * `properties`, `required`, `additionalProperties`, `items`, `minItems`,\n * `maxItems`, `uniqueItems`, `minimum`, `maximum`, `exclusiveMinimum`,\n * `exclusiveMaximum`, `multipleOf`, `minLength`, `maxLength`, `pattern`,\n * `anyOf`, `oneOf`, `allOf`, `not` and local `$ref`s (`#/$defs/...`).\n * Other keywords (`format`, `if`/`then`, `patternProperties`, remote refs...)\n * are ignored.\n *\n * When no `anyOf` / `oneOf` branch matches, the errors of the closest branch\n * (the one with the fewest errors) are reported, so a caller sees what to fix\n * rather than only \"no branch matched\".\n */\nexport function validateJsonSchema(\n\tvalue: unknown,\n\tschema: JsonSchema | undefined,\n\tpath = '',\n\troot: JsonSchema | undefined = schema,\n\trefDepth = 0\n): SchemaValidationError[] {\n\tif (!schema || typeof schema !== 'object') return [];\n\tconst errors: SchemaValidationError[] = [];\n\tconst at = path || '/';\n\tconst recurse = (child: unknown, childSchema: JsonSchema | undefined, childPath: string) =>\n\t\tvalidateJsonSchema(child, childSchema, childPath, root, refDepth);\n\n\tif (typeof schema.$ref === 'string') {\n\t\tconst target = root ? resolveRef(schema.$ref, root) : undefined;\n\t\tif (!target) {\n\t\t\terrors.push({ path: at, message: `Unresolvable schema reference ${schema.$ref}.` });\n\t\t} else if (refDepth >= MAX_REF_DEPTH) {\n\t\t\terrors.push({ path: at, message: `Schema reference ${schema.$ref} is nested too deeply.` });\n\t\t} else {\n\t\t\terrors.push(...validateJsonSchema(value, target, path, root, refDepth + 1));\n\t\t}\n\t\t// Sibling keywords still apply (2019-09+ semantics).\n\t}\n\n\tif (schema.allOf) {\n\t\tfor (const branch of schema.allOf) errors.push(...recurse(value, branch, path));\n\t}\n\tif (schema.anyOf || schema.oneOf) {\n\t\tconst branches = (schema.anyOf ?? schema.oneOf)!;\n\t\tconst results = branches.map((branch) => recurse(value, branch, path));\n\t\tconst matching = results.filter((r) => r.length === 0).length;\n\t\tif (matching === 0 && results.length > 0) {\n\t\t\tconst closest = results.reduce((best, r) => (r.length < best.length ? r : best));\n\t\t\terrors.push(\n\t\t\t\t{ path: at, message: `Does not match any allowed shape (${branches.length} options); closest match failed with:` },\n\t\t\t\t...closest\n\t\t\t);\n\t\t} else if (schema.oneOf && !schema.anyOf && matching > 1) {\n\t\t\terrors.push({ path: at, message: `Matches ${matching} shapes; exactly one is allowed.` });\n\t\t}\n\t}\n\tif (schema.not && recurse(value, schema.not, path).length === 0) {\n\t\terrors.push({ path: at, message: 'Matches a disallowed shape.' });\n\t}\n\n\tif (schema.type !== undefined) {\n\t\tconst types = (Array.isArray(schema.type) ? schema.type : [schema.type]) as JsonSchemaType[];\n\t\tif (!types.some((t) => matchesType(value, t))) {\n\t\t\terrors.push({ path: at, message: `Expected ${types.join(' | ')}, got ${typeOf(value)}.` });\n\t\t\treturn errors;\n\t\t}\n\t}\n\tif (schema.const !== undefined && !isEqual(value, schema.const)) {\n\t\terrors.push({ path: at, message: `Expected ${JSON.stringify(schema.const)}.` });\n\t}\n\tif (schema.enum && !schema.enum.some((option) => isEqual(value, option))) {\n\t\terrors.push({\n\t\t\tpath: at,\n\t\t\tmessage: `Expected one of ${schema.enum.map((o) => JSON.stringify(o)).join(', ')}, got ${JSON.stringify(value)}.`\n\t\t});\n\t}\n\n\tif (typeof value === 'string') {\n\t\tif (schema.minLength !== undefined && value.length < schema.minLength) {\n\t\t\terrors.push({ path: at, message: `Must be at least ${schema.minLength} characters.` });\n\t\t}\n\t\tif (schema.maxLength !== undefined && value.length > schema.maxLength) {\n\t\t\terrors.push({ path: at, message: `Must be at most ${schema.maxLength} characters.` });\n\t\t}\n\t\tif (schema.pattern !== undefined) {\n\t\t\tlet regex: RegExp | null = null;\n\t\t\ttry {\n\t\t\t\tregex = new RegExp(schema.pattern, 'u');\n\t\t\t} catch {\n\t\t\t\t// An invalid pattern in the schema is not the caller's fault.\n\t\t\t}\n\t\t\tif (regex && !regex.test(value)) {\n\t\t\t\terrors.push({ path: at, message: `Must match pattern ${schema.pattern}.` });\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof value === 'number') {\n\t\tif (schema.minimum !== undefined && value < schema.minimum) {\n\t\t\terrors.push({ path: at, message: `Must be >= ${schema.minimum}.` });\n\t\t}\n\t\tif (schema.maximum !== undefined && value > schema.maximum) {\n\t\t\terrors.push({ path: at, message: `Must be <= ${schema.maximum}.` });\n\t\t}\n\t\tif (typeof schema.exclusiveMinimum === 'number' && value <= schema.exclusiveMinimum) {\n\t\t\terrors.push({ path: at, message: `Must be > ${schema.exclusiveMinimum}.` });\n\t\t}\n\t\tif (typeof schema.exclusiveMaximum === 'number' && value >= schema.exclusiveMaximum) {\n\t\t\terrors.push({ path: at, message: `Must be < ${schema.exclusiveMaximum}.` });\n\t\t}\n\t\tif (schema.multipleOf !== undefined && schema.multipleOf > 0) {\n\t\t\tconst quotient = value / schema.multipleOf;\n\t\t\tif (Math.abs(quotient - Math.round(quotient)) > 1e-9) {\n\t\t\t\terrors.push({ path: at, message: `Must be a multiple of ${schema.multipleOf}.` });\n\t\t\t}\n\t\t}\n\t}\n\n\tif (Array.isArray(value)) {\n\t\tif (schema.minItems !== undefined && value.length < schema.minItems) {\n\t\t\terrors.push({ path: at, message: `Must have at least ${schema.minItems} items.` });\n\t\t}\n\t\tif (schema.maxItems !== undefined && value.length > schema.maxItems) {\n\t\t\terrors.push({ path: at, message: `Must have at most ${schema.maxItems} items.` });\n\t\t}\n\t\tif (schema.uniqueItems) {\n\t\t\tconst seen = new Set<string>();\n\t\t\tvalue.forEach((item, index) => {\n\t\t\t\tconst key = JSON.stringify(item);\n\t\t\t\tif (seen.has(key)) errors.push({ path: `${path}/${index}`, message: 'Duplicate item; items must be unique.' });\n\t\t\t\tseen.add(key);\n\t\t\t});\n\t\t}\n\t\tif (schema.items) {\n\t\t\tvalue.forEach((item, index) => {\n\t\t\t\terrors.push(...recurse(item, schema.items, `${path}/${index}`));\n\t\t\t});\n\t\t}\n\t}\n\n\tif (typeOf(value) === 'object') {\n\t\tconst obj = value as Record<string, unknown>;\n\t\tfor (const key of schema.required ?? []) {\n\t\t\tif (obj[key] === undefined) {\n\t\t\t\terrors.push({ path: `${path}/${key}`, message: `Missing required property \"${key}\".` });\n\t\t\t}\n\t\t}\n\t\tconst properties = schema.properties ?? {};\n\t\tfor (const [key, child] of Object.entries(obj)) {\n\t\t\tif (child === undefined) continue;\n\t\t\tif (key in properties) {\n\t\t\t\terrors.push(...recurse(child, properties[key], `${path}/${key}`));\n\t\t\t} else if (schema.additionalProperties === false) {\n\t\t\t\tconst known = Object.keys(properties);\n\t\t\t\terrors.push({\n\t\t\t\t\tpath: `${path}/${key}`,\n\t\t\t\t\tmessage: `Unknown property \"${key}\".${closestName(key, known)}${known.length ? ` Allowed: ${known.join(', ')}.` : ''}`\n\t\t\t\t});\n\t\t\t} else if (typeof schema.additionalProperties === 'object') {\n\t\t\t\terrors.push(...recurse(child, schema.additionalProperties, `${path}/${key}`));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn errors;\n}\n\n/** Edit distance between two short strings (case-insensitive). */\nfunction editDistance(a: string, b: string): number {\n\ta = a.toLowerCase();\n\tb = b.toLowerCase();\n\tconst row = Array.from({ length: b.length + 1 }, (_, j) => j);\n\tfor (let i = 1; i <= a.length; i++) {\n\t\tlet prev = row[0];\n\t\trow[0] = i;\n\t\tfor (let j = 1; j <= b.length; j++) {\n\t\t\tconst tmp = row[j];\n\t\t\trow[j] = Math.min(row[j] + 1, row[j - 1] + 1, prev + (a[i - 1] === b[j - 1] ? 0 : 1));\n\t\t\tprev = tmp;\n\t\t}\n\t}\n\treturn row[b.length];\n}\n\n/** ` Did you mean \"x\"?` for the nearest known name within a couple of edits, else ''. */\nfunction closestName(name: string, known: readonly string[]): string {\n\tlet best = '';\n\tlet bestDistance = Infinity;\n\tfor (const k of known) {\n\t\tconst d = editDistance(name, k);\n\t\tif (d < bestDistance) {\n\t\t\tbest = k;\n\t\t\tbestDistance = d;\n\t\t}\n\t}\n\treturn best && bestDistance <= Math.max(1, Math.min(2, Math.floor(name.length / 2))) ? ` Did you mean \"${best}\"?` : '';\n}\n"]}
@@ -0,0 +1,113 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ var _chunkPRSJJZBScjs = require('./chunk-PRSJJZBS.cjs');
14
+
15
+ // src/chart/schemas.ts
16
+ var VALUE = { type: ["number", "string", "null"], description: 'A number, numeric text ("1,200", "12%", "$40", "(3)") or null for a gap.' };
17
+ var SERIES_REF = { type: "string", description: "Series id (from get_chart) or exact series name." };
18
+ var CATEGORY_REF = { type: ["string", "integer"], description: "Category index (0-based) or exact category label." };
19
+ var WIDTH = { type: "number", minimum: 50, maximum: 4096, description: "Width in pixels (default 640)." };
20
+ var HEIGHT = { type: "number", minimum: 50, maximum: 4096, description: "Height in pixels (default 400)." };
21
+ var FORMAT = {
22
+ type: "object",
23
+ description: "How numbers are written on this axis or series.",
24
+ properties: {
25
+ style: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_NUMBER_STYLES], description: "number (default), percent (0.25 \u2192 25%), currency or compact (1.2K)." },
26
+ decimals: { type: "integer", minimum: 0, maximum: 10, description: "Fixed decimals (default: what the ticks need)." },
27
+ currency: { type: "string", description: 'ISO currency code for style "currency", e.g. "EUR" (default USD).' },
28
+ prefix: { type: "string", description: "Text before every number." },
29
+ suffix: { type: "string", description: "Text after every number." },
30
+ code: { type: "string", description: 'Spreadsheet format code such as "#,##0.0,,\\"M\\"" or "0.0%"; wins over the other fields.' }
31
+ },
32
+ additionalProperties: false
33
+ };
34
+ var AXIS = (what) => ({
35
+ type: "object",
36
+ description: what,
37
+ properties: {
38
+ show: { type: "boolean", description: "Draw the axis labels (default true)." },
39
+ title: { type: "string", description: 'Axis title ("" for none).' },
40
+ min: { type: ["number", "null"], description: "Fixed lower bound, or null for automatic." },
41
+ max: { type: ["number", "null"], description: "Fixed upper bound, or null for automatic." },
42
+ step: { type: ["number", "null"], exclusiveMinimum: 0, description: "Fixed distance between ticks, or null for automatic." },
43
+ gridlines: { type: "boolean", description: "Grid lines at each tick." },
44
+ format: FORMAT,
45
+ kind: { type: ["string", "null"], enum: [..._chunkPRSJJZBScjs.CHART_AXIS_KINDS, null], description: 'Category axis only: "date" reads categories as dates and labels them by calendar steps.' }
46
+ },
47
+ additionalProperties: false
48
+ });
49
+ var TRENDLINE_PROPS = {
50
+ type: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_TRENDLINE_TYPES], description: "Fit: linear, exponential, logarithmic, power, polynomial or moving-average." },
51
+ order: { type: "integer", minimum: 2, maximum: 6, description: "Polynomial order (default 2)." },
52
+ period: { type: "integer", minimum: 2, description: "Moving-average period in points (default 2)." },
53
+ forward: { type: "number", minimum: 0, description: "Extend the line this many x units past the last point (default 0)." },
54
+ backward: { type: "number", minimum: 0, description: "Extend the line this many x units before the first point (default 0)." },
55
+ intercept: { type: ["number", "null"], description: "Force the fit through this y at x = 0 (linear, polynomial, exponential)." },
56
+ showEquation: { type: "boolean", description: "Write the fitted equation on the chart." },
57
+ showR2: { type: "boolean", description: "Write R\xB2 on the chart." },
58
+ name: { type: "string", description: 'Legend name (default e.g. "Linear (Sales)").' },
59
+ color: { type: "string", description: "CSS colour (default: the series colour)." }
60
+ };
61
+ var SERIES_PROPS = {
62
+ name: { type: "string", description: "Series name (legend and data grid header)." },
63
+ values: { type: "array", items: VALUE, description: "One value per category, in category order (padded with gaps)." },
64
+ color: { type: ["string", "null"], description: "CSS colour, or null for the palette colour." },
65
+ type: { type: ["string", "null"], enum: [..._chunkPRSJJZBScjs.CHART_SERIES_TYPES, null], description: "Draw this series as bar, line, area or scatter (a combo chart); null follows the chart type." },
66
+ hidden: { type: "boolean", description: "Hide the series (its data is kept)." },
67
+ axis: { type: ["string", "null"], enum: ["primary", "secondary", null], description: "Value axis: secondary is drawn on the right with its own scale." },
68
+ x: { type: ["array", "null"], items: VALUE, description: "Numeric x per category, for scatter and bubble charts." },
69
+ sizes: { type: ["array", "null"], items: VALUE, description: "Bubble sizes per category (area is proportional to size)." },
70
+ pointColors: { type: ["array", "null"], items: { type: ["string", "null"] }, description: "Colour per category (null keeps the series colour)." },
71
+ marker: { type: ["string", "null"], enum: [..._chunkPRSJJZBScjs.CHART_MARKERS, null], description: "Point marker shape for line, area and scatter series." },
72
+ curve: { type: ["string", "null"], enum: [..._chunkPRSJJZBScjs.CHART_CURVES, null], description: "Line shape for this series: linear, smooth or step." },
73
+ dataLabels: { type: ["boolean", "null"], description: "Value labels for this series (null follows the chart)." },
74
+ format: { ...FORMAT, type: ["object", "null"], description: "How this series' labels are written (null follows the value axis)." }
75
+ };
76
+ var CHART_UPDATE_PROPERTIES = {
77
+ type: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_TYPES], description: "Chart type." },
78
+ title: { type: "string", description: 'Title ("" for none).' },
79
+ subtitle: { type: "string", description: 'Subtitle ("" for none).' },
80
+ xAxis: AXIS("Category axis (or numeric x axis of scatter / bubble charts)."),
81
+ yAxis: AXIS("Value axis."),
82
+ yAxis2: AXIS('Secondary value axis (for series with axis "secondary").'),
83
+ legend: {
84
+ type: "object",
85
+ description: "Legend.",
86
+ properties: { show: { type: "boolean", description: "Show the legend." }, position: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_LEGEND_POSITIONS], description: "Where the legend goes." } },
87
+ additionalProperties: false
88
+ },
89
+ stacking: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_STACKINGS], description: "none, stacked, or percent (each category scaled to 100%)." },
90
+ orientation: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_ORIENTATIONS], description: "horizontal draws bars sideways." },
91
+ curve: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_CURVES], description: "Line shape: linear, smooth or step." },
92
+ points: { type: "boolean", description: "Dots on line and area series." },
93
+ dataLabels: { type: "boolean", description: "Value labels on bars, points and slices." },
94
+ labelPosition: { type: "string", enum: [..._chunkPRSJJZBScjs.CHART_LABEL_POSITIONS], description: "Bar label position; auto drops labels that do not fit." },
95
+ palette: { type: "array", items: { type: "string" }, minItems: 1, description: "Series colours in order (CSS colours)." },
96
+ innerRadius: { type: "number", minimum: 0, maximum: 0.9, description: "Donut hole as a fraction of the radius." },
97
+ gapWidth: { type: "number", minimum: 0, maximum: 0.9, description: "Space between bar groups as a fraction of the category (default 0.28)." },
98
+ overlap: { type: "number", minimum: -1, maximum: 1, description: "Bar overlap within a group as a fraction of a bar (negative: a gap; default -0.12)." },
99
+ bins: { type: ["integer", "null"], minimum: 1, maximum: 500, description: "Histogram bin count, or null for \u221An." },
100
+ showTotal: { type: "boolean", description: "Waterfall: append a total bar." }
101
+ };
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ exports.VALUE = VALUE; exports.SERIES_REF = SERIES_REF; exports.CATEGORY_REF = CATEGORY_REF; exports.WIDTH = WIDTH; exports.HEIGHT = HEIGHT; exports.TRENDLINE_PROPS = TRENDLINE_PROPS; exports.SERIES_PROPS = SERIES_PROPS; exports.CHART_UPDATE_PROPERTIES = CHART_UPDATE_PROPERTIES;
113
+ //# sourceMappingURL=chunk-U6IZKC7B.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/chunk-U6IZKC7B.cjs","../src/chart/schemas.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACGO,IAAM,MAAA,EAAoB,EAAE,IAAA,EAAM,CAAC,QAAA,EAAU,QAAA,EAAU,MAAM,CAAA,EAAG,WAAA,EAAa,2EAA2E,CAAA;AACxJ,IAAM,WAAA,EAAyB,EAAE,IAAA,EAAM,QAAA,EAAU,WAAA,EAAa,mDAAmD,CAAA;AACjH,IAAM,aAAA,EAA2B,EAAE,IAAA,EAAM,CAAC,QAAA,EAAU,SAAS,CAAA,EAAG,WAAA,EAAa,oDAAoD,CAAA;AACjI,IAAM,MAAA,EAAoB,EAAE,IAAA,EAAM,QAAA,EAAU,OAAA,EAAS,EAAA,EAAI,OAAA,EAAS,IAAA,EAAM,WAAA,EAAa,iCAAiC,CAAA;AACtH,IAAM,OAAA,EAAqB,EAAE,IA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AG,WAAA,EAAa,yCAAyC,CAAA;AAAA,EACxH,WAAA,EAAa,EAAE,IAAA,EAAM,QAAA,EAAU,OAAA,EAAS,CAAA,EAAG,OAAA,EAAS,GAAA,EAAK,WAAA,EAAa,0CAA0C,CAAA;AAAA,EAChH,QAAA,EAAU,EAAE,IAAA,EAAM,QAAA,EAAU,OAAA,EAAS,CAAA,EAAG,OAAA,EAAS,GAAA,EAAK,WAAA,EAAa,yEAAyE,CAAA;AAAA,EAC5I,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA,EAAU,OAAA,EAAS,CAAA,CAAA,EAAI,OAAA,EAAS,CAAA,EAAG,WAAA,EAAa,sFAAsF,CAAA;AAAA,EACvJ,IAAA,EAAM,EAAE,IAAA,EAAM,CAAC,SAAA,EAAW,MAAM,CAAA,EAAG,OAAA,EAAS,CAAA,EAAG,OAAA,EAAS,GAAA,EAAK,WAAA,EAAa,4CAAuC,CAAA;AAAA,EACjH,SAAA,EAAW,EAAE,IAAA,EAAM,SAAA,EAAW,WAAA,EAAa,iCAAiC;AAC7E,CAAA;ADPH;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uRAAC","file":"/home/runner/work/editor/editor/packages/core/dist/chunk-U6IZKC7B.cjs","sourcesContent":[null,"import type { JsonSchema } from '../tools/schema.js';\nimport {\n\tCHART_AXIS_KINDS,\n\tCHART_CURVES,\n\tCHART_LABEL_POSITIONS,\n\tCHART_LEGEND_POSITIONS,\n\tCHART_MARKERS,\n\tCHART_NUMBER_STYLES,\n\tCHART_ORIENTATIONS,\n\tCHART_SERIES_TYPES,\n\tCHART_STACKINGS,\n\tCHART_TRENDLINE_TYPES,\n\tCHART_TYPES\n} from './spec.js';\n\n// JSON Schema fragments shared by the chart commands and the chart agent tools.\n\nexport const VALUE: JsonSchema = { type: ['number', 'string', 'null'], description: 'A number, numeric text (\"1,200\", \"12%\", \"$40\", \"(3)\") or null for a gap.' };\nexport const SERIES_REF: JsonSchema = { type: 'string', description: 'Series id (from get_chart) or exact series name.' };\nexport const CATEGORY_REF: JsonSchema = { type: ['string', 'integer'], description: 'Category index (0-based) or exact category label.' };\nexport const WIDTH: JsonSchema = { type: 'number', minimum: 50, maximum: 4096, description: 'Width in pixels (default 640).' };\nexport const HEIGHT: JsonSchema = { type: 'number', minimum: 50, maximum: 4096, description: 'Height in pixels (default 400).' };\n\nexport const FORMAT: JsonSchema = {\n\ttype: 'object',\n\tdescription: 'How numbers are written on this axis or series.',\n\tproperties: {\n\t\tstyle: { type: 'string', enum: [...CHART_NUMBER_STYLES], description: 'number (default), percent (0.25 → 25%), currency or compact (1.2K).' },\n\t\tdecimals: { type: 'integer', minimum: 0, maximum: 10, description: 'Fixed decimals (default: what the ticks need).' },\n\t\tcurrency: { type: 'string', description: 'ISO currency code for style \"currency\", e.g. \"EUR\" (default USD).' },\n\t\tprefix: { type: 'string', description: 'Text before every number.' },\n\t\tsuffix: { type: 'string', description: 'Text after every number.' },\n\t\tcode: { type: 'string', description: 'Spreadsheet format code such as \"#,##0.0,,\\\\\"M\\\\\"\" or \"0.0%\"; wins over the other fields.' }\n\t},\n\tadditionalProperties: false\n};\n\nexport const AXIS = (what: string): JsonSchema => ({\n\ttype: 'object',\n\tdescription: what,\n\tproperties: {\n\t\tshow: { type: 'boolean', description: 'Draw the axis labels (default true).' },\n\t\ttitle: { type: 'string', description: 'Axis title (\"\" for none).' },\n\t\tmin: { type: ['number', 'null'], description: 'Fixed lower bound, or null for automatic.' },\n\t\tmax: { type: ['number', 'null'], description: 'Fixed upper bound, or null for automatic.' },\n\t\tstep: { type: ['number', 'null'], exclusiveMinimum: 0, description: 'Fixed distance between ticks, or null for automatic.' },\n\t\tgridlines: { type: 'boolean', description: 'Grid lines at each tick.' },\n\t\tformat: FORMAT,\n\t\tkind: { type: ['string', 'null'], enum: [...CHART_AXIS_KINDS, null], description: 'Category axis only: \"date\" reads categories as dates and labels them by calendar steps.' }\n\t},\n\tadditionalProperties: false\n});\n\nexport const TRENDLINE_PROPS: Record<string, JsonSchema> = {\n\ttype: { type: 'string', enum: [...CHART_TRENDLINE_TYPES], description: 'Fit: linear, exponential, logarithmic, power, polynomial or moving-average.' },\n\torder: { type: 'integer', minimum: 2, maximum: 6, description: 'Polynomial order (default 2).' },\n\tperiod: { type: 'integer', minimum: 2, description: 'Moving-average period in points (default 2).' },\n\tforward: { type: 'number', minimum: 0, description: 'Extend the line this many x units past the last point (default 0).' },\n\tbackward: { type: 'number', minimum: 0, description: 'Extend the line this many x units before the first point (default 0).' },\n\tintercept: { type: ['number', 'null'], description: 'Force the fit through this y at x = 0 (linear, polynomial, exponential).' },\n\tshowEquation: { type: 'boolean', description: 'Write the fitted equation on the chart.' },\n\tshowR2: { type: 'boolean', description: 'Write R² on the chart.' },\n\tname: { type: 'string', description: 'Legend name (default e.g. \"Linear (Sales)\").' },\n\tcolor: { type: 'string', description: 'CSS colour (default: the series colour).' }\n};\n\nexport const SERIES_PROPS: Record<string, JsonSchema> = {\n\tname: { type: 'string', description: 'Series name (legend and data grid header).' },\n\tvalues: { type: 'array', items: VALUE, description: 'One value per category, in category order (padded with gaps).' },\n\tcolor: { type: ['string', 'null'], description: 'CSS colour, or null for the palette colour.' },\n\ttype: { type: ['string', 'null'], enum: [...CHART_SERIES_TYPES, null], description: 'Draw this series as bar, line, area or scatter (a combo chart); null follows the chart type.' },\n\thidden: { type: 'boolean', description: 'Hide the series (its data is kept).' },\n\taxis: { type: ['string', 'null'], enum: ['primary', 'secondary', null], description: 'Value axis: secondary is drawn on the right with its own scale.' },\n\tx: { type: ['array', 'null'], items: VALUE, description: 'Numeric x per category, for scatter and bubble charts.' },\n\tsizes: { type: ['array', 'null'], items: VALUE, description: 'Bubble sizes per category (area is proportional to size).' },\n\tpointColors: { type: ['array', 'null'], items: { type: ['string', 'null'] }, description: 'Colour per category (null keeps the series colour).' },\n\tmarker: { type: ['string', 'null'], enum: [...CHART_MARKERS, null], description: 'Point marker shape for line, area and scatter series.' },\n\tcurve: { type: ['string', 'null'], enum: [...CHART_CURVES, null], description: 'Line shape for this series: linear, smooth or step.' },\n\tdataLabels: { type: ['boolean', 'null'], description: 'Value labels for this series (null follows the chart).' },\n\tformat: { ...FORMAT, type: ['object', 'null'], description: 'How this series\\' labels are written (null follows the value axis).' }\n};\n\n\nexport const CHART_UPDATE_PROPERTIES: Record<string, JsonSchema> = {\n\t\t\t\ttype: { type: 'string', enum: [...CHART_TYPES], description: 'Chart type.' },\n\t\t\t\ttitle: { type: 'string', description: 'Title (\"\" for none).' },\n\t\t\t\tsubtitle: { type: 'string', description: 'Subtitle (\"\" for none).' },\n\t\t\t\txAxis: AXIS('Category axis (or numeric x axis of scatter / bubble charts).'),\n\t\t\t\tyAxis: AXIS('Value axis.'),\n\t\t\t\tyAxis2: AXIS('Secondary value axis (for series with axis \"secondary\").'),\n\t\t\t\tlegend: {\n\t\t\t\t\ttype: 'object',\n\t\t\t\t\tdescription: 'Legend.',\n\t\t\t\t\tproperties: { show: { type: 'boolean', description: 'Show the legend.' }, position: { type: 'string', enum: [...CHART_LEGEND_POSITIONS], description: 'Where the legend goes.' } },\n\t\t\t\t\tadditionalProperties: false\n\t\t\t\t},\n\t\t\t\tstacking: { type: 'string', enum: [...CHART_STACKINGS], description: 'none, stacked, or percent (each category scaled to 100%).' },\n\t\t\t\torientation: { type: 'string', enum: [...CHART_ORIENTATIONS], description: 'horizontal draws bars sideways.' },\n\t\t\t\tcurve: { type: 'string', enum: [...CHART_CURVES], description: 'Line shape: linear, smooth or step.' },\n\t\t\t\tpoints: { type: 'boolean', description: 'Dots on line and area series.' },\n\t\t\t\tdataLabels: { type: 'boolean', description: 'Value labels on bars, points and slices.' },\n\t\t\t\tlabelPosition: { type: 'string', enum: [...CHART_LABEL_POSITIONS], description: 'Bar label position; auto drops labels that do not fit.' },\n\t\t\t\tpalette: { type: 'array', items: { type: 'string' }, minItems: 1, description: 'Series colours in order (CSS colours).' },\n\t\t\t\tinnerRadius: { type: 'number', minimum: 0, maximum: 0.9, description: 'Donut hole as a fraction of the radius.' },\n\t\t\t\tgapWidth: { type: 'number', minimum: 0, maximum: 0.9, description: 'Space between bar groups as a fraction of the category (default 0.28).' },\n\t\t\t\toverlap: { type: 'number', minimum: -1, maximum: 1, description: 'Bar overlap within a group as a fraction of a bar (negative: a gap; default -0.12).' },\n\t\t\t\tbins: { type: ['integer', 'null'], minimum: 1, maximum: 500, description: 'Histogram bin count, or null for √n.' },\n\t\t\t\tshowTotal: { type: 'boolean', description: 'Waterfall: append a total bar.' }\n\t\t\t};\n"]}