@akanjs/cli 2.3.13 → 2.4.0-rc.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "2.3.13",
3
+ "version": "2.4.0-rc.1",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  "@langchain/openai": "^1.4.6",
35
35
  "@tailwindcss/node": "^4.3.0",
36
36
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "2.3.13",
37
+ "akanjs": "2.4.0-rc.1",
38
38
  "chalk": "^5.6.2",
39
39
  "commander": "^14.0.3",
40
40
  "daisyui": "5.5.23",
@@ -28,6 +28,18 @@
28
28
  --color-error-content: #fafafa;
29
29
  --color-open: #27ae60;
30
30
  --color-open-content: #fafafa;
31
+
32
+ /* Shape & feel — customize these too, not just colors, to make the theme yours.
33
+ These are daisyUI v5 theme variables; the values below are the neutral defaults.
34
+ See `akan guideline show cssRule` and https://daisyui.com/docs/themes/ for the full set. */
35
+ --radius-selector: 1rem; /* checkbox, toggle, badge corner rounding */
36
+ --radius-field: 0.5rem; /* button, input, select, tab corner rounding */
37
+ --radius-box: 1rem; /* card, modal, alert corner rounding */
38
+ --size-selector: 0.25rem; /* base scale (density) for selector controls */
39
+ --size-field: 0.25rem; /* base scale (density) for field controls */
40
+ --border: 1px; /* component border width */
41
+ --depth: 0; /* 1 = subtle 3D depth on components */
42
+ --noise: 0; /* 1 = grain texture on surfaces */
31
43
  }
32
44
 
33
45
  @plugin "daisyui/theme" {
@@ -51,4 +63,14 @@
51
63
  --color-error: #f02020;
52
64
  --color-error-content: #ffffff;
53
65
  --color-open: #10fc00;
66
+
67
+ /* Keep shape & feel consistent with the light theme (usually the same values across modes). */
68
+ --radius-selector: 1rem;
69
+ --radius-field: 0.5rem;
70
+ --radius-box: 1rem;
71
+ --size-selector: 0.25rem;
72
+ --size-field: 0.25rem;
73
+ --border: 1px;
74
+ --depth: 0;
75
+ --noise: 0;
54
76
  }
@@ -14,21 +14,15 @@ const sourceFilePattern = /\.(ts|tsx)$/;
14
14
  const excludedFilePattern = /(^index\.tsx?$|\.d\.ts$|\.(test|spec)\.(ts|tsx)$|\.css$|\.scss$|\.sass$)/;
15
15
  // `ui` exports PascalCase names only; `common`/`srvkit`/`webkit` export camelCase names only. Names with
16
16
  // dots, underscores, or hyphens (e.g. `foo.helper`, `Globe_Dynamic`, `kebab-case`) match neither and are skipped.
17
- // `plugin` additionally exports `<camelCase>.plugin` files (the plugin-facet file convention, e.g.
18
- // `pushNotification.plugin.ts`) alongside plain camelCase helpers.
19
17
  const pascalCasePattern = /^[A-Z][A-Za-z0-9]*$/;
20
18
  const camelCasePattern = /^[a-z][A-Za-z0-9]*$/;
21
- const pluginNamePattern = /^[a-z][A-Za-z0-9]*\.plugin$/;
22
- const matchesFacetNameConvention = (facet: string, name: string) => {
23
- if (facet === "ui") return pascalCasePattern.test(name);
24
- if (facet === "plugin") return camelCasePattern.test(name) || pluginNamePattern.test(name);
25
- return camelCasePattern.test(name);
26
- };
19
+ const nameCasePatternForFacet = (facet: string) => (facet === "ui" ? pascalCasePattern : camelCasePattern);
27
20
 
28
21
  export default async function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}, options: Options = {}) {
29
22
  const { exec, facet } = options;
30
23
  if (!exec || !facet || !(await exec.exists(facet))) return null;
31
24
 
25
+ const nameCasePattern = nameCasePatternForFacet(facet);
32
26
  const { files, dirs } = await exec.getFilesAndDirs(facet);
33
27
  const exportNames = [
34
28
  ...files
@@ -36,7 +30,7 @@ export default async function getContent(scanInfo: AppInfo | LibInfo | null, dic
36
30
  .map((filename) => filename.replace(sourceFilePattern, "")),
37
31
  ...dirs.filter((dirname) => !dirname.startsWith(".")),
38
32
  ]
39
- .filter((name) => matchesFacetNameConvention(facet, name))
33
+ .filter((name) => nameCasePattern.test(name))
40
34
  .sort();
41
35
 
42
36
  if (exportNames.length === 0) return null;
@@ -142,6 +142,7 @@
142
142
  "!**/*.test.tsx",
143
143
  "!**/*.spec.ts",
144
144
  "!**/*.spec.tsx",
145
+ "!**/*.constant.ts",
145
146
  "!**/common/**"
146
147
  ],
147
148
  "plugins": ["./node_modules/@akanjs/devkit/lint/no-throw-raw-error.grit"]