@hyperfixi/core 2.10.0 → 2.11.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 (43) hide show
  1. package/dist/ast-utils/index.js +109 -8
  2. package/dist/ast-utils/index.mjs +109 -8
  3. package/dist/behaviors/index.js +2 -1
  4. package/dist/behaviors/index.mjs +2 -1
  5. package/dist/chunks/{bridge-CPNAPYAo.js → bridge-De7lnU_9.js} +2 -2
  6. package/dist/chunks/browser-modular-DpHHlmJ0.js +2 -0
  7. package/dist/chunks/{index-BQkkNlzO.js → index-D6-8bcsy.js} +2 -2
  8. package/dist/commands/helpers/dom-mutation.d.ts +3 -2
  9. package/dist/commands/helpers/index.d.ts +1 -1
  10. package/dist/commands/index.js +74 -8
  11. package/dist/commands/index.mjs +74 -8
  12. package/dist/hyperfixi-browser-classic-i18n.js +1 -1
  13. package/dist/hyperfixi-browser-minimal.js +1 -1
  14. package/dist/hyperfixi-browser-standard.js +1 -1
  15. package/dist/hyperfixi-browser.js +1 -1
  16. package/dist/hyperfixi-classic-i18n.js +1 -1
  17. package/dist/hyperfixi-hx-v4.js +1 -1
  18. package/dist/hyperfixi-minimal.js +1 -1
  19. package/dist/hyperfixi-multilingual.js +1 -1
  20. package/dist/hyperfixi-standard.js +1 -1
  21. package/dist/hyperfixi.js +1 -1
  22. package/dist/hyperfixi.mjs +1 -1
  23. package/dist/index.js +224 -33
  24. package/dist/index.min.js +1 -1
  25. package/dist/index.mjs +224 -33
  26. package/dist/lokascript-browser-classic-i18n.js +1 -1
  27. package/dist/lokascript-browser-minimal.js +1 -1
  28. package/dist/lokascript-browser-standard.js +1 -1
  29. package/dist/lokascript-browser.js +1 -1
  30. package/dist/lokascript-multilingual.js +1 -1
  31. package/dist/lsp-metadata.js +2 -2
  32. package/dist/lsp-metadata.mjs +2 -2
  33. package/dist/metadata.d.ts +1 -1
  34. package/dist/metadata.js +13 -11
  35. package/dist/metadata.mjs +13 -11
  36. package/dist/reference/index.js +7 -2
  37. package/dist/reference/index.mjs +7 -2
  38. package/dist/registry/index.js +6 -4
  39. package/dist/registry/index.mjs +6 -4
  40. package/dist/utils/element-check.d.ts +1 -0
  41. package/dist/version.d.ts +2 -0
  42. package/package.json +5 -5
  43. package/dist/chunks/browser-modular-B0lGdcoP.js +0 -2
@@ -167,8 +167,8 @@ const HOVER_DOCS = {
167
167
  },
168
168
  put: {
169
169
  title: 'put',
170
- description: 'Sets the content of an element.',
171
- example: 'put "Hello" into #message\nput response into #results',
170
+ description: 'Sets the content of an element. An array of elements is moved in order (an in-place reorder when they are already children of the target).',
171
+ example: 'put "Hello" into #message\nput response into #results\nput <tr/> in me sorted by its @data-price as Number at end of me',
172
172
  category: 'command',
173
173
  },
174
174
  set: {
@@ -165,8 +165,8 @@ const HOVER_DOCS = {
165
165
  },
166
166
  put: {
167
167
  title: 'put',
168
- description: 'Sets the content of an element.',
169
- example: 'put "Hello" into #message\nput response into #results',
168
+ description: 'Sets the content of an element. An array of elements is moved in order (an in-place reorder when they are already children of the target).',
169
+ example: 'put "Hello" into #message\nput response into #results\nput <tr/> in me sorted by its @data-price as Number at end of me',
170
170
  category: 'command',
171
171
  },
172
172
  set: {
@@ -1,6 +1,6 @@
1
1
  export declare const packageInfo: {
2
2
  readonly name: "@hyperfixi/core";
3
- readonly version: "2.7.2";
3
+ readonly version: "2.10.0";
4
4
  readonly description: "Modern hyperscript engine with fixi/htmx integration";
5
5
  readonly compatibility: "~85% official _hyperscript";
6
6
  readonly languages: 24;
package/dist/metadata.js CHANGED
@@ -62,10 +62,12 @@ const COMMAND_NAMES = [
62
62
  'wait',
63
63
  ];
64
64
 
65
+ const VERSION = '2.10.0';
66
+
65
67
  const FULL_RUNTIME_COMMAND_COUNT = COMMAND_NAMES.length;
66
68
  const packageInfo = {
67
69
  name: '@hyperfixi/core',
68
- version: '2.7.2',
70
+ version: VERSION,
69
71
  description: 'Modern hyperscript engine with fixi/htmx integration',
70
72
  compatibility: '~85% official _hyperscript',
71
73
  languages: 24,
@@ -146,8 +148,8 @@ const bundleInfo = [
146
148
  id: 'hybrid-hx-v4',
147
149
  name: 'Hybrid HX v4',
148
150
  filename: 'hyperfixi-hx-v4.js',
149
- gzipSize: '320.9 KB',
150
- rawSize: '1490 KB',
151
+ gzipSize: '322.4 KB',
152
+ rawSize: '1501 KB',
151
153
  commandCount: FULL_RUNTIME_COMMAND_COUNT,
152
154
  parser: 'full',
153
155
  hasBlocks: true,
@@ -163,8 +165,8 @@ const bundleInfo = [
163
165
  id: 'minimal',
164
166
  name: 'Minimal',
165
167
  filename: 'hyperfixi-minimal.js',
166
- gzipSize: '71.5 KB',
167
- rawSize: '289 KB',
168
+ gzipSize: '71.9 KB',
169
+ rawSize: '292 KB',
168
170
  commandCount: 10,
169
171
  parser: 'full',
170
172
  hasBlocks: true,
@@ -180,8 +182,8 @@ const bundleInfo = [
180
182
  id: 'standard',
181
183
  name: 'Standard',
182
184
  filename: 'hyperfixi-standard.js',
183
- gzipSize: '78.3 KB',
184
- rawSize: '317 KB',
185
+ gzipSize: '78.8 KB',
186
+ rawSize: '321 KB',
185
187
  commandCount: 25,
186
188
  parser: 'full',
187
189
  hasBlocks: true,
@@ -197,8 +199,8 @@ const bundleInfo = [
197
199
  id: 'browser',
198
200
  name: 'Full Browser',
199
201
  filename: 'hyperfixi.js',
200
- gzipSize: '309.1 KB',
201
- rawSize: '1453 KB',
202
+ gzipSize: '310.8 KB',
203
+ rawSize: '1464 KB',
202
204
  commandCount: FULL_RUNTIME_COMMAND_COUNT,
203
205
  parser: 'full',
204
206
  hasBlocks: true,
@@ -214,8 +216,8 @@ const bundleInfo = [
214
216
  id: 'multilingual',
215
217
  name: 'Multilingual',
216
218
  filename: 'hyperfixi-multilingual.js',
217
- gzipSize: '93.4 KB',
218
- rawSize: '380 KB',
219
+ gzipSize: '94.5 KB',
220
+ rawSize: '388 KB',
219
221
  commandCount: 52,
220
222
  parser: 'full',
221
223
  hasBlocks: true,
package/dist/metadata.mjs CHANGED
@@ -60,10 +60,12 @@ const COMMAND_NAMES = [
60
60
  'wait',
61
61
  ];
62
62
 
63
+ const VERSION = '2.10.0';
64
+
63
65
  const FULL_RUNTIME_COMMAND_COUNT = COMMAND_NAMES.length;
64
66
  const packageInfo = {
65
67
  name: '@hyperfixi/core',
66
- version: '2.7.2',
68
+ version: VERSION,
67
69
  description: 'Modern hyperscript engine with fixi/htmx integration',
68
70
  compatibility: '~85% official _hyperscript',
69
71
  languages: 24,
@@ -144,8 +146,8 @@ const bundleInfo = [
144
146
  id: 'hybrid-hx-v4',
145
147
  name: 'Hybrid HX v4',
146
148
  filename: 'hyperfixi-hx-v4.js',
147
- gzipSize: '320.9 KB',
148
- rawSize: '1490 KB',
149
+ gzipSize: '322.4 KB',
150
+ rawSize: '1501 KB',
149
151
  commandCount: FULL_RUNTIME_COMMAND_COUNT,
150
152
  parser: 'full',
151
153
  hasBlocks: true,
@@ -161,8 +163,8 @@ const bundleInfo = [
161
163
  id: 'minimal',
162
164
  name: 'Minimal',
163
165
  filename: 'hyperfixi-minimal.js',
164
- gzipSize: '71.5 KB',
165
- rawSize: '289 KB',
166
+ gzipSize: '71.9 KB',
167
+ rawSize: '292 KB',
166
168
  commandCount: 10,
167
169
  parser: 'full',
168
170
  hasBlocks: true,
@@ -178,8 +180,8 @@ const bundleInfo = [
178
180
  id: 'standard',
179
181
  name: 'Standard',
180
182
  filename: 'hyperfixi-standard.js',
181
- gzipSize: '78.3 KB',
182
- rawSize: '317 KB',
183
+ gzipSize: '78.8 KB',
184
+ rawSize: '321 KB',
183
185
  commandCount: 25,
184
186
  parser: 'full',
185
187
  hasBlocks: true,
@@ -195,8 +197,8 @@ const bundleInfo = [
195
197
  id: 'browser',
196
198
  name: 'Full Browser',
197
199
  filename: 'hyperfixi.js',
198
- gzipSize: '309.1 KB',
199
- rawSize: '1453 KB',
200
+ gzipSize: '310.8 KB',
201
+ rawSize: '1464 KB',
200
202
  commandCount: FULL_RUNTIME_COMMAND_COUNT,
201
203
  parser: 'full',
202
204
  hasBlocks: true,
@@ -212,8 +214,8 @@ const bundleInfo = [
212
214
  id: 'multilingual',
213
215
  name: 'Multilingual',
214
216
  filename: 'hyperfixi-multilingual.js',
215
- gzipSize: '93.4 KB',
216
- rawSize: '380 KB',
217
+ gzipSize: '94.5 KB',
218
+ rawSize: '388 KB',
217
219
  commandCount: 52,
218
220
  parser: 'full',
219
221
  hasBlocks: true,
@@ -44,10 +44,15 @@ const commands = {
44
44
  put: {
45
45
  name: 'put',
46
46
  description: 'Set content or values',
47
- syntax: 'put value into target',
47
+ syntax: 'put value into|before|after|at start of|at end of target',
48
48
  category: 'dom',
49
49
  availability: 'lite',
50
- examples: ['put "Hello" into #output', 'put it into me', "put '<p>New</p>' into #container"],
50
+ examples: [
51
+ 'put "Hello" into #output',
52
+ 'put it into me',
53
+ "put '<p>New</p>' into #container",
54
+ 'put <tr/> in me sorted by its @data-price as Number at end of me',
55
+ ],
51
56
  },
52
57
  make: {
53
58
  name: 'make',
@@ -42,10 +42,15 @@ const commands = {
42
42
  put: {
43
43
  name: 'put',
44
44
  description: 'Set content or values',
45
- syntax: 'put value into target',
45
+ syntax: 'put value into|before|after|at start of|at end of target',
46
46
  category: 'dom',
47
47
  availability: 'lite',
48
- examples: ['put "Hello" into #output', 'put it into me', "put '<p>New</p>' into #container"],
48
+ examples: [
49
+ 'put "Hello" into #output',
50
+ 'put it into me',
51
+ "put '<p>New</p>' into #container",
52
+ 'put <tr/> in me sorted by its @data-price as Number at end of me',
53
+ ],
49
54
  },
50
55
  make: {
51
56
  name: 'make',
@@ -9907,6 +9907,12 @@ function evaluateLiteral(node) {
9907
9907
  }
9908
9908
  async function evaluateIdentifier(node, context) {
9909
9909
  const name = node.name;
9910
+ if (name.startsWith('$')) {
9911
+ notifyGlobalRead(name.slice(1), context);
9912
+ }
9913
+ else if (node.scope === 'global') {
9914
+ notifyGlobalRead(name, context);
9915
+ }
9910
9916
  if (name === 'me' || name === 'my' || name === 'I') {
9911
9917
  return getExpr(context, 'me').evaluate(context);
9912
9918
  }
@@ -9926,7 +9932,6 @@ async function evaluateIdentifier(node, context) {
9926
9932
  return getExpr(context, 'document').evaluate(context);
9927
9933
  }
9928
9934
  if (node.scope === 'global' && context.globals?.has(name)) {
9929
- notifyGlobalRead(name, context);
9930
9935
  return context.globals.get(name);
9931
9936
  }
9932
9937
  if (node.scope === 'element') {
@@ -9937,12 +9942,9 @@ async function evaluateIdentifier(node, context) {
9937
9942
  return context.locals.get(name);
9938
9943
  }
9939
9944
  if (context.globals && context.globals.has(name)) {
9940
- if (name.startsWith('$'))
9941
- notifyGlobalRead(name.slice(1), context);
9942
9945
  return context.globals.get(name);
9943
9946
  }
9944
9947
  if (name.startsWith('$') && context.globals && context.globals.has(name.slice(1))) {
9945
- notifyGlobalRead(name.slice(1), context);
9946
9948
  return context.globals.get(name.slice(1));
9947
9949
  }
9948
9950
  if (context[name] !== undefined) {
@@ -9905,6 +9905,12 @@ function evaluateLiteral(node) {
9905
9905
  }
9906
9906
  async function evaluateIdentifier(node, context) {
9907
9907
  const name = node.name;
9908
+ if (name.startsWith('$')) {
9909
+ notifyGlobalRead(name.slice(1), context);
9910
+ }
9911
+ else if (node.scope === 'global') {
9912
+ notifyGlobalRead(name, context);
9913
+ }
9908
9914
  if (name === 'me' || name === 'my' || name === 'I') {
9909
9915
  return getExpr(context, 'me').evaluate(context);
9910
9916
  }
@@ -9924,7 +9930,6 @@ async function evaluateIdentifier(node, context) {
9924
9930
  return getExpr(context, 'document').evaluate(context);
9925
9931
  }
9926
9932
  if (node.scope === 'global' && context.globals?.has(name)) {
9927
- notifyGlobalRead(name, context);
9928
9933
  return context.globals.get(name);
9929
9934
  }
9930
9935
  if (node.scope === 'element') {
@@ -9935,12 +9940,9 @@ async function evaluateIdentifier(node, context) {
9935
9940
  return context.locals.get(name);
9936
9941
  }
9937
9942
  if (context.globals && context.globals.has(name)) {
9938
- if (name.startsWith('$'))
9939
- notifyGlobalRead(name.slice(1), context);
9940
9943
  return context.globals.get(name);
9941
9944
  }
9942
9945
  if (name.startsWith('$') && context.globals && context.globals.has(name.slice(1))) {
9943
- notifyGlobalRead(name.slice(1), context);
9944
9946
  return context.globals.get(name.slice(1));
9945
9947
  }
9946
9948
  if (context[name] !== undefined) {
@@ -1,6 +1,7 @@
1
1
  export declare function isHTMLElement(value: unknown): value is HTMLElement;
2
2
  export declare function isNode(value: unknown): value is Node;
3
3
  export declare function isElement(value: unknown): value is Element;
4
+ export declare function isInsertableNode(value: unknown): value is Node;
4
5
  export declare function isEventTarget(value: unknown): value is EventTarget;
5
6
  export declare function isNodeList(value: unknown): value is NodeList;
6
7
  export declare function isDocumentFragment(value: unknown): value is DocumentFragment;
@@ -0,0 +1,2 @@
1
+ export declare const VERSION = "2.10.0";
2
+ //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperfixi/core",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "Multilingual, tree-shakeable hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -284,14 +284,14 @@
284
284
  "access": "public"
285
285
  },
286
286
  "dependencies": {
287
- "@lokascript/intent": "^2.10.0",
288
- "@lokascript/semantic": "^2.10.0",
287
+ "@lokascript/intent": "^2.11.0",
288
+ "@lokascript/semantic": "^2.11.0",
289
289
  "morphlex": "^1.4.0",
290
290
  "tslib": "^2.8.1"
291
291
  },
292
292
  "peerDependencies": {
293
- "@hyperfixi/patterns-reference": "^2.10.0",
294
- "@lokascript/framework": "^2.10.0"
293
+ "@hyperfixi/patterns-reference": "^2.11.0",
294
+ "@lokascript/framework": "^2.11.0"
295
295
  },
296
296
  "peerDependenciesMeta": {
297
297
  "@hyperfixi/patterns-reference": {