@lucasvu/scope-ui 0.1.4 → 0.1.5

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/AI_SETUP.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Muc tieu cua file nay la de AI cua project dung `@lucasvu/scope-ui` dung cach, khong import lung tung, khong hardcode mau sai cho, va giu dung base `Vite + micro frontend` khi repo duoc setup o may khac.
4
4
 
5
- Tu phien ban nay, cac phan generic truoc day thuong nam o `packages/shared/theme` da duoc ship ngay trong package nay:
5
+ Tu phien ban nay, cac phan theme/runtime truoc day tung nam o legacy shared theme source da duoc ship ngay trong package nay:
6
6
 
7
7
  - base stylesheet
8
8
  - color-mode runtime
package/RULES.md ADDED
@@ -0,0 +1,52 @@
1
+ # Rules Cho `@lucasvu/scope-ui`
2
+
3
+ ## Vai trò
4
+
5
+ `@lucasvu/scope-ui` là package UI chính của workspace. Package này sở hữu:
6
+
7
+ - component surface
8
+ - stylesheet public
9
+ - theme layers public
10
+ - color-mode runtime
11
+ - theme/runtime contract cho giao diện
12
+
13
+ ## Import đúng
14
+
15
+ Import component từ:
16
+
17
+ - `@lucasvu/scope-ui`
18
+
19
+ Import runtime/theme contract từ:
20
+
21
+ - `@lucasvu/scope-ui/core`
22
+
23
+ Import stylesheet và theme từ:
24
+
25
+ - `@lucasvu/scope-ui/styles.css`
26
+ - `@lucasvu/scope-ui/themes/*`
27
+
28
+ Không import:
29
+
30
+ - từ `src/*`
31
+ - từ `theme-source/*`
32
+ - từ file nội bộ trong `dist/*`
33
+
34
+ ## Rule sử dụng
35
+
36
+ - Import `styles.css` một lần ở app entry.
37
+ - Nếu dùng theme layer, import từ `@lucasvu/scope-ui/themes/*`.
38
+ - Nếu app không cần React surface mà chỉ cần theme/runtime, dùng `@lucasvu/scope-ui/core`.
39
+ - Dùng component root trước. Chỉ dùng `MainFe` khi task thật sự yêu cầu legacy main-fe.
40
+ - Không tự tạo thêm một hệ theme khác ngoài theme contract của package.
41
+
42
+ ## Rule cho AI và agent
43
+
44
+ - Chọn component theo intent trước khi code.
45
+ - Đọc `uiAiManifest` hoặc docs canonical props trước khi tự chọn component.
46
+ - Không tự import file nội bộ chỉ vì tiện.
47
+ - Không tự phát minh variant/theme path ngoài public API.
48
+
49
+ ## Ghi chú boundary
50
+
51
+ - Theme source thuộc `ui`, không thuộc `shared`.
52
+ - Utility generic như regex, formatter, runtime helper không nằm ở package này.
@@ -3,7 +3,7 @@
3
3
  import { copyFileSync, existsSync, mkdirSync, readdirSync, rmSync } from 'node:fs'
4
4
  import { dirname, join, resolve } from 'node:path'
5
5
 
6
- const sourceDir = resolve(process.cwd(), '../shared/theme')
6
+ const sourceDir = resolve(process.cwd(), 'theme-source')
7
7
  const targetDir = resolve(process.cwd(), 'dist/themes')
8
8
 
9
9
  if (!existsSync(sourceDir)) {
@@ -1,9 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
1
  // src/ai-manifest.ts
8
2
  var uiAiManifest = {
9
3
  packageName: "@lucasvu/scope-ui",
@@ -1036,4 +1030,4 @@ function cn(...values) {
1036
1030
  return values.filter(Boolean).join(" ");
1037
1031
  }
1038
1032
 
1039
- export { ROOT_CLIENT_THEME_ATTRIBUTE, ROOT_COLOR_MODE_ATTRIBUTE, __export, applyDocumentClientTheme, applyDocumentColorMode, cn, getSystemColorMode, initializeDocumentColorMode, isColorMode, subscribeToSystemColorMode, syncDocumentColorModeToSystem, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemeLayerAssets, uiThemePresets };
1033
+ export { ROOT_CLIENT_THEME_ATTRIBUTE, ROOT_COLOR_MODE_ATTRIBUTE, applyDocumentClientTheme, applyDocumentColorMode, cn, getSystemColorMode, initializeDocumentColorMode, isColorMode, subscribeToSystemColorMode, syncDocumentColorModeToSystem, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemeLayerAssets, uiThemePresets };
@@ -1 +1 @@
1
- export { ROOT_CLIENT_THEME_ATTRIBUTE, ROOT_COLOR_MODE_ATTRIBUTE, applyDocumentClientTheme, applyDocumentColorMode, cn, getSystemColorMode, initializeDocumentColorMode, isColorMode, subscribeToSystemColorMode, syncDocumentColorModeToSystem, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemeLayerAssets, uiThemePresets } from '../chunk-CL3F2TWE.js';
1
+ export { ROOT_CLIENT_THEME_ATTRIBUTE, ROOT_COLOR_MODE_ATTRIBUTE, applyDocumentClientTheme, applyDocumentColorMode, cn, getSystemColorMode, initializeDocumentColorMode, isColorMode, subscribeToSystemColorMode, syncDocumentColorModeToSystem, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemeLayerAssets, uiThemePresets } from '../chunk-QBAHQOOH.js';