@hyperfixi/core 2.1.0 → 2.2.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/dist/api/hyperscript-api.d.ts +6 -1
- package/dist/chunks/{bridge-CZfeDyEz.js → bridge-D2DBo02Z.js} +2 -2
- package/dist/chunks/browser-modular-BA3JFmkq.js +2 -0
- package/dist/chunks/index-C6Fn0jGB.js +2 -0
- package/dist/commands/dom/toggle.d.ts +2 -0
- package/dist/commands/index.js +35 -0
- package/dist/commands/index.mjs +35 -0
- package/dist/expressions/index.js +0 -27
- package/dist/expressions/index.mjs +0 -27
- package/dist/hyperfixi-classic-i18n.js +1 -1
- package/dist/hyperfixi-minimal.js +1 -1
- package/dist/hyperfixi-multilingual.js +1 -1
- package/dist/hyperfixi-standard.js +1 -1
- package/dist/hyperfixi.js +1 -1
- package/dist/hyperfixi.mjs +1 -1
- package/dist/i18n/error-catalog.d.ts +12 -0
- package/dist/index.js +31352 -23495
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +31352 -23495
- package/dist/lokascript-browser-classic-i18n.js +1 -1
- package/dist/lokascript-browser-minimal.js +1 -1
- package/dist/lokascript-browser-standard.js +1 -1
- package/dist/lokascript-browser.js +1 -1
- package/dist/lokascript-multilingual.js +1 -1
- package/dist/lse/index.d.ts +15 -0
- package/dist/lse/index.js +84 -0
- package/dist/lse/index.mjs +71 -0
- package/dist/parser/full-parser.js +596 -240
- package/dist/parser/full-parser.mjs +596 -240
- package/dist/parser/helpers/ast-helpers.d.ts +1 -0
- package/dist/parser/parser-types.d.ts +22 -7
- package/dist/parser/parser.d.ts +7 -0
- package/dist/parser/pratt-parser.d.ts +42 -0
- package/dist/parser/token-consumer.d.ts +1 -2
- package/dist/parser/tokenizer.d.ts +0 -33
- package/dist/registry/index.js +0 -27
- package/dist/registry/index.mjs +0 -27
- package/dist/runtime/runtime-base.d.ts +3 -0
- package/dist/types/base-types.d.ts +11 -0
- package/dist/types/core.d.ts +1 -0
- package/package.json +12 -3
- package/dist/chunks/browser-modular-CwTpxqdt.js +0 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { SemanticNode, CommandSemanticNode, EventHandlerSemanticNode, ConditionalSemanticNode, CompoundSemanticNode, LoopSemanticNode, SemanticValue, LiteralValue, SelectorValue, ReferenceValue, PropertyPathValue, ExpressionValue, FlagValue, SemanticMetadata, ActionType, SemanticRoleType, Annotation, ProtocolDiagnostic, LSEEnvelope, Diagnostic, DiagnosticSeverity, DiagnosticResult, } from '@lokascript/framework';
|
|
2
|
+
export type { SemanticJSON, SchemaLookup, ParseExplicitOptions, IRDiagnostic, ProtocolNodeJSON, ProtocolValueJSON, ProtocolDiagnosticJSON, AnnotationJSON, MatchArmJSON, LSEEnvelopeJSON, RuntimeASTNode, RuntimeCommandNode, RuntimeEventNode, } from '@lokascript/framework';
|
|
3
|
+
export declare function isLSEAvailable(): boolean;
|
|
4
|
+
export declare function parseExplicit(input: string, options?: import('@lokascript/framework').ParseExplicitOptions): Promise<import("@lokascript/framework").SemanticNode>;
|
|
5
|
+
export declare function isExplicitSyntax(input: string): Promise<boolean>;
|
|
6
|
+
export declare function renderExplicit(node: import('@lokascript/framework').SemanticNode): Promise<string>;
|
|
7
|
+
export declare function fromInterchangeNode(node: unknown): Promise<import("@lokascript/framework").SemanticNode>;
|
|
8
|
+
export declare function toProtocolJSON(node: import('@lokascript/framework').SemanticNode): Promise<import("@lokascript/framework").ProtocolNodeJSON>;
|
|
9
|
+
export declare function fromProtocolJSON(json: import('@lokascript/framework').ProtocolNodeJSON): Promise<import("@lokascript/framework").SemanticNode>;
|
|
10
|
+
export declare function validateProtocolJSON(json: unknown): Promise<import("@lokascript/framework").IRDiagnostic[]>;
|
|
11
|
+
export declare function toEnvelopeJSON(envelope: import('@lokascript/framework').LSEEnvelope): Promise<import("@lokascript/framework").LSEEnvelopeJSON>;
|
|
12
|
+
export declare function fromEnvelopeJSON(json: import('@lokascript/framework').LSEEnvelopeJSON): Promise<import("@lokascript/framework").LSEEnvelope>;
|
|
13
|
+
export declare function isEnvelope(json: unknown): Promise<boolean>;
|
|
14
|
+
export declare function semanticNodeToRuntimeAST(node: import('@lokascript/framework').SemanticNode): Promise<import("@lokascript/framework").RuntimeASTNode>;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
let _fw = null;
|
|
4
|
+
async function getFramework() {
|
|
5
|
+
if (!_fw) {
|
|
6
|
+
try {
|
|
7
|
+
_fw = await import('@lokascript/framework');
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
throw new Error('@lokascript/framework is required for LSE support. ' +
|
|
11
|
+
'Install it: npm install @lokascript/framework');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return _fw;
|
|
15
|
+
}
|
|
16
|
+
function isLSEAvailable() {
|
|
17
|
+
if (_fw)
|
|
18
|
+
return true;
|
|
19
|
+
try {
|
|
20
|
+
require.resolve('@lokascript/framework');
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function parseExplicit(input, options) {
|
|
28
|
+
const fw = await getFramework();
|
|
29
|
+
return fw.parseExplicit(input, options);
|
|
30
|
+
}
|
|
31
|
+
async function isExplicitSyntax(input) {
|
|
32
|
+
const fw = await getFramework();
|
|
33
|
+
return fw.isExplicitSyntax(input);
|
|
34
|
+
}
|
|
35
|
+
async function renderExplicit(node) {
|
|
36
|
+
const fw = await getFramework();
|
|
37
|
+
return fw.renderExplicit(node);
|
|
38
|
+
}
|
|
39
|
+
async function fromInterchangeNode(node) {
|
|
40
|
+
const fw = await getFramework();
|
|
41
|
+
return fw.fromInterchangeNode(node);
|
|
42
|
+
}
|
|
43
|
+
async function toProtocolJSON(node) {
|
|
44
|
+
const fw = await getFramework();
|
|
45
|
+
return fw.toProtocolJSON(node);
|
|
46
|
+
}
|
|
47
|
+
async function fromProtocolJSON(json) {
|
|
48
|
+
const fw = await getFramework();
|
|
49
|
+
return fw.fromProtocolJSON(json);
|
|
50
|
+
}
|
|
51
|
+
async function validateProtocolJSON(json) {
|
|
52
|
+
const fw = await getFramework();
|
|
53
|
+
return fw.validateProtocolJSON(json);
|
|
54
|
+
}
|
|
55
|
+
async function toEnvelopeJSON(envelope) {
|
|
56
|
+
const fw = await getFramework();
|
|
57
|
+
return fw.toEnvelopeJSON(envelope);
|
|
58
|
+
}
|
|
59
|
+
async function fromEnvelopeJSON(json) {
|
|
60
|
+
const fw = await getFramework();
|
|
61
|
+
return fw.fromEnvelopeJSON(json);
|
|
62
|
+
}
|
|
63
|
+
async function isEnvelope(json) {
|
|
64
|
+
const fw = await getFramework();
|
|
65
|
+
return fw.isEnvelope(json);
|
|
66
|
+
}
|
|
67
|
+
async function semanticNodeToRuntimeAST(node) {
|
|
68
|
+
const fw = await getFramework();
|
|
69
|
+
return fw.semanticNodeToRuntimeAST(node);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
exports.fromEnvelopeJSON = fromEnvelopeJSON;
|
|
73
|
+
exports.fromInterchangeNode = fromInterchangeNode;
|
|
74
|
+
exports.fromProtocolJSON = fromProtocolJSON;
|
|
75
|
+
exports.isEnvelope = isEnvelope;
|
|
76
|
+
exports.isExplicitSyntax = isExplicitSyntax;
|
|
77
|
+
exports.isLSEAvailable = isLSEAvailable;
|
|
78
|
+
exports.parseExplicit = parseExplicit;
|
|
79
|
+
exports.renderExplicit = renderExplicit;
|
|
80
|
+
exports.semanticNodeToRuntimeAST = semanticNodeToRuntimeAST;
|
|
81
|
+
exports.toEnvelopeJSON = toEnvelopeJSON;
|
|
82
|
+
exports.toProtocolJSON = toProtocolJSON;
|
|
83
|
+
exports.validateProtocolJSON = validateProtocolJSON;
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
let _fw = null;
|
|
2
|
+
async function getFramework() {
|
|
3
|
+
if (!_fw) {
|
|
4
|
+
try {
|
|
5
|
+
_fw = await import('@lokascript/framework');
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
throw new Error('@lokascript/framework is required for LSE support. ' +
|
|
9
|
+
'Install it: npm install @lokascript/framework');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return _fw;
|
|
13
|
+
}
|
|
14
|
+
function isLSEAvailable() {
|
|
15
|
+
if (_fw)
|
|
16
|
+
return true;
|
|
17
|
+
try {
|
|
18
|
+
require.resolve('@lokascript/framework');
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function parseExplicit(input, options) {
|
|
26
|
+
const fw = await getFramework();
|
|
27
|
+
return fw.parseExplicit(input, options);
|
|
28
|
+
}
|
|
29
|
+
async function isExplicitSyntax(input) {
|
|
30
|
+
const fw = await getFramework();
|
|
31
|
+
return fw.isExplicitSyntax(input);
|
|
32
|
+
}
|
|
33
|
+
async function renderExplicit(node) {
|
|
34
|
+
const fw = await getFramework();
|
|
35
|
+
return fw.renderExplicit(node);
|
|
36
|
+
}
|
|
37
|
+
async function fromInterchangeNode(node) {
|
|
38
|
+
const fw = await getFramework();
|
|
39
|
+
return fw.fromInterchangeNode(node);
|
|
40
|
+
}
|
|
41
|
+
async function toProtocolJSON(node) {
|
|
42
|
+
const fw = await getFramework();
|
|
43
|
+
return fw.toProtocolJSON(node);
|
|
44
|
+
}
|
|
45
|
+
async function fromProtocolJSON(json) {
|
|
46
|
+
const fw = await getFramework();
|
|
47
|
+
return fw.fromProtocolJSON(json);
|
|
48
|
+
}
|
|
49
|
+
async function validateProtocolJSON(json) {
|
|
50
|
+
const fw = await getFramework();
|
|
51
|
+
return fw.validateProtocolJSON(json);
|
|
52
|
+
}
|
|
53
|
+
async function toEnvelopeJSON(envelope) {
|
|
54
|
+
const fw = await getFramework();
|
|
55
|
+
return fw.toEnvelopeJSON(envelope);
|
|
56
|
+
}
|
|
57
|
+
async function fromEnvelopeJSON(json) {
|
|
58
|
+
const fw = await getFramework();
|
|
59
|
+
return fw.fromEnvelopeJSON(json);
|
|
60
|
+
}
|
|
61
|
+
async function isEnvelope(json) {
|
|
62
|
+
const fw = await getFramework();
|
|
63
|
+
return fw.isEnvelope(json);
|
|
64
|
+
}
|
|
65
|
+
async function semanticNodeToRuntimeAST(node) {
|
|
66
|
+
const fw = await getFramework();
|
|
67
|
+
return fw.semanticNodeToRuntimeAST(node);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { fromEnvelopeJSON, fromInterchangeNode, fromProtocolJSON, isEnvelope, isExplicitSyntax, isLSEAvailable, parseExplicit, renderExplicit, semanticNodeToRuntimeAST, toEnvelopeJSON, toProtocolJSON, validateProtocolJSON };
|
|
71
|
+
//# sourceMappingURL=index.mjs.map
|