tachyon-dom 0.1.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/LICENSE +21 -0
- package/README.md +339 -0
- package/dist/adapters/lambda.d.ts +65 -0
- package/dist/adapters/lambda.js +211 -0
- package/dist/adapters/node.d.ts +25 -0
- package/dist/adapters/node.js +360 -0
- package/dist/adapters/workers.d.ts +149 -0
- package/dist/adapters/workers.js +272 -0
- package/dist/adapters.d.ts +3 -0
- package/dist/adapters.js +3 -0
- package/dist/app.d.ts +98 -0
- package/dist/app.js +306 -0
- package/dist/cli.d.ts +55 -0
- package/dist/cli.js +711 -0
- package/dist/compiler/expression.d.ts +55 -0
- package/dist/compiler/expression.js +858 -0
- package/dist/compiler/index.d.ts +8 -0
- package/dist/compiler/index.js +50 -0
- package/dist/compiler/ir.d.ts +4 -0
- package/dist/compiler/ir.js +255 -0
- package/dist/compiler/parser.d.ts +3 -0
- package/dist/compiler/parser.js +236 -0
- package/dist/compiler/sfc.d.ts +33 -0
- package/dist/compiler/sfc.js +439 -0
- package/dist/compiler/targets/client.d.ts +3 -0
- package/dist/compiler/targets/client.js +568 -0
- package/dist/compiler/targets/server.d.ts +7 -0
- package/dist/compiler/targets/server.js +396 -0
- package/dist/compiler/targets/stream.d.ts +2 -0
- package/dist/compiler/targets/stream.js +204 -0
- package/dist/compiler/types.d.ts +185 -0
- package/dist/compiler/types.js +1 -0
- package/dist/compiler/utils.d.ts +40 -0
- package/dist/compiler/utils.js +185 -0
- package/dist/compiler/whitespace.d.ts +2 -0
- package/dist/compiler/whitespace.js +66 -0
- package/dist/compiler.d.ts +1 -0
- package/dist/compiler.js +1 -0
- package/dist/constant-time.d.ts +1 -0
- package/dist/constant-time.js +26 -0
- package/dist/cookies.d.ts +44 -0
- package/dist/cookies.js +199 -0
- package/dist/diagnostics.d.ts +22 -0
- package/dist/diagnostics.js +45 -0
- package/dist/env.d.ts +27 -0
- package/dist/env.js +37 -0
- package/dist/html-escape.d.ts +2 -0
- package/dist/html-escape.js +20 -0
- package/dist/html-whitespace.d.ts +6 -0
- package/dist/html-whitespace.js +83 -0
- package/dist/i18n.d.ts +19 -0
- package/dist/i18n.js +93 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +18 -0
- package/dist/language-server.d.ts +17 -0
- package/dist/language-server.js +79 -0
- package/dist/package-integrity.d.ts +9 -0
- package/dist/package-integrity.js +64 -0
- package/dist/result.d.ts +13 -0
- package/dist/result.js +4 -0
- package/dist/router-node.d.ts +2 -0
- package/dist/router-node.js +12 -0
- package/dist/router.d.ts +324 -0
- package/dist/router.js +1024 -0
- package/dist/runtime/attr.d.ts +3 -0
- package/dist/runtime/attr.js +66 -0
- package/dist/runtime/class.d.ts +2 -0
- package/dist/runtime/class.js +10 -0
- package/dist/runtime/conditional.d.ts +78 -0
- package/dist/runtime/conditional.js +140 -0
- package/dist/runtime/enhancement.d.ts +11 -0
- package/dist/runtime/enhancement.js +70 -0
- package/dist/runtime/error-boundary.d.ts +8 -0
- package/dist/runtime/error-boundary.js +27 -0
- package/dist/runtime/event.d.ts +1 -0
- package/dist/runtime/event.js +11 -0
- package/dist/runtime/form.d.ts +41 -0
- package/dist/runtime/form.js +167 -0
- package/dist/runtime/fragment.d.ts +6 -0
- package/dist/runtime/fragment.js +18 -0
- package/dist/runtime/html.d.ts +8 -0
- package/dist/runtime/html.js +6 -0
- package/dist/runtime/hydrate.d.ts +68 -0
- package/dist/runtime/hydrate.js +205 -0
- package/dist/runtime/keyed-rows.d.ts +61 -0
- package/dist/runtime/keyed-rows.js +192 -0
- package/dist/runtime/list.d.ts +84 -0
- package/dist/runtime/list.js +424 -0
- package/dist/runtime/portal.d.ts +6 -0
- package/dist/runtime/portal.js +12 -0
- package/dist/runtime/router.d.ts +102 -0
- package/dist/runtime/router.js +649 -0
- package/dist/runtime/signal.d.ts +30 -0
- package/dist/runtime/signal.js +275 -0
- package/dist/runtime/store.d.ts +1 -0
- package/dist/runtime/store.js +1 -0
- package/dist/runtime/stream-client.d.ts +8 -0
- package/dist/runtime/stream-client.js +33 -0
- package/dist/runtime/text.d.ts +2 -0
- package/dist/runtime/text.js +10 -0
- package/dist/runtime/virtual-list.d.ts +15 -0
- package/dist/runtime/virtual-list.js +89 -0
- package/dist/security.d.ts +27 -0
- package/dist/security.js +173 -0
- package/dist/server/form-action.d.ts +52 -0
- package/dist/server/form-action.js +102 -0
- package/dist/server/html.d.ts +19 -0
- package/dist/server/html.js +101 -0
- package/dist/server/stream.d.ts +4 -0
- package/dist/server/stream.js +72 -0
- package/dist/source-map.d.ts +17 -0
- package/dist/source-map.js +18 -0
- package/dist/tachyon-html.d.ts +110 -0
- package/dist/testing.d.ts +14 -0
- package/dist/testing.js +36 -0
- package/dist/typed.d.ts +9 -0
- package/dist/typed.js +4 -0
- package/dist/vite.d.ts +84 -0
- package/dist/vite.js +426 -0
- package/package.json +604 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type Result } from "../result.js";
|
|
2
|
+
import type { CompilerError } from "./types.js";
|
|
3
|
+
export type ExpressionParserBackend = "auto" | "native" | "oxc";
|
|
4
|
+
export type ExpressionParseOptions = {
|
|
5
|
+
backend?: ExpressionParserBackend;
|
|
6
|
+
};
|
|
7
|
+
export type ExpressionNode = {
|
|
8
|
+
type: "identifier";
|
|
9
|
+
path: string[];
|
|
10
|
+
} | {
|
|
11
|
+
type: "literal";
|
|
12
|
+
value: string | number | boolean | null;
|
|
13
|
+
} | {
|
|
14
|
+
type: "array";
|
|
15
|
+
items: ExpressionNode[];
|
|
16
|
+
} | {
|
|
17
|
+
type: "object";
|
|
18
|
+
entries: Array<{
|
|
19
|
+
key: string;
|
|
20
|
+
value: ExpressionNode;
|
|
21
|
+
}>;
|
|
22
|
+
} | {
|
|
23
|
+
type: "unary";
|
|
24
|
+
operator: "!" | "-";
|
|
25
|
+
argument: ExpressionNode;
|
|
26
|
+
} | {
|
|
27
|
+
type: "binary";
|
|
28
|
+
operator: string;
|
|
29
|
+
left: ExpressionNode;
|
|
30
|
+
right: ExpressionNode;
|
|
31
|
+
} | {
|
|
32
|
+
type: "conditional";
|
|
33
|
+
test: ExpressionNode;
|
|
34
|
+
consequent: ExpressionNode;
|
|
35
|
+
alternate: ExpressionNode;
|
|
36
|
+
} | {
|
|
37
|
+
type: "call";
|
|
38
|
+
callee: ExpressionNode;
|
|
39
|
+
args: ExpressionNode[];
|
|
40
|
+
} | {
|
|
41
|
+
type: "member";
|
|
42
|
+
object: ExpressionNode;
|
|
43
|
+
property: ExpressionNode;
|
|
44
|
+
computed: boolean;
|
|
45
|
+
optional: boolean;
|
|
46
|
+
} | {
|
|
47
|
+
type: "template";
|
|
48
|
+
parts: Array<string | ExpressionNode>;
|
|
49
|
+
};
|
|
50
|
+
export declare const parseExpression: (source: string, options?: ExpressionParseOptions) => Result<ExpressionNode, CompilerError>;
|
|
51
|
+
export declare const evaluateExpressionNode: (node: ExpressionNode, scope: Record<string, unknown>) => unknown;
|
|
52
|
+
export declare const evaluateExpression: (source: string, scope: Record<string, unknown>) => unknown;
|
|
53
|
+
export declare const expressionToJs: (source: string, locals?: ReadonlySet<string>, scopeName?: string, options?: ExpressionParseOptions) => string;
|
|
54
|
+
export declare const expressionNodeToJs: (node: ExpressionNode, locals?: ReadonlySet<string>, scopeName?: string) => string;
|
|
55
|
+
export declare const isAssignableExpression: (source: string, options?: ExpressionParseOptions) => boolean;
|