@azerothjs/compiler 0.3.0-alpha.3 → 0.4.0-beta.2

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.
@@ -0,0 +1,109 @@
1
+ // A minimal Source Map v3 generator with no dependencies. We only need
2
+ // line-level mappings, which is what stack traces use: one segment at the
3
+ // start of each generated line, pointing back into the `.azeroth` source.
4
+ //
5
+ // This is accurate because the transform leaves non-markup byte-for-byte: a
6
+ // generated line that came from verbatim source maps 1:1; a generated line
7
+ // inside a compiled markup region maps to that region's starting position.
8
+ const BASE64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
9
+ /**
10
+ * Encodes a signed integer as a base64 VLQ (the source-map number format).
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * vlqEncode(0); // 'A'
15
+ * vlqEncode(1); // 'C' (1 << 1 = 2 -> base64 'C')
16
+ * vlqEncode(-1); // 'D' (sign bit set -> 3 -> base64 'D')
17
+ * ```
18
+ */
19
+ export function vlqEncode(value) {
20
+ // Sign goes in the least-significant bit.
21
+ let vlq = value < 0 ? ((-value) << 1) | 1 : value << 1;
22
+ let out = '';
23
+ do {
24
+ let digit = vlq & 0b11111;
25
+ vlq >>>= 5;
26
+ if (vlq > 0) {
27
+ digit |= 0b100000; // continuation bit
28
+ }
29
+ out += BASE64[digit];
30
+ } while (vlq > 0);
31
+ return out;
32
+ }
33
+ /**
34
+ * Offsets at which each line of `text` begins (index 0 = line 0).
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * buildLineStarts('ab\ncd\n'); // [0, 3, 6]
39
+ * ```
40
+ */
41
+ export function buildLineStarts(text) {
42
+ const starts = [0];
43
+ for (let i = 0; i < text.length; i++) {
44
+ if (text[i] === '\n') {
45
+ starts.push(i + 1);
46
+ }
47
+ }
48
+ return starts;
49
+ }
50
+ /**
51
+ * Converts a byte offset to a 0-based `{ line, column }` location.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const starts = buildLineStarts('ab\ncd\n'); // [0, 3, 6]
56
+ * locationFor(4, starts); // { line: 1, column: 1 } (the 'd' on line 1)
57
+ * ```
58
+ */
59
+ export function locationFor(offset, lineStarts) {
60
+ let lo = 0;
61
+ let hi = lineStarts.length - 1;
62
+ while (lo < hi) {
63
+ const mid = (lo + hi + 1) >> 1;
64
+ if (lineStarts[mid] <= offset) {
65
+ lo = mid;
66
+ }
67
+ else {
68
+ hi = mid - 1;
69
+ }
70
+ }
71
+ return { line: lo, column: offset - lineStarts[lo] };
72
+ }
73
+ /**
74
+ * Encodes per-line segment lists into the `mappings` string.
75
+ * `genColumn` is relative within a line (reset each line); the
76
+ * source fields are relative across the whole file, per the spec.
77
+ * A single source (index 0) is assumed.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * encodeMappings([
82
+ * [{ genColumn: 0, sourceLine: 0, sourceColumn: 0 }], // line 0 -> source 0:0
83
+ * [{ genColumn: 0, sourceLine: 1, sourceColumn: 0 }] // line 1 -> source 1:0
84
+ * ]);
85
+ * // 'AAAA;AACA' (one ';'-separated segment per generated line)
86
+ * ```
87
+ */
88
+ export function encodeMappings(lines) {
89
+ let prevSourceLine = 0;
90
+ let prevSourceColumn = 0;
91
+ const encodedLines = [];
92
+ for (const segments of lines) {
93
+ let prevGenColumn = 0;
94
+ const encoded = [];
95
+ for (const seg of segments) {
96
+ let chunk = vlqEncode(seg.genColumn - prevGenColumn);
97
+ prevGenColumn = seg.genColumn;
98
+ chunk += vlqEncode(0); // sourceIndex delta (always 0 - one source)
99
+ chunk += vlqEncode(seg.sourceLine - prevSourceLine);
100
+ prevSourceLine = seg.sourceLine;
101
+ chunk += vlqEncode(seg.sourceColumn - prevSourceColumn);
102
+ prevSourceColumn = seg.sourceColumn;
103
+ encoded.push(chunk);
104
+ }
105
+ encodedLines.push(encoded.join(','));
106
+ }
107
+ return encodedLines.join(';');
108
+ }
109
+ //# sourceMappingURL=sourcemap.js.map
@@ -0,0 +1 @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AgB,CAAC,CAAC;YACxD,gBAAgB,GAAG,GAAG,CAAC,YAAY,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;QACD,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,82 @@
1
+ /** Offsets into the original source string. */
2
+ export interface Span {
3
+ /** Inclusive start offset. */
4
+ start: number;
5
+ /** Exclusive end offset. */
6
+ end: number;
7
+ }
8
+ /**
9
+ * A markup element: `<div class="x">...</div>`, `<Counter n={1} />`, or a
10
+ * component. `isComponent` is true when the tag starts with an uppercase
11
+ * letter or contains a dot (`<Foo.Bar/>`) - those compile to component calls
12
+ * rather than `h('tag', ...)`.
13
+ */
14
+ export interface MarkupElement extends Span {
15
+ kind: 'element';
16
+ /** Tag name as written, e.g. `div`, `Counter`, `Foo.Bar`. */
17
+ tag: string;
18
+ /** True for components (capitalised / dotted tag). */
19
+ isComponent: boolean;
20
+ attributes: MarkupAttribute[];
21
+ children: MarkupChild[];
22
+ }
23
+ /** A `<>...</>` fragment: a children list with no wrapper element. */
24
+ export interface MarkupFragment extends Span {
25
+ kind: 'fragment';
26
+ children: MarkupChild[];
27
+ }
28
+ /** Literal text between tags. Whitespace-only text is dropped by the parser. */
29
+ export interface MarkupText extends Span {
30
+ kind: 'text';
31
+ value: string;
32
+ }
33
+ /**
34
+ * A `{ ... }` expression hole in element-child or attribute position. `code`
35
+ * is the verbatim JS between the braces; any nested markup inside it is left
36
+ * untouched here and expanded later by codegen.
37
+ */
38
+ export interface MarkupExpression extends Span {
39
+ kind: 'expression';
40
+ /** Raw JS source inside the braces, with nested markup left in place. */
41
+ code: string;
42
+ }
43
+ /** Any node that can appear as a child of an element/fragment. */
44
+ export type MarkupChild = MarkupElement | MarkupFragment | MarkupText | MarkupExpression;
45
+ /** The value side of an attribute. */
46
+ export type MarkupAttributeValue =
47
+ /** `name="literal"`: a plain string. */
48
+ {
49
+ kind: 'static';
50
+ value: string;
51
+ }
52
+ /** `name={expr}`: a JS expression. */
53
+ | {
54
+ kind: 'expression';
55
+ code: string;
56
+ }
57
+ /** Bare `name`: a boolean-true attribute. */
58
+ | {
59
+ kind: 'none';
60
+ };
61
+ /**
62
+ * A single attribute on an element. A spread (`{...props}`) is
63
+ * represented with `name === null` and an expression value holding
64
+ * the spread argument.
65
+ */
66
+ export interface MarkupAttribute extends Span {
67
+ kind: 'attribute';
68
+ /** Attribute name, or `null` for a spread (`{...expr}`). */
69
+ name: string | null;
70
+ value: MarkupAttributeValue;
71
+ /** True when this is a `{...spread}`. */
72
+ spread: boolean;
73
+ }
74
+ /**
75
+ * A markup region located by the scanner: the root markup node plus the span
76
+ * it occupies in the source (so `compile()` can splice the generated code
77
+ * back in).
78
+ */
79
+ export interface MarkupRegion extends Span {
80
+ node: MarkupElement | MarkupFragment;
81
+ }
82
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAQA,+CAA+C;AAC/C,MAAM,WAAW,IAAI;IAEjB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI;IAEvC,IAAI,EAAE,SAAS,CAAC;IAChB,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,sEAAsE;AACtE,MAAM,WAAW,cAAe,SAAQ,IAAI;IAExC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,gFAAgF;AAChF,MAAM,WAAW,UAAW,SAAQ,IAAI;IAEpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI;IAE1C,IAAI,EAAE,YAAY,CAAC;IACnB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAEzF,sCAAsC;AACtC,MAAM,MAAM,oBAAoB;AAC5B,wCAAwC;AACtC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AACnC,sCAAsC;GACpC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACtC,6CAA6C;GAC3C;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvB;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI;IAEzC,IAAI,EAAE,WAAW,CAAC;IAClB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI;IAEtC,IAAI,EAAE,aAAa,GAAG,cAAc,CAAC;CACxC"}
package/dist/types.js ADDED
@@ -0,0 +1,9 @@
1
+ // AST for one markup region. The compiler transforms markup embedded in a
2
+ // JS/TS module into h() calls; these types describe what the parser produces.
3
+ // Everything outside markup is left as opaque source text (the scanner only
4
+ // carves out markup regions), so we never need a full JS grammar.
5
+ //
6
+ // Every node carries start/end byte offsets into the original source, so
7
+ // codegen can emit source maps and errors can point at the right place.
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,8EAA8E;AAC9E,4EAA4E;AAC5E,kEAAkE;AAClE,EAAE;AACF,yEAAyE;AACzE,wEAAwE"}
package/dist/vite.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ import type { Plugin } from 'vite';
2
+ /** Options for the AzerothJS Vite plugin. */
3
+ export interface AzerothPluginOptions {
4
+ /** File extension to handle. Default: `'.azeroth'`. */
5
+ extension?: string;
6
+ }
7
+ /**
8
+ * The AzerothJS Vite plugin. Add it to your Vite config so imports
9
+ * of `.azeroth` files compile to runnable modules.
10
+ *
11
+ * Without azeroth(): call compile() on each `.azeroth` source yourself, then
12
+ * run the result through a TS-to-JS step and feed it back into the bundler:
13
+ *
14
+ * const compiled = compile(readFileSync(file, 'utf8'), file);
15
+ * const js = transformWithOxc(compiled.code, file, { lang: 'ts' });
16
+ * // wire js back into the build by hand; source maps to the markup are on you
17
+ *
18
+ * With azeroth(): drop it in `plugins` and Vite loads `.azeroth` files directly:
19
+ *
20
+ * export default defineConfig({ plugins: [azeroth()] });
21
+ * // imports of *.azeroth just work; maps chain back to the original markup
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * // vite.config.ts
26
+ * import { defineConfig } from 'vite';
27
+ * import { azeroth } from '@azerothjs/compiler';
28
+ *
29
+ * export default defineConfig({ plugins: [azeroth()] });
30
+ * ```
31
+ */
32
+ export declare function azeroth(options?: AzerothPluginOptions): Plugin;
33
+ //# sourceMappingURL=vite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IAEjC,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,OAAO,CAAC,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAkClE"}
package/dist/vite.js ADDED
@@ -0,0 +1,65 @@
1
+ // Vite plugin that teaches Vite to load `.azeroth` files: compile() turns the
2
+ // markup into h() calls, then Vite strips any TS, yielding a normal JS module.
3
+ // Runs with `enforce: 'pre'` so it sees the raw source before Vite's other
4
+ // transforms.
5
+ //
6
+ // `vite` is a peer dependency, imported only at transform time via a dynamic
7
+ // import - so importing `@azerothjs/compiler` elsewhere (the playground, unit
8
+ // tests, an SSR build) never pulls Vite in.
9
+ //
10
+ // HMR: this plugin re-transforms a `.azeroth` file on every edit, so the
11
+ // updated module propagates through Vite's graph like any other. Because
12
+ // AzerothJS has no VDOM, the app accepts the update at its root and re-renders
13
+ // (see the demo's app.ts) - a flash-free swap with no page reload. State
14
+ // resets, which is the honest model for a framework with no component-instance
15
+ // tree.
16
+ import { compile } from "./compile.js";
17
+ /**
18
+ * The AzerothJS Vite plugin. Add it to your Vite config so imports
19
+ * of `.azeroth` files compile to runnable modules.
20
+ *
21
+ * Without azeroth(): call compile() on each `.azeroth` source yourself, then
22
+ * run the result through a TS-to-JS step and feed it back into the bundler:
23
+ *
24
+ * const compiled = compile(readFileSync(file, 'utf8'), file);
25
+ * const js = transformWithOxc(compiled.code, file, { lang: 'ts' });
26
+ * // wire js back into the build by hand; source maps to the markup are on you
27
+ *
28
+ * With azeroth(): drop it in `plugins` and Vite loads `.azeroth` files directly:
29
+ *
30
+ * export default defineConfig({ plugins: [azeroth()] });
31
+ * // imports of *.azeroth just work; maps chain back to the original markup
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * // vite.config.ts
36
+ * import { defineConfig } from 'vite';
37
+ * import { azeroth } from '@azerothjs/compiler';
38
+ *
39
+ * export default defineConfig({ plugins: [azeroth()] });
40
+ * ```
41
+ */
42
+ export function azeroth(options = {}) {
43
+ const extension = options.extension ?? '.azeroth';
44
+ return {
45
+ name: 'azerothjs',
46
+ enforce: 'pre',
47
+ async transform(code, id) {
48
+ // Strip any `?query` suffix Vite appends to module ids.
49
+ const filename = id.split('?')[0];
50
+ if (!filename.endsWith(extension)) {
51
+ return null;
52
+ }
53
+ // 1) markup -> h() calls (plus a source map back to .azeroth).
54
+ const compiled = compile(code, filename);
55
+ // 2) TS -> JS (the compiled module may still contain types). Vite
56
+ // transforms via oxc; passing our map as `inMap` chains it, so
57
+ // the final map points all the way back to the original
58
+ // `.azeroth` source. `lang: 'ts'` is explicit since `.azeroth`
59
+ // doesn't imply TS.
60
+ const { transformWithOxc } = await import('vite');
61
+ return transformWithOxc(compiled.code, filename, { lang: 'ts' }, compiled.map ?? undefined);
62
+ }
63
+ };
64
+ }
65
+ //# sourceMappingURL=vite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.js","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,cAAc;AACd,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,4CAA4C;AAC5C,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,+EAA+E;AAC/E,yEAAyE;AACzE,+EAA+E;AAC/E,QAAQ;AAGR,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AASvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,OAAO,CAAC,UAAgC,EAAE;IAEtD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,UAAU,CAAC;IAElD,OAAO;QACH,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,KAAK;QAEd,KAAK,CAAC,SAAS,CAAC,IAAY,EAAE,EAAU;YAEpC,wDAAwD;YACxD,MAAM,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAClC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,EACjC,CAAC;gBACG,OAAO,IAAI,CAAC;YAChB,CAAC;YAED,+DAA+D;YAC/D,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAEzC,kEAAkE;YAClE,kEAAkE;YAClE,2DAA2D;YAC3D,kEAAkE;YAClE,uBAAuB;YACvB,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;YAClD,OAAO,gBAAgB,CACnB,QAAQ,CAAC,IAAI,EACb,QAAQ,EACR,EAAE,IAAI,EAAE,IAAI,EAAE,EACd,QAAQ,CAAC,GAAG,IAAI,SAAS,CAC5B,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,38 +1,61 @@
1
1
  {
2
2
  "name": "@azerothjs/compiler",
3
- "version": "0.3.0-alpha.3",
3
+ "version": "0.4.0-beta.2",
4
4
  "description": "AzerothJS compiler — .azeroth SFC compiler (coming soon)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
9
+ "exports":
10
+ {
11
+ ".":
12
+ {
11
13
  "types": "./dist/index.d.ts",
12
14
  "import": "./dist/index.js",
13
15
  "default": "./dist/index.js"
14
16
  }
15
17
  },
16
- "files": [
18
+ "files":
19
+ [
17
20
  "dist"
18
21
  ],
19
22
  "sideEffects": false,
20
- "scripts": {
23
+ "peerDependencies":
24
+ {
25
+ "vite": ">=5"
26
+ },
27
+ "peerDependenciesMeta":
28
+ {
29
+ "vite":
30
+ {
31
+ "optional": true
32
+ }
33
+ },
34
+ "scripts":
35
+ {
21
36
  "build": "tsc -p tsconfig.build.json",
22
37
  "prepublishOnly": "npm run build"
23
38
  },
24
- "publishConfig": {
39
+ "publishConfig":
40
+ {
25
41
  "access": "public"
26
42
  },
27
- "author": "IntelligentQuantum",
43
+ "author":
44
+ {
45
+ "name": "IntelligentQuantum",
46
+ "email": "IntelligentQuantum@Gmail.Com",
47
+ "url": "https://IntelligentQuantum.Dev/"
48
+ },
28
49
  "license": "MIT",
29
- "repository": {
50
+ "repository":
51
+ {
30
52
  "type": "git",
31
53
  "url": "git+https://github.com/IntelligentQuantum-Dev/AzerothJS.git",
32
54
  "directory": "packages/compiler"
33
55
  },
34
56
  "homepage": "https://github.com/IntelligentQuantum-Dev/AzerothJS/tree/main/packages/compiler",
35
- "bugs": {
57
+ "bugs":
58
+ {
36
59
  "url": "https://github.com/IntelligentQuantum-Dev/AzerothJS/issues"
37
60
  }
38
61
  }