@wildwinter/expr-editor 0.12.0 → 0.12.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.
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1775,6 +1775,7 @@ exports.flipContainerOp = flipContainerOp;
|
|
|
1775
1775
|
exports.formatNumber = formatNumber;
|
|
1776
1776
|
exports.getNodeAt = getNodeAt;
|
|
1777
1777
|
exports.groupByScope = groupByScope;
|
|
1778
|
+
exports.initialValueFor = initialValueFor;
|
|
1778
1779
|
exports.insertSiblingClauseAt = insertSiblingClauseAt;
|
|
1779
1780
|
exports.isComparisonOp = isComparisonOp;
|
|
1780
1781
|
exports.isPlaceholderForOp = isPlaceholderForOp;
|
package/dist/index.d.cts
CHANGED
|
@@ -407,6 +407,23 @@ declare function updateAt(list: EditorEffect[], i: number, patch: Partial<Editor
|
|
|
407
407
|
declare function setArgAt(list: EditorEffect[], i: number, argIdx: number, value: string): EditorEffect[];
|
|
408
408
|
declare function addArg(list: EditorEffect[], i: number, value?: string): EditorEffect[];
|
|
409
409
|
declare function removeArgAt(list: EditorEffect[], i: number, argIdx: number): EditorEffect[];
|
|
410
|
+
/**
|
|
411
|
+
* What a freshly targeted property's value should be, and whether the guided value wizard still has a
|
|
412
|
+
* question worth asking.
|
|
413
|
+
*
|
|
414
|
+
* BOTH paths that target a property go through this - "+ set property" (add) and re-picking an
|
|
415
|
+
* existing effect's target - because when they answered separately they drifted: 0.11.0 seeded a
|
|
416
|
+
* quality with `advance(...)` on re-pick while the add path opened a wizard that did not know what a
|
|
417
|
+
* quality was, so the same job offered two different affordances depending on how you arrived.
|
|
418
|
+
*
|
|
419
|
+
* `ask: false` means the type has a canonical outcome and the wizard would be ceremony: a QUALITY
|
|
420
|
+
* moves to its next stage, which is the insertion-safe form the type exists for, and an author who
|
|
421
|
+
* meant a specific stage clicks the pill.
|
|
422
|
+
*/
|
|
423
|
+
declare function initialValueFor(entry: CatalogueEntry, defaultScope: string): {
|
|
424
|
+
src: string;
|
|
425
|
+
ask: boolean;
|
|
426
|
+
};
|
|
410
427
|
/** A sensible starting value-expression for a freshly targeted property. Literals
|
|
411
428
|
* are seeded so the value editor opens on an editable pill, never the empty state.
|
|
412
429
|
*
|
|
@@ -464,4 +481,4 @@ interface ValueWizardOptions {
|
|
|
464
481
|
/** Build the wizard UI into a fresh element (drive it via the host's popover). */
|
|
465
482
|
declare function valueWizard(opts: ValueWizardOptions): HTMLElement;
|
|
466
483
|
|
|
467
|
-
export { ARITHMETIC_OPS, BINARY_LABEL, COMPARABLE_TYPES, COMPARISON_OPS, type CatalogueEntry, EQUALITY_OPS, type EditCtx, type EditorEffect, type EffectsEditorHandle, type EffectsEditorOptions, type ExpressionEditorHandle, type ExpressionEditorOptions, type Filter, type FunctionTemplateSpec, type PreviewOptions, type TreeRow, UNARY_LABEL, type Validation, type ValueWizardOptions, type WizardSpec, type WizardStepSpec, type WizardValue, addArg, addChildToContainer, addEmit, addSet, astToTree, binary, boolLit, buildSubGroupClause, callNode, choicesOf, comparisonOpsFor, deleteAt, displayName, filterCatalogue, findEnumPeer, firstEmptyLeafPath, flagDelta, flipContainerOp, formatNumber, getNodeAt, groupByScope, insertSiblingClauseAt, isComparisonOp, isPlaceholderForOp, isWrappedInNot, issuesAt, lookup, mountEffectsEditor, mountExpressionEditor, moveAt, moveChildInContainer, needsParens, notNode, numLit, opSwapGroup, pathKey, placeholderForOp, redirectDeleteForPlaceholderSibling, refOf, removeArgAt, removeAt, renderConditionPreview, renderEffectsPreview, rhsTypesFor, scopedVar, searchCatalogue, seedValueSrc, setArgAt, setNodeAt, strLit, toggleContainerNot, toggleNotAt, updateAt, validateSource, valueWizard, wrapInNotAt };
|
|
484
|
+
export { ARITHMETIC_OPS, BINARY_LABEL, COMPARABLE_TYPES, COMPARISON_OPS, type CatalogueEntry, EQUALITY_OPS, type EditCtx, type EditorEffect, type EffectsEditorHandle, type EffectsEditorOptions, type ExpressionEditorHandle, type ExpressionEditorOptions, type Filter, type FunctionTemplateSpec, type PreviewOptions, type TreeRow, UNARY_LABEL, type Validation, type ValueWizardOptions, type WizardSpec, type WizardStepSpec, type WizardValue, addArg, addChildToContainer, addEmit, addSet, astToTree, binary, boolLit, buildSubGroupClause, callNode, choicesOf, comparisonOpsFor, deleteAt, displayName, filterCatalogue, findEnumPeer, firstEmptyLeafPath, flagDelta, flipContainerOp, formatNumber, getNodeAt, groupByScope, initialValueFor, insertSiblingClauseAt, isComparisonOp, isPlaceholderForOp, isWrappedInNot, issuesAt, lookup, mountEffectsEditor, mountExpressionEditor, moveAt, moveChildInContainer, needsParens, notNode, numLit, opSwapGroup, pathKey, placeholderForOp, redirectDeleteForPlaceholderSibling, refOf, removeArgAt, removeAt, renderConditionPreview, renderEffectsPreview, rhsTypesFor, scopedVar, searchCatalogue, seedValueSrc, setArgAt, setNodeAt, strLit, toggleContainerNot, toggleNotAt, updateAt, validateSource, valueWizard, wrapInNotAt };
|
package/dist/index.d.ts
CHANGED
|
@@ -407,6 +407,23 @@ declare function updateAt(list: EditorEffect[], i: number, patch: Partial<Editor
|
|
|
407
407
|
declare function setArgAt(list: EditorEffect[], i: number, argIdx: number, value: string): EditorEffect[];
|
|
408
408
|
declare function addArg(list: EditorEffect[], i: number, value?: string): EditorEffect[];
|
|
409
409
|
declare function removeArgAt(list: EditorEffect[], i: number, argIdx: number): EditorEffect[];
|
|
410
|
+
/**
|
|
411
|
+
* What a freshly targeted property's value should be, and whether the guided value wizard still has a
|
|
412
|
+
* question worth asking.
|
|
413
|
+
*
|
|
414
|
+
* BOTH paths that target a property go through this - "+ set property" (add) and re-picking an
|
|
415
|
+
* existing effect's target - because when they answered separately they drifted: 0.11.0 seeded a
|
|
416
|
+
* quality with `advance(...)` on re-pick while the add path opened a wizard that did not know what a
|
|
417
|
+
* quality was, so the same job offered two different affordances depending on how you arrived.
|
|
418
|
+
*
|
|
419
|
+
* `ask: false` means the type has a canonical outcome and the wizard would be ceremony: a QUALITY
|
|
420
|
+
* moves to its next stage, which is the insertion-safe form the type exists for, and an author who
|
|
421
|
+
* meant a specific stage clicks the pill.
|
|
422
|
+
*/
|
|
423
|
+
declare function initialValueFor(entry: CatalogueEntry, defaultScope: string): {
|
|
424
|
+
src: string;
|
|
425
|
+
ask: boolean;
|
|
426
|
+
};
|
|
410
427
|
/** A sensible starting value-expression for a freshly targeted property. Literals
|
|
411
428
|
* are seeded so the value editor opens on an editable pill, never the empty state.
|
|
412
429
|
*
|
|
@@ -464,4 +481,4 @@ interface ValueWizardOptions {
|
|
|
464
481
|
/** Build the wizard UI into a fresh element (drive it via the host's popover). */
|
|
465
482
|
declare function valueWizard(opts: ValueWizardOptions): HTMLElement;
|
|
466
483
|
|
|
467
|
-
export { ARITHMETIC_OPS, BINARY_LABEL, COMPARABLE_TYPES, COMPARISON_OPS, type CatalogueEntry, EQUALITY_OPS, type EditCtx, type EditorEffect, type EffectsEditorHandle, type EffectsEditorOptions, type ExpressionEditorHandle, type ExpressionEditorOptions, type Filter, type FunctionTemplateSpec, type PreviewOptions, type TreeRow, UNARY_LABEL, type Validation, type ValueWizardOptions, type WizardSpec, type WizardStepSpec, type WizardValue, addArg, addChildToContainer, addEmit, addSet, astToTree, binary, boolLit, buildSubGroupClause, callNode, choicesOf, comparisonOpsFor, deleteAt, displayName, filterCatalogue, findEnumPeer, firstEmptyLeafPath, flagDelta, flipContainerOp, formatNumber, getNodeAt, groupByScope, insertSiblingClauseAt, isComparisonOp, isPlaceholderForOp, isWrappedInNot, issuesAt, lookup, mountEffectsEditor, mountExpressionEditor, moveAt, moveChildInContainer, needsParens, notNode, numLit, opSwapGroup, pathKey, placeholderForOp, redirectDeleteForPlaceholderSibling, refOf, removeArgAt, removeAt, renderConditionPreview, renderEffectsPreview, rhsTypesFor, scopedVar, searchCatalogue, seedValueSrc, setArgAt, setNodeAt, strLit, toggleContainerNot, toggleNotAt, updateAt, validateSource, valueWizard, wrapInNotAt };
|
|
484
|
+
export { ARITHMETIC_OPS, BINARY_LABEL, COMPARABLE_TYPES, COMPARISON_OPS, type CatalogueEntry, EQUALITY_OPS, type EditCtx, type EditorEffect, type EffectsEditorHandle, type EffectsEditorOptions, type ExpressionEditorHandle, type ExpressionEditorOptions, type Filter, type FunctionTemplateSpec, type PreviewOptions, type TreeRow, UNARY_LABEL, type Validation, type ValueWizardOptions, type WizardSpec, type WizardStepSpec, type WizardValue, addArg, addChildToContainer, addEmit, addSet, astToTree, binary, boolLit, buildSubGroupClause, callNode, choicesOf, comparisonOpsFor, deleteAt, displayName, filterCatalogue, findEnumPeer, firstEmptyLeafPath, flagDelta, flipContainerOp, formatNumber, getNodeAt, groupByScope, initialValueFor, insertSiblingClauseAt, isComparisonOp, isPlaceholderForOp, isWrappedInNot, issuesAt, lookup, mountEffectsEditor, mountExpressionEditor, moveAt, moveChildInContainer, needsParens, notNode, numLit, opSwapGroup, pathKey, placeholderForOp, redirectDeleteForPlaceholderSibling, refOf, removeArgAt, removeAt, renderConditionPreview, renderEffectsPreview, rhsTypesFor, scopedVar, searchCatalogue, seedValueSrc, setArgAt, setNodeAt, strLit, toggleContainerNot, toggleNotAt, updateAt, validateSource, valueWizard, wrapInNotAt };
|
package/dist/index.js
CHANGED
|
@@ -1746,6 +1746,6 @@ function renderEffectsPreview(effects, o) {
|
|
|
1746
1746
|
return wrap;
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
export { ARITHMETIC_OPS, BINARY_LABEL, COMPARABLE_TYPES, COMPARISON_OPS, EQUALITY_OPS, UNARY_LABEL, addArg, addChildToContainer, addEmit, addSet, astToTree, binary, boolLit, buildSubGroupClause, callNode, choicesOf, comparisonOpsFor, deleteAt, displayName, filterCatalogue, findEnumPeer, firstEmptyLeafPath, flagDelta, flipContainerOp, formatNumber, getNodeAt, groupByScope, insertSiblingClauseAt, isComparisonOp, isPlaceholderForOp, isWrappedInNot, issuesAt, lookup, mountEffectsEditor, mountExpressionEditor, moveAt, moveChildInContainer, needsParens, notNode, numLit, opSwapGroup, pathKey, placeholderForOp, redirectDeleteForPlaceholderSibling, refOf, removeArgAt, removeAt, renderConditionPreview, renderEffectsPreview, rhsTypesFor, scopedVar, searchCatalogue, seedValueSrc, setArgAt, setNodeAt, strLit, toggleContainerNot, toggleNotAt, updateAt, validateSource, valueWizard, wrapInNotAt };
|
|
1749
|
+
export { ARITHMETIC_OPS, BINARY_LABEL, COMPARABLE_TYPES, COMPARISON_OPS, EQUALITY_OPS, UNARY_LABEL, addArg, addChildToContainer, addEmit, addSet, astToTree, binary, boolLit, buildSubGroupClause, callNode, choicesOf, comparisonOpsFor, deleteAt, displayName, filterCatalogue, findEnumPeer, firstEmptyLeafPath, flagDelta, flipContainerOp, formatNumber, getNodeAt, groupByScope, initialValueFor, insertSiblingClauseAt, isComparisonOp, isPlaceholderForOp, isWrappedInNot, issuesAt, lookup, mountEffectsEditor, mountExpressionEditor, moveAt, moveChildInContainer, needsParens, notNode, numLit, opSwapGroup, pathKey, placeholderForOp, redirectDeleteForPlaceholderSibling, refOf, removeArgAt, removeAt, renderConditionPreview, renderEffectsPreview, rhsTypesFor, scopedVar, searchCatalogue, seedValueSrc, setArgAt, setNodeAt, strLit, toggleContainerNot, toggleNotAt, updateAt, validateSource, valueWizard, wrapInNotAt };
|
|
1750
1750
|
//# sourceMappingURL=index.js.map
|
|
1751
1751
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildwinter/expr-editor",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Framework-neutral (vanilla TS + DOM) visual editor for @wildwinter/expr expressions: a hybrid pill-strip + AND/OR tree builder with a raw-text fallback, property picker, and live validation. Scopes, properties and functions come from an injected Dialect + ExpressionSchema, so any expr-based authoring tool can mount it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|