@design-edito/tools 0.1.39 → 0.1.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. package/agnostic/css/bem/index.js +2 -2
  2. package/agnostic/css/index.js +13 -13
  3. package/agnostic/errors/index.js +2 -2
  4. package/agnostic/html/hyper-json/cast/index.d.ts +8 -14
  5. package/agnostic/html/hyper-json/cast/index.js +13 -8
  6. package/agnostic/html/hyper-json/index.d.ts +8 -4
  7. package/agnostic/html/hyper-json/index.js +14 -9
  8. package/agnostic/html/hyper-json/method/index.d.ts +7 -0
  9. package/agnostic/html/hyper-json/method/index.js +6 -0
  10. package/agnostic/html/hyper-json/serialize/index.d.ts +2 -2
  11. package/agnostic/html/hyper-json/serialize/index.js +4 -1
  12. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.d.ts +4 -0
  13. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +21 -0
  14. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.d.ts +3 -0
  15. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +21 -0
  16. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +2 -0
  17. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +21 -0
  18. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +6 -0
  19. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +21 -0
  20. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +5 -0
  21. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +21 -0
  22. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +4 -0
  23. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +21 -0
  24. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +2 -0
  25. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +21 -0
  26. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +4 -0
  27. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +21 -0
  28. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +2 -0
  29. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +21 -0
  30. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.d.ts +4 -0
  31. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +21 -0
  32. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +4 -0
  33. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +21 -0
  34. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +5 -0
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +23 -0
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +8 -0
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +21 -0
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +4 -0
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +21 -0
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +5 -0
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +21 -0
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +4 -0
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +21 -0
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +4 -0
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +21 -0
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.d.ts +1 -0
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +21 -0
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.d.ts +5 -0
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +21 -0
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +2 -0
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +21 -0
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +2 -0
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +21 -0
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +6 -0
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +21 -0
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +2 -0
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +21 -0
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +2 -0
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +21 -0
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +4 -0
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +21 -0
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +2 -0
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +21 -0
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +5 -0
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +21 -0
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.d.ts +3 -0
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +21 -0
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +4 -0
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +21 -0
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +6 -0
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +21 -0
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.d.ts +5 -0
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +21 -0
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +4 -0
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +21 -0
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +5 -0
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +21 -0
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperties/index.d.ts +4 -0
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperties/index.js +21 -0
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +4 -0
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +21 -0
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +5 -0
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +21 -0
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.d.ts +5 -0
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +21 -0
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +2 -0
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +21 -0
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +2 -0
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +21 -0
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +2 -0
  91. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +21 -0
  92. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.d.ts +3 -0
  93. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +21 -0
  94. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +4 -0
  95. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +21 -0
  96. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +2 -0
  97. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +21 -0
  98. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +2 -0
  99. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +21 -0
  100. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +2 -0
  101. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +21 -0
  102. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +2 -0
  103. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +21 -0
  104. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +2 -0
  105. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +21 -0
  106. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +2 -0
  107. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +21 -0
  108. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +9 -0
  109. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +21 -0
  110. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.d.ts +4 -0
  111. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +21 -0
  112. package/agnostic/html/hyper-json/smart-tags/index.d.ts +4 -0
  113. package/agnostic/html/hyper-json/smart-tags/index.js +9 -0
  114. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +2 -0
  115. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +10 -0
  116. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +2 -0
  117. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +10 -0
  118. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.d.ts +4 -0
  119. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +21 -0
  120. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.d.ts +4 -0
  121. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +21 -0
  122. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +4 -0
  123. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +21 -0
  124. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.d.ts +2 -0
  125. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +21 -0
  126. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +2 -0
  127. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +21 -0
  128. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +4 -0
  129. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +21 -0
  130. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +2 -0
  131. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +10 -0
  132. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.d.ts +4 -0
  133. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +21 -0
  134. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +4 -0
  135. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +21 -0
  136. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +7 -0
  137. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +23 -0
  138. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.d.ts +4 -0
  139. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +21 -0
  140. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.d.ts +4 -0
  141. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +21 -0
  142. package/agnostic/html/hyper-json/transformer/index.d.ts +33 -0
  143. package/agnostic/html/hyper-json/transformer/index.js +8 -0
  144. package/agnostic/html/hyper-json/tree/index.d.ts +50 -41
  145. package/agnostic/html/hyper-json/tree/index.js +15 -8
  146. package/agnostic/html/hyper-json/types/index.d.ts +138 -84
  147. package/agnostic/html/hyper-json/types/index.js +1 -1
  148. package/agnostic/html/hyper-json/utils/index.d.ts +49 -8
  149. package/agnostic/html/hyper-json/utils/index.js +13 -8
  150. package/agnostic/html/index.js +27 -22
  151. package/agnostic/html/replace-in-element/index.js +20 -3
  152. package/agnostic/html/sanitize/index.js +4 -4
  153. package/agnostic/html/selector-to-element/index.js +4 -4
  154. package/agnostic/html/string-to-nodes/index.js +5 -5
  155. package/agnostic/misc/index.js +16 -16
  156. package/agnostic/misc/logs/index.js +2 -2
  157. package/agnostic/misc/lorem-ipsum/index.js +7 -7
  158. package/agnostic/misc/outcome/index.js +3 -16
  159. package/agnostic/numbers/index.js +6 -6
  160. package/agnostic/objects/deep-get-property/index.d.ts +1 -0
  161. package/agnostic/objects/deep-get-property/index.js +7 -0
  162. package/agnostic/objects/index.d.ts +2 -0
  163. package/agnostic/objects/index.js +13 -9
  164. package/agnostic/random/index.js +2 -2
  165. package/agnostic/strings/index.js +3 -3
  166. package/agnostic/time/index.js +3 -3
  167. package/chunks/chunk-2G5MFJ66.js +2420 -0
  168. package/chunks/chunk-7VL2O6SQ.js +211 -0
  169. package/chunks/chunk-BKO7GLC2.js +133 -0
  170. package/chunks/chunk-EJEG2LDE.js +2427 -0
  171. package/chunks/chunk-FHLCPVND.js +23 -0
  172. package/chunks/chunk-FOLCH72D.js +211 -0
  173. package/chunks/chunk-GPWFYPER.js +211 -0
  174. package/chunks/chunk-JMU5PDBD.js +20 -0
  175. package/chunks/chunk-MAP7OSVR.js +37 -0
  176. package/chunks/chunk-PMYUC6VD.js +37 -0
  177. package/chunks/chunk-QAVYONH6.js +20 -0
  178. package/chunks/chunk-RW7VAKJW.js +15 -0
  179. package/chunks/chunk-SKMCIFS3.js +27 -0
  180. package/chunks/chunk-SXRWMH3U.js +78 -0
  181. package/chunks/chunk-UT2J62LH.js +37 -0
  182. package/chunks/chunk-VDNIN3V5.js +23 -0
  183. package/chunks/chunk-XEQ2PBT2.js +20 -0
  184. package/chunks/chunk-XPRBKRSB.js +37 -0
  185. package/chunks/chunk-YGJHHWBJ.js +37 -0
  186. package/chunks/chunk-YMNBUQVR.js +2420 -0
  187. package/chunks/chunk-YYE7TVB6.js +2420 -0
  188. package/node/files/index.js +3 -3
  189. package/package.json +1 -1
@@ -1,89 +1,143 @@
1
- import { Tree } from '../tree';
1
+ import { Outcome } from '~/agnostic/misc/outcome';
2
+ import { Logger } from '~/agnostic/misc/logs/logger';
3
+ import { Tree as TreeNamespace } from '../tree';
4
+ import { Transformer } from '../transformer';
5
+ import { Method } from '../method';
2
6
  export declare namespace Types {
3
- enum TyperTagName {
4
- ANY = "any",
5
- NULL = "null",
6
- BOOLEAN = "boolean",
7
- NUMBER = "number",
8
- STRING = "string",
9
- TEXT = "text",
10
- NODELIST = "nodelist",
11
- ARRAY = "array",
12
- RECORD = "record",
13
- LITERAL = "literal"
7
+ namespace Transformations {
8
+ type FunctionMainValueFailure = {
9
+ expected: string;
10
+ found: string;
11
+ details?: any;
12
+ };
13
+ type FunctionArgsValueFailure = {
14
+ expected: string;
15
+ found: string;
16
+ position?: number;
17
+ details?: any;
18
+ };
19
+ type FunctionTransformationFailure = {
20
+ details?: any;
21
+ };
22
+ type FunctionFailurePayload = FunctionMainValueFailure | FunctionArgsValueFailure | FunctionTransformationFailure;
23
+ type FunctionDetailsArg = {
24
+ name: string;
25
+ sourceTree: TreeNamespace.Tree;
26
+ };
27
+ type Function<Main extends Tree.RestingValue, Args extends Tree.Value[], Out extends Tree.RestingValue> = (mainValue: Main, args: Args, details: FunctionDetailsArg) => Outcome.Either<Out, FunctionFailurePayload>;
28
+ type FailurePayloadCore = {
29
+ transformerName: string;
30
+ path: string;
31
+ mainValue: Tree.RestingValue;
32
+ argsValue: Tree.RestingArrayValue;
33
+ };
34
+ type MainValueFailurePayload = FailurePayloadCore & FunctionMainValueFailure & {
35
+ message: 'BAD_MAIN_VALUE';
36
+ };
37
+ type ArgsValueFailurePayload = FailurePayloadCore & FunctionArgsValueFailure & {
38
+ message: 'BAD_ARGUMENTS_VALUE';
39
+ };
40
+ type TransformationFailurePayload = FailurePayloadCore & FunctionTransformationFailure & {
41
+ message: 'TRANSFORMATION_ERROR';
42
+ };
43
+ type FailurePayload = MainValueFailurePayload | ArgsValueFailurePayload | TransformationFailurePayload;
44
+ type Output<S extends Tree.RestingValue = Tree.RestingValue, F extends FailurePayload = FailurePayload> = Outcome.Either<S, F>;
14
45
  }
15
- type PrimitiveValue = null | string | number | boolean | Element | Text | NodeListOf<Text | Element> | Transformer;
16
- type Value = PrimitiveValue | Value[] | {
17
- [k: string]: Value;
18
- };
19
- type TransformerHooks = {
20
- resolver: Tree.Tree['resolve'];
21
- getGenerator: Tree.Tree['getGenerator'];
22
- };
23
- type TransformerErrorReturnType = {
24
- action: 'ERROR';
25
- value: Value;
26
- };
27
- type TransformerReplaceReturnType = {
28
- action: 'REPLACE';
29
- value: Value;
30
- };
31
- type TransformerMergeReturnType = {
32
- action: 'MERGE';
33
- value: Value;
34
- };
35
- type TransformerNullReturnType = {
36
- action: null;
37
- };
38
- type TransformerReturnType = TransformerErrorReturnType | TransformerReplaceReturnType | TransformerMergeReturnType | TransformerNullReturnType;
39
- type AnonymousTransformer = (currentValue: Value, callerTree: Tree.Tree) => TransformerReturnType;
40
- type Transformer = AnonymousTransformer & {
41
- transformerName: string;
42
- args: Value[];
43
- };
44
- type TransformerGenerator = (name: string, ...args: Value[]) => Transformer;
45
- type Resolver = (path: Tree.Tree['path']) => Tree.Tree | undefined;
46
- type TreeOptions = {
47
- generatorsMap: Map<string, Types.TransformerGenerator>;
48
- keyAttribute: string;
49
- actionAttribute: string;
50
- };
51
- enum ReductionAction {
52
- APPEND = "append",
53
- PREPEND = "prepend",
54
- REPLACE = "replace"
46
+ namespace Tree {
47
+ namespace Merge {
48
+ enum Action {
49
+ APPEND = "append",
50
+ PREPEND = "prepend",
51
+ REPLACE = "replace"
52
+ }
53
+ }
54
+ type Mode = 'isolation' | 'coalescion';
55
+ type TransformerValue = Transformer;
56
+ type MethodValue = Method;
57
+ type PrimitiveValue = null | boolean | number | string | Text | NodeListOf<Element | Text> | Element | MethodValue;
58
+ type RestingValue = PrimitiveValue | RestingValue[] | {
59
+ [k: string]: RestingValue;
60
+ };
61
+ type Value = RestingValue | TransformerValue;
62
+ type RestingArrayValue = RestingValue[];
63
+ type RestingRecordValue = {
64
+ [k: string]: RestingValue;
65
+ };
66
+ type ValuesTypesNamesIndex = {
67
+ null: null;
68
+ boolean: boolean;
69
+ number: number;
70
+ string: string;
71
+ text: Text;
72
+ nodelist: NodeListOf<Element | Text>;
73
+ element: Element;
74
+ transformer: TransformerValue;
75
+ method: MethodValue;
76
+ array: RestingArrayValue;
77
+ record: RestingRecordValue;
78
+ };
79
+ type ValueTypeName = keyof ValuesTypesNamesIndex;
80
+ type ValueTypeFromNames<N extends ValueTypeName[]> = ValuesTypesNamesIndex[N[number]];
81
+ type Resolver = (path: TreeNamespace.Tree['path']) => TreeNamespace.Tree | undefined;
82
+ type Options = {
83
+ globalObject: RestingRecordValue;
84
+ logger: Logger | null;
85
+ loggerThread: string | undefined;
86
+ };
87
+ type Serialized = {
88
+ type: 'null';
89
+ value: null;
90
+ } | {
91
+ type: 'boolean';
92
+ value: boolean;
93
+ } | {
94
+ type: 'number';
95
+ value: number;
96
+ } | {
97
+ type: 'string';
98
+ value: string;
99
+ } | {
100
+ type: 'text';
101
+ value: string;
102
+ } | {
103
+ type: 'element';
104
+ value: string;
105
+ } | {
106
+ type: 'nodelist';
107
+ value: Array<Serialized>;
108
+ } | {
109
+ type: 'array';
110
+ value: Array<Serialized>;
111
+ } | {
112
+ type: 'record';
113
+ value: {
114
+ [k: string]: Serialized;
115
+ };
116
+ } | {
117
+ type: 'transformer';
118
+ value: Transformer;
119
+ } | {
120
+ type: 'method';
121
+ value: Method;
122
+ };
55
123
  }
56
- type Serialized = {
57
- type: 'null';
58
- value: null;
59
- } | {
60
- type: 'boolean';
61
- value: boolean;
62
- } | {
63
- type: 'number';
64
- value: number;
65
- } | {
66
- type: 'string';
67
- value: string;
68
- } | {
69
- type: 'text';
70
- value: string;
71
- } | {
72
- type: 'element';
73
- value: string;
74
- } | {
75
- type: 'nodelist';
76
- value: string;
77
- } | {
78
- type: 'array';
79
- value: Array<Serialized>;
80
- } | {
81
- type: 'record';
82
- value: {
83
- [k: string]: Serialized;
124
+ namespace SmartTags {
125
+ type SmartTag<Main extends Types.Tree.RestingValue = Types.Tree.RestingValue, Args extends Types.Tree.RestingArrayValue = Types.Tree.RestingArrayValue, Output extends Types.Tree.RestingValue = Types.Tree.RestingValue> = {
126
+ defaultMode: Types.Tree.Mode;
127
+ isolationInitType: Exclude<Types.Tree.ValueTypeName, 'transformer' | 'method'>;
128
+ generator: (innerValue: Types.Tree.RestingValue, mode: Types.Tree.Mode, sourceTree: TreeNamespace.Tree) => {
129
+ transformer: Transformer<Main, Args, Output>;
130
+ method: Method<Main, Args, Output>;
131
+ };
132
+ };
133
+ type Descriptor<Main extends Types.Tree.RestingValue = Types.Tree.RestingValue, Args extends Types.Tree.RestingArrayValue = Types.Tree.RestingArrayValue, Output extends Types.Tree.RestingValue = Types.Tree.RestingValue> = {
134
+ name: string;
135
+ defaultMode: Types.Tree.Mode;
136
+ isolationInitType: Exclude<Types.Tree.ValueTypeName, 'transformer' | 'method'>;
137
+ mainValueCheck: Transformer<Main, Args, Output>['typeChecks']['mainValue'];
138
+ argsValueCheck: Transformer<Main, Args, Output>['typeChecks']['argsValue'];
139
+ func: Transformer<Main, Args, Output>['func'];
84
140
  };
85
- } | {
86
- type: 'transformer';
87
- value: Transformer;
88
- };
141
+ type Register = Map<string, Types.SmartTags.SmartTag<any, any, any>>;
142
+ }
89
143
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Types
3
- } from "../../../../chunks/chunk-5GI5G45R.js";
3
+ } from "../../../../chunks/chunk-XEQ2PBT2.js";
4
4
  export {
5
5
  Types
6
6
  };
@@ -1,11 +1,52 @@
1
- import { Tree } from '../tree';
1
+ import { Outcome } from '~/agnostic/misc/outcome';
2
2
  import { Types } from '../types';
3
3
  export declare namespace Utils {
4
- export const pathStringToPath: (pathString: Tree.Tree["pathString"]) => Tree.Tree["path"];
5
- export const pathToPathString: (path: Tree.Tree["path"]) => string;
6
- type ErrReturn = Types.TransformerErrorReturnType;
7
- export const makeTransformerError: (value: ErrReturn["value"]) => ErrReturn;
8
- export const toNamedTransformer: (name: string, args: Types.Value[], anonymous: Types.AnonymousTransformer) => Types.Transformer;
9
- export const toHyperJson: (value: Types.Value, keyAttribute?: string) => Element;
10
- export {};
4
+ function clone<T extends Types.Tree.Value = Types.Tree.Value>(value: T): T;
5
+ function coalesceValues(currentValue: Types.Tree.RestingValue, subpath: string | number, subvalue: Types.Tree.Value): Types.Tree.RestingValue;
6
+ const toHyperJson: (value: Types.Tree.Value) => Element | Text;
7
+ namespace Transformations {
8
+ namespace TypeChecks {
9
+ function getType<T extends unknown>(value: T): T extends Types.Tree.Value ? Types.Tree.ValueTypeName : Types.Tree.ValueTypeName | undefined;
10
+ const everyTypeName: Types.Tree.ValueTypeName[];
11
+ function singleTypeCheck<K extends Types.Tree.ValueTypeName>(value: unknown, type: K): value is Types.Tree.ValueTypeFromNames<[K]>;
12
+ function typeCheck<K extends Array<Types.Tree.ValueTypeName>>(value: unknown, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>, {
13
+ expected: string;
14
+ found: string;
15
+ }>;
16
+ function typeCheckMany<K extends Array<Types.Tree.ValueTypeName>>(values: unknown[], ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>[], {
17
+ position: number;
18
+ expected: string;
19
+ found: string;
20
+ }>;
21
+ }
22
+ }
23
+ namespace Tree {
24
+ function mergeNodes(nodes: Element[]): Element;
25
+ function getInitialValueFromTypeName(name: Exclude<Types.Tree.ValueTypeName, 'transformer' | 'method'>): Types.Tree.RestingValue;
26
+ namespace TypeChecks {
27
+ function getType<T extends unknown>(value: T): T extends Types.Tree.Value ? Types.Tree.ValueTypeName : Types.Tree.ValueTypeName | undefined;
28
+ const everyTypeName: Types.Tree.ValueTypeName[];
29
+ function singleTypeCheck<K extends Types.Tree.ValueTypeName>(value: unknown, type: K): value is Types.Tree.ValueTypeFromNames<[K]>;
30
+ function typeCheck<K extends Array<Types.Tree.ValueTypeName>>(value: unknown, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>, {
31
+ expected: string;
32
+ found: string;
33
+ }>;
34
+ function typeCheckMany<K extends Array<Types.Tree.ValueTypeName>>(values: unknown[], ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>[], {
35
+ position: number;
36
+ expected: string;
37
+ found: string;
38
+ }>;
39
+ const isTreeMode: (name: string) => name is Types.Tree.Mode;
40
+ const isValueTypeName: (name: string) => name is Types.Tree.ValueTypeName;
41
+ }
42
+ }
43
+ namespace SmartTags {
44
+ const expectEmptyArgs: (args: unknown[]) => Outcome.Either<[], {
45
+ expected: string;
46
+ found: string;
47
+ }>;
48
+ const makeMainValueError: (expected: string, found: string, details?: any) => Types.Transformations.FunctionMainValueFailure;
49
+ const makeArgsValueError: (expected: string, found: string, position?: number, details?: any) => Types.Transformations.FunctionArgsValueFailure;
50
+ const makeTransformationError: (details?: any) => Types.Transformations.FunctionTransformationFailure;
51
+ }
11
52
  }
@@ -1,16 +1,21 @@
1
1
  import {
2
2
  Utils
3
- } from "../../../../chunks/chunk-LOFELEU3.js";
4
- import "../../../../chunks/chunk-ZCPGE7H7.js";
5
- import "../../../../chunks/chunk-5GI5G45R.js";
6
- import "../../../../chunks/chunk-XWLQR4UY.js";
7
- import "../../../../chunks/chunk-LUPVHC73.js";
8
- import "../../../../chunks/chunk-YDIBNEGA.js";
3
+ } from "../../../../chunks/chunk-2G5MFJ66.js";
4
+ import "../../../../chunks/chunk-QAVYONH6.js";
5
+ import "../../../../chunks/chunk-XEQ2PBT2.js";
6
+ import "../../../../chunks/chunk-VDNIN3V5.js";
7
+ import "../../../../chunks/chunk-FHLCPVND.js";
8
+ import "../../../../chunks/chunk-UT2J62LH.js";
9
+ import "../../../../chunks/chunk-SXRWMH3U.js";
10
+ import "../../../../chunks/chunk-BKO7GLC2.js";
11
+ import "../../../../chunks/chunk-RW7VAKJW.js";
12
+ import "../../../../chunks/chunk-XA4HVHJ4.js";
9
13
  import "../../../../chunks/chunk-E6MSDKON.js";
14
+ import "../../../../chunks/chunk-XNF5MLCQ.js";
15
+ import "../../../../chunks/chunk-YDIBNEGA.js";
16
+ import "../../../../chunks/chunk-JMU5PDBD.js";
10
17
  import "../../../../chunks/chunk-ZTDVUXPR.js";
11
18
  import "../../../../chunks/chunk-RLJOYG64.js";
12
- import "../../../../chunks/chunk-QXAJXTXV.js";
13
- import "../../../../chunks/chunk-HC6ZOHCS.js";
14
19
  export {
15
20
  Utils
16
21
  };
@@ -1,44 +1,49 @@
1
- import {
2
- stringToNodes
3
- } from "../../chunks/chunk-NWFX6TEY.js";
4
1
  import {
5
2
  selectorToElement
6
- } from "../../chunks/chunk-EVOTJ7SU.js";
3
+ } from "../../chunks/chunk-GB4UQS6V.js";
4
+ import {
5
+ Placeholders
6
+ } from "../../chunks/chunk-VYW4IADX.js";
7
+ import {
8
+ stringToNodes
9
+ } from "../../chunks/chunk-PPHUIOHO.js";
7
10
  import {
8
11
  HyperJson
9
- } from "../../chunks/chunk-LVXK54LL.js";
10
- import "../../chunks/chunk-LOFELEU3.js";
11
- import "../../chunks/chunk-ZCPGE7H7.js";
12
- import "../../chunks/chunk-5GI5G45R.js";
12
+ } from "../../chunks/chunk-PMYUC6VD.js";
13
+ import "../../chunks/chunk-2G5MFJ66.js";
14
+ import "../../chunks/chunk-QAVYONH6.js";
15
+ import "../../chunks/chunk-XEQ2PBT2.js";
16
+ import "../../chunks/chunk-VDNIN3V5.js";
17
+ import "../../chunks/chunk-FHLCPVND.js";
18
+ import "../../chunks/chunk-UT2J62LH.js";
19
+ import "../../chunks/chunk-SXRWMH3U.js";
20
+ import "../../chunks/chunk-BKO7GLC2.js";
21
+ import "../../chunks/chunk-RW7VAKJW.js";
13
22
  import {
14
23
  getPositionInsideParent
15
24
  } from "../../chunks/chunk-VTPRO4NJ.js";
16
25
  import {
17
- Sanitize
18
- } from "../../chunks/chunk-WABWQCFE.js";
26
+ getNodeAncestors
27
+ } from "../../chunks/chunk-LUPVHC73.js";
19
28
  import {
20
29
  insertNode
21
30
  } from "../../chunks/chunk-XA4HVHJ4.js";
22
31
  import {
23
- Placeholders
24
- } from "../../chunks/chunk-VYW4IADX.js";
25
- import "../../chunks/chunk-XWLQR4UY.js";
26
- import {
27
- getNodeAncestors
28
- } from "../../chunks/chunk-LUPVHC73.js";
29
- import "../../chunks/chunk-YDIBNEGA.js";
32
+ Sanitize
33
+ } from "../../chunks/chunk-Z352MSRL.js";
30
34
  import "../../chunks/chunk-E6MSDKON.js";
35
+ import "../../chunks/chunk-XNF5MLCQ.js";
36
+ import "../../chunks/chunk-YDIBNEGA.js";
37
+ import "../../chunks/chunk-JMU5PDBD.js";
31
38
  import "../../chunks/chunk-ZTDVUXPR.js";
32
- import "../../chunks/chunk-CB52KVOZ.js";
39
+ import "../../chunks/chunk-U6YRINXJ.js";
33
40
  import "../../chunks/chunk-UFKH5WD2.js";
34
41
  import "../../chunks/chunk-RLJOYG64.js";
35
42
  import "../../chunks/chunk-S2NMAH7K.js";
36
43
  import "../../chunks/chunk-LV2VMOWR.js";
37
- import "../../chunks/chunk-2KT7AKRW.js";
38
- import "../../chunks/chunk-FENXVJYO.js";
44
+ import "../../chunks/chunk-WH6BPDAC.js";
39
45
  import "../../chunks/chunk-QHLQVR3E.js";
40
- import "../../chunks/chunk-QXAJXTXV.js";
41
- import "../../chunks/chunk-HC6ZOHCS.js";
46
+ import "../../chunks/chunk-FENXVJYO.js";
42
47
 
43
48
  // src/agnostic/html/index.ts
44
49
  var Html;
@@ -1,7 +1,24 @@
1
1
  import {
2
- replaceInElement
3
- } from "../../../chunks/chunk-XWLQR4UY.js";
4
- import "../../../chunks/chunk-LUPVHC73.js";
2
+ getNodeAncestors
3
+ } from "../../../chunks/chunk-LUPVHC73.js";
4
+
5
+ // src/agnostic/html/replace-in-element/index.ts
6
+ function replaceInElement(inputElement, replaceMap) {
7
+ const actualReplaceMap = new Map(Array.from(replaceMap).filter(([toReplace]) => {
8
+ const toReplaceAncestors = getNodeAncestors(toReplace);
9
+ return toReplaceAncestors.includes(inputElement);
10
+ }));
11
+ actualReplaceMap.forEach((replacer, toReplace) => {
12
+ if ("nodeType" in replacer) {
13
+ toReplace.parentNode?.insertBefore(replacer, toReplace);
14
+ } else {
15
+ const replacerNodes = Array.from(replacer);
16
+ replacerNodes.forEach((rpl) => toReplace.parentNode?.insertBefore(rpl, toReplace));
17
+ }
18
+ toReplace.parentNode?.removeChild(toReplace);
19
+ });
20
+ return inputElement;
21
+ }
5
22
  export {
6
23
  replaceInElement
7
24
  };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  Sanitize
3
- } from "../../../chunks/chunk-WABWQCFE.js";
4
- import "../../../chunks/chunk-CB52KVOZ.js";
3
+ } from "../../../chunks/chunk-Z352MSRL.js";
4
+ import "../../../chunks/chunk-U6YRINXJ.js";
5
5
  import "../../../chunks/chunk-UFKH5WD2.js";
6
6
  import "../../../chunks/chunk-RLJOYG64.js";
7
7
  import "../../../chunks/chunk-S2NMAH7K.js";
8
8
  import "../../../chunks/chunk-LV2VMOWR.js";
9
- import "../../../chunks/chunk-2KT7AKRW.js";
10
- import "../../../chunks/chunk-FENXVJYO.js";
9
+ import "../../../chunks/chunk-WH6BPDAC.js";
11
10
  import "../../../chunks/chunk-QHLQVR3E.js";
11
+ import "../../../chunks/chunk-FENXVJYO.js";
12
12
  export {
13
13
  Sanitize
14
14
  };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  selectorToElement
3
- } from "../../../chunks/chunk-EVOTJ7SU.js";
4
- import "../../../chunks/chunk-CB52KVOZ.js";
3
+ } from "../../../chunks/chunk-GB4UQS6V.js";
4
+ import "../../../chunks/chunk-U6YRINXJ.js";
5
5
  import "../../../chunks/chunk-UFKH5WD2.js";
6
6
  import "../../../chunks/chunk-RLJOYG64.js";
7
7
  import "../../../chunks/chunk-S2NMAH7K.js";
8
8
  import "../../../chunks/chunk-LV2VMOWR.js";
9
- import "../../../chunks/chunk-2KT7AKRW.js";
10
- import "../../../chunks/chunk-FENXVJYO.js";
9
+ import "../../../chunks/chunk-WH6BPDAC.js";
11
10
  import "../../../chunks/chunk-QHLQVR3E.js";
11
+ import "../../../chunks/chunk-FENXVJYO.js";
12
12
  export {
13
13
  selectorToElement
14
14
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  stringToNodes
3
- } from "../../../chunks/chunk-NWFX6TEY.js";
4
- import "../../../chunks/chunk-WABWQCFE.js";
5
- import "../../../chunks/chunk-CB52KVOZ.js";
3
+ } from "../../../chunks/chunk-PPHUIOHO.js";
4
+ import "../../../chunks/chunk-Z352MSRL.js";
5
+ import "../../../chunks/chunk-U6YRINXJ.js";
6
6
  import "../../../chunks/chunk-UFKH5WD2.js";
7
7
  import "../../../chunks/chunk-RLJOYG64.js";
8
8
  import "../../../chunks/chunk-S2NMAH7K.js";
9
9
  import "../../../chunks/chunk-LV2VMOWR.js";
10
- import "../../../chunks/chunk-2KT7AKRW.js";
11
- import "../../../chunks/chunk-FENXVJYO.js";
10
+ import "../../../chunks/chunk-WH6BPDAC.js";
12
11
  import "../../../chunks/chunk-QHLQVR3E.js";
12
+ import "../../../chunks/chunk-FENXVJYO.js";
13
13
  export {
14
14
  stringToNodes
15
15
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Logs
3
- } from "../../chunks/chunk-QN3UAKIU.js";
4
- import "../../chunks/chunk-L3OCRR3V.js";
3
+ } from "../../chunks/chunk-MJQF3YZO.js";
5
4
  import "../../chunks/chunk-RASMASS4.js";
5
+ import "../../chunks/chunk-L3OCRR3V.js";
6
6
  import "../../chunks/chunk-H4PP6AHP.js";
7
7
  import {
8
- Cast
9
- } from "../../chunks/chunk-SNJJII7A.js";
8
+ Assert
9
+ } from "../../chunks/chunk-W7YBGJ4H.js";
10
10
  import {
11
11
  Crawler
12
12
  } from "../../chunks/chunk-YUP434IY.js";
@@ -15,17 +15,11 @@ import {
15
15
  } from "../../chunks/chunk-7AWTHZLY.js";
16
16
  import {
17
17
  LoremIpsum
18
- } from "../../chunks/chunk-RHV7UOXD.js";
19
- import "../../chunks/chunk-4CIS3R7T.js";
18
+ } from "../../chunks/chunk-7VL2O6SQ.js";
20
19
  import {
21
- Assert
22
- } from "../../chunks/chunk-W7YBGJ4H.js";
23
- import "../../chunks/chunk-6RGDWX4A.js";
24
- import {
25
- isConstructorFunction
26
- } from "../../chunks/chunk-RCO57B6F.js";
27
- import "../../chunks/chunk-RLAZR3NL.js";
28
- import "../../chunks/chunk-YS6WMSWC.js";
20
+ Cast
21
+ } from "../../chunks/chunk-SNJJII7A.js";
22
+ import "../../chunks/chunk-4CIS3R7T.js";
29
23
  import "../../chunks/chunk-FCU6IHKD.js";
30
24
  import {
31
25
  Crossenv
@@ -35,16 +29,22 @@ import "../../chunks/chunk-S2NMAH7K.js";
35
29
  import "../../chunks/chunk-LV2VMOWR.js";
36
30
  import {
37
31
  Random
38
- } from "../../chunks/chunk-OVG5RGI3.js";
32
+ } from "../../chunks/chunk-S32K7POB.js";
33
+ import "../../chunks/chunk-D3ERTRDW.js";
39
34
  import "../../chunks/chunk-75BICI4L.js";
40
35
  import "../../chunks/chunk-OGBUSUE6.js";
41
- import "../../chunks/chunk-D3ERTRDW.js";
42
36
  import "../../chunks/chunk-QXAJXTXV.js";
43
37
  import {
44
38
  isNotNullish,
45
39
  isNullish,
46
40
  nullishValues
47
41
  } from "../../chunks/chunk-HC6ZOHCS.js";
42
+ import "../../chunks/chunk-RLAZR3NL.js";
43
+ import "../../chunks/chunk-YS6WMSWC.js";
44
+ import "../../chunks/chunk-6RGDWX4A.js";
45
+ import {
46
+ isConstructorFunction
47
+ } from "../../chunks/chunk-RCO57B6F.js";
48
48
 
49
49
  // src/agnostic/misc/index.ts
50
50
  var Misc;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Logs
3
- } from "../../../chunks/chunk-QN3UAKIU.js";
4
- import "../../../chunks/chunk-L3OCRR3V.js";
3
+ } from "../../../chunks/chunk-MJQF3YZO.js";
5
4
  import "../../../chunks/chunk-RASMASS4.js";
5
+ import "../../../chunks/chunk-L3OCRR3V.js";
6
6
  import "../../../chunks/chunk-H4PP6AHP.js";
7
7
  export {
8
8
  Logs
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  LoremIpsum
3
- } from "../../../chunks/chunk-RHV7UOXD.js";
4
- import "../../../chunks/chunk-6RGDWX4A.js";
5
- import "../../../chunks/chunk-RCO57B6F.js";
6
- import "../../../chunks/chunk-RLAZR3NL.js";
7
- import "../../../chunks/chunk-YS6WMSWC.js";
3
+ } from "../../../chunks/chunk-7VL2O6SQ.js";
8
4
  import "../../../chunks/chunk-FCU6IHKD.js";
9
- import "../../../chunks/chunk-OVG5RGI3.js";
5
+ import "../../../chunks/chunk-S32K7POB.js";
6
+ import "../../../chunks/chunk-D3ERTRDW.js";
10
7
  import "../../../chunks/chunk-75BICI4L.js";
11
8
  import "../../../chunks/chunk-OGBUSUE6.js";
12
- import "../../../chunks/chunk-D3ERTRDW.js";
9
+ import "../../../chunks/chunk-RLAZR3NL.js";
10
+ import "../../../chunks/chunk-YS6WMSWC.js";
11
+ import "../../../chunks/chunk-6RGDWX4A.js";
12
+ import "../../../chunks/chunk-RCO57B6F.js";
13
13
  export {
14
14
  LoremIpsum
15
15
  };
@@ -1,19 +1,6 @@
1
- // src/agnostic/misc/outcome/index.ts
2
- var Outcome;
3
- ((Outcome2) => {
4
- function makeSuccess(payload) {
5
- return { success: true, payload };
6
- }
7
- Outcome2.makeSuccess = makeSuccess;
8
- function makeFailure(error) {
9
- return { success: false, error };
10
- }
11
- Outcome2.makeFailure = makeFailure;
12
- function make(success, payloadOrError) {
13
- return success ? makeSuccess(payloadOrError) : makeFailure(payloadOrError);
14
- }
15
- Outcome2.make = make;
16
- })(Outcome || (Outcome = {}));
1
+ import {
2
+ Outcome
3
+ } from "../../../chunks/chunk-JMU5PDBD.js";
17
4
  export {
18
5
  Outcome
19
6
  };
@@ -1,16 +1,16 @@
1
+ import {
2
+ clamp
3
+ } from "../../chunks/chunk-OSAXBA7G.js";
1
4
  import {
2
5
  absoluteModulo
3
6
  } from "../../chunks/chunk-DNIOWD7K.js";
7
+ import {
8
+ interpolate
9
+ } from "../../chunks/chunk-BJAYUP7M.js";
4
10
  import {
5
11
  createScale,
6
12
  getHarmonic
7
13
  } from "../../chunks/chunk-UYTXXUU7.js";
8
- import {
9
- clamp
10
- } from "../../chunks/chunk-OSAXBA7G.js";
11
- import {
12
- interpolate
13
- } from "../../chunks/chunk-BJAYUP7M.js";
14
14
  import {
15
15
  round
16
16
  } from "../../chunks/chunk-32IRF4OP.js";
@@ -0,0 +1 @@
1
+ export declare function deepGetProperty(anythingThatHasProperties: unknown, pathString: string): any;