@es-joy/jsoe 0.28.2 → 0.30.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 (167) hide show
  1. package/.claude/scheduled_tasks.lock +1 -0
  2. package/CHANGES.md +25 -0
  3. package/README.md +4 -0
  4. package/dist/formatAndTypeChoices.d.ts +6 -6
  5. package/dist/formatAndTypeChoices.d.ts.map +1 -1
  6. package/dist/formats/schema.d.ts +5 -0
  7. package/dist/formats/schema.d.ts.map +1 -1
  8. package/dist/formats.d.ts +2 -2
  9. package/dist/formats.d.ts.map +1 -1
  10. package/dist/fundamentalTypes/dateType.d.ts +26 -2
  11. package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
  12. package/dist/fundamentalTypes/domexceptionType.d.ts +7 -0
  13. package/dist/fundamentalTypes/domexceptionType.d.ts.map +1 -1
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/jtltExtensions.d.ts +112 -0
  19. package/dist/jtltExtensions.d.ts.map +1 -0
  20. package/dist/search/fundamentalTypes/arraySearchType.d.ts +22 -0
  21. package/dist/search/fundamentalTypes/arraySearchType.d.ts.map +1 -0
  22. package/dist/search/fundamentalTypes/bigintSearchType.d.ts +10 -0
  23. package/dist/search/fundamentalTypes/bigintSearchType.d.ts.map +1 -0
  24. package/dist/search/fundamentalTypes/blobSearchType.d.ts +19 -0
  25. package/dist/search/fundamentalTypes/blobSearchType.d.ts.map +1 -0
  26. package/dist/search/fundamentalTypes/booleanSearchType.d.ts +11 -0
  27. package/dist/search/fundamentalTypes/booleanSearchType.d.ts.map +1 -0
  28. package/dist/search/fundamentalTypes/catchSearchType.d.ts +18 -0
  29. package/dist/search/fundamentalTypes/catchSearchType.d.ts.map +1 -0
  30. package/dist/search/fundamentalTypes/dateSearchType.d.ts +15 -0
  31. package/dist/search/fundamentalTypes/dateSearchType.d.ts.map +1 -0
  32. package/dist/search/fundamentalTypes/domexceptionSearchType.d.ts +16 -0
  33. package/dist/search/fundamentalTypes/domexceptionSearchType.d.ts.map +1 -0
  34. package/dist/search/fundamentalTypes/enumSearchType.d.ts +26 -0
  35. package/dist/search/fundamentalTypes/enumSearchType.d.ts.map +1 -0
  36. package/dist/search/fundamentalTypes/errorSearchType.d.ts +9 -0
  37. package/dist/search/fundamentalTypes/errorSearchType.d.ts.map +1 -0
  38. package/dist/search/fundamentalTypes/fileSearchType.d.ts +28 -0
  39. package/dist/search/fundamentalTypes/fileSearchType.d.ts.map +1 -0
  40. package/dist/search/fundamentalTypes/filelistSearchType.d.ts +24 -0
  41. package/dist/search/fundamentalTypes/filelistSearchType.d.ts.map +1 -0
  42. package/dist/search/fundamentalTypes/functionSearchType.d.ts +18 -0
  43. package/dist/search/fundamentalTypes/functionSearchType.d.ts.map +1 -0
  44. package/dist/search/fundamentalTypes/mapSearchType.d.ts +22 -0
  45. package/dist/search/fundamentalTypes/mapSearchType.d.ts.map +1 -0
  46. package/dist/search/fundamentalTypes/nanSearchType.d.ts +7 -0
  47. package/dist/search/fundamentalTypes/nanSearchType.d.ts.map +1 -0
  48. package/dist/search/fundamentalTypes/nullSearchType.d.ts +7 -0
  49. package/dist/search/fundamentalTypes/nullSearchType.d.ts.map +1 -0
  50. package/dist/search/fundamentalTypes/numberSearchType.d.ts +11 -0
  51. package/dist/search/fundamentalTypes/numberSearchType.d.ts.map +1 -0
  52. package/dist/search/fundamentalTypes/objectSearchType.d.ts +21 -0
  53. package/dist/search/fundamentalTypes/objectSearchType.d.ts.map +1 -0
  54. package/dist/search/fundamentalTypes/promiseSearchType.d.ts +20 -0
  55. package/dist/search/fundamentalTypes/promiseSearchType.d.ts.map +1 -0
  56. package/dist/search/fundamentalTypes/regexpSearchType.d.ts +20 -0
  57. package/dist/search/fundamentalTypes/regexpSearchType.d.ts.map +1 -0
  58. package/dist/search/fundamentalTypes/setSearchType.d.ts +15 -0
  59. package/dist/search/fundamentalTypes/setSearchType.d.ts.map +1 -0
  60. package/dist/search/fundamentalTypes/stringSearchType.d.ts +21 -0
  61. package/dist/search/fundamentalTypes/stringSearchType.d.ts.map +1 -0
  62. package/dist/search/fundamentalTypes/symbolSearchType.d.ts +16 -0
  63. package/dist/search/fundamentalTypes/symbolSearchType.d.ts.map +1 -0
  64. package/dist/search/fundamentalTypes/undefinedSearchType.d.ts +7 -0
  65. package/dist/search/fundamentalTypes/undefinedSearchType.d.ts.map +1 -0
  66. package/dist/search/index.d.ts +70 -0
  67. package/dist/search/index.d.ts.map +1 -0
  68. package/dist/search/queryTree.d.ts +12 -1
  69. package/dist/search/queryTree.d.ts.map +1 -1
  70. package/dist/search/queryTreeBuilders.d.ts +18 -0
  71. package/dist/search/queryTreeBuilders.d.ts.map +1 -1
  72. package/dist/search/searchDispatch.d.ts +44 -0
  73. package/dist/search/searchDispatch.d.ts.map +1 -1
  74. package/dist/search/searchElementUtils.d.ts +106 -0
  75. package/dist/search/searchElementUtils.d.ts.map +1 -0
  76. package/dist/search/searchUtils.d.ts +550 -0
  77. package/dist/search/searchUtils.d.ts.map +1 -0
  78. package/dist/search/subTypes/blobHTMLSearchType.d.ts +36 -0
  79. package/dist/search/subTypes/blobHTMLSearchType.d.ts.map +1 -0
  80. package/dist/search/subTypes/recordSearchType.d.ts +18 -0
  81. package/dist/search/subTypes/recordSearchType.d.ts.map +1 -0
  82. package/dist/search/subTypes/tupleSearchType.d.ts +21 -0
  83. package/dist/search/subTypes/tupleSearchType.d.ts.map +1 -0
  84. package/dist/search/superTypes/SpecialRealNumberSearchType.d.ts +14 -0
  85. package/dist/search/superTypes/SpecialRealNumberSearchType.d.ts.map +1 -0
  86. package/dist/search/superTypes/buffersourceSearchType.d.ts +17 -0
  87. package/dist/search/superTypes/buffersourceSearchType.d.ts.map +1 -0
  88. package/dist/search/superTypes/dommatrixSearchType.d.ts +11 -0
  89. package/dist/search/superTypes/dommatrixSearchType.d.ts.map +1 -0
  90. package/dist/search/superTypes/dompointSearchType.d.ts +9 -0
  91. package/dist/search/superTypes/dompointSearchType.d.ts.map +1 -0
  92. package/dist/search/superTypes/domrectSearchType.d.ts +9 -0
  93. package/dist/search/superTypes/domrectSearchType.d.ts.map +1 -0
  94. package/dist/search/superTypes/errorsSpecialSearchType.d.ts +11 -0
  95. package/dist/search/superTypes/errorsSpecialSearchType.d.ts.map +1 -0
  96. package/dist/search/unions/discriminatedUnionSearchType.d.ts +12 -0
  97. package/dist/search/unions/discriminatedUnionSearchType.d.ts.map +1 -0
  98. package/dist/search/unions/unionFamilySearchType.d.ts +36 -0
  99. package/dist/search/unions/unionFamilySearchType.d.ts.map +1 -0
  100. package/dist/search/unions/unionSearchType.d.ts +8 -0
  101. package/dist/search/unions/unionSearchType.d.ts.map +1 -0
  102. package/dist/search/unions/xorSearchType.d.ts +12 -0
  103. package/dist/search/unions/xorSearchType.d.ts.map +1 -0
  104. package/dist/superTypes/buffersourceType.d.ts.map +1 -1
  105. package/dist/typeChoices.d.ts +3 -3
  106. package/dist/typeChoices.d.ts.map +1 -1
  107. package/dist/types.d.ts +3 -3
  108. package/dist/types.d.ts.map +1 -1
  109. package/package.json +5 -4
  110. package/pnpm-workspace.yaml +1 -1
  111. package/rollup.config.js +12 -0
  112. package/src/formatAndTypeChoices.js +4 -4
  113. package/src/formats/schema.js +1 -1
  114. package/src/formats.js +1 -1
  115. package/src/fundamentalTypes/dateType.js +40 -14
  116. package/src/fundamentalTypes/domexceptionType.js +41 -33
  117. package/src/fundamentalTypes/regexpType.js +1 -1
  118. package/src/index.js +6 -0
  119. package/src/jsoe.css +204 -0
  120. package/src/jtltExtensions.js +103 -0
  121. package/src/search/fundamentalTypes/arraySearchType.js +101 -0
  122. package/src/search/fundamentalTypes/bigintSearchType.js +68 -0
  123. package/src/search/fundamentalTypes/blobSearchType.js +42 -0
  124. package/src/search/fundamentalTypes/booleanSearchType.js +40 -0
  125. package/src/search/fundamentalTypes/catchSearchType.js +59 -0
  126. package/src/search/fundamentalTypes/dateSearchType.js +166 -0
  127. package/src/search/fundamentalTypes/domexceptionSearchType.js +84 -0
  128. package/src/search/fundamentalTypes/enumSearchType.js +62 -0
  129. package/src/search/fundamentalTypes/errorSearchType.js +11 -0
  130. package/src/search/fundamentalTypes/fileSearchType.js +94 -0
  131. package/src/search/fundamentalTypes/filelistSearchType.js +103 -0
  132. package/src/search/fundamentalTypes/functionSearchType.js +102 -0
  133. package/src/search/fundamentalTypes/mapSearchType.js +117 -0
  134. package/src/search/fundamentalTypes/nanSearchType.js +11 -0
  135. package/src/search/fundamentalTypes/nullSearchType.js +11 -0
  136. package/src/search/fundamentalTypes/numberSearchType.js +59 -0
  137. package/src/search/fundamentalTypes/objectSearchType.js +367 -0
  138. package/src/search/fundamentalTypes/promiseSearchType.js +61 -0
  139. package/src/search/fundamentalTypes/regexpSearchType.js +72 -0
  140. package/src/search/fundamentalTypes/setSearchType.js +91 -0
  141. package/src/search/fundamentalTypes/stringSearchType.js +44 -0
  142. package/src/search/fundamentalTypes/symbolSearchType.js +39 -0
  143. package/src/search/fundamentalTypes/undefinedSearchType.js +11 -0
  144. package/src/search/index.js +96 -0
  145. package/src/search/queryTree.js +244 -0
  146. package/src/search/queryTreeBuilders.js +233 -0
  147. package/src/search/searchDispatch.js +291 -0
  148. package/src/search/searchElementUtils.js +373 -0
  149. package/src/search/searchUtils.js +847 -0
  150. package/src/search/subTypes/blobHTMLSearchType.js +122 -0
  151. package/src/search/subTypes/recordSearchType.js +105 -0
  152. package/src/search/subTypes/tupleSearchType.js +152 -0
  153. package/src/search/superTypes/SpecialRealNumberSearchType.js +42 -0
  154. package/src/search/superTypes/buffersourceSearchType.js +53 -0
  155. package/src/search/superTypes/dommatrixSearchType.js +24 -0
  156. package/src/search/superTypes/dompointSearchType.js +15 -0
  157. package/src/search/superTypes/domrectSearchType.js +15 -0
  158. package/src/search/superTypes/errorsSpecialSearchType.js +15 -0
  159. package/src/search/unions/discriminatedUnionSearchType.js +16 -0
  160. package/src/search/unions/unionFamilySearchType.js +168 -0
  161. package/src/search/unions/unionSearchType.js +12 -0
  162. package/src/search/unions/xorSearchType.js +16 -0
  163. package/src/superTypes/buffersourceType.js +13 -15
  164. package/src/typeChoices.js +2 -2
  165. package/src/types.js +2 -2
  166. package/tsconfig-prod.json +12 -0
  167. package/tsconfig.json +5 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undefinedSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/undefinedSearchType.js"],"names":[],"mappings":";AAEA;;;GAGG;AACH,mCAFU,OAAO,sBAAsB,EAAE,gBAAgB,CAItD"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @typedef {{
3
+ * container: HTMLFormElement,
4
+ * $getQuery: () => import('./queryTree.js').QueryAnd,
5
+ * whenReady: Promise<void>
6
+ * }} SearchChoicesControl
7
+ */
8
+ /**
9
+ * The top-level entry point (search plan §5): builds the whole recursive
10
+ * search widget tree for `schemaContent` via `buildSearchWidget`
11
+ * (`searchDispatch.js`), starting at `path = '#/'`. Does not route through
12
+ * `getTypesForSchema` for the general case - that function flattens union
13
+ * members into one flat `Set` of leaf types for a type-choice pull-down,
14
+ * whereas search needs union branches to stay distinguishable nested
15
+ * sub-widgets for the "has type" affordance (`unionSearchType.js` et al.) -
16
+ * `getTypesForSchema` is only reused narrowly, for intersection resolution,
17
+ * inside `buildSearchWidget`/`resolveIntersection` - which run at *every*
18
+ * recursive call site (every composite module's own child recursion uses
19
+ * `buildSearchWidget` too), not just here at the root, so an intersection
20
+ * schema nested anywhere in the tree resolves the same way a top-level one
21
+ * does rather than falling through to the `noneditableSearchType` escape
22
+ * hatch.
23
+ *
24
+ * `resolveIntersection` is called here too (redundantly, but cheaply, since
25
+ * it's a no-op for anything that isn't itself an `intersection`) purely so
26
+ * `$getQuery()` below dispatches through the *same* resolved schema
27
+ * `buildSearchWidget` actually built the UI for, rather than the original
28
+ * (possibly-`intersection`) one.
29
+ *
30
+ * Mirrors `buildTypeChoices`'s (`src/typeChoices.js`) `whenReady`/
31
+ * pull-based convention rather than inventing a push/callback API:
32
+ * `$getQuery()` reads the live DOM into a `QueryAnd` on demand (`{$and:
33
+ * []}` when nothing has been entered anywhere, matching the empty-`$and`
34
+ * convention of "no constraint"), and a host that wants live updates wraps
35
+ * it in its own `container.addEventListener('input', ...)`. Every widget
36
+ * built so far is synchronous, so `whenReady` (unlike `buildTypeChoices`'s)
37
+ * has no deferred work to wait on and settles immediately - it's still
38
+ * returned, so a caller can `await` either function uniformly without
39
+ * checking which one it has.
40
+ *
41
+ * `container` is a real `<form>` (its own `submit` prevented, since it is
42
+ * never actually submitted) rather than a plain `<div>`, matching the edit
43
+ * side's own root `<form>` (`src/types.js`'s `Types.validValuesSet` reads
44
+ * `form.checkValidity()`) - the various cross-field checks the individual
45
+ * search widgets wire up (`searchUtils.js`'s `buildRangeInputsPair`,
46
+ * `dateSearchType.js`, etc.) are native Constraint Validation API calls
47
+ * (`setCustomValidity`/`required`), so a host only needs the one native
48
+ * `container.checkValidity()`/`container.reportValidity()` to check them
49
+ * all at once, the same way `demo/index-search.js`'s "Check validity"
50
+ * button does.
51
+ * @param {{
52
+ * schemaContent: import('../formats/schema.js').ZodexSchema,
53
+ * typeNamespace?: string,
54
+ * topRoot?: import('../types.js').RootElement,
55
+ * types?: import('../types.js').default
56
+ * }} cfg
57
+ * @returns {SearchChoicesControl}
58
+ */
59
+ export function buildSearchChoices({ schemaContent, typeNamespace, topRoot, types }: {
60
+ schemaContent: import("../formats/schema.js").ZodexSchema;
61
+ typeNamespace?: string;
62
+ topRoot?: import("../types.js").RootElement;
63
+ types?: import("../types.js").default;
64
+ }): SearchChoicesControl;
65
+ export type SearchChoicesControl = {
66
+ container: HTMLFormElement;
67
+ $getQuery: () => import("./queryTree.js").QueryAnd;
68
+ whenReady: Promise<void>;
69
+ };
70
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search/index.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,qFARW;IACN,aAAa,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,aAAa,EAAE,WAAW,CAAC;IAC5C,KAAK,CAAC,EAAE,OAAO,aAAa,EAAE,OAAO,CAAA;CACtC,GACS,oBAAoB,CAmChC;mCA3FY;IACR,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,MAAM,OAAO,gBAAgB,EAAE,QAAQ,CAAC;IACnD,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB"}
@@ -55,6 +55,17 @@ export type QueryIntegerCheckLeaf = {
55
55
  path: string;
56
56
  isInteger: boolean;
57
57
  };
58
+ /**
59
+ * `date`: is/is-not a valid `Date` (a structured-cloned `Date` can itself be
60
+ * an "Invalid Date" - a `NaN` internal time value - `dateType.js`'s own
61
+ * `notANum`/`ValidDate`/`InvalidDate` handling deals with the same state on
62
+ * the edit side).
63
+ */
64
+ export type QueryValidDateCheckLeaf = {
65
+ kind: "validDateCheck";
66
+ path: string;
67
+ isValid: boolean;
68
+ };
58
69
  /**
59
70
  * `string`/`StringObject`/`Blob`/`File`/regexp-source/symbol-description
60
71
  * (via `$in`/`$nin`).
@@ -175,6 +186,6 @@ export type QueryBooleanEqualsLeaf = {
175
186
  path: string;
176
187
  value: boolean;
177
188
  };
178
- export type QueryLeaf = QueryHasPropertyLeaf | QueryLengthSizeLeaf | QueryRangeLeaf | QueryNotLeaf | QueryIntegerCheckLeaf | QueryLiteralSetLeaf | QueryRegexLeaf | QueryNotContainsLeaf | QueryMultiSelectLeaf | QueryKeyValueEnumLeaf | QueryTypeOfLeaf | QueryBlobHTMLLeaf | QueryDomShapeLeaf | QueryMapRecordJointLeaf | QueryPassThroughLeaf | QueryPresenceLeaf | QueryBooleanEqualsLeaf;
189
+ export type QueryLeaf = QueryHasPropertyLeaf | QueryLengthSizeLeaf | QueryRangeLeaf | QueryNotLeaf | QueryIntegerCheckLeaf | QueryValidDateCheckLeaf | QueryLiteralSetLeaf | QueryRegexLeaf | QueryNotContainsLeaf | QueryMultiSelectLeaf | QueryKeyValueEnumLeaf | QueryTypeOfLeaf | QueryBlobHTMLLeaf | QueryDomShapeLeaf | QueryMapRecordJointLeaf | QueryPassThroughLeaf | QueryPresenceLeaf | QueryBooleanEqualsLeaf;
179
190
  export type QueryNode = QueryAnd | QueryOr | QueryLeaf;
180
191
  //# sourceMappingURL=queryTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryTree.d.ts","sourceRoot":"","sources":["../../src/search/queryTree.js"],"names":[],"mappings":"uBAqBa;IAAC,IAAI,EAAE,SAAS,EAAE,CAAA;CAAC;sBAInB;IAAC,GAAG,EAAE,SAAS,EAAE,CAAA;CAAC;;;;mCAKlB;IAAC,IAAI,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC;;;;;;kCAOrD;IACR,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACzD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;;;;;;;;6BASS;IACR,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,QAAQ,GAAC,cAAc,GAAC,QAAQ,GAAC,MAAM,GAAC,cAAc,CAAC;IAClE,GAAG,CAAC,EAAE,MAAM,GAAC,MAAM,GAAC,MAAM,CAA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C,EAAE,CAAC,GAAC,CAAC,CAAA;CACrB;;;;sCAKS;IACR,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,EAAE,OAAO,CAAA;CACf;;;;;;mCAOS;IACR,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;;;;gCAKS;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC;;;;;;qCAOlD;IACR,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAA;CACf;wBAIS,oBAAoB,GAAC,mBAAmB,GAAC,cAAc,GAC/D,YAAY,GAAC,qBAAqB,GAAC,uBAAuB,GAC1D,mBAAmB,GAAC,cAAc,GAClC,oBAAoB,GAAC,oBAAoB,GAAC,qBAAqB,GAC/D,eAAe,GAAC,iBAAiB,GAAC,iBAAiB,GACnD,uBAAuB,GAAC,oBAAoB,GAAC,iBAAiB,GAC9D,sBAAsB;wBAKd,QAAQ,GAAC,OAAO,GAAC,SAAS"}
@@ -9,6 +9,18 @@
9
9
  * @returns {import('./queryTree.js').QueryAnd}
10
10
  */
11
11
  export function makeAndNode(nodes: import("./queryTree.js").QueryNode[]): import("./queryTree.js").QueryAnd;
12
+ /**
13
+ * Combines the leaves a single widget contributes (e.g. a number leaf's
14
+ * range plus its separate "Is/Is Not Integer" check) into one `QueryNode`:
15
+ * drops any `undefined` (no constraint entered there), returns `undefined`
16
+ * if nothing is left, the bare node if only one is left, else an `$and` of
17
+ * the rest - so a widget with several independent controls still honors
18
+ * `getQuery`'s "`undefined` means no constraint" convention without every
19
+ * such widget re-implementing this collapsing logic itself.
20
+ * @param {(import('./queryTree.js').QueryNode|undefined)[]} nodes
21
+ * @returns {import('./queryTree.js').QueryNode|undefined}
22
+ */
23
+ export function combineAnd(nodes: (import("./queryTree.js").QueryNode | undefined)[]): import("./queryTree.js").QueryNode | undefined;
12
24
  /**
13
25
  * @param {import('./queryTree.js').QueryNode[]} nodes
14
26
  * @returns {import('./queryTree.js').QueryOr}
@@ -63,6 +75,12 @@ export function makeNotLeaf(query: import("./queryTree.js").QueryNode): import("
63
75
  * @returns {import('./queryTree.js').QueryIntegerCheckLeaf}
64
76
  */
65
77
  export function makeIntegerCheckLeaf(path: string, isInteger: boolean): import("./queryTree.js").QueryIntegerCheckLeaf;
78
+ /**
79
+ * @param {string} path
80
+ * @param {boolean} isValid
81
+ * @returns {import('./queryTree.js').QueryValidDateCheckLeaf}
82
+ */
83
+ export function makeValidDateCheckLeaf(path: string, isValid: boolean): import("./queryTree.js").QueryValidDateCheckLeaf;
66
84
  /**
67
85
  * @param {string} path
68
86
  * @param {{$in?: unknown[], $nin?: unknown[]}} cfg
@@ -1 +1 @@
1
- {"version":3,"file":"queryTreeBuilders.d.ts","sourceRoot":"","sources":["../../src/search/queryTreeBuilders.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,mCAHW,OAAO,gBAAgB,EAAE,SAAS,EAAE,GAClC,OAAO,gBAAgB,EAAE,QAAQ,CAI7C;AAED;;;GAGG;AACH,kCAHW,OAAO,gBAAgB,EAAE,SAAS,EAAE,GAClC,OAAO,gBAAgB,EAAE,OAAO,CAI5C;AAED;;;;GAIG;AACH,0CAJW,MAAM,WACN,OAAO,GACL,OAAO,gBAAgB,EAAE,oBAAoB,CAIzD;AAED;;;;;;;;GAQG;AACH,yCARW,MAAM,QACN;IACN,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI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AE,GACP,OAAO,gBAAgB,EAAE,qBAAqB,CAI1D;AAED;;;;;GAKG;AACH,qCALW,MAAM,cACN,MAAM,uBACN,OAAO,GACL,OAAO,gBAAgB,EAAE,eAAe,CASpD;AAED;;;;;GAKG;AACH,uCALW,MAAM,QACN,OAAO,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC,SAClD,MAAM,GACJ,OAAO,gBAAgB,EAAE,iBAAiB,CAItD;AAED;;;;;GAKG;AACH,uCALW,MAAM,cACN;IAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,gBAAgB,EAAE,cAAc,CAAA;CAAC,QAC9D;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;CAAC,GAC7C,OAAO,gBAAgB,EAAE,iBAAiB,CAItD;AAED;;;;;;GAMG;AACH,6CANW,MAAM,SACN,OAAO,aACP,OAAO,gBAAgB,EAAE,SAAS,eAClC,OAAO,gBAAgB,EAAE,SAAS,GAChC,OAAO,gBAAgB,EAAE,uBAAuB,CAU5D;AAED;;;;GAIG;AACH,0CAJW,MAAM,UACN,OAAO,gBAAgB,EAAE,SAAS,GAChC,OAAO,gBAAgB,EAAE,oBAAoB,CAIzD;AAED;;;;GAIG;AACH,uCAJW,MAAM,WACN,OAAO,GACL,OAAO,gBAAgB,EAAE,iBAAiB,CAItD;AAED;;;;GAIG;AACH,4CAJW,MAAM,SACN,OAAO,GACL,OAAO,gBAAgB,EAAE,sBAAsB,CAI3D"}
1
+ {"version":3,"file":"queryTreeBuilders.d.ts","sourceRoot":"","sources":["../../src/search/queryTreeBuilders.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,mCAHW,OAAO,gBAAgB,EAAE,SAAS,EAAE,GAClC,OAAO,gBAAgB,EAAE,QAAQ,CAI7C;AAED;;;;;;;;;;GAUG;AACH,kCAHW,CAAC,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS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M,UACN,OAAO,gBAAgB,EAAE,SAAS,GAChC,OAAO,gBAAgB,EAAE,oBAAoB,CAIzD;AAED;;;;GAIG;AACH,uCAJW,MAAM,WACN,OAAO,GACL,OAAO,gBAAgB,EAAE,iBAAiB,CAItD;AAED;;;;GAIG;AACH,4CAJW,MAAM,SACN,OAAO,GACL,OAAO,gBAAgB,EAAE,sBAAsB,CAI3D"}
@@ -28,6 +28,35 @@ export function getSearchSchemaType(schemaObject: import("../formats/schema.js")
28
28
  * @returns {SearchTypeObject}
29
29
  */
30
30
  export function getSearchTypeObject(schemaObject: import("../formats/schema.js").ZodexSchema): SearchTypeObject;
31
+ /**
32
+ * The call site every *recursive* search widget uses in place of calling
33
+ * `getSearchTypeObject(...).buildUI(...)` directly - it's the same thing,
34
+ * plus `resolveIntersection` run first, so an intersection schema at any
35
+ * depth (not just the one `buildSearchChoices` is called with) still
36
+ * resolves instead of falling through to the `noneditableSearchType`
37
+ * escape hatch. `originalJSON` (needed for the `getTypesForSchema` call's
38
+ * own `$ref` resolution) defaults to `schemaObject` itself only as a last
39
+ * resort for a call site that has none to pass down - every recursive
40
+ * caller should be threading the true document root through via its own
41
+ * `originalJSON` parameter instead.
42
+ * @param {{
43
+ * schemaObject: import('../formats/schema.js').ZodexSchema,
44
+ * path: string,
45
+ * typeNamespace?: string,
46
+ * topRoot?: import('../types.js').RootElement,
47
+ * types?: import('../types.js').default,
48
+ * originalJSON?: import('../formats/schema.js').ZodexSchema
49
+ * }} cfg
50
+ * @returns {import('../types.js').JamilihArray}
51
+ */
52
+ export function buildSearchWidget({ schemaObject, path, typeNamespace, topRoot, types, originalJSON }: {
53
+ schemaObject: import("../formats/schema.js").ZodexSchema;
54
+ path: string;
55
+ typeNamespace?: string;
56
+ topRoot?: import("../types.js").RootElement;
57
+ types?: import("../types.js").default;
58
+ originalJSON?: import("../formats/schema.js").ZodexSchema;
59
+ }): import("../types.js").JamilihArray;
31
60
  export type QueryNode = import("./queryTree.js").QueryNode;
32
61
  /**
33
62
  * The search-side analogue of `TypeObject` (`src/types.js:308-408`): two
@@ -41,6 +70,7 @@ export type SearchTypeObject = {
41
70
  typeNamespace?: string;
42
71
  topRoot?: import("../types.js").RootElement;
43
72
  types?: import("../types.js").default;
73
+ originalJSON?: import("../formats/schema.js").ZodexSchema;
44
74
  }) => import("../types.js").JamilihArray;
45
75
  getQuery: (cfg: {
46
76
  root: HTMLElement;
@@ -74,4 +104,18 @@ export const availableSearchTypes: {
74
104
  * @type {SearchTypeObject}
75
105
  */
76
106
  export const noneditableSearchType: SearchTypeObject;
107
+ /**
108
+ * Intersection schemas are never registered in `availableSearchTypes` -
109
+ * resolved here instead of in `getSearchSchemaType`, reusing jsoe's
110
+ * existing intersection-merging machinery (`getTypesForSchema`,
111
+ * `src/formats/schema.js`) rather than reinventing it (search plan §3/§5).
112
+ * A single merged result replaces the intersection outright; more than one
113
+ * (e.g. one side of the intersection is itself a union) is handed to
114
+ * `unionSearchType.js` unchanged via a synthesized `union` wrapper, the
115
+ * same way `unionSearchType.js` already treats distinguishable branches.
116
+ * @param {import('../formats/schema.js').ZodexSchema} schemaObject
117
+ * @param {import('../formats/schema.js').ZodexSchema} originalJSON
118
+ * @returns {import('../formats/schema.js').ZodexSchema}
119
+ */
120
+ export function resolveIntersection(schemaObject: import("../formats/schema.js").ZodexSchema, originalJSON: import("../formats/schema.js").ZodexSchema): import("../formats/schema.js").ZodexSchema;
77
121
  //# sourceMappingURL=searchDispatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchDispatch.d.ts","sourceRoot":"","sources":["../../src/search/searchDispatch.js"],"names":[],"mappings":"AA2HA;;;;;;;;;;;;;;;;;GAiBG;AACH,kDAHW,OAAO,sBAAsB,EAAE,WAAW,GACxC,MAAM,CAuBlB;AAED;;;;;;;;;GASG;AACH,kDAHW,OAAO,sBAAsB,EAAE,WAAW,GACxC,gBAAgB,CAK5B;wBA9KY,OAAO,gBAAgB,EAAE,SAAS;;;;;;+BAOlC;IACR,O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BAAgB,EAAE,SAAS;;;;;;+BAOlC;IACR,OAAO,EAAE,CAAC,GAAG,EAAE;QACb,YAAY,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;QACzD,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,aAAa,EAAE,WAAW,CAAC;QAC5C,KAAK,CAAC,EAAE,OAAO,aAAa,EAAE,OAAO,CAAC;QACtC,YAAY,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAA;KAC1D,KAAK,OAAO,aAAa,EAAE,YAAY,CAAC;IACzC,QAAQ,EAAE,CAAC,GAAG,EAAE;QACd,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,MAAM,CAAA;KACb,KAAK,SAAS,GAAC,SAAS,CAAA;CAC1B;AAyBJ;;;;;;;;;;;;;;;;;GAiBG;AACH,mCAFU;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAC,CA+DzC;AAtFF;;;;GAIG;AACH,oCAFU,gBAAgB,CAEkC;AAmJ5D;;;;;;;;;;;;GAYG;AACH,kDAJW,OAAO,sBAAsB,EAAE,WAAW,gBAC1C,OAAO,sBAAsB,EAAE,WAAW,GACxC,OAAO,sBAAsB,EAAE,WAAW,CAYtD"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Locates a built search element by the JSON-Pointer path it was built for.
3
+ * Compares `dataset.searchPath` in JS rather than interpolating `path` into
4
+ * a `querySelector` attribute-value string, since a schema path can embed
5
+ * arbitrary property-name characters (only `~`/`/` are escaped by
6
+ * `makeJSONPointer`) that would otherwise need CSS-selector escaping.
7
+ * @param {ParentNode} root
8
+ * @param {string} path
9
+ * @returns {HTMLElement|undefined}
10
+ */
11
+ export function findSearchElement(root: ParentNode, path: string): HTMLElement | undefined;
12
+ /**
13
+ * @typedef {HTMLElement & {
14
+ * getQuery: () => import('./queryTree.js').QueryNode|undefined
15
+ * }} SearchElement
16
+ */
17
+ /**
18
+ * The `SearchTypeObject.getQuery` every leaf module implements identically:
19
+ * locate the element it built under `root` and delegate to its own
20
+ * (per-element, `dataset`-driven) `getQuery()` method.
21
+ * @param {{root: HTMLElement, path: string}} cfg
22
+ * @returns {import('./queryTree.js').QueryNode|undefined}
23
+ */
24
+ export function getQueryViaElement({ root, path }: {
25
+ root: HTMLElement;
26
+ path: string;
27
+ }): import("./queryTree.js").QueryNode | undefined;
28
+ /**
29
+ * Type-predicate guard distinguishing a built search element (leaf or
30
+ * container, either answers to `.getQuery()`) from a plain DOM node - used
31
+ * by container elements (e.g. `objectSearchType.js`'s `<jsoe-search-object>`)
32
+ * that walk `this.children` polymorphically (search plan §8) without
33
+ * knowing which children are search elements and which are plain layout
34
+ * (a controls `<div>`, etc.).
35
+ * @param {Element} el
36
+ * @returns {el is SearchElement}
37
+ */
38
+ export function hasGetQuery(el: Element): el is SearchElement;
39
+ /**
40
+ * Factory for the README's "no variants to allow for distinct search"
41
+ * leaves (`undefined`/`void`, `null`, `NaN`): the only meaningful question
42
+ * is whether the path is present at all, which only matters once the path
43
+ * is optional or nested in a union - so all three share one tiny, single-
44
+ * checkbox implementation, differing only in tag name/label. Unlike every
45
+ * other leaf, this one is never left for the user to configure at all: its
46
+ * checkbox is pre-checked and `disabled` (`buildCheckbox`'s doc), since a
47
+ * type with only one possible value has nothing else worth offering a
48
+ * choice between - it's simply valid, unconditionally, the moment it
49
+ * exists, rather than needing a `required`-style rule of its own.
50
+ * @param {{tagName: string}} cfg
51
+ * @returns {import('./searchDispatch.js').SearchTypeObject}
52
+ */
53
+ export function makePresenceOnlySearchType({ tagName }: {
54
+ tagName: string;
55
+ }): import("./searchDispatch.js").SearchTypeObject;
56
+ /**
57
+ * Factory for `errorSearchType.js`/`errorsSpecialSearchType.js`, offering
58
+ * literal/regex search of child string properties, numeric of number
59
+ * children (README) - one `buildLiteralRegexControls`/`buildRangeInputsPair`
60
+ * pair per known property (`key`-distinguished so they coexist in one
61
+ * widget; see those helpers' docs), each wrapped in its own
62
+ * `buildOptInFieldset` (so picking, say, just `message` doesn't also force
63
+ * `name`/`fileName`/`stack`/`lineNumber`/`columnNumber` to be filled in),
64
+ * combined via `$and`, with `buildAtLeastOneSentinel` requiring at least one
65
+ * of the six to actually be opted into. `.cause` (a recursive, arbitrarily-
66
+ * typed property) and `errorsSpecial`'s `AggregateError.errors` array are
67
+ * deliberately left out of this pass - the README's bullet asks only for
68
+ * the flat string/number children, and open-ended recursion into an
69
+ * arbitrary `cause` chain is a materially bigger feature than "the same
70
+ * shape, twice more".
71
+ * @param {{tagName: string}} cfg
72
+ * @returns {import('./searchDispatch.js').SearchTypeObject}
73
+ */
74
+ export function makeErrorFamilySearchType({ tagName }: {
75
+ tagName: string;
76
+ }): import("./searchDispatch.js").SearchTypeObject;
77
+ /**
78
+ * Factory for `domrectSearchType.js`/`dompointSearchType.js`/
79
+ * `dommatrixSearchType.js`: numeric search ranges for children; "Is/Is not
80
+ * Readonly"; DOMMatrix: "Is/Is not 3d" (README) - one `buildRangeInputsPair`
81
+ * per known dimension (`key`-distinguished so they coexist in one widget;
82
+ * `dimensionKeys` covers DOMMatrix's 2D (`a`-`f`) *and* 3D (`m11`-`m44`)
83
+ * shapes at once rather than switching the control set on an "Is/Is not 3d"
84
+ * answer that's itself just another optional search constraint, not a
85
+ * schema fact - `domrect`/`dompoint`/`dommatrix` are all "checked" types
86
+ * with no structural schema to derive dimension names from in the first
87
+ * place, same reasoning as `makeErrorFamilySearchType`), combined into one
88
+ * `domShape` leaf (`queryTree.js`) rather than separate leaves via `$and`.
89
+ * @param {{
90
+ * tagName: string,
91
+ * dimensionKeys: string[],
92
+ * includeReadonly?: boolean,
93
+ * includeDimensionCheck?: boolean
94
+ * }} cfg
95
+ * @returns {import('./searchDispatch.js').SearchTypeObject}
96
+ */
97
+ export function makeDomShapeSearchType({ tagName, dimensionKeys, includeReadonly, includeDimensionCheck }: {
98
+ tagName: string;
99
+ dimensionKeys: string[];
100
+ includeReadonly?: boolean;
101
+ includeDimensionCheck?: boolean;
102
+ }): import("./searchDispatch.js").SearchTypeObject;
103
+ export type SearchElement = HTMLElement & {
104
+ getQuery: () => import("./queryTree.js").QueryNode | undefined;
105
+ };
106
+ //# sourceMappingURL=searchElementUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchElementUtils.d.ts","sourceRoot":"","sources":["../../src/search/searchElementUtils.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,wCAJW,UAAU,QACV,MAAM,GACJ,WAAW,GAAC,SAAS,CAMjC;AAED;;;;GAIG;AAEH;;;;;;GAMG;AACH,mDAHW;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAC/B,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,CAOxD;AAED;;;;;;;;;GASG;AACH,gCAHW,OAAO,GACL,EAAE,IAAI,aAAa,CAK/B;AAED;;;;;;;;;;;;;GAaG;AACH,wDAHW;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GACf,OAAO,qBAAqB,EAAE,gBAAgB,CA4B1D;AAsDD;;;;;;;;;;;;;;;;;GAiBG;AACH,uDAHW;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GACf,OAAO,qBAAqB,EAAE,gBAAgB,CA+C1D;AAyDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2GARW;IACN,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,GACS,OAAO,qBAAqB,EAAE,gBAAgB,CA8E1D;4BAxVY,WAAW,GAAG;IACtB,QAAQ,EAAE,MAAM,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,CAAA;CAC7D"}