@hyperfixi/core 2.3.0 → 2.3.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.
Files changed (36) hide show
  1. package/README.md +8 -11
  2. package/dist/bundle-generator/index.js +25 -4
  3. package/dist/bundle-generator/index.mjs +25 -4
  4. package/dist/chunks/{bridge-BlRqsZT4.js → bridge-Clbh_xAj.js} +2 -2
  5. package/dist/chunks/browser-modular-DIOxQqhV.js +2 -0
  6. package/dist/chunks/{index-BDYQHwCF.js → index-DcxoRUBe.js} +2 -2
  7. package/dist/commands/index.js +22 -3
  8. package/dist/commands/index.mjs +22 -3
  9. package/dist/hyperfixi-classic-i18n.js +1 -1
  10. package/dist/hyperfixi-hx.js +1 -1
  11. package/dist/hyperfixi-hybrid-complete.js +1 -1
  12. package/dist/hyperfixi-minimal.js +1 -1
  13. package/dist/hyperfixi-multilingual.js +1 -1
  14. package/dist/hyperfixi-standard.js +1 -1
  15. package/dist/hyperfixi.js +1 -1
  16. package/dist/hyperfixi.mjs +1 -1
  17. package/dist/index.js +22 -3
  18. package/dist/index.min.js +1 -1
  19. package/dist/index.mjs +22 -3
  20. package/dist/lokascript-browser-classic-i18n.js +1 -1
  21. package/dist/lokascript-browser-minimal.js +1 -1
  22. package/dist/lokascript-browser-standard.js +1 -1
  23. package/dist/lokascript-browser.js +1 -1
  24. package/dist/lokascript-hybrid-complete.js +1 -1
  25. package/dist/lokascript-hybrid-hx.js +1 -1
  26. package/dist/lokascript-multilingual.js +1 -1
  27. package/dist/parser/hybrid/index.js +7 -0
  28. package/dist/parser/hybrid/index.mjs +7 -0
  29. package/dist/parser/hybrid/parser-core.js +7 -0
  30. package/dist/parser/hybrid/parser-core.mjs +7 -0
  31. package/dist/parser/hybrid/tokenizer.js +7 -0
  32. package/dist/parser/hybrid/tokenizer.mjs +7 -0
  33. package/dist/parser/hybrid-parser.js +7 -0
  34. package/dist/parser/hybrid-parser.mjs +7 -0
  35. package/package.json +1 -1
  36. package/dist/chunks/browser-modular-AbV0Ql4i.js +0 -2
@@ -155,6 +155,13 @@ function tokenize(code) {
155
155
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
156
156
  continue;
157
157
  }
158
+ if (code[pos] === '@') {
159
+ pos++;
160
+ while (pos < code.length && /[\w-]/.test(code[pos]))
161
+ pos++;
162
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
163
+ continue;
164
+ }
158
165
  if (code[pos] === '#' || code[pos] === '.') {
159
166
  if (code[pos] === '.') {
160
167
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -153,6 +153,13 @@ function tokenize(code) {
153
153
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
154
154
  continue;
155
155
  }
156
+ if (code[pos] === '@') {
157
+ pos++;
158
+ while (pos < code.length && /[\w-]/.test(code[pos]))
159
+ pos++;
160
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
161
+ continue;
162
+ }
156
163
  if (code[pos] === '#' || code[pos] === '.') {
157
164
  if (code[pos] === '.') {
158
165
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -155,6 +155,13 @@ function tokenize(code) {
155
155
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
156
156
  continue;
157
157
  }
158
+ if (code[pos] === '@') {
159
+ pos++;
160
+ while (pos < code.length && /[\w-]/.test(code[pos]))
161
+ pos++;
162
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
163
+ continue;
164
+ }
158
165
  if (code[pos] === '#' || code[pos] === '.') {
159
166
  if (code[pos] === '.') {
160
167
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -153,6 +153,13 @@ function tokenize(code) {
153
153
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
154
154
  continue;
155
155
  }
156
+ if (code[pos] === '@') {
157
+ pos++;
158
+ while (pos < code.length && /[\w-]/.test(code[pos]))
159
+ pos++;
160
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
161
+ continue;
162
+ }
156
163
  if (code[pos] === '#' || code[pos] === '.') {
157
164
  if (code[pos] === '.') {
158
165
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -155,6 +155,13 @@ function tokenize(code) {
155
155
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
156
156
  continue;
157
157
  }
158
+ if (code[pos] === '@') {
159
+ pos++;
160
+ while (pos < code.length && /[\w-]/.test(code[pos]))
161
+ pos++;
162
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
163
+ continue;
164
+ }
158
165
  if (code[pos] === '#' || code[pos] === '.') {
159
166
  if (code[pos] === '.') {
160
167
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -153,6 +153,13 @@ function tokenize(code) {
153
153
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
154
154
  continue;
155
155
  }
156
+ if (code[pos] === '@') {
157
+ pos++;
158
+ while (pos < code.length && /[\w-]/.test(code[pos]))
159
+ pos++;
160
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
161
+ continue;
162
+ }
156
163
  if (code[pos] === '#' || code[pos] === '.') {
157
164
  if (code[pos] === '.') {
158
165
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -155,6 +155,13 @@ function tokenize(code) {
155
155
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
156
156
  continue;
157
157
  }
158
+ if (code[pos] === '@') {
159
+ pos++;
160
+ while (pos < code.length && /[\w-]/.test(code[pos]))
161
+ pos++;
162
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
163
+ continue;
164
+ }
158
165
  if (code[pos] === '#' || code[pos] === '.') {
159
166
  if (code[pos] === '.') {
160
167
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
@@ -153,6 +153,13 @@ function tokenize(code) {
153
153
  tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
154
154
  continue;
155
155
  }
156
+ if (code[pos] === '@') {
157
+ pos++;
158
+ while (pos < code.length && /[\w-]/.test(code[pos]))
159
+ pos++;
160
+ tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
161
+ continue;
162
+ }
156
163
  if (code[pos] === '#' || code[pos] === '.') {
157
164
  if (code[pos] === '.') {
158
165
  const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperfixi/core",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Multilingual, tree-shakeable hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",