@axiom-core/vue-adapter 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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @axiom-core/vue-adapter/runtime — Runtime Entry
3
+ *
4
+ * REQUIREMENT EA-8: Runtime entry MUST import core-engine and invariant-engine
5
+ * REQUIREMENT EA-9: Supports runtime theme composition from primitives
6
+ * REQUIREMENT EA-10: Validates theme structure using invariant-engine
7
+ * REQUIREMENT EA-11: Accepts same pre-resolved theme input as base entry
8
+ * REQUIREMENT EA-12: Pre-resolved theme renders identically in both entries
9
+ *
10
+ * This entry includes full composition engine for dynamic theme switching.
11
+ */
12
+ export type { ResolvedTheme } from '@axiom-core/css-bridge';
13
+ export type { PrimitiveTokens, SemanticTokens } from '@axiom-core/token-schema';
14
+ export type { ThemeConfig, AxisRegistry } from '@axiom-core/core-engine';
15
+ export type { AxiomProviderRuntimeProps } from './internal/types.js';
16
+ export { AxiomProviderRuntime } from './AxiomProviderRuntime.js';
17
+ export { useAxiomTheme } from './composables.js';
18
+ export { getAxiomStyleTag } from './ssr.js';
19
+ export type { ThemeAxis } from '@axiom-core/core-engine';
20
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChF,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @axiom-core/vue-adapter/runtime — Runtime Entry
3
+ *
4
+ * REQUIREMENT EA-8: Runtime entry MUST import core-engine and invariant-engine
5
+ * REQUIREMENT EA-9: Supports runtime theme composition from primitives
6
+ * REQUIREMENT EA-10: Validates theme structure using invariant-engine
7
+ * REQUIREMENT EA-11: Accepts same pre-resolved theme input as base entry
8
+ * REQUIREMENT EA-12: Pre-resolved theme renders identically in both entries
9
+ *
10
+ * This entry includes full composition engine for dynamic theme switching.
11
+ */
12
+ // Runtime entry exports
13
+ export { AxiomProviderRuntime } from './AxiomProviderRuntime.js';
14
+ export { useAxiomTheme } from './composables.js';
15
+ export { getAxiomStyleTag } from './ssr.js';
16
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,wBAAwB;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
package/dist/ssr.d.ts ADDED
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Server-Side Rendering utilities
3
+ *
4
+ * REQUIREMENT SSR-2: Use @axiom-core/ssr-utils for server-side style generation
5
+ * REQUIREMENT SSR-3: MUST NOT reimplement SSR helper functions
6
+ * REQUIREMENT SSR-8: Provide getStyleTag function with specified signature
7
+ * REQUIREMENT SSR-4: Server-rendered CSS MUST be byte-identical to client CSS
8
+ */
9
+ import { type RenderedAxiomStyles } from '@axiom-core/ssr-utils';
10
+ import type { ResolvedTheme } from '@axiom-core/css-bridge';
11
+ /**
12
+ * Options for server-side style tag generation
13
+ */
14
+ export interface GetAxiomStyleTagOptions {
15
+ /**
16
+ * CSS selector for variable injection
17
+ * @default ':root'
18
+ */
19
+ selector?: string;
20
+ /**
21
+ * Style tag ID attribute
22
+ * @default 'axiom-theme'
23
+ */
24
+ id?: string;
25
+ /**
26
+ * Bridge mode: 'dev' (readable names) or 'prod' (hashed names)
27
+ * @default 'prod'
28
+ */
29
+ mode?: 'dev' | 'prod';
30
+ /**
31
+ * CSS variable prefix
32
+ * @default 'ax'
33
+ */
34
+ prefix?: string;
35
+ }
36
+ /**
37
+ * Generate server-side style tag for SSR
38
+ *
39
+ * REQUIREMENT SSR-8: Must match signature specification
40
+ * REQUIREMENT SSR-3: Delegates to @axiom-core/ssr-utils (no reimplementation)
41
+ *
42
+ * @param resolvedTheme Pre-resolved theme object
43
+ * @param options Optional configuration
44
+ * @returns Style tag metadata for server rendering
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * import { renderToString } from 'vue/server-renderer';
49
+ * import { getAxiomStyleTag } from '@axiom-core/vue-adapter';
50
+ *
51
+ * const styleTag = getAxiomStyleTag(resolvedTheme);
52
+ * const html = `
53
+ * <style id="${styleTag.id}">${styleTag.cssText}</style>
54
+ * ${await renderToString(app)}
55
+ * `;
56
+ * ```
57
+ */
58
+ export declare function getAxiomStyleTag(resolvedTheme: ResolvedTheme, options?: GetAxiomStyleTagOptions): RenderedAxiomStyles;
59
+ //# sourceMappingURL=ssr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../src/ssr.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE,uBAAuB,GAChC,mBAAmB,CAIrB"}
package/dist/ssr.js ADDED
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Server-Side Rendering utilities
3
+ *
4
+ * REQUIREMENT SSR-2: Use @axiom-core/ssr-utils for server-side style generation
5
+ * REQUIREMENT SSR-3: MUST NOT reimplement SSR helper functions
6
+ * REQUIREMENT SSR-8: Provide getStyleTag function with specified signature
7
+ * REQUIREMENT SSR-4: Server-rendered CSS MUST be byte-identical to client CSS
8
+ */
9
+ import { renderAxiomStyles } from '@axiom-core/ssr-utils';
10
+ /**
11
+ * Generate server-side style tag for SSR
12
+ *
13
+ * REQUIREMENT SSR-8: Must match signature specification
14
+ * REQUIREMENT SSR-3: Delegates to @axiom-core/ssr-utils (no reimplementation)
15
+ *
16
+ * @param resolvedTheme Pre-resolved theme object
17
+ * @param options Optional configuration
18
+ * @returns Style tag metadata for server rendering
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { renderToString } from 'vue/server-renderer';
23
+ * import { getAxiomStyleTag } from '@axiom-core/vue-adapter';
24
+ *
25
+ * const styleTag = getAxiomStyleTag(resolvedTheme);
26
+ * const html = `
27
+ * <style id="${styleTag.id}">${styleTag.cssText}</style>
28
+ * ${await renderToString(app)}
29
+ * `;
30
+ * ```
31
+ */
32
+ export function getAxiomStyleTag(resolvedTheme, options) {
33
+ // REQUIREMENT SSR-3: Delegate to @axiom-core/ssr-utils
34
+ // No reimplementation, pure delegation
35
+ return renderAxiomStyles(resolvedTheme, options);
36
+ }
37
+ //# sourceMappingURL=ssr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr.js","sourceRoot":"","sources":["../src/ssr.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAA4B,MAAM,uBAAuB,CAAC;AAgCpF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,aAA4B,EAC5B,OAAiC;IAEjC,uDAAuD;IACvD,uCAAuC;IACvC,OAAO,iBAAiB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@axiom-core/vue-adapter",
3
+ "version": "0.1.0",
4
+ "description": "Official Axiom Design System adapter for Vue 3",
5
+ "author": "Axiom Platform Architecture Team",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": "./dist/index.js",
11
+ "./runtime": "./dist/runtime.js"
12
+ },
13
+ "main": "./dist/index.js",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "files": [
17
+ "dist",
18
+ "CONFORMANCE.md"
19
+ ],
20
+ "dependencies": {
21
+ "@axiom-core/css-bridge": "0.1.0",
22
+ "@axiom-core/token-schema": "0.1.0",
23
+ "@axiom-core/dom-injector": "0.1.0",
24
+ "@axiom-core/ssr-utils": "0.1.0"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^20.0.0",
28
+ "esbuild": "^0.19.0",
29
+ "happy-dom": "^20.8.3",
30
+ "typescript": "^5.3.0",
31
+ "vitest": "^1.0.0",
32
+ "vue": "^3.4.0",
33
+ "@axiom-core/invariant-engine": "0.1.0",
34
+ "@axiom-core/core-engine": "0.1.0"
35
+ },
36
+ "peerDependencies": {
37
+ "@axiom-core/core-engine": ">=0.1.0",
38
+ "@axiom-core/invariant-engine": ">=0.1.0",
39
+ "vue": ">=3.0.0"
40
+ },
41
+ "peerDependenciesMeta": {
42
+ "@axiom-core/core-engine": {
43
+ "optional": true
44
+ },
45
+ "@axiom-core/invariant-engine": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "https://github.com/Haneefe/Axiom-Core.git"
52
+ },
53
+ "homepage": "https://github.com/Haneefe/Axiom-Core",
54
+ "bugs": {
55
+ "url": "https://github.com/Haneefe/Axiom-Core/issues"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "build": "tsc --build",
62
+ "clean": "rimraf dist",
63
+ "test": "vitest run",
64
+ "verify:boundaries": "node scripts/validate-bundle-boundaries.js",
65
+ "verify:hash": "node scripts/validate-golden-hash.js",
66
+ "verify:size": "node scripts/validate-bundle-size.js",
67
+ "verify:determinism": "node scripts/test-determinism-matrix.js",
68
+ "verify": "pnpm verify:boundaries && pnpm verify:hash && pnpm verify:size && pnpm verify:determinism",
69
+ "postbuild": "pnpm verify:boundaries"
70
+ }
71
+ }