kss-modern 0.0.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.
Files changed (28) hide show
  1. package/README.md +15 -0
  2. package/dist/node/lib/index.d.mts +86 -0
  3. package/dist/node/lib/index.d.ts +86 -0
  4. package/dist/node/lib/index.mjs +1900 -0
  5. package/dist/node/lib/vite-pug/worker.d.mts +24 -0
  6. package/dist/node/lib/vite-pug/worker.d.ts +24 -0
  7. package/dist/node/lib/vite-pug/worker.mjs +107 -0
  8. package/dist/styleguide-assets/.vite/manifest.json +63 -0
  9. package/dist/styleguide-assets/assets/worker-D4V8OS0H.js +12 -0
  10. package/dist/styleguide-assets/browser-BSX_g1yp.js +22671 -0
  11. package/dist/styleguide-assets/client-BZlkq2d8.js +1 -0
  12. package/dist/styleguide-assets/client-fullpage-1rKiNQVN.js +62 -0
  13. package/dist/styleguide-assets/clipboard-DhKzwemV.js +19 -0
  14. package/dist/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2 +0 -0
  15. package/dist/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2 +0 -0
  16. package/dist/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2 +0 -0
  17. package/dist/styleguide-assets/fonts/geist-sans-latin-300-normal.woff2 +0 -0
  18. package/dist/styleguide-assets/fonts/geist-sans-latin-400-normal.woff2 +0 -0
  19. package/dist/styleguide-assets/fonts/geist-sans-latin-600-normal.woff2 +0 -0
  20. package/dist/styleguide-assets/html-validator-DqoaRE1y.js +136 -0
  21. package/dist/styleguide-assets/icons/external-link.svg +4 -0
  22. package/dist/styleguide-assets/icons/figma.svg +1 -0
  23. package/dist/styleguide-assets/icons/phpstorm.svg +1 -0
  24. package/dist/styleguide-assets/icons/vscode.svg +1 -0
  25. package/dist/styleguide-assets/icons-oK5xUF8R.js +37 -0
  26. package/dist/styleguide-assets/main-B97JcbYk.js +3603 -0
  27. package/dist/styleguide-assets/styleguide-BQbUioN5.css +1 -0
  28. package/package.json +42 -0
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # styleguide-rewrite
2
+
3
+ To install dependencies:
4
+
5
+ ```bash
6
+ bun install
7
+ ```
8
+
9
+ To run:
10
+
11
+ ```bash
12
+ bun run index.ts
13
+ ```
14
+
15
+ This project was created using `bun init` in bun v1.1.34. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
@@ -0,0 +1,86 @@
1
+ interface ColorObject {
2
+ name?: string;
3
+ color: string;
4
+ description?: string;
5
+ }
6
+ interface IconObject {
7
+ name: string;
8
+ svg: string;
9
+ }
10
+ interface in2Section {
11
+ id: string;
12
+ sectionLevel: 'first' | 'second' | 'third';
13
+ header: string;
14
+ description: string;
15
+ hasMarkdownDescription: boolean;
16
+ markup: string;
17
+ modifiers: {
18
+ value: string;
19
+ description: string;
20
+ }[];
21
+ colors?: ColorObject[];
22
+ icons?: IconObject[];
23
+ figma?: string;
24
+ wrapper?: string;
25
+ htmlclass?: string;
26
+ bodyclass?: string;
27
+ sourceFileName: string;
28
+ previewFileName: string;
29
+ fullpageFileName: string;
30
+ }
31
+
32
+ declare global {
33
+ var isWatchMode: boolean;
34
+ var styleguideConfiguration: StyleguideConfiguration;
35
+ }
36
+ interface StyleguideConfiguration {
37
+ mode: 'development' | 'production';
38
+ outDir: string;
39
+ contentDir: `${string}/`;
40
+ projectTitle: string;
41
+ deactivateDarkMode?: boolean;
42
+ launchInEditor?: boolean | {
43
+ rootDir: string;
44
+ };
45
+ theme: string | {
46
+ light: string;
47
+ dark: string;
48
+ };
49
+ html: {
50
+ lang: string;
51
+ assets: {
52
+ css: {
53
+ type?: 'regular' | 'overwriteStyleguide';
54
+ src: string;
55
+ }[];
56
+ js: {
57
+ type?: 'regular' | 'overwriteStyleguide';
58
+ src: string;
59
+ additionalAttributes?: Record<string, string>;
60
+ }[];
61
+ };
62
+ };
63
+ plugins?: {
64
+ ogImage?: (section: in2Section) => string;
65
+ };
66
+ }
67
+ interface StyleguideBuildOutput {
68
+ errors?: {
69
+ overwrittenSectionsIds?: string[];
70
+ };
71
+ }
72
+ /**
73
+ * Builds the styleguide
74
+ * @param config - The configuration for the styleguide
75
+ */
76
+ declare function buildStyleguide(config: StyleguideConfiguration): Promise<StyleguideBuildOutput>;
77
+ /**
78
+ * Builds the styleguide and watches for changes
79
+ * @param config - The configuration for the styleguide
80
+ * @param onChange - Optional callback function to call when the styleguide is changed
81
+ * @param onError - Optional callback function to call when an error occurs while building the styleguide
82
+ */
83
+ declare function watchStyleguide(config: StyleguideConfiguration, onChange?: () => void, onError?: (errorData: StyleguideBuildOutput['errors']) => void): Promise<void>;
84
+
85
+ export { buildStyleguide, watchStyleguide };
86
+ export type { StyleguideConfiguration };
@@ -0,0 +1,86 @@
1
+ interface ColorObject {
2
+ name?: string;
3
+ color: string;
4
+ description?: string;
5
+ }
6
+ interface IconObject {
7
+ name: string;
8
+ svg: string;
9
+ }
10
+ interface in2Section {
11
+ id: string;
12
+ sectionLevel: 'first' | 'second' | 'third';
13
+ header: string;
14
+ description: string;
15
+ hasMarkdownDescription: boolean;
16
+ markup: string;
17
+ modifiers: {
18
+ value: string;
19
+ description: string;
20
+ }[];
21
+ colors?: ColorObject[];
22
+ icons?: IconObject[];
23
+ figma?: string;
24
+ wrapper?: string;
25
+ htmlclass?: string;
26
+ bodyclass?: string;
27
+ sourceFileName: string;
28
+ previewFileName: string;
29
+ fullpageFileName: string;
30
+ }
31
+
32
+ declare global {
33
+ var isWatchMode: boolean;
34
+ var styleguideConfiguration: StyleguideConfiguration;
35
+ }
36
+ interface StyleguideConfiguration {
37
+ mode: 'development' | 'production';
38
+ outDir: string;
39
+ contentDir: `${string}/`;
40
+ projectTitle: string;
41
+ deactivateDarkMode?: boolean;
42
+ launchInEditor?: boolean | {
43
+ rootDir: string;
44
+ };
45
+ theme: string | {
46
+ light: string;
47
+ dark: string;
48
+ };
49
+ html: {
50
+ lang: string;
51
+ assets: {
52
+ css: {
53
+ type?: 'regular' | 'overwriteStyleguide';
54
+ src: string;
55
+ }[];
56
+ js: {
57
+ type?: 'regular' | 'overwriteStyleguide';
58
+ src: string;
59
+ additionalAttributes?: Record<string, string>;
60
+ }[];
61
+ };
62
+ };
63
+ plugins?: {
64
+ ogImage?: (section: in2Section) => string;
65
+ };
66
+ }
67
+ interface StyleguideBuildOutput {
68
+ errors?: {
69
+ overwrittenSectionsIds?: string[];
70
+ };
71
+ }
72
+ /**
73
+ * Builds the styleguide
74
+ * @param config - The configuration for the styleguide
75
+ */
76
+ declare function buildStyleguide(config: StyleguideConfiguration): Promise<StyleguideBuildOutput>;
77
+ /**
78
+ * Builds the styleguide and watches for changes
79
+ * @param config - The configuration for the styleguide
80
+ * @param onChange - Optional callback function to call when the styleguide is changed
81
+ * @param onError - Optional callback function to call when an error occurs while building the styleguide
82
+ */
83
+ declare function watchStyleguide(config: StyleguideConfiguration, onChange?: () => void, onError?: (errorData: StyleguideBuildOutput['errors']) => void): Promise<void>;
84
+
85
+ export { buildStyleguide, watchStyleguide };
86
+ export type { StyleguideConfiguration };