@seyuna/cli 1.0.0-canary.2 → 1.0.0-canary.22

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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/esm/_dnt.polyfills.d.ts +101 -0
  4. package/esm/_dnt.polyfills.d.ts.map +1 -0
  5. package/esm/_dnt.polyfills.js +127 -0
  6. package/esm/_dnt.shims.d.ts +6 -0
  7. package/esm/_dnt.shims.d.ts.map +1 -0
  8. package/esm/_dnt.shims.js +61 -0
  9. package/esm/deno.d.ts +27 -0
  10. package/esm/deno.d.ts.map +1 -0
  11. package/esm/deno.js +30 -0
  12. package/esm/package.json +3 -0
  13. package/esm/src/config/init.d.ts +8 -0
  14. package/esm/src/config/init.d.ts.map +1 -0
  15. package/esm/src/config/init.js +68 -0
  16. package/esm/src/config/types.d.ts +25 -0
  17. package/esm/src/config/types.d.ts.map +1 -0
  18. package/esm/src/config/types.js +18 -0
  19. package/esm/src/helpers/cli.d.ts +45 -0
  20. package/esm/src/helpers/cli.d.ts.map +1 -0
  21. package/esm/src/helpers/cli.js +72 -0
  22. package/esm/src/helpers/fs.d.ts +35 -0
  23. package/esm/src/helpers/fs.d.ts.map +1 -0
  24. package/esm/src/helpers/fs.js +83 -0
  25. package/esm/src/helpers/styles.d.ts +54 -0
  26. package/esm/src/helpers/styles.d.ts.map +1 -0
  27. package/esm/src/helpers/styles.js +71 -0
  28. package/esm/src/main.d.ts +11 -0
  29. package/esm/src/main.d.ts.map +1 -0
  30. package/esm/src/main.js +111 -0
  31. package/esm/src/ui/compile.d.ts +21 -0
  32. package/esm/src/ui/compile.d.ts.map +1 -0
  33. package/esm/src/ui/compile.js +193 -0
  34. package/esm/src/ui/default.d.ts +8 -0
  35. package/esm/src/ui/default.d.ts.map +1 -0
  36. package/esm/src/ui/default.js +65 -0
  37. package/esm/src/ui/global.css.d.ts +11 -0
  38. package/esm/src/ui/global.css.d.ts.map +1 -0
  39. package/esm/src/ui/global.css.js +104 -0
  40. package/esm/src/ui/types.d.ts +77 -0
  41. package/esm/src/ui/types.d.ts.map +1 -0
  42. package/esm/src/ui/types.js +41 -0
  43. package/package.json +32 -18
  44. package/bin/seyuna.js +0 -10
  45. package/install.js +0 -42
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Core global CSS template for the Seyuna framework.
3
+ *
4
+ * Provides a modern baseline including:
5
+ * - CSS Cascade Layers (@layer reset, base, etc.)
6
+ * - Sophisticated CSS Reset with focus on accessibility and modern typography
7
+ * - Responsive typography foundations
8
+ * - Standardized element baselines (links, images, headings)
9
+ */
10
+ export declare const GLOBAL_CSS = "@layer reset, base, components, utilities;\n\n@layer reset {\n/* \n Reset all elements to a zeroed baseline to ensure consistency in all browsers.\n*/\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n line-height: 2;\n font-family: inherit;\n }\n\n/* \n Prevent automatic font size adjustments on mobile devices to keep text rendering consistent across platforms.\n*/\n html {\n -moz-text-size-adjust: none; /* Firefox */\n -webkit-text-size-adjust: none; /* Safari / older WebKit browsers */\n text-size-adjust: none; /* Modern spec-compliant browsers */\n color: var(--text);\n background-color: var(--background);\n font-size: max(1rem, 0.833vw);\n }\n\n/* \n Remove default list styling from unordered and ordered lists that \n explicitly use role=\"list\".\n*/\n ul[role=\"list\"],\n ol[role=\"list\"] {\n list-style: none;\n }\n\n/* \n Ensure the body element always fills at least the full height of the viewport\n so short pages don't collapse. Improve text rendering across browsers by\n enabling smoother grayscale antialiasing. Set the body as a container\n (queryable by its inline size) for use with CSS container queries, and\n enable smooth scrolling for anchor links and programmatic scroll actions.\n*/\n body {\n min-height: 100vh;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n container-type: inline-size;\n scroll-behavior: smooth;\n }\n\n/* \n Improve heading readability by evenly distributing words across lines.\n This prevents awkward line breaks and creates more balanced, aesthetic headings.\n*/\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n text-wrap: balance;\n }\n\n/* \n Reset all link styles to inherit from parent elements.\n This removes default colors, underlines, and visited/hover states.\n*/\n a {\n all: unset;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n }\n\n/* \n Ensure images and <picture> elements scale within their container,\n preventing overflow and maintaining layout integrity on any screen size.\n*/\n img,\n picture {\n max-width: 100%;\n display: block;\n }\n\n/* \n Add extra scroll margin above and below elements targeted via anchors.\n This prevents the element from hugging the top edge of the viewport when navigated to.\n*/\n :target {\n scroll-margin-block: 1rem;\n }\n}\n";
11
+ //# sourceMappingURL=global.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.css.d.ts","sourceRoot":"","sources":["../../../src/src/ui/global.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,q4EA8FtB,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Core global CSS template for the Seyuna framework.
3
+ *
4
+ * Provides a modern baseline including:
5
+ * - CSS Cascade Layers (@layer reset, base, etc.)
6
+ * - Sophisticated CSS Reset with focus on accessibility and modern typography
7
+ * - Responsive typography foundations
8
+ * - Standardized element baselines (links, images, headings)
9
+ */
10
+ export const GLOBAL_CSS = `@layer reset, base, components, utilities;
11
+
12
+ @layer reset {
13
+ /*
14
+ Reset all elements to a zeroed baseline to ensure consistency in all browsers.
15
+ */
16
+ *,
17
+ *::before,
18
+ *::after {
19
+ box-sizing: border-box;
20
+ margin: 0;
21
+ padding: 0;
22
+ line-height: 2;
23
+ font-family: inherit;
24
+ }
25
+
26
+ /*
27
+ Prevent automatic font size adjustments on mobile devices to keep text rendering consistent across platforms.
28
+ */
29
+ html {
30
+ -moz-text-size-adjust: none; /* Firefox */
31
+ -webkit-text-size-adjust: none; /* Safari / older WebKit browsers */
32
+ text-size-adjust: none; /* Modern spec-compliant browsers */
33
+ color: var(--text);
34
+ background-color: var(--background);
35
+ font-size: max(1rem, 0.833vw);
36
+ }
37
+
38
+ /*
39
+ Remove default list styling from unordered and ordered lists that
40
+ explicitly use role="list".
41
+ */
42
+ ul[role="list"],
43
+ ol[role="list"] {
44
+ list-style: none;
45
+ }
46
+
47
+ /*
48
+ Ensure the body element always fills at least the full height of the viewport
49
+ so short pages don't collapse. Improve text rendering across browsers by
50
+ enabling smoother grayscale antialiasing. Set the body as a container
51
+ (queryable by its inline size) for use with CSS container queries, and
52
+ enable smooth scrolling for anchor links and programmatic scroll actions.
53
+ */
54
+ body {
55
+ min-height: 100vh;
56
+ -webkit-font-smoothing: antialiased;
57
+ -moz-osx-font-smoothing: grayscale;
58
+ container-type: inline-size;
59
+ scroll-behavior: smooth;
60
+ }
61
+
62
+ /*
63
+ Improve heading readability by evenly distributing words across lines.
64
+ This prevents awkward line breaks and creates more balanced, aesthetic headings.
65
+ */
66
+ h1,
67
+ h2,
68
+ h3,
69
+ h4,
70
+ h5,
71
+ h6 {
72
+ text-wrap: balance;
73
+ }
74
+
75
+ /*
76
+ Reset all link styles to inherit from parent elements.
77
+ This removes default colors, underlines, and visited/hover states.
78
+ */
79
+ a {
80
+ all: unset;
81
+ color: inherit;
82
+ text-decoration: none;
83
+ cursor: pointer;
84
+ }
85
+
86
+ /*
87
+ Ensure images and <picture> elements scale within their container,
88
+ preventing overflow and maintaining layout integrity on any screen size.
89
+ */
90
+ img,
91
+ picture {
92
+ max-width: 100%;
93
+ display: block;
94
+ }
95
+
96
+ /*
97
+ Add extra scroll margin above and below elements targeted via anchors.
98
+ This prevents the element from hugging the top edge of the viewport when navigated to.
99
+ */
100
+ :target {
101
+ scroll-margin-block: 1rem;
102
+ }
103
+ }
104
+ `;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Supported color appearance modes.
3
+ * - 'system': Automatically follows OS preference.
4
+ * - 'light': Forces light theme.
5
+ * - 'dark': Forces dark theme.
6
+ */
7
+ export type Mode = "system" | "light" | "dark";
8
+ /**
9
+ * Represents a color in the Oklch color space.
10
+ * Oklch provides a perceptually uniform way to define colors,
11
+ * making it ideal for accessibility-conscious design systems.
12
+ */
13
+ export interface Color {
14
+ /** Lightness (0-100%) */
15
+ lightness: number;
16
+ /** Chroma (color intensity, 0-0.4) */
17
+ chroma: number;
18
+ /** Hue (angle on the color wheel, 0-360) */
19
+ hue: number;
20
+ }
21
+ /**
22
+ * A cohesive set of colors used within a specific theme mode (Light or Dark).
23
+ */
24
+ export interface Palette {
25
+ /** Base chroma for primary elements */
26
+ chroma: number;
27
+ /** Base lightness for background/text contrast */
28
+ lightness: number;
29
+ /** Prime background color definition */
30
+ background: Color;
31
+ /** Prime text color definition */
32
+ text: Color;
33
+ /** Named semantic colors (e.g., 'primary', 'secondary') */
34
+ colors: Record<string, Color>;
35
+ }
36
+ /**
37
+ * The complete theme specification containing both light and dark mode mappings.
38
+ */
39
+ export interface Theme {
40
+ /** Global hue definitions for consistent branding */
41
+ hues: Record<string, number>;
42
+ /** Global color definitions inherited by palettes */
43
+ colors: Record<string, Color>;
44
+ /** Light mode palette configuration */
45
+ light: Palette;
46
+ /** Dark mode palette configuration */
47
+ dark: Palette;
48
+ }
49
+ /**
50
+ * UI Engine Configuration.
51
+ * Controls how the CSS is generated and where it's saved.
52
+ */
53
+ export interface UI {
54
+ /** Theme specification */
55
+ theme: Theme;
56
+ /** Default theme mode */
57
+ mode: Mode;
58
+ /** Relative path to save generated CSS files */
59
+ output_dir?: string;
60
+ }
61
+ /**
62
+ * Merges two color objects. Currently prioritizes the override.
63
+ */
64
+ export declare function mergeColor(_base: Color, override: Color): Color;
65
+ /**
66
+ * Recursively merges two palettes.
67
+ */
68
+ export declare function mergePalette(base: Palette, override: Palette): Palette;
69
+ /**
70
+ * Recursively merges two theme specifications.
71
+ */
72
+ export declare function mergeTheme(base: Theme, override: Theme): Theme;
73
+ /**
74
+ * Recursively merges two UI engine configurations.
75
+ */
76
+ export declare function mergeUI(base: UI, override: UI): UI;
77
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3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,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAQtE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,KAAK,CAS9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,CAMlD"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Merges two color objects. Currently prioritizes the override.
3
+ */
4
+ export function mergeColor(_base, override) {
5
+ return { ...override };
6
+ }
7
+ /**
8
+ * Recursively merges two palettes.
9
+ */
10
+ export function mergePalette(base, override) {
11
+ return {
12
+ ...base,
13
+ ...override,
14
+ background: mergeColor(base.background, override.background),
15
+ text: mergeColor(base.text, override.text),
16
+ colors: { ...base.colors, ...override.colors },
17
+ };
18
+ }
19
+ /**
20
+ * Recursively merges two theme specifications.
21
+ */
22
+ export function mergeTheme(base, override) {
23
+ return {
24
+ ...base,
25
+ ...override,
26
+ hues: { ...base.hues, ...override.hues },
27
+ colors: { ...base.colors, ...override.colors },
28
+ light: mergePalette(base.light, override.light),
29
+ dark: mergePalette(base.dark, override.dark),
30
+ };
31
+ }
32
+ /**
33
+ * Recursively merges two UI engine configurations.
34
+ */
35
+ export function mergeUI(base, override) {
36
+ return {
37
+ ...base,
38
+ ...override,
39
+ theme: mergeTheme(base.theme, override.theme),
40
+ };
41
+ }
package/package.json CHANGED
@@ -1,26 +1,40 @@
1
1
  {
2
2
  "name": "@seyuna/cli",
3
- "version": "1.0.0-canary.2",
4
- "main": "./index.js",
5
- "bin": {
6
- "seyuna": "./bin/seyuna.js"
7
- },
8
- "scripts": {
9
- "postinstall": "node ./install.js"
10
- },
3
+ "version": "1.0.0-canary.22",
11
4
  "description": "Seyuna CLI",
12
- "author": "Seyuna",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/seyuna-corp/seyuna-cli.git"
8
+ },
13
9
  "license": "MIT",
10
+ "bugs": {
11
+ "url": "https://github.com/seyuna-corp/seyuna-cli/issues"
12
+ },
13
+ "module": "./esm/src/main.js",
14
+ "exports": {
15
+ ".": {
16
+ "import": "./esm/src/main.js"
17
+ }
18
+ },
19
+ "scripts": {},
14
20
  "engines": {
15
21
  "node": ">=18"
16
22
  },
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/seyuna-corp/seyuna-cli.git"
23
+ "bin": {
24
+ "seyuna": "./esm/src/main.js"
25
+ },
26
+ "dependencies": {
27
+ "@jsr/cliffy__command": "^1.0.0-rc.8",
28
+ "@jsr/cliffy__prompt": "^1.0.0-rc.8",
29
+ "@jsr/std__async": "^1.0.0",
30
+ "@jsr/std__cli": "^1.0.25",
31
+ "@jsr/std__fmt": "^1.0.0",
32
+ "@jsr/std__fs": "^1.0.0",
33
+ "@jsr/std__path": "^1.0.0",
34
+ "@deno/shim-deno": "~0.18.0"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^20.9.0"
20
38
  },
21
- "optionalDependencies": {
22
- "@seyuna/cli-darwin": "1.0.0-canary.2",
23
- "@seyuna/cli-linux": "1.0.0-canary.2",
24
- "@seyuna/cli-win32": "1.0.0-canary.2"
25
- }
26
- }
39
+ "_generatedBy": "dnt@dev"
40
+ }
package/bin/seyuna.js DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- const { spawn } = require("child_process");
3
- const path = require("path");
4
- const os = require("os");
5
-
6
- const exe = os.platform() === "win32" ? "seyuna.exe" : "seyuna";
7
- const binPath = path.join(__dirname, exe);
8
-
9
- const proc = spawn(binPath, process.argv.slice(2), { stdio: "inherit" });
10
- proc.on("exit", code => process.exit(code));
package/install.js DELETED
@@ -1,42 +0,0 @@
1
- const os = require("os");
2
- const path = require("path");
3
- const fs = require("fs");
4
-
5
- const platform = os.platform();
6
- let pkg;
7
-
8
- switch (platform) {
9
- case "darwin":
10
- pkg = "@seyuna/cli-darwin";
11
- break;
12
- case "linux":
13
- pkg = "@seyuna/cli-linux";
14
- break;
15
- case "win32":
16
- pkg = "@seyuna/cli-win32";
17
- break;
18
- default:
19
- console.error(`Unsupported platform: ${platform}`);
20
- process.exit(1);
21
- }
22
-
23
- try {
24
- const binSrc = require.resolve(`${pkg}/bin/seyuna${platform === "win32" ? ".exe" : ""}`);
25
- const binDest = path.join(__dirname, "bin", `seyuna${platform === "win32" ? ".exe" : ""}`);
26
-
27
- fs.mkdirSync(path.dirname(binDest), { recursive: true });
28
- fs.copyFileSync(binSrc, binDest);
29
-
30
- if (platform !== "win32") {
31
- fs.chmodSync(binDest, 0o755);
32
- } else {
33
- // Create Windows CMD shim
34
- const cmdShimPath = path.join(__dirname, "bin", "seyuna.cmd");
35
- fs.writeFileSync(cmdShimPath, `@echo off\r\n"${binDest}" %*`);
36
- }
37
-
38
- console.log(`seyuna installed for ${platform}`);
39
- } catch (err) {
40
- console.error(`Failed to install seyuna for ${platform}:`, err);
41
- process.exit(1);
42
- }