@hyperfixi/core 3.1.1 → 3.3.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.
- package/README.md +28 -36
- package/dist/ast/command-slots.d.ts +1 -1
- package/dist/ast/nodes.d.ts +2 -0
- package/dist/ast-utils/index.cjs +193 -48
- package/dist/ast-utils/index.mjs +193 -48
- package/dist/ast-utils/interchange/types.d.ts +19 -1
- package/dist/behaviors/index.cjs +19 -0
- package/dist/behaviors/index.mjs +19 -0
- package/dist/bundle-generator/index.cjs +36 -17
- package/dist/bundle-generator/index.mjs +36 -17
- package/dist/bundle-generator/parser-templates.d.ts +1 -1
- package/dist/chunks/bridge-CI9SOl8u.js +2 -0
- package/dist/chunks/browser-modular-7CpI5VF2.js +2 -0
- package/dist/chunks/index-BwXDEK0m.js +2 -0
- package/dist/chunks/index-DQi2o8Lk.js +2 -0
- package/dist/chunks/index-uCOQ8Qn0.js +2 -0
- package/dist/commands/animation/transition.d.ts +12 -6
- package/dist/commands/helpers/loop-executor.d.ts +2 -2
- package/dist/commands/helpers/numeric-target-parser.d.ts +1 -1
- package/dist/commands/helpers/variable-access.d.ts +5 -2
- package/dist/commands/helpers/write-target.d.ts +5 -0
- package/dist/commands/index.cjs +938 -425
- package/dist/commands/index.mjs +938 -425
- package/dist/commands/templates/render.d.ts +4 -4
- package/dist/commands/utility/beep.d.ts +0 -3
- package/dist/expressions/index.cjs +7 -13
- package/dist/expressions/index.mjs +7 -13
- package/dist/htmx/i18n-hooks.d.ts +4 -1
- package/dist/hyperfixi-browser-classic-i18n.js +1 -1
- package/dist/hyperfixi-browser.js +1 -1
- package/dist/hyperfixi-classic-i18n.js +1 -1
- package/dist/hyperfixi-hx-v4.js +1 -1
- package/dist/hyperfixi-hx.js +1 -1
- package/dist/hyperfixi-hybrid-complete.js +1 -1
- package/dist/hyperfixi-hybrid-hx.js +1 -1
- package/dist/hyperfixi-multilingual.js +1 -1
- package/dist/hyperfixi.js +1 -1
- package/dist/hyperfixi.mjs +1 -1
- package/dist/index.cjs +1149 -485
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +1149 -485
- package/dist/lib/swap-executor.d.ts +1 -1
- package/dist/lokascript-browser-classic-i18n.js +1 -1
- package/dist/lokascript-browser.js +1 -1
- package/dist/lokascript-hybrid-complete.js +1 -1
- package/dist/lokascript-hybrid-hx.js +1 -1
- package/dist/lokascript-multilingual.js +1 -1
- package/dist/metadata.cjs +9 -9
- package/dist/metadata.d.ts +1 -1
- package/dist/metadata.mjs +9 -9
- package/dist/parser/command-grammar.d.ts +1 -0
- package/dist/parser/full-parser.cjs +396 -153
- package/dist/parser/full-parser.mjs +396 -153
- package/dist/parser/helpers/parsing-helpers.d.ts +3 -0
- package/dist/parser/hybrid/index.cjs +3 -0
- package/dist/parser/hybrid/index.mjs +3 -0
- package/dist/parser/hybrid/parser-core.cjs +3 -0
- package/dist/parser/hybrid/parser-core.mjs +3 -0
- package/dist/parser/hybrid-parser.cjs +3 -0
- package/dist/parser/hybrid-parser.mjs +3 -0
- package/dist/parser/parser-types.d.ts +2 -0
- package/dist/parser/parser.d.ts +9 -0
- package/dist/parser/pratt-parser.d.ts +2 -0
- package/dist/registry/index.cjs +535 -210
- package/dist/registry/index.mjs +535 -210
- package/dist/utils/beep.d.ts +8 -0
- package/dist/version.d.ts +1 -1
- package/package.json +21 -18
- package/vocab/htmx/ar.js +22 -20
- package/vocab/htmx/bn.js +21 -5
- package/vocab/htmx/de.js +33 -10
- package/vocab/htmx/en.js +4 -1
- package/vocab/htmx/es.js +28 -9
- package/vocab/htmx/fr.js +28 -8
- package/vocab/htmx/he.js +22 -1
- package/vocab/htmx/hi.js +28 -7
- package/vocab/htmx/id.js +29 -10
- package/vocab/htmx/it.js +26 -5
- package/vocab/htmx/ja.js +36 -11
- package/vocab/htmx/ko.js +27 -6
- package/vocab/htmx/ms.js +24 -1
- package/vocab/htmx/pl.js +27 -7
- package/vocab/htmx/pt.js +30 -9
- package/vocab/htmx/qu.js +32 -9
- package/vocab/htmx/ru.js +28 -6
- package/vocab/htmx/sw.js +28 -8
- package/vocab/htmx/th.js +19 -1
- package/vocab/htmx/tl.js +24 -1
- package/vocab/htmx/tr.js +34 -8
- package/vocab/htmx/uk.js +28 -6
- package/vocab/htmx/vi.js +27 -19
- package/vocab/htmx/zh.js +28 -9
- package/dist/chunks/bridge-D7qrHhV0.js +0 -2
- package/dist/chunks/browser-modular-C4LFxfoS.js +0 -2
- package/dist/chunks/index-C7lqD4mo.js +0 -2
- package/dist/chunks/index-CAPhqA6k.js +0 -2
- package/dist/chunks/index-CLdRyZaP.js +0 -2
|
@@ -13,4 +13,7 @@ export declare function parseMaybeNamedArgument(ctx: ParserContext): {
|
|
|
13
13
|
name?: string;
|
|
14
14
|
value: ASTNode;
|
|
15
15
|
};
|
|
16
|
+
export declare function isNakedNamedArgStart(ctx: ParserContext): boolean;
|
|
17
|
+
export declare function parseNakedNamedArgs(ctx: ParserContext, parseValue: () => ASTNode | null, command: string): ASTNode;
|
|
18
|
+
export declare function isGluedBeepBang(beep: Token | null | undefined, bang: Token | null | undefined): boolean;
|
|
16
19
|
//# sourceMappingURL=parsing-helpers.d.ts.map
|
|
@@ -964,6 +964,9 @@ class HybridParser {
|
|
|
964
964
|
return left;
|
|
965
965
|
}
|
|
966
966
|
parseUnary() {
|
|
967
|
+
if (this.match('beep') && this.peek(1).value === '!') {
|
|
968
|
+
throw new Error(`'beep!' needs the full parser (use hyperfixi.js)`);
|
|
969
|
+
}
|
|
967
970
|
if (this.match('not', '!')) {
|
|
968
971
|
this.advance();
|
|
969
972
|
return { type: 'unary', operator: 'not', operand: this.parseUnary() };
|
|
@@ -962,6 +962,9 @@ class HybridParser {
|
|
|
962
962
|
return left;
|
|
963
963
|
}
|
|
964
964
|
parseUnary() {
|
|
965
|
+
if (this.match('beep') && this.peek(1).value === '!') {
|
|
966
|
+
throw new Error(`'beep!' needs the full parser (use hyperfixi.js)`);
|
|
967
|
+
}
|
|
965
968
|
if (this.match('not', '!')) {
|
|
966
969
|
this.advance();
|
|
967
970
|
return { type: 'unary', operator: 'not', operand: this.parseUnary() };
|
|
@@ -958,6 +958,9 @@ class HybridParser {
|
|
|
958
958
|
return left;
|
|
959
959
|
}
|
|
960
960
|
parseUnary() {
|
|
961
|
+
if (this.match('beep') && this.peek(1).value === '!') {
|
|
962
|
+
throw new Error(`'beep!' needs the full parser (use hyperfixi.js)`);
|
|
963
|
+
}
|
|
961
964
|
if (this.match('not', '!')) {
|
|
962
965
|
this.advance();
|
|
963
966
|
return { type: 'unary', operator: 'not', operand: this.parseUnary() };
|
|
@@ -956,6 +956,9 @@ class HybridParser {
|
|
|
956
956
|
return left;
|
|
957
957
|
}
|
|
958
958
|
parseUnary() {
|
|
959
|
+
if (this.match('beep') && this.peek(1).value === '!') {
|
|
960
|
+
throw new Error(`'beep!' needs the full parser (use hyperfixi.js)`);
|
|
961
|
+
}
|
|
959
962
|
if (this.match('not', '!')) {
|
|
960
963
|
this.advance();
|
|
961
964
|
return { type: 'unary', operator: 'not', operand: this.parseUnary() };
|
|
@@ -964,6 +964,9 @@ class HybridParser {
|
|
|
964
964
|
return left;
|
|
965
965
|
}
|
|
966
966
|
parseUnary() {
|
|
967
|
+
if (this.match('beep') && this.peek(1).value === '!') {
|
|
968
|
+
throw new Error(`'beep!' needs the full parser (use hyperfixi.js)`);
|
|
969
|
+
}
|
|
967
970
|
if (this.match('not', '!')) {
|
|
968
971
|
this.advance();
|
|
969
972
|
return { type: 'unary', operator: 'not', operand: this.parseUnary() };
|
|
@@ -962,6 +962,9 @@ class HybridParser {
|
|
|
962
962
|
return left;
|
|
963
963
|
}
|
|
964
964
|
parseUnary() {
|
|
965
|
+
if (this.match('beep') && this.peek(1).value === '!') {
|
|
966
|
+
throw new Error(`'beep!' needs the full parser (use hyperfixi.js)`);
|
|
967
|
+
}
|
|
965
968
|
if (this.match('not', '!')) {
|
|
966
969
|
this.advance();
|
|
967
970
|
return { type: 'unary', operator: 'not', operand: this.parseUnary() };
|
|
@@ -31,6 +31,7 @@ export interface CallExpressionNode extends ASTNode {
|
|
|
31
31
|
type: 'callExpression';
|
|
32
32
|
callee: ASTNode;
|
|
33
33
|
arguments: ASTNode[];
|
|
34
|
+
closestTo?: ASTNode;
|
|
34
35
|
}
|
|
35
36
|
export interface MemberExpressionNode extends ASTNode {
|
|
36
37
|
type: 'memberExpression';
|
|
@@ -90,6 +91,7 @@ export interface TokenStream {
|
|
|
90
91
|
match(...types: string[]): boolean;
|
|
91
92
|
matchOperator(operator: string): boolean;
|
|
92
93
|
isAtEnd(): boolean;
|
|
94
|
+
atEndOfInput(): boolean;
|
|
93
95
|
peekAt(offset: number): Token | null;
|
|
94
96
|
}
|
|
95
97
|
export interface TokenPredicates {
|
package/dist/parser/parser.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export declare class Parser {
|
|
|
21
21
|
private parseExpression;
|
|
22
22
|
private static readonly PRATT_TABLE;
|
|
23
23
|
private parseExpressionPratt;
|
|
24
|
+
private parseBeepExpression;
|
|
25
|
+
private static readonly BEEP_OPERAND_BP;
|
|
26
|
+
private isStyleRefStar;
|
|
27
|
+
private isSpacedStyleRef;
|
|
24
28
|
private tryParseStringPostfix;
|
|
25
29
|
private isNumericPostfixRoot;
|
|
26
30
|
private canStartOperand;
|
|
@@ -63,8 +67,10 @@ export declare class Parser {
|
|
|
63
67
|
private parseErrorAndFinallyBlocks;
|
|
64
68
|
private parseEventNameWithNamespace;
|
|
65
69
|
private static readonly PSEUDO_COMMAND_PREPOSITIONS;
|
|
70
|
+
private static readonly POSITIONAL_SOURCE_HEADS;
|
|
66
71
|
private callExprToCommandNode;
|
|
67
72
|
private createPseudoCommandNode;
|
|
73
|
+
private isArgumentListOnly;
|
|
68
74
|
private tryParsePseudoCommand;
|
|
69
75
|
private parseCommandWithErrorRecovery;
|
|
70
76
|
private parseTemporalKeywordModifiers;
|
|
@@ -105,6 +111,7 @@ export declare class Parser {
|
|
|
105
111
|
private matchSelector;
|
|
106
112
|
private checkAnySelector;
|
|
107
113
|
private checkLiteral;
|
|
114
|
+
private checkEventNamedCall;
|
|
108
115
|
private checkIdentifierLike;
|
|
109
116
|
private checkIsCommand;
|
|
110
117
|
private checkCommandTerminator;
|
|
@@ -139,6 +146,8 @@ export declare class Parser {
|
|
|
139
146
|
private consumeEvent;
|
|
140
147
|
private advance;
|
|
141
148
|
private isAtEnd;
|
|
149
|
+
private atEndOfInput;
|
|
150
|
+
private checkFeatureStart;
|
|
142
151
|
private peek;
|
|
143
152
|
private peekAt;
|
|
144
153
|
private previous;
|
|
@@ -33,6 +33,8 @@ export declare function leftAssoc(bp: number, handler?: InfixHandler): Pick<Bind
|
|
|
33
33
|
export declare function rightAssoc(bp: number, handler?: InfixHandler): Pick<BindingPowerEntry, 'infix'>;
|
|
34
34
|
export declare function prefix(bp: number, handler?: PrefixHandler): Pick<BindingPowerEntry, 'prefix'>;
|
|
35
35
|
export declare const CORE_FRAGMENT: BindingPowerFragment;
|
|
36
|
+
export declare function parseOfOperand(ctx: PrattContext, minBp?: number): ASTNode;
|
|
37
|
+
export declare const THE_OF_TARGET_BP: number;
|
|
36
38
|
export declare const PARSER_COMPARISON_FRAGMENT: BindingPowerFragment;
|
|
37
39
|
export declare const ASSIGNMENT_FRAGMENT: BindingPowerFragment;
|
|
38
40
|
export declare const PARSER_TABLE: BindingPowerFragment;
|