@capillarytech/blaze-ui 5.4.1 → 5.6.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.
@@ -0,0 +1,32 @@
1
+ # CapExpressionEditor
2
+
3
+ Expression editor component with grammar validation, syntax highlighting, and autocomplete. Uses a jQuery-based expredit plugin for parsing and validation.
4
+
5
+ ## Migration Notes (Antd v3 → v6)
6
+
7
+ ### Changes Applied
8
+
9
+ - **Runtime prop validation removed**: Replaced with TypeScript types from `types.ts`
10
+ - **defaultProps removed**: Default values now use destructuring in function arguments
11
+ - **Class → Functional component**: Converted to React.FC with hooks
12
+ - **SCSS**: Hardcoded colors replaced with `$CAP_*` design tokens from `_variables.scss`
13
+ - **No Antd overrides**: Component uses `CapInput.TextArea` (wraps Antd Input); no theme config changes required
14
+
15
+ ### Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ |------|------|---------|-------------|
19
+ | `grammar` | `ExpressionGrammar` | defaultGrammar | Expression grammar configuration |
20
+ | `expected` | `string[]` | `['boolean']` | Expected types for validation |
21
+ | `typeSource` | `string` | - | Type source identifier |
22
+ | `delims` | `string[]` | `['{{', '}}']` | Delimiters for expression parsing |
23
+ | `expression` | `string` | `''` | Initial expression value |
24
+ | `onChange` | `(expressionJSON, expression, isError) => void` | - | Callback when expression changes |
25
+ | `className` | `string` | - | Additional CSS class |
26
+ | `disabled` | `boolean` | - | Disable the editor |
27
+ | ...rest | `CapInputTextAreaProps` | - | Passed through to underlying TextArea |
28
+
29
+ ### Dependencies
30
+
31
+ - **jquery** (^3.6.0): Required for expredit plugin
32
+ - **rangy** (^1.3.2): Selection/range library used by expredit plugin