@revisium/formula 0.1.1 → 0.2.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.
@@ -0,0 +1,193 @@
1
+ 'use strict';
2
+
3
+ require('./chunk-Q7SFCCGT.cjs');
4
+
5
+ // src/formula-spec.ts
6
+ var formulaSpec = {
7
+ version: "1.1",
8
+ description: "Formula expressions for computed fields. Formulas reference other fields and calculate values automatically.",
9
+ syntax: {
10
+ fieldReferences: [
11
+ "Simple field: fieldName (e.g., price, quantity)",
12
+ "Nested path: object.property (e.g., stats.damage)",
13
+ "Array index: array[0] or array[-1] for last element",
14
+ "Combined: items[0].price, user.addresses[-1].city"
15
+ ],
16
+ arithmeticOperators: [
17
+ { operator: "+", description: "Addition or string concatenation" },
18
+ { operator: "-", description: "Subtraction" },
19
+ { operator: "*", description: "Multiplication" },
20
+ { operator: "/", description: "Division" },
21
+ { operator: "%", description: "Modulo (remainder)" }
22
+ ],
23
+ comparisonOperators: [
24
+ { operator: "==", description: "Equal" },
25
+ { operator: "!=", description: "Not equal" },
26
+ { operator: ">", description: "Greater than" },
27
+ { operator: "<", description: "Less than" },
28
+ { operator: ">=", description: "Greater or equal" },
29
+ { operator: "<=", description: "Less or equal" }
30
+ ],
31
+ logicalOperators: [
32
+ { operator: "&&", description: "Logical AND" },
33
+ { operator: "||", description: "Logical OR" },
34
+ { operator: "!", description: "Logical NOT" }
35
+ ],
36
+ other: [
37
+ "Parentheses: (a + b) * c",
38
+ "Ternary: condition ? valueIfTrue : valueIfFalse",
39
+ "Unary minus: -value, a + -b"
40
+ ]
41
+ },
42
+ features: [
43
+ {
44
+ name: "simple_refs",
45
+ description: "Reference top-level fields by name",
46
+ minVersion: "1.0",
47
+ examples: ["price", "quantity", "baseDamage"],
48
+ dependenciesExtracted: ['["price"]', '["quantity"]', '["baseDamage"]']
49
+ },
50
+ {
51
+ name: "arithmetic",
52
+ description: "Basic math operations (+, -, *, /)",
53
+ minVersion: "1.0",
54
+ examples: ["price * 1.1", "a + b - c", "quantity * price"]
55
+ },
56
+ {
57
+ name: "comparison",
58
+ description: "Compare values (>, <, >=, <=, ==, !=)",
59
+ minVersion: "1.0",
60
+ examples: ["price > 100", "x == 10", "quantity >= 5"]
61
+ },
62
+ {
63
+ name: "nested_path",
64
+ description: "Access nested object properties using dot notation",
65
+ minVersion: "1.1",
66
+ examples: ["stats.damage", "user.profile.name", "item.metadata.category"],
67
+ dependenciesExtracted: ['["stats.damage"]']
68
+ },
69
+ {
70
+ name: "array_index",
71
+ description: "Access array elements by numeric index. Negative indices access from the end",
72
+ minVersion: "1.1",
73
+ examples: [
74
+ "items[0].price",
75
+ "inventory[1].quantity",
76
+ "items[-1].name // last element",
77
+ "items[-2].price // second to last"
78
+ ],
79
+ dependenciesExtracted: ['["items[0].price"]', '["items[-1].name"]']
80
+ }
81
+ ],
82
+ versionDetection: [
83
+ { feature: "Simple refs, arithmetic, comparisons", minVersion: "1.0" },
84
+ { feature: "Nested paths (a.b)", minVersion: "1.1" },
85
+ { feature: "Array index ([0], [-1])", minVersion: "1.1" }
86
+ ],
87
+ parseResult: {
88
+ description: "The parser automatically detects the minimum required version",
89
+ interface: `interface ParseResult {
90
+ ast: ASTNode; // Abstract syntax tree
91
+ dependencies: string[]; // List of field dependencies
92
+ features: string[]; // List of detected features
93
+ minVersion: string; // Minimum required version ("1.0" or "1.1")
94
+ }`
95
+ },
96
+ examples: [
97
+ {
98
+ expression: "price * quantity",
99
+ description: "Calculate total from price and quantity",
100
+ result: "number"
101
+ },
102
+ {
103
+ expression: 'firstName + " " + lastName',
104
+ description: "Concatenate strings with space",
105
+ result: "string"
106
+ },
107
+ {
108
+ expression: "quantity > 0",
109
+ description: "Check if in stock",
110
+ result: "boolean"
111
+ },
112
+ {
113
+ expression: 'stock > 0 ? "Available" : "Out of Stock"',
114
+ description: "Conditional text based on stock",
115
+ result: "string"
116
+ },
117
+ {
118
+ expression: "price * (1 + taxRate)",
119
+ description: "Price with tax",
120
+ result: "number"
121
+ },
122
+ {
123
+ expression: "items[0].price + items[1].price",
124
+ description: "Sum first two item prices (v1.1)",
125
+ result: "number"
126
+ }
127
+ ],
128
+ apiExamples: [
129
+ {
130
+ name: "Simple Expression (v1.0)",
131
+ description: "Parse a basic arithmetic expression",
132
+ code: `parseExpression('price * 1.1')
133
+ // {
134
+ // minVersion: "1.0",
135
+ // features: [],
136
+ // dependencies: ["price"]
137
+ // }`
138
+ },
139
+ {
140
+ name: "Nested Path (v1.1)",
141
+ description: "Parse expression with nested object access",
142
+ code: `parseExpression('stats.damage * multiplier')
143
+ // {
144
+ // minVersion: "1.1",
145
+ // features: ["nested_path"],
146
+ // dependencies: ["stats.damage", "multiplier"]
147
+ // }`
148
+ },
149
+ {
150
+ name: "Array Access (v1.1)",
151
+ description: "Parse expression with array index access",
152
+ code: `parseExpression('items[0].price + items[1].price')
153
+ // {
154
+ // minVersion: "1.1",
155
+ // features: ["array_index", "nested_path"],
156
+ // dependencies: ["items[0].price", "items[1].price"]
157
+ // }`
158
+ },
159
+ {
160
+ name: "Evaluate expressions",
161
+ description: "Execute formulas with context data",
162
+ code: `evaluate('price * 1.1', { price: 100 })
163
+ // 110
164
+
165
+ evaluate('stats.damage', { stats: { damage: 50 } })
166
+ // 50
167
+
168
+ evaluate('items[0].price', { items: [{ price: 10 }] })
169
+ // 10
170
+
171
+ evaluate('price > 100', { price: 150 })
172
+ // true
173
+
174
+ evaluate('a + b * c', { a: 1, b: 2, c: 3 })
175
+ // 7`
176
+ }
177
+ ],
178
+ schemaUsage: {
179
+ structure: '{ "x-formula": { "version": 1, "expression": "..." }, "readOnly": true }',
180
+ fieldTypes: ["string", "number", "boolean"],
181
+ rules: [
182
+ "Add x-formula to string, number, or boolean field schema",
183
+ "readOnly: true is REQUIRED for fields with x-formula",
184
+ "Expression must reference existing fields in the same table",
185
+ "Circular dependencies are not allowed (a references b, b references a)",
186
+ "Referenced fields must exist before the formula field in schema order"
187
+ ]
188
+ }
189
+ };
190
+
191
+ exports.formulaSpec = formulaSpec;
192
+ //# sourceMappingURL=formula-spec.cjs.map
193
+ //# sourceMappingURL=formula-spec.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/formula-spec.ts"],"names":[],"mappings":";;;;;AAuCO,IAAM,WAAA,GAA2B;AAAA,EACtC,OAAA,EAAS,KAAA;AAAA,EACT,WAAA,EACE,8GAAA;AAAA,EAEF,MAAA,EAAQ;AAAA,IACN,eAAA,EAAiB;AAAA,MACf,iDAAA;AAAA,MACA,mDAAA;AAAA,MACA,qDAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,mBAAA,EAAqB;AAAA,MACnB,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,kCAAA,EAAmC;AAAA,MACjE,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,aAAA,EAAc;AAAA,MAC5C,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,gBAAA,EAAiB;AAAA,MAC/C,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,UAAA,EAAW;AAAA,MACzC,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,oBAAA;AAAqB,KACrD;AAAA,IACA,mBAAA,EAAqB;AAAA,MACnB,EAAE,QAAA,EAAU,IAAA,EAAM,WAAA,EAAa,OAAA,EAAQ;AAAA,MACvC,EAAE,QAAA,EAAU,IAAA,EAAM,WAAA,EAAa,WAAA,EAAY;AAAA,MAC3C,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,cAAA,EAAe;AAAA,MAC7C,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,WAAA,EAAY;AAAA,MAC1C,EAAE,QAAA,EAAU,IAAA,EAAM,WAAA,EAAa,kBAAA,EAAmB;AAAA,MAClD,EAAE,QAAA,EAAU,IAAA,EAAM,WAAA,EAAa,eAAA;AAAgB,KACjD;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,EAAE,QAA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IAAA,EAAM,0BAAA;AAAA,MACN,WAAA,EAAa,qCAAA;AAAA,MACb,IAAA,EAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,KAMR;AAAA,IACA;AAAA,MACE,IAAA,EAAM,oBAAA;AAAA,MACN,WAAA,EAAa,4CAAA;AAAA,MACb,IAAA,EAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,KAMR;AAAA,IACA;AAAA,MACE,IAAA,EAAM,qBAAA;AAAA,MACN,WAAA,EAAa,0CAAA;AAAA,MACb,IAAA,EAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,KAMR;AAAA,IACA;AAAA,MACE,IAAA,EAAM,sBAAA;AAAA,MACN,WAAA,EAAa,oCAAA;AAAA,MACb,IAAA,EAAM,CAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA,IAAA;AAAA;AAcR,GACF;AAAA,EAEA,WAAA,EAAa;AAAA,IACX,SAAA,EACE,0EAAA;AAAA,IACF,UAAA,EAAY,CAAC,QAAA,EAAU,QAAA,EAAU,SAAS,CAAA;AAAA,IAC1C,KAAA,EAAO;AAAA,MACL,0DAAA;AAAA,MACA,sDAAA;AAAA,MACA,6DAAA;AAAA,MACA,wEAAA;AAAA,MACA;AAAA;AACF;AAEJ","file":"formula-spec.cjs","sourcesContent":["export interface FormulaSpec {\n version: string;\n description: string;\n syntax: {\n fieldReferences: string[];\n arithmeticOperators: { operator: string; description: string }[];\n comparisonOperators: { operator: string; description: string }[];\n logicalOperators: { operator: string; description: string }[];\n other: string[];\n };\n features: {\n name: string;\n description: string;\n minVersion: string;\n examples: string[];\n dependenciesExtracted?: string[];\n }[];\n versionDetection: { feature: string; minVersion: string }[];\n parseResult: {\n description: string;\n interface: string;\n };\n examples: {\n expression: string;\n description: string;\n result?: string;\n }[];\n apiExamples: {\n name: string;\n description: string;\n code: string;\n }[];\n schemaUsage: {\n structure: string;\n fieldTypes: string[];\n rules: string[];\n };\n}\n\nexport const formulaSpec: FormulaSpec = {\n version: '1.1',\n description:\n 'Formula expressions for computed fields. Formulas reference other fields and calculate values automatically.',\n\n syntax: {\n fieldReferences: [\n 'Simple field: fieldName (e.g., price, quantity)',\n 'Nested path: object.property (e.g., stats.damage)',\n 'Array index: array[0] or array[-1] for last element',\n 'Combined: items[0].price, user.addresses[-1].city',\n ],\n arithmeticOperators: [\n { operator: '+', description: 'Addition or string concatenation' },\n { operator: '-', description: 'Subtraction' },\n { operator: '*', description: 'Multiplication' },\n { operator: '/', description: 'Division' },\n { operator: '%', description: 'Modulo (remainder)' },\n ],\n comparisonOperators: [\n { operator: '==', description: 'Equal' },\n { operator: '!=', description: 'Not equal' },\n { operator: '>', description: 'Greater than' },\n { operator: '<', description: 'Less than' },\n { operator: '>=', description: 'Greater or equal' },\n { operator: '<=', description: 'Less or equal' },\n ],\n logicalOperators: [\n { operator: '&&', description: 'Logical AND' },\n { operator: '||', description: 'Logical OR' },\n { operator: '!', description: 'Logical NOT' },\n ],\n other: [\n 'Parentheses: (a + b) * c',\n 'Ternary: condition ? valueIfTrue : valueIfFalse',\n 'Unary minus: -value, a + -b',\n ],\n },\n\n features: [\n {\n name: 'simple_refs',\n description: 'Reference top-level fields by name',\n minVersion: '1.0',\n examples: ['price', 'quantity', 'baseDamage'],\n dependenciesExtracted: ['[\"price\"]', '[\"quantity\"]', '[\"baseDamage\"]'],\n },\n {\n name: 'arithmetic',\n description: 'Basic math operations (+, -, *, /)',\n minVersion: '1.0',\n examples: ['price * 1.1', 'a + b - c', 'quantity * price'],\n },\n {\n name: 'comparison',\n description: 'Compare values (>, <, >=, <=, ==, !=)',\n minVersion: '1.0',\n examples: ['price > 100', 'x == 10', 'quantity >= 5'],\n },\n {\n name: 'nested_path',\n description: 'Access nested object properties using dot notation',\n minVersion: '1.1',\n examples: ['stats.damage', 'user.profile.name', 'item.metadata.category'],\n dependenciesExtracted: ['[\"stats.damage\"]'],\n },\n {\n name: 'array_index',\n description:\n 'Access array elements by numeric index. Negative indices access from the end',\n minVersion: '1.1',\n examples: [\n 'items[0].price',\n 'inventory[1].quantity',\n 'items[-1].name // last element',\n 'items[-2].price // second to last',\n ],\n dependenciesExtracted: ['[\"items[0].price\"]', '[\"items[-1].name\"]'],\n },\n ],\n\n versionDetection: [\n { feature: 'Simple refs, arithmetic, comparisons', minVersion: '1.0' },\n { feature: 'Nested paths (a.b)', minVersion: '1.1' },\n { feature: 'Array index ([0], [-1])', minVersion: '1.1' },\n ],\n\n parseResult: {\n description:\n 'The parser automatically detects the minimum required version',\n interface: `interface ParseResult {\n ast: ASTNode; // Abstract syntax tree\n dependencies: string[]; // List of field dependencies\n features: string[]; // List of detected features\n minVersion: string; // Minimum required version (\"1.0\" or \"1.1\")\n}`,\n },\n\n examples: [\n {\n expression: 'price * quantity',\n description: 'Calculate total from price and quantity',\n result: 'number',\n },\n {\n expression: 'firstName + \" \" + lastName',\n description: 'Concatenate strings with space',\n result: 'string',\n },\n {\n expression: 'quantity > 0',\n description: 'Check if in stock',\n result: 'boolean',\n },\n {\n expression: 'stock > 0 ? \"Available\" : \"Out of Stock\"',\n description: 'Conditional text based on stock',\n result: 'string',\n },\n {\n expression: 'price * (1 + taxRate)',\n description: 'Price with tax',\n result: 'number',\n },\n {\n expression: 'items[0].price + items[1].price',\n description: 'Sum first two item prices (v1.1)',\n result: 'number',\n },\n ],\n\n apiExamples: [\n {\n name: 'Simple Expression (v1.0)',\n description: 'Parse a basic arithmetic expression',\n code: `parseExpression('price * 1.1')\n// {\n// minVersion: \"1.0\",\n// features: [],\n// dependencies: [\"price\"]\n// }`,\n },\n {\n name: 'Nested Path (v1.1)',\n description: 'Parse expression with nested object access',\n code: `parseExpression('stats.damage * multiplier')\n// {\n// minVersion: \"1.1\",\n// features: [\"nested_path\"],\n// dependencies: [\"stats.damage\", \"multiplier\"]\n// }`,\n },\n {\n name: 'Array Access (v1.1)',\n description: 'Parse expression with array index access',\n code: `parseExpression('items[0].price + items[1].price')\n// {\n// minVersion: \"1.1\",\n// features: [\"array_index\", \"nested_path\"],\n// dependencies: [\"items[0].price\", \"items[1].price\"]\n// }`,\n },\n {\n name: 'Evaluate expressions',\n description: 'Execute formulas with context data',\n code: `evaluate('price * 1.1', { price: 100 })\n// 110\n\nevaluate('stats.damage', { stats: { damage: 50 } })\n// 50\n\nevaluate('items[0].price', { items: [{ price: 10 }] })\n// 10\n\nevaluate('price > 100', { price: 150 })\n// true\n\nevaluate('a + b * c', { a: 1, b: 2, c: 3 })\n// 7`,\n },\n ],\n\n schemaUsage: {\n structure:\n '{ \"x-formula\": { \"version\": 1, \"expression\": \"...\" }, \"readOnly\": true }',\n fieldTypes: ['string', 'number', 'boolean'],\n rules: [\n 'Add x-formula to string, number, or boolean field schema',\n 'readOnly: true is REQUIRED for fields with x-formula',\n 'Expression must reference existing fields in the same table',\n 'Circular dependencies are not allowed (a references b, b references a)',\n 'Referenced fields must exist before the formula field in schema order',\n ],\n },\n};\n"]}
@@ -0,0 +1,53 @@
1
+ interface FormulaSpec {
2
+ version: string;
3
+ description: string;
4
+ syntax: {
5
+ fieldReferences: string[];
6
+ arithmeticOperators: {
7
+ operator: string;
8
+ description: string;
9
+ }[];
10
+ comparisonOperators: {
11
+ operator: string;
12
+ description: string;
13
+ }[];
14
+ logicalOperators: {
15
+ operator: string;
16
+ description: string;
17
+ }[];
18
+ other: string[];
19
+ };
20
+ features: {
21
+ name: string;
22
+ description: string;
23
+ minVersion: string;
24
+ examples: string[];
25
+ dependenciesExtracted?: string[];
26
+ }[];
27
+ versionDetection: {
28
+ feature: string;
29
+ minVersion: string;
30
+ }[];
31
+ parseResult: {
32
+ description: string;
33
+ interface: string;
34
+ };
35
+ examples: {
36
+ expression: string;
37
+ description: string;
38
+ result?: string;
39
+ }[];
40
+ apiExamples: {
41
+ name: string;
42
+ description: string;
43
+ code: string;
44
+ }[];
45
+ schemaUsage: {
46
+ structure: string;
47
+ fieldTypes: string[];
48
+ rules: string[];
49
+ };
50
+ }
51
+ declare const formulaSpec: FormulaSpec;
52
+
53
+ export { type FormulaSpec, formulaSpec };
@@ -0,0 +1,53 @@
1
+ interface FormulaSpec {
2
+ version: string;
3
+ description: string;
4
+ syntax: {
5
+ fieldReferences: string[];
6
+ arithmeticOperators: {
7
+ operator: string;
8
+ description: string;
9
+ }[];
10
+ comparisonOperators: {
11
+ operator: string;
12
+ description: string;
13
+ }[];
14
+ logicalOperators: {
15
+ operator: string;
16
+ description: string;
17
+ }[];
18
+ other: string[];
19
+ };
20
+ features: {
21
+ name: string;
22
+ description: string;
23
+ minVersion: string;
24
+ examples: string[];
25
+ dependenciesExtracted?: string[];
26
+ }[];
27
+ versionDetection: {
28
+ feature: string;
29
+ minVersion: string;
30
+ }[];
31
+ parseResult: {
32
+ description: string;
33
+ interface: string;
34
+ };
35
+ examples: {
36
+ expression: string;
37
+ description: string;
38
+ result?: string;
39
+ }[];
40
+ apiExamples: {
41
+ name: string;
42
+ description: string;
43
+ code: string;
44
+ }[];
45
+ schemaUsage: {
46
+ structure: string;
47
+ fieldTypes: string[];
48
+ rules: string[];
49
+ };
50
+ }
51
+ declare const formulaSpec: FormulaSpec;
52
+
53
+ export { type FormulaSpec, formulaSpec };
@@ -0,0 +1,191 @@
1
+ import './chunk-PZ5AY32C.js';
2
+
3
+ // src/formula-spec.ts
4
+ var formulaSpec = {
5
+ version: "1.1",
6
+ description: "Formula expressions for computed fields. Formulas reference other fields and calculate values automatically.",
7
+ syntax: {
8
+ fieldReferences: [
9
+ "Simple field: fieldName (e.g., price, quantity)",
10
+ "Nested path: object.property (e.g., stats.damage)",
11
+ "Array index: array[0] or array[-1] for last element",
12
+ "Combined: items[0].price, user.addresses[-1].city"
13
+ ],
14
+ arithmeticOperators: [
15
+ { operator: "+", description: "Addition or string concatenation" },
16
+ { operator: "-", description: "Subtraction" },
17
+ { operator: "*", description: "Multiplication" },
18
+ { operator: "/", description: "Division" },
19
+ { operator: "%", description: "Modulo (remainder)" }
20
+ ],
21
+ comparisonOperators: [
22
+ { operator: "==", description: "Equal" },
23
+ { operator: "!=", description: "Not equal" },
24
+ { operator: ">", description: "Greater than" },
25
+ { operator: "<", description: "Less than" },
26
+ { operator: ">=", description: "Greater or equal" },
27
+ { operator: "<=", description: "Less or equal" }
28
+ ],
29
+ logicalOperators: [
30
+ { operator: "&&", description: "Logical AND" },
31
+ { operator: "||", description: "Logical OR" },
32
+ { operator: "!", description: "Logical NOT" }
33
+ ],
34
+ other: [
35
+ "Parentheses: (a + b) * c",
36
+ "Ternary: condition ? valueIfTrue : valueIfFalse",
37
+ "Unary minus: -value, a + -b"
38
+ ]
39
+ },
40
+ features: [
41
+ {
42
+ name: "simple_refs",
43
+ description: "Reference top-level fields by name",
44
+ minVersion: "1.0",
45
+ examples: ["price", "quantity", "baseDamage"],
46
+ dependenciesExtracted: ['["price"]', '["quantity"]', '["baseDamage"]']
47
+ },
48
+ {
49
+ name: "arithmetic",
50
+ description: "Basic math operations (+, -, *, /)",
51
+ minVersion: "1.0",
52
+ examples: ["price * 1.1", "a + b - c", "quantity * price"]
53
+ },
54
+ {
55
+ name: "comparison",
56
+ description: "Compare values (>, <, >=, <=, ==, !=)",
57
+ minVersion: "1.0",
58
+ examples: ["price > 100", "x == 10", "quantity >= 5"]
59
+ },
60
+ {
61
+ name: "nested_path",
62
+ description: "Access nested object properties using dot notation",
63
+ minVersion: "1.1",
64
+ examples: ["stats.damage", "user.profile.name", "item.metadata.category"],
65
+ dependenciesExtracted: ['["stats.damage"]']
66
+ },
67
+ {
68
+ name: "array_index",
69
+ description: "Access array elements by numeric index. Negative indices access from the end",
70
+ minVersion: "1.1",
71
+ examples: [
72
+ "items[0].price",
73
+ "inventory[1].quantity",
74
+ "items[-1].name // last element",
75
+ "items[-2].price // second to last"
76
+ ],
77
+ dependenciesExtracted: ['["items[0].price"]', '["items[-1].name"]']
78
+ }
79
+ ],
80
+ versionDetection: [
81
+ { feature: "Simple refs, arithmetic, comparisons", minVersion: "1.0" },
82
+ { feature: "Nested paths (a.b)", minVersion: "1.1" },
83
+ { feature: "Array index ([0], [-1])", minVersion: "1.1" }
84
+ ],
85
+ parseResult: {
86
+ description: "The parser automatically detects the minimum required version",
87
+ interface: `interface ParseResult {
88
+ ast: ASTNode; // Abstract syntax tree
89
+ dependencies: string[]; // List of field dependencies
90
+ features: string[]; // List of detected features
91
+ minVersion: string; // Minimum required version ("1.0" or "1.1")
92
+ }`
93
+ },
94
+ examples: [
95
+ {
96
+ expression: "price * quantity",
97
+ description: "Calculate total from price and quantity",
98
+ result: "number"
99
+ },
100
+ {
101
+ expression: 'firstName + " " + lastName',
102
+ description: "Concatenate strings with space",
103
+ result: "string"
104
+ },
105
+ {
106
+ expression: "quantity > 0",
107
+ description: "Check if in stock",
108
+ result: "boolean"
109
+ },
110
+ {
111
+ expression: 'stock > 0 ? "Available" : "Out of Stock"',
112
+ description: "Conditional text based on stock",
113
+ result: "string"
114
+ },
115
+ {
116
+ expression: "price * (1 + taxRate)",
117
+ description: "Price with tax",
118
+ result: "number"
119
+ },
120
+ {
121
+ expression: "items[0].price + items[1].price",
122
+ description: "Sum first two item prices (v1.1)",
123
+ result: "number"
124
+ }
125
+ ],
126
+ apiExamples: [
127
+ {
128
+ name: "Simple Expression (v1.0)",
129
+ description: "Parse a basic arithmetic expression",
130
+ code: `parseExpression('price * 1.1')
131
+ // {
132
+ // minVersion: "1.0",
133
+ // features: [],
134
+ // dependencies: ["price"]
135
+ // }`
136
+ },
137
+ {
138
+ name: "Nested Path (v1.1)",
139
+ description: "Parse expression with nested object access",
140
+ code: `parseExpression('stats.damage * multiplier')
141
+ // {
142
+ // minVersion: "1.1",
143
+ // features: ["nested_path"],
144
+ // dependencies: ["stats.damage", "multiplier"]
145
+ // }`
146
+ },
147
+ {
148
+ name: "Array Access (v1.1)",
149
+ description: "Parse expression with array index access",
150
+ code: `parseExpression('items[0].price + items[1].price')
151
+ // {
152
+ // minVersion: "1.1",
153
+ // features: ["array_index", "nested_path"],
154
+ // dependencies: ["items[0].price", "items[1].price"]
155
+ // }`
156
+ },
157
+ {
158
+ name: "Evaluate expressions",
159
+ description: "Execute formulas with context data",
160
+ code: `evaluate('price * 1.1', { price: 100 })
161
+ // 110
162
+
163
+ evaluate('stats.damage', { stats: { damage: 50 } })
164
+ // 50
165
+
166
+ evaluate('items[0].price', { items: [{ price: 10 }] })
167
+ // 10
168
+
169
+ evaluate('price > 100', { price: 150 })
170
+ // true
171
+
172
+ evaluate('a + b * c', { a: 1, b: 2, c: 3 })
173
+ // 7`
174
+ }
175
+ ],
176
+ schemaUsage: {
177
+ structure: '{ "x-formula": { "version": 1, "expression": "..." }, "readOnly": true }',
178
+ fieldTypes: ["string", "number", "boolean"],
179
+ rules: [
180
+ "Add x-formula to string, number, or boolean field schema",
181
+ "readOnly: true is REQUIRED for fields with x-formula",
182
+ "Expression must reference existing fields in the same table",
183
+ "Circular dependencies are not allowed (a references b, b references a)",
184
+ "Referenced fields must exist before the formula field in schema order"
185
+ ]
186
+ }
187
+ };
188
+
189
+ export { formulaSpec };
190
+ //# sourceMappingURL=formula-spec.js.map
191
+ //# sourceMappingURL=formula-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/formula-spec.ts"],"names":[],"mappings":";;;AAuCO,IAAM,WAAA,GAA2B;AAAA,EACtC,OAAA,EAAS,KAAA;AAAA,EACT,WAAA,EACE,8GAAA;AAAA,EAEF,MAAA,EAAQ;AAAA,IACN,eAAA,EAAiB;AAAA,MACf,iDAAA;AAAA,MACA,mDAAA;AAAA,MACA,qDAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,mBAAA,EAAqB;AAAA,MACnB,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,kCAAA,EAAmC;AAAA,MACjE,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,aAAA,EAAc;AAAA,MAC5C,EAAE,QAAA,EAAU,GAAA,EAAK,WAAA,EAAa,gBAAA,EAAiB;AA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,EAEA,WAAA,EAAa;AAAA,IACX,SAAA,EACE,0EAAA;AAAA,IACF,UAAA,EAAY,CAAC,QAAA,EAAU,QAAA,EAAU,SAAS,CAAA;AAAA,IAC1C,KAAA,EAAO;AAAA,MACL,0DAAA;AAAA,MACA,sDAAA;AAAA,MACA,6DAAA;AAAA,MACA,wEAAA;AAAA,MACA;AAAA;AACF;AAEJ","file":"formula-spec.js","sourcesContent":["export interface FormulaSpec {\n version: string;\n description: string;\n syntax: {\n fieldReferences: string[];\n arithmeticOperators: { operator: string; description: string }[];\n comparisonOperators: { operator: string; description: string }[];\n logicalOperators: { operator: string; description: string }[];\n other: string[];\n };\n features: {\n name: string;\n description: string;\n minVersion: string;\n examples: string[];\n dependenciesExtracted?: string[];\n }[];\n versionDetection: { feature: string; minVersion: string }[];\n parseResult: {\n description: string;\n interface: string;\n };\n examples: {\n expression: string;\n description: string;\n result?: string;\n }[];\n apiExamples: {\n name: string;\n description: string;\n code: string;\n }[];\n schemaUsage: {\n structure: string;\n fieldTypes: string[];\n rules: string[];\n };\n}\n\nexport const formulaSpec: FormulaSpec = {\n version: '1.1',\n description:\n 'Formula expressions for computed fields. Formulas reference other fields and calculate values automatically.',\n\n syntax: {\n fieldReferences: [\n 'Simple field: fieldName (e.g., price, quantity)',\n 'Nested path: object.property (e.g., stats.damage)',\n 'Array index: array[0] or array[-1] for last element',\n 'Combined: items[0].price, user.addresses[-1].city',\n ],\n arithmeticOperators: [\n { operator: '+', description: 'Addition or string concatenation' },\n { operator: '-', description: 'Subtraction' },\n { operator: '*', description: 'Multiplication' },\n { operator: '/', description: 'Division' },\n { operator: '%', description: 'Modulo (remainder)' },\n ],\n comparisonOperators: [\n { operator: '==', description: 'Equal' },\n { operator: '!=', description: 'Not equal' },\n { operator: '>', description: 'Greater than' },\n { operator: '<', description: 'Less than' },\n { operator: '>=', description: 'Greater or equal' },\n { operator: '<=', description: 'Less or equal' },\n ],\n logicalOperators: [\n { operator: '&&', description: 'Logical AND' },\n { operator: '||', description: 'Logical OR' },\n { operator: '!', description: 'Logical NOT' },\n ],\n other: [\n 'Parentheses: (a + b) * c',\n 'Ternary: condition ? valueIfTrue : valueIfFalse',\n 'Unary minus: -value, a + -b',\n ],\n },\n\n features: [\n {\n name: 'simple_refs',\n description: 'Reference top-level fields by name',\n minVersion: '1.0',\n examples: ['price', 'quantity', 'baseDamage'],\n dependenciesExtracted: ['[\"price\"]', '[\"quantity\"]', '[\"baseDamage\"]'],\n },\n {\n name: 'arithmetic',\n description: 'Basic math operations (+, -, *, /)',\n minVersion: '1.0',\n examples: ['price * 1.1', 'a + b - c', 'quantity * price'],\n },\n {\n name: 'comparison',\n description: 'Compare values (>, <, >=, <=, ==, !=)',\n minVersion: '1.0',\n examples: ['price > 100', 'x == 10', 'quantity >= 5'],\n },\n {\n name: 'nested_path',\n description: 'Access nested object properties using dot notation',\n minVersion: '1.1',\n examples: ['stats.damage', 'user.profile.name', 'item.metadata.category'],\n dependenciesExtracted: ['[\"stats.damage\"]'],\n },\n {\n name: 'array_index',\n description:\n 'Access array elements by numeric index. Negative indices access from the end',\n minVersion: '1.1',\n examples: [\n 'items[0].price',\n 'inventory[1].quantity',\n 'items[-1].name // last element',\n 'items[-2].price // second to last',\n ],\n dependenciesExtracted: ['[\"items[0].price\"]', '[\"items[-1].name\"]'],\n },\n ],\n\n versionDetection: [\n { feature: 'Simple refs, arithmetic, comparisons', minVersion: '1.0' },\n { feature: 'Nested paths (a.b)', minVersion: '1.1' },\n { feature: 'Array index ([0], [-1])', minVersion: '1.1' },\n ],\n\n parseResult: {\n description:\n 'The parser automatically detects the minimum required version',\n interface: `interface ParseResult {\n ast: ASTNode; // Abstract syntax tree\n dependencies: string[]; // List of field dependencies\n features: string[]; // List of detected features\n minVersion: string; // Minimum required version (\"1.0\" or \"1.1\")\n}`,\n },\n\n examples: [\n {\n expression: 'price * quantity',\n description: 'Calculate total from price and quantity',\n result: 'number',\n },\n {\n expression: 'firstName + \" \" + lastName',\n description: 'Concatenate strings with space',\n result: 'string',\n },\n {\n expression: 'quantity > 0',\n description: 'Check if in stock',\n result: 'boolean',\n },\n {\n expression: 'stock > 0 ? \"Available\" : \"Out of Stock\"',\n description: 'Conditional text based on stock',\n result: 'string',\n },\n {\n expression: 'price * (1 + taxRate)',\n description: 'Price with tax',\n result: 'number',\n },\n {\n expression: 'items[0].price + items[1].price',\n description: 'Sum first two item prices (v1.1)',\n result: 'number',\n },\n ],\n\n apiExamples: [\n {\n name: 'Simple Expression (v1.0)',\n description: 'Parse a basic arithmetic expression',\n code: `parseExpression('price * 1.1')\n// {\n// minVersion: \"1.0\",\n// features: [],\n// dependencies: [\"price\"]\n// }`,\n },\n {\n name: 'Nested Path (v1.1)',\n description: 'Parse expression with nested object access',\n code: `parseExpression('stats.damage * multiplier')\n// {\n// minVersion: \"1.1\",\n// features: [\"nested_path\"],\n// dependencies: [\"stats.damage\", \"multiplier\"]\n// }`,\n },\n {\n name: 'Array Access (v1.1)',\n description: 'Parse expression with array index access',\n code: `parseExpression('items[0].price + items[1].price')\n// {\n// minVersion: \"1.1\",\n// features: [\"array_index\", \"nested_path\"],\n// dependencies: [\"items[0].price\", \"items[1].price\"]\n// }`,\n },\n {\n name: 'Evaluate expressions',\n description: 'Execute formulas with context data',\n code: `evaluate('price * 1.1', { price: 100 })\n// 110\n\nevaluate('stats.damage', { stats: { damage: 50 } })\n// 50\n\nevaluate('items[0].price', { items: [{ price: 10 }] })\n// 10\n\nevaluate('price > 100', { price: 150 })\n// true\n\nevaluate('a + b * c', { a: 1, b: 2, c: 3 })\n// 7`,\n },\n ],\n\n schemaUsage: {\n structure:\n '{ \"x-formula\": { \"version\": 1, \"expression\": \"...\" }, \"readOnly\": true }',\n fieldTypes: ['string', 'number', 'boolean'],\n rules: [\n 'Add x-formula to string, number, or boolean field schema',\n 'readOnly: true is REQUIRED for fields with x-formula',\n 'Expression must reference existing fields in the same table',\n 'Circular dependencies are not allowed (a references b, b references a)',\n 'Referenced fields must exist before the formula field in schema order',\n ],\n },\n};\n"]}
package/dist/index.cjs CHANGED
@@ -1,56 +1,57 @@
1
1
  'use strict';
2
2
 
3
- var chunkV4BMBATD_cjs = require('./chunk-V4BMBATD.cjs');
3
+ var chunk5NMNSRHH_cjs = require('./chunk-5NMNSRHH.cjs');
4
+ require('./chunk-Q7SFCCGT.cjs');
4
5
 
5
6
 
6
7
 
7
8
  Object.defineProperty(exports, "buildDependencyGraph", {
8
9
  enumerable: true,
9
- get: function () { return chunkV4BMBATD_cjs.buildDependencyGraph; }
10
+ get: function () { return chunk5NMNSRHH_cjs.buildDependencyGraph; }
10
11
  });
11
12
  Object.defineProperty(exports, "detectCircularDependencies", {
12
13
  enumerable: true,
13
- get: function () { return chunkV4BMBATD_cjs.detectCircularDependencies; }
14
+ get: function () { return chunk5NMNSRHH_cjs.detectCircularDependencies; }
14
15
  });
15
16
  Object.defineProperty(exports, "evaluate", {
16
17
  enumerable: true,
17
- get: function () { return chunkV4BMBATD_cjs.evaluate; }
18
+ get: function () { return chunk5NMNSRHH_cjs.evaluate; }
18
19
  });
19
20
  Object.defineProperty(exports, "extractSchemaFormulas", {
20
21
  enumerable: true,
21
- get: function () { return chunkV4BMBATD_cjs.extractSchemaFormulas; }
22
+ get: function () { return chunk5NMNSRHH_cjs.extractSchemaFormulas; }
22
23
  });
23
24
  Object.defineProperty(exports, "getTopologicalOrder", {
24
25
  enumerable: true,
25
- get: function () { return chunkV4BMBATD_cjs.getTopologicalOrder; }
26
+ get: function () { return chunk5NMNSRHH_cjs.getTopologicalOrder; }
26
27
  });
27
28
  Object.defineProperty(exports, "inferFormulaType", {
28
29
  enumerable: true,
29
- get: function () { return chunkV4BMBATD_cjs.inferFormulaType; }
30
+ get: function () { return chunk5NMNSRHH_cjs.inferFormulaType; }
30
31
  });
31
32
  Object.defineProperty(exports, "parseExpression", {
32
33
  enumerable: true,
33
- get: function () { return chunkV4BMBATD_cjs.parseExpression; }
34
+ get: function () { return chunk5NMNSRHH_cjs.parseExpression; }
34
35
  });
35
36
  Object.defineProperty(exports, "parseFormula", {
36
37
  enumerable: true,
37
- get: function () { return chunkV4BMBATD_cjs.parseFormula; }
38
+ get: function () { return chunk5NMNSRHH_cjs.parseFormula; }
38
39
  });
39
40
  Object.defineProperty(exports, "validateFormulaAgainstSchema", {
40
41
  enumerable: true,
41
- get: function () { return chunkV4BMBATD_cjs.validateFormulaAgainstSchema; }
42
+ get: function () { return chunk5NMNSRHH_cjs.validateFormulaAgainstSchema; }
42
43
  });
43
44
  Object.defineProperty(exports, "validateFormulaSyntax", {
44
45
  enumerable: true,
45
- get: function () { return chunkV4BMBATD_cjs.validateFormulaSyntax; }
46
+ get: function () { return chunk5NMNSRHH_cjs.validateFormulaSyntax; }
46
47
  });
47
48
  Object.defineProperty(exports, "validateSchemaFormulas", {
48
49
  enumerable: true,
49
- get: function () { return chunkV4BMBATD_cjs.validateSchemaFormulas; }
50
+ get: function () { return chunk5NMNSRHH_cjs.validateSchemaFormulas; }
50
51
  });
51
52
  Object.defineProperty(exports, "validateSyntax", {
52
53
  enumerable: true,
53
- get: function () { return chunkV4BMBATD_cjs.validateSyntax; }
54
+ get: function () { return chunk5NMNSRHH_cjs.validateSyntax; }
54
55
  });
55
56
  //# sourceMappingURL=index.cjs.map
56
57
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
- export { buildDependencyGraph, detectCircularDependencies, evaluate, extractSchemaFormulas, getTopologicalOrder, inferFormulaType, parseExpression, parseFormula, validateFormulaAgainstSchema, validateFormulaSyntax, validateSchemaFormulas, validateSyntax } from './chunk-5TRH7SCW.js';
1
+ export { buildDependencyGraph, detectCircularDependencies, evaluate, extractSchemaFormulas, getTopologicalOrder, inferFormulaType, parseExpression, parseFormula, validateFormulaAgainstSchema, validateFormulaSyntax, validateSchemaFormulas, validateSyntax } from './chunk-FGRNVE53.js';
2
+ import './chunk-PZ5AY32C.js';
2
3
  //# sourceMappingURL=index.js.map
3
4
  //# sourceMappingURL=index.js.map