@nexia/sdk 0.8.7 → 0.8.8
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 +6 -0
- package/changelog/0.8.8/en.md +11 -0
- package/changelog/0.8.8/ko.md +11 -0
- package/dist/theme.css +112 -0
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +23 -5
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -7,3 +7,9 @@ Public frontend contracts for Nexia App Packages. Import supported contracts fro
|
|
|
7
7
|
Report SDK, setup, CLI, Docker, AI-tool and sandbox problems in the [central developer support tracker](https://github.com/nexia-cloud-os/developer-support/issues). Search existing issues first and include package versions and minimal reproduction steps. Never attach credentials, private Core source or customer data.
|
|
8
8
|
|
|
9
9
|
SDK·개발환경·CLI·Docker·AI 도구·샌드박스 문제는 [통합 이슈 창구](https://github.com/nexia-cloud-os/developer-support/issues)에 신고하세요. 기존 이슈를 먼저 검색하고 패키지 버전과 최소 재현 단계를 포함하세요. 인증 정보, 비공개 Core 소스와 고객 데이터는 첨부하지 마세요.
|
|
10
|
+
|
|
11
|
+
## Standalone App styles
|
|
12
|
+
|
|
13
|
+
`nexiaAppConfig(import.meta.url)` generates Tailwind utilities from the App resources, including lazy screens, and records emitted CSS in `nexia-host.json`. The build references the shared `@nexia/sdk/theme.css` token aliases; Core supplies token values and resets. Keep those aliases aligned with the Core theme contract. Do not bundle a second preflight or global theme.
|
|
14
|
+
|
|
15
|
+
After adopting the SDK release containing this fix, rebuild and resubmit each standalone App. Existing deployed bundles are unchanged until replaced. Custom builds must declare every emitted stylesheet in `nexia-host.json`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: published
|
|
3
|
+
version: 0.8.8
|
|
4
|
+
date: 2026-10-16
|
|
5
|
+
title: Standalone App stylesheet generation
|
|
6
|
+
description: Restore utility styles in independently built Apps.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
The standalone App build helper now generates utility styles for App screens, including lazy screens, and records emitted CSS in the frontend manifest. Theme aliases use Core token values without adding another reset.
|
|
10
|
+
|
|
11
|
+
Update the App dependency lock to @nexia/sdk 0.8.8, rebuild, and resubmit the App. Existing published bundles do not change automatically.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: published
|
|
3
|
+
version: 0.8.8
|
|
4
|
+
date: 2026-10-16
|
|
5
|
+
title: 독립 App 스타일 생성 복구
|
|
6
|
+
description: 독립 빌드한 App의 유틸리티 스타일을 복구합니다.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
App 빌드 도구가 지연 로딩 화면을 포함한 App 화면의 유틸리티 스타일을 생성하고 프런트엔드 매니페스트에 CSS를 기록합니다. 테마 별칭은 Core 토큰 값을 사용하며 초기화 스타일을 중복 추가하지 않습니다.
|
|
10
|
+
|
|
11
|
+
App의 의존성 lock에 @nexia/sdk 0.8.8을 반영한 뒤 다시 빌드하고 제출해야 합니다. 기존 게시 번들은 자동으로 변경되지 않습니다.
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* Public utility aliases reference host tokens; Apps never redefine token values. */
|
|
2
|
+
@theme inline {
|
|
3
|
+
--font-sans: var(--nx-font-sans);
|
|
4
|
+
--font-display: var(--nx-font-display);
|
|
5
|
+
--font-mono: var(--nx-font-mono);
|
|
6
|
+
--text-page-title: var(--nx-fontsize-page-title);
|
|
7
|
+
--text-page-title--line-height: var(--nx-leading-page-title);
|
|
8
|
+
--text-section-title: var(--nx-fontsize-section-title);
|
|
9
|
+
--text-section-title--line-height: var(--nx-leading-section-title);
|
|
10
|
+
--text-card-title: var(--nx-fontsize-card-title);
|
|
11
|
+
--text-card-title--line-height: var(--nx-leading-card-title);
|
|
12
|
+
--text-row-label: var(--nx-fontsize-row-label);
|
|
13
|
+
--text-row-label--line-height: var(--nx-leading-row-label);
|
|
14
|
+
--text-description: var(--nx-fontsize-description);
|
|
15
|
+
--text-description--line-height: var(--nx-leading-description);
|
|
16
|
+
--text-meta: var(--nx-fontsize-meta);
|
|
17
|
+
--text-meta--line-height: var(--nx-leading-meta);
|
|
18
|
+
--text-chat-body: var(--nx-fontsize-chat-body);
|
|
19
|
+
--text-chat-body--line-height: var(--nx-leading-chat-body);
|
|
20
|
+
--text-eyebrow: var(--nx-fontsize-eyebrow);
|
|
21
|
+
--text-eyebrow--line-height: var(--nx-leading-eyebrow);
|
|
22
|
+
--font-weight-page-title: var(--nx-weight-page-title);
|
|
23
|
+
--font-weight-section-title: var(--nx-weight-section-title);
|
|
24
|
+
--font-weight-card-title: var(--nx-weight-card-title);
|
|
25
|
+
--font-weight-row-label: var(--nx-weight-row-label);
|
|
26
|
+
--font-weight-description: var(--nx-weight-description);
|
|
27
|
+
--font-weight-meta: var(--nx-weight-meta);
|
|
28
|
+
--font-weight-chat-body: var(--nx-weight-chat-body);
|
|
29
|
+
--font-weight-eyebrow: var(--nx-weight-eyebrow);
|
|
30
|
+
--tracking-eyebrow: var(--nx-tracking-eyebrow);
|
|
31
|
+
--radius-sm: var(--nx-radius-sm);
|
|
32
|
+
--radius-md: var(--nx-radius-md);
|
|
33
|
+
--radius-lg: var(--nx-radius-lg);
|
|
34
|
+
--radius-xl: var(--nx-radius-xl);
|
|
35
|
+
--radius-2xl: var(--nx-radius-2xl);
|
|
36
|
+
--radius-3xl: var(--nx-radius-3xl);
|
|
37
|
+
--radius-full: var(--nx-radius-full);
|
|
38
|
+
--radius-control: var(--nx-radius-md);
|
|
39
|
+
--radius-card: var(--nx-radius-md);
|
|
40
|
+
--radius-pill: var(--nx-radius-full);
|
|
41
|
+
--radius-bubble: var(--nx-radius-2xl);
|
|
42
|
+
--radius-composer: var(--nx-radius-2xl);
|
|
43
|
+
--radius-panel: var(--nx-radius-2xl);
|
|
44
|
+
--shadow-sm: var(--nx-outline-hairline);
|
|
45
|
+
--shadow-hairline: var(--nx-outline-hairline);
|
|
46
|
+
--shadow-lg: var(--nx-shadow-lg);
|
|
47
|
+
--shadow-xl: var(--nx-shadow-xl);
|
|
48
|
+
--shadow-card: var(--nx-outline-hairline);
|
|
49
|
+
--shadow-overlay: var(--nx-shadow-lg);
|
|
50
|
+
--spacing-page: var(--nx-spacing-page);
|
|
51
|
+
--spacing-section: var(--nx-spacing-section);
|
|
52
|
+
--spacing-inset: var(--nx-spacing-inset);
|
|
53
|
+
--spacing-row: var(--nx-spacing-row);
|
|
54
|
+
--spacing-stack: var(--nx-spacing-stack);
|
|
55
|
+
--color-bg: var(--nx-bg);
|
|
56
|
+
--color-surface: var(--nx-surface);
|
|
57
|
+
--color-surface-elevated: var(--nx-surface-elevated);
|
|
58
|
+
--color-surface-control: var(--nx-surface-control);
|
|
59
|
+
--color-surface-overlay: var(--nx-surface-overlay);
|
|
60
|
+
--color-surface-hover: var(--nx-surface-hover);
|
|
61
|
+
--color-surface-active: var(--nx-surface-active);
|
|
62
|
+
--color-surface-selected: var(--nx-surface-selected);
|
|
63
|
+
--color-backdrop: var(--nx-backdrop);
|
|
64
|
+
--color-border: var(--nx-border);
|
|
65
|
+
--color-border-subtle: var(--nx-border-subtle);
|
|
66
|
+
--color-divider: var(--nx-divider);
|
|
67
|
+
--color-divider-hover: var(--nx-divider-hover);
|
|
68
|
+
--color-divider-track-hover: var(--nx-divider-track-hover);
|
|
69
|
+
--color-text-primary: var(--nx-text-primary);
|
|
70
|
+
--color-text-secondary: var(--nx-text-secondary);
|
|
71
|
+
--color-text-tertiary: var(--nx-text-tertiary);
|
|
72
|
+
--color-text-disabled: var(--nx-text-disabled);
|
|
73
|
+
--color-accent: var(--nx-accent);
|
|
74
|
+
--color-accent-hover: var(--nx-accent-hover);
|
|
75
|
+
--color-accent-text: var(--nx-accent-text);
|
|
76
|
+
--color-token-neutral: var(--nx-token-neutral);
|
|
77
|
+
--color-token-accent: var(--nx-token-accent);
|
|
78
|
+
--color-token-accent-text: var(--nx-token-accent-text);
|
|
79
|
+
--color-info: var(--nx-info);
|
|
80
|
+
--color-info-surface: var(--nx-info-surface);
|
|
81
|
+
--color-destructive: var(--nx-destructive);
|
|
82
|
+
--color-destructive-surface: var(--nx-destructive-surface);
|
|
83
|
+
--color-warning: var(--nx-warning);
|
|
84
|
+
--color-warning-surface: var(--nx-warning-surface);
|
|
85
|
+
--color-success: var(--nx-success);
|
|
86
|
+
--color-success-surface: var(--nx-success-surface);
|
|
87
|
+
--color-chart-1: var(--nx-chart-1);
|
|
88
|
+
--color-chart-2: var(--nx-chart-2);
|
|
89
|
+
--color-chart-3: var(--nx-chart-3);
|
|
90
|
+
--color-chart-4: var(--nx-chart-4);
|
|
91
|
+
--color-chart-5: var(--nx-chart-5);
|
|
92
|
+
--color-chart-6: var(--nx-chart-6);
|
|
93
|
+
--color-chart-7: var(--nx-chart-7);
|
|
94
|
+
--color-chart-8: var(--nx-chart-8);
|
|
95
|
+
--color-chart-other: var(--nx-chart-other);
|
|
96
|
+
--color-background: var(--background);
|
|
97
|
+
--color-foreground: var(--foreground);
|
|
98
|
+
--color-card: var(--card);
|
|
99
|
+
--color-card-foreground: var(--card-foreground);
|
|
100
|
+
--color-popover: var(--popover);
|
|
101
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
102
|
+
--color-primary: var(--primary);
|
|
103
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
104
|
+
--color-secondary: var(--secondary);
|
|
105
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
106
|
+
--color-muted: var(--muted);
|
|
107
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
108
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
109
|
+
--color-destructive-foreground: var(--nx-accent-text);
|
|
110
|
+
--color-input: var(--input);
|
|
111
|
+
--color-ring: var(--ring);
|
|
112
|
+
}
|
package/dist/vite.d.mts
CHANGED
|
@@ -5,5 +5,5 @@ export function nexiaAppFrontend(apps: { appKey: string; root: string } | Array<
|
|
|
5
5
|
enforce: 'pre';
|
|
6
6
|
resolveId(source: string, importer?: string): string | undefined;
|
|
7
7
|
load(id: string): string | undefined;
|
|
8
|
-
generateBundle(this: { emitFile(file: { type: 'asset'; fileName: string; source: string }): unknown }, options: unknown, bundle: Record<string, unknown>): void;
|
|
8
|
+
generateBundle: { order: 'post'; handler(this: { emitFile(file: { type: 'asset'; fileName: string; source: string }): unknown }, options: unknown, bundle: Record<string, unknown>): void };
|
|
9
9
|
};
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
+
import { readFileSync, realpathSync } from 'node:fs';
|
|
3
5
|
import { fileURLToPath } from 'node:url';
|
|
4
6
|
|
|
5
7
|
// Only these modules are supplied by Core's import map. Other App dependencies
|
|
@@ -9,10 +11,26 @@ export const nexiaHostPeers = ['react', 'react/jsx-runtime', 'react/jsx-dev-runt
|
|
|
9
11
|
|
|
10
12
|
/** The same standalone build contract for generated and existing Apps. */
|
|
11
13
|
export function nexiaAppConfig(configUrl) {
|
|
12
|
-
const root = fileURLToPath(new URL('.', configUrl));
|
|
14
|
+
const root = realpathSync(fileURLToPath(new URL('.', configUrl)));
|
|
13
15
|
const manifest = JSON.parse(readFileSync(new URL('./nexia.json', configUrl), 'utf8'));
|
|
16
|
+
const utilities = '\0nexia-app-utilities.css';
|
|
17
|
+
const theme = createRequire(import.meta.url).resolve('tailwindcss/theme.css').replaceAll('\\', '/');
|
|
18
|
+
const aliases = fileURLToPath(new URL('./theme.css', import.meta.url)).replaceAll('\\', '/');
|
|
19
|
+
const entry = path.join(root, 'resources/js/index.ts');
|
|
14
20
|
return {
|
|
15
|
-
root, base: './', plugins: [nexiaAppFrontend({ appKey: manifest.app.app_key, root })
|
|
21
|
+
root, base: './', plugins: [nexiaAppFrontend({ appKey: manifest.app.app_key, root }), ...tailwindcss(), {
|
|
22
|
+
name: 'nexia:app-utilities',
|
|
23
|
+
resolveId(id) { if (id === utilities) return id; },
|
|
24
|
+
load(id) {
|
|
25
|
+
if (id === utilities) return `@reference ${JSON.stringify(theme)};
|
|
26
|
+
@reference ${JSON.stringify(aliases)};
|
|
27
|
+
@layer utilities { @tailwind utilities source(none); }
|
|
28
|
+
@source ${JSON.stringify(path.join(root, 'resources').replaceAll('\\', '/'))};`;
|
|
29
|
+
},
|
|
30
|
+
transform(code, id) {
|
|
31
|
+
if (id === entry) return { code: `import ${JSON.stringify(utilities)};\n${code}`, map: null };
|
|
32
|
+
},
|
|
33
|
+
}],
|
|
16
34
|
publicDir: false, envDir: false, esbuild: { jsx: 'automatic' },
|
|
17
35
|
resolve: { alias: { '#app': path.join(root, 'resources/js'), '#lang': path.join(root, 'resources/lang') } },
|
|
18
36
|
build: {
|
|
@@ -56,13 +74,13 @@ export const { api, openFile, sendUserInvitation, useDataMigrationBackgroundOper
|
|
|
56
74
|
processUserTaskFormRegistry, dataMigrationRegistry,
|
|
57
75
|
registerAgentComponent, registerLazyAgentComponent } = services;`;
|
|
58
76
|
},
|
|
59
|
-
generateBundle(_options, bundle) {
|
|
77
|
+
generateBundle: { order: 'post', handler(_options, bundle) {
|
|
60
78
|
// Standalone App builds expose compatibility before executing their entry.
|
|
61
79
|
if (owners.length === 1) this.emitFile({
|
|
62
80
|
type: 'asset', fileName: 'nexia-host.json',
|
|
63
81
|
source: JSON.stringify({ version: 1, development_updates: 1, app_key: owners[0].appKey,
|
|
64
82
|
styles: Object.keys(bundle).filter(file => file.endsWith('.css')) }),
|
|
65
83
|
});
|
|
66
|
-
},
|
|
84
|
+
} },
|
|
67
85
|
};
|
|
68
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexia/sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"description": "Frontend contracts for Nexia App Packages",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"development": "./dist/testing.js",
|
|
28
28
|
"types": "./dist/testing.d.ts",
|
|
29
29
|
"import": "./dist/testing.js"
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"./theme.css": "./dist/theme.css"
|
|
31
32
|
},
|
|
32
33
|
"sideEffects": false,
|
|
33
34
|
"scripts": {
|
|
34
35
|
"build": "node scripts/build.mjs",
|
|
35
36
|
"prepack": "npm run build",
|
|
36
|
-
"test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node scripts/organization-target-contract.mjs && node tests/ResourceInspectorRegistrationTest.mjs && node tests/SettingsPrimitivesTest.mjs && node tests/AppServicesTest.mjs",
|
|
37
|
+
"test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node scripts/organization-target-contract.mjs && node tests/ResourceInspectorRegistrationTest.mjs && node tests/SettingsPrimitivesTest.mjs && node tests/AppServicesTest.mjs && node tests/AppStylesTest.mjs",
|
|
37
38
|
"test:wire-values": "node tests/WireValuesTest.mjs",
|
|
38
39
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
39
40
|
"test:resource-composition": "pnpm run build && node tests/ResourceCompositionFrontendContractsTest.mjs",
|
|
@@ -51,7 +52,8 @@
|
|
|
51
52
|
"@types/react": "^19.1.0",
|
|
52
53
|
"axios": "^1.11.0",
|
|
53
54
|
"react": "^19.1.0",
|
|
54
|
-
"typescript": "^5.8.3"
|
|
55
|
+
"typescript": "^5.8.3",
|
|
56
|
+
"vite": "^7.0.7"
|
|
55
57
|
},
|
|
56
58
|
"publishConfig": {
|
|
57
59
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -64,5 +66,9 @@
|
|
|
64
66
|
},
|
|
65
67
|
"bugs": {
|
|
66
68
|
"url": "https://github.com/nexia-cloud-os/developer-support/issues"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@tailwindcss/vite": "4.2.1",
|
|
72
|
+
"tailwindcss": "4.2.1"
|
|
67
73
|
}
|
|
68
74
|
}
|