lapikit 0.0.0-insiders.fd1a829 → 0.0.0-insiders.fd9617d

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 (228) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +117 -1
  3. package/bin/configuration.js +303 -0
  4. package/bin/helper.js +59 -0
  5. package/bin/index.js +33 -0
  6. package/bin/presets.js +26 -0
  7. package/bin/prompts.js +67 -0
  8. package/dist/actions/accordion.svelte.d.ts +9 -0
  9. package/dist/actions/accordion.svelte.js +24 -0
  10. package/dist/actions/index.d.ts +2 -0
  11. package/dist/actions/index.js +2 -0
  12. package/dist/actions/use-theme.d.ts +1 -0
  13. package/dist/actions/use-theme.js +18 -0
  14. package/dist/assets/icons/arrow-down.svelte +12 -0
  15. package/dist/assets/icons/arrow-down.svelte.d.ts +18 -0
  16. package/dist/assets/icons/arrow-up.svelte +12 -0
  17. package/dist/assets/icons/arrow-up.svelte.d.ts +18 -0
  18. package/dist/assets/icons/close-fill.svelte +12 -0
  19. package/dist/assets/icons/close-fill.svelte.d.ts +18 -0
  20. package/dist/assets/icons/loading-fill.svelte +31 -0
  21. package/dist/assets/icons/loading-fill.svelte.d.ts +18 -0
  22. package/dist/components/accordion/accordion.css +36 -0
  23. package/dist/components/accordion/accordion.svelte +39 -0
  24. package/dist/components/accordion/accordion.svelte.d.ts +4 -0
  25. package/dist/components/accordion/modules/accordion-item.css +68 -0
  26. package/dist/components/accordion/modules/accordion-item.svelte +94 -0
  27. package/dist/components/accordion/modules/accordion-item.svelte.d.ts +4 -0
  28. package/dist/components/accordion/types.d.ts +33 -0
  29. package/dist/components/accordion/types.js +1 -0
  30. package/dist/components/alert/alert.css +130 -0
  31. package/dist/components/alert/alert.svelte +89 -0
  32. package/dist/components/alert/alert.svelte.d.ts +4 -0
  33. package/dist/components/alert/types.d.ts +28 -0
  34. package/dist/components/alert/types.js +1 -0
  35. package/dist/components/app/app.css +26 -0
  36. package/dist/components/app/app.svelte +79 -0
  37. package/dist/components/app/app.svelte.d.ts +4 -0
  38. package/dist/components/app/types.d.ts +10 -0
  39. package/dist/components/app/types.js +1 -0
  40. package/dist/components/appbar/appbar.css +38 -0
  41. package/dist/components/appbar/appbar.svelte +40 -0
  42. package/dist/components/appbar/appbar.svelte.d.ts +4 -0
  43. package/dist/components/appbar/types.d.ts +15 -0
  44. package/dist/components/appbar/types.js +1 -0
  45. package/dist/components/aspect-ratio/aspect-ratio.css +19 -0
  46. package/dist/components/aspect-ratio/aspect-ratio.svelte +25 -0
  47. package/dist/components/aspect-ratio/aspect-ratio.svelte.d.ts +4 -0
  48. package/dist/components/aspect-ratio/types.d.ts +5 -0
  49. package/dist/components/aspect-ratio/types.js +1 -0
  50. package/dist/components/avatar/avatar.css +102 -0
  51. package/dist/components/avatar/avatar.svelte +46 -0
  52. package/dist/components/avatar/avatar.svelte.d.ts +4 -0
  53. package/dist/components/avatar/types.d.ts +22 -0
  54. package/dist/components/avatar/types.js +1 -0
  55. package/dist/components/button/button.css +240 -0
  56. package/dist/components/button/button.svelte +102 -0
  57. package/dist/components/button/button.svelte.d.ts +4 -0
  58. package/dist/components/button/types.d.ts +29 -0
  59. package/dist/components/button/types.js +1 -0
  60. package/dist/components/card/card.css +105 -0
  61. package/dist/components/card/card.svelte +67 -0
  62. package/dist/components/card/card.svelte.d.ts +4 -0
  63. package/dist/components/card/types.d.ts +20 -0
  64. package/dist/components/card/types.js +1 -0
  65. package/dist/components/chip/chip.css +224 -0
  66. package/dist/components/chip/chip.svelte +131 -0
  67. package/dist/components/chip/chip.svelte.d.ts +4 -0
  68. package/dist/components/chip/types.d.ts +32 -0
  69. package/dist/components/chip/types.js +1 -0
  70. package/dist/components/dialog/dialog.css +129 -0
  71. package/dist/components/dialog/dialog.svelte +67 -0
  72. package/dist/components/dialog/dialog.svelte.d.ts +4 -0
  73. package/dist/components/dialog/types.d.ts +24 -0
  74. package/dist/components/dialog/types.js +1 -0
  75. package/dist/components/dropdown/dropdown.css +13 -0
  76. package/dist/components/dropdown/dropdown.svelte +115 -0
  77. package/dist/components/dropdown/dropdown.svelte.d.ts +4 -0
  78. package/dist/components/dropdown/types.d.ts +26 -0
  79. package/dist/components/dropdown/types.js +1 -0
  80. package/dist/components/icon/icon.css +78 -0
  81. package/dist/components/icon/icon.svelte +49 -0
  82. package/dist/components/icon/icon.svelte.d.ts +4 -0
  83. package/dist/components/icon/types.d.ts +16 -0
  84. package/dist/components/icon/types.js +1 -0
  85. package/dist/components/index.d.ts +22 -0
  86. package/dist/components/index.js +23 -0
  87. package/dist/components/list/list.css +149 -0
  88. package/dist/components/list/list.svelte +44 -0
  89. package/dist/components/list/list.svelte.d.ts +4 -0
  90. package/dist/components/list/modules/list-item.css +67 -0
  91. package/dist/components/list/modules/list-item.svelte +76 -0
  92. package/dist/components/list/modules/list-item.svelte.d.ts +4 -0
  93. package/dist/components/list/types.d.ts +33 -0
  94. package/dist/components/list/types.js +1 -0
  95. package/dist/components/modal/modal.css +137 -0
  96. package/dist/components/modal/modal.svelte +112 -0
  97. package/dist/components/modal/modal.svelte.d.ts +4 -0
  98. package/dist/components/modal/types.d.ts +26 -0
  99. package/dist/components/modal/types.js +1 -0
  100. package/dist/components/popover/popover.css +13 -0
  101. package/dist/components/popover/popover.svelte +73 -0
  102. package/dist/components/popover/popover.svelte.d.ts +4 -0
  103. package/dist/components/popover/types.d.ts +20 -0
  104. package/dist/components/popover/types.js +1 -0
  105. package/dist/components/separator/separator.css +42 -0
  106. package/dist/components/separator/separator.svelte +37 -0
  107. package/dist/components/separator/separator.svelte.d.ts +4 -0
  108. package/dist/components/separator/types.d.ts +15 -0
  109. package/dist/components/separator/types.js +1 -0
  110. package/dist/components/spacer/spacer.css +3 -0
  111. package/dist/components/spacer/spacer.svelte +7 -0
  112. package/dist/components/spacer/spacer.svelte.d.ts +4 -0
  113. package/dist/components/spacer/types.d.ts +4 -0
  114. package/dist/components/spacer/types.js +1 -0
  115. package/dist/components/textfield/textfield.css +298 -0
  116. package/dist/components/textfield/textfield.svelte +193 -0
  117. package/dist/components/textfield/textfield.svelte.d.ts +4 -0
  118. package/dist/components/textfield/types.d.ts +37 -0
  119. package/dist/components/textfield/types.js +1 -0
  120. package/dist/components/toolbar/toolbar.css +106 -0
  121. package/dist/components/toolbar/toolbar.svelte +47 -0
  122. package/dist/components/toolbar/toolbar.svelte.d.ts +4 -0
  123. package/dist/components/toolbar/types.d.ts +27 -0
  124. package/dist/components/toolbar/types.js +1 -0
  125. package/dist/components/tooltip/tooltip.css +116 -0
  126. package/dist/components/tooltip/tooltip.svelte +113 -0
  127. package/dist/components/tooltip/tooltip.svelte.d.ts +4 -0
  128. package/dist/components/tooltip/types.d.ts +23 -0
  129. package/dist/components/tooltip/types.js +1 -0
  130. package/dist/entry-bundler.d.ts +12 -0
  131. package/dist/entry-bundler.js +107 -0
  132. package/dist/index.d.ts +3 -1
  133. package/dist/index.js +23 -3
  134. package/dist/internal/config/presets.d.ts +149 -0
  135. package/dist/internal/config/presets.js +169 -0
  136. package/dist/internal/config/variables.d.ts +3 -0
  137. package/dist/internal/config/variables.js +3 -0
  138. package/dist/internal/core/actions/assets.svelte.d.ts +8 -0
  139. package/dist/internal/core/actions/assets.svelte.js +54 -0
  140. package/dist/internal/core/actions/dropdown.svelte.d.ts +7 -0
  141. package/dist/internal/core/actions/dropdown.svelte.js +148 -0
  142. package/dist/internal/core/actions/popover.svelte.d.ts +7 -0
  143. package/dist/internal/core/actions/popover.svelte.js +134 -0
  144. package/dist/internal/core/actions/tooltip.svelte.d.ts +7 -0
  145. package/dist/internal/core/actions/tooltip.svelte.js +131 -0
  146. package/dist/internal/core/animations/ripple.d.ts +12 -0
  147. package/dist/internal/core/animations/ripple.js +93 -0
  148. package/dist/{server/modules → internal/core/bin}/ansi.d.ts +0 -1
  149. package/dist/{server/modules → internal/core/bin}/ansi.js +0 -11
  150. package/dist/internal/core/bin/terminal.d.ts +1 -0
  151. package/dist/internal/core/bin/terminal.js +12 -0
  152. package/dist/internal/core/css.d.ts +1 -0
  153. package/dist/internal/core/css.js +16 -0
  154. package/dist/internal/core/formatter/component.d.ts +5 -0
  155. package/dist/internal/core/formatter/component.js +60 -0
  156. package/dist/internal/core/formatter/device.d.ts +5 -0
  157. package/dist/internal/core/formatter/device.js +66 -0
  158. package/dist/internal/core/formatter/index.d.ts +7 -0
  159. package/dist/internal/core/formatter/index.js +35 -0
  160. package/dist/internal/core/formatter/style.d.ts +4 -0
  161. package/dist/internal/core/formatter/style.js +15 -0
  162. package/dist/internal/core/formatter/theme.d.ts +5 -0
  163. package/dist/internal/core/formatter/theme.js +44 -0
  164. package/dist/internal/core/formatter/typography.d.ts +5 -0
  165. package/dist/internal/core/formatter/typography.js +12 -0
  166. package/dist/internal/core/standard-colors.d.ts +75 -0
  167. package/dist/internal/core/standard-colors.js +75 -0
  168. package/dist/{server/modules/x11.d.ts → internal/core/x11-colors.d.ts} +1 -1
  169. package/dist/internal/helpers/colors.d.ts +1 -0
  170. package/dist/{server/modules → internal/helpers}/colors.js +2 -2
  171. package/dist/internal/helpers/convert.d.ts +1 -0
  172. package/dist/internal/helpers/convert.js +17 -0
  173. package/dist/internal/helpers/deep-merge.d.ts +44 -0
  174. package/dist/internal/helpers/deep-merge.js +80 -0
  175. package/dist/internal/helpers/outside.d.ts +9 -0
  176. package/dist/internal/helpers/outside.js +34 -0
  177. package/dist/internal/helpers/parser.d.ts +10 -0
  178. package/dist/internal/helpers/parser.js +93 -0
  179. package/dist/internal/helpers/scroll.d.ts +1 -0
  180. package/dist/internal/helpers/scroll.js +5 -0
  181. package/dist/internal/plugins/vite.d.ts +8 -0
  182. package/dist/internal/plugins/vite.js +33 -0
  183. package/dist/internal/types/components.d.ts +14 -0
  184. package/dist/internal/types/components.js +1 -0
  185. package/dist/internal/types/configuration.d.ts +63 -0
  186. package/dist/internal/types/configuration.js +1 -0
  187. package/dist/internal/types/index.d.ts +2 -0
  188. package/dist/internal/types/index.js +2 -0
  189. package/dist/labs/components/btn/btn.svelte +13 -0
  190. package/dist/labs/components/btn/btn.svelte.d.ts +5 -0
  191. package/dist/labs/components/index.d.ts +1 -0
  192. package/dist/labs/components/index.js +2 -0
  193. package/dist/stores/breakpoints.d.ts +6 -0
  194. package/dist/stores/breakpoints.js +14 -0
  195. package/dist/stores/components.d.ts +8 -0
  196. package/dist/stores/components.js +26 -0
  197. package/dist/stores/devices.d.ts +6 -0
  198. package/dist/stores/devices.js +9 -0
  199. package/dist/stores/index.d.ts +5 -0
  200. package/dist/stores/index.js +5 -0
  201. package/dist/stores/themes.d.ts +2 -0
  202. package/dist/stores/themes.js +4 -0
  203. package/dist/stores/viewport.d.ts +7 -0
  204. package/dist/stores/viewport.js +7 -0
  205. package/dist/styles/animation.css +33 -0
  206. package/dist/styles/keyframes.css +30 -0
  207. package/dist/styles/{normalize.css → reset.css} +15 -5
  208. package/dist/styles.css.d.ts +4 -0
  209. package/dist/themes.css +0 -0
  210. package/dist/themes.css.d.ts +4 -0
  211. package/package.json +135 -74
  212. package/dist/app.d.ts +0 -13
  213. package/dist/app.html +0 -12
  214. package/dist/server/modules/colors.d.ts +0 -1
  215. package/dist/server/modules/css.d.ts +0 -1
  216. package/dist/server/modules/css.js +0 -144
  217. package/dist/server/modules/devices.d.ts +0 -1
  218. package/dist/server/modules/devices.js +0 -43
  219. package/dist/server/modules/importer.d.ts +0 -1
  220. package/dist/server/modules/importer.js +0 -13
  221. package/dist/server/modules/themes.d.ts +0 -4
  222. package/dist/server/modules/themes.js +0 -94
  223. package/dist/server/vite.d.ts +0 -11
  224. package/dist/server/vite.js +0 -17
  225. package/dist/styles/variables.css +0 -7
  226. /package/dist/{server/modules → internal/core}/minify.d.ts +0 -0
  227. /package/dist/{server/modules → internal/core}/minify.js +0 -0
  228. /package/dist/{server/modules/x11.js → internal/core/x11-colors.js} +0 -0
@@ -0,0 +1,4 @@
1
+ import { writable } from 'svelte/store';
2
+ // presets
3
+ const themeRef = 'light';
4
+ export const theme = writable(themeRef);
@@ -0,0 +1,7 @@
1
+ export type Viewport = {
2
+ innerWidth: number;
3
+ outerWidth: number;
4
+ innerHeight: number;
5
+ outerHeight: number;
6
+ };
7
+ export declare const viewport: import("svelte/store").Writable<Viewport>;
@@ -0,0 +1,7 @@
1
+ import { writable } from 'svelte/store';
2
+ export const viewport = writable({
3
+ innerWidth: 0,
4
+ outerWidth: 0,
5
+ innerHeight: 0,
6
+ outerHeight: 0
7
+ });
@@ -0,0 +1,33 @@
1
+ .kit-ripple {
2
+ background-color: currentColor;
3
+ opacity: 0.1;
4
+ position: absolute;
5
+ border-radius: 50%;
6
+ pointer-events: none;
7
+ -webkit-transition: 0.6s;
8
+ transition: 0.6s;
9
+ -webkit-animation: animation-l-ripple var(--system-animation-ripple-duration, 0.4s)
10
+ cubic-bezier(0.4, 0, 0.2, 1);
11
+ animation: animation-l-ripple var(--system-animation-ripple-duration, 0.4s)
12
+ cubic-bezier(0.4, 0, 0.2, 1);
13
+ border-radius: var(--system-ripple-radius);
14
+ }
15
+
16
+ .kit-ripple--center {
17
+ top: 50% !important;
18
+ left: 50% !important;
19
+ translate: -50% -50% !important;
20
+ }
21
+
22
+ .kit-ripple--effect {
23
+ position: absolute;
24
+ left: 0;
25
+ right: 0;
26
+ top: 0;
27
+ bottom: 0;
28
+ overflow: hidden;
29
+ background: none;
30
+ pointer-events: none;
31
+ z-index: 999;
32
+ border-radius: var(--system-ripple-radius);
33
+ }
@@ -0,0 +1,30 @@
1
+ @keyframes button-click {
2
+ 0% {
3
+ transform: scale(0.98);
4
+ }
5
+ 40% {
6
+ transform: scale(1.02);
7
+ }
8
+ 100% {
9
+ transform: scale(1);
10
+ }
11
+ }
12
+
13
+ @keyframes icon-rotate {
14
+ 0% {
15
+ transform: rotate(10deg);
16
+ }
17
+ 100% {
18
+ transform: rotate(380deg);
19
+ }
20
+ }
21
+
22
+ @keyframes animation-l-ripple {
23
+ from {
24
+ scale: 0;
25
+ }
26
+
27
+ to {
28
+ scale: 1;
29
+ }
30
+ }
@@ -3,16 +3,19 @@ html {
3
3
  tab-size: 4;
4
4
  line-height: 1.5;
5
5
  box-sizing: border-box;
6
- font-family: var(--font-sans, var(--kit-font-family-sans));
6
+ font-family: var(--kit-font-sans);
7
+ background-color: var(--kit-background-primary);
8
+ color: var(--kit-label-primary);
7
9
  }
8
10
 
9
11
  pre,
10
12
  code {
11
- font-family: var(--font-mono, var(--kit-font-family-mono));
13
+ font-family: var(--kit-font-mono);
12
14
  }
13
15
 
14
16
  body {
15
17
  margin: 0;
18
+ -webkit-font-smoothing: antialiased;
16
19
  }
17
20
 
18
21
  main {
@@ -44,7 +47,8 @@ button,
44
47
  outline: none;
45
48
  }
46
49
 
47
- *,
50
+ /* bug with tailwind */
51
+ /* *,
48
52
  ::after,
49
53
  ::before,
50
54
  ::backdrop {
@@ -52,7 +56,7 @@ button,
52
56
  margin: 0;
53
57
  padding: 0;
54
58
  border: 0 solid;
55
- }
59
+ } */
56
60
 
57
61
  *,
58
62
  ::before,
@@ -77,7 +81,7 @@ ol,
77
81
  ul,
78
82
  menu {
79
83
  list-style: initial;
80
- margin-left: calc(var(--kit-spacing) * 5);
84
+ margin-left: calc(var(--system-spacing) * 5);
81
85
  }
82
86
 
83
87
  ol ul,
@@ -121,3 +125,9 @@ textarea {
121
125
  background-color: transparent;
122
126
  border-style: none;
123
127
  }
128
+
129
+ @media (prefers-reduced-motion: no-preference) {
130
+ html {
131
+ interpolate-size: allow-keywords;
132
+ }
133
+ }
@@ -0,0 +1,4 @@
1
+ declare module 'lapikit/styles' {
2
+ const styles: string;
3
+ export default styles;
4
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ declare module 'lapikit/themes' {
2
+ const themes: string;
3
+ export default themes;
4
+ }
package/package.json CHANGED
@@ -1,76 +1,137 @@
1
1
  {
2
- "name": "lapikit",
3
- "version": "0.0.0-insiders.fd1a829",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/Nycolaide/lapikit",
10
- "directory": "packages/lapikit"
11
- },
12
- "scripts": {
13
- "dev": "vite dev",
14
- "build": "vite build && npm run prepack",
15
- "preview": "vite preview",
16
- "prepare": "svelte-kit sync || echo ''",
17
- "prepack": "svelte-kit sync && svelte-package && publint",
18
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
19
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
20
- "format": "prettier --write .",
21
- "lint": "prettier --check . && eslint .",
22
- "test:unit": "vitest",
23
- "test": "npm run test:unit -- --run"
24
- },
25
- "files": [
26
- "dist",
27
- "!dist/**/*.test.*",
28
- "!dist/**/*.spec.*"
29
- ],
30
- "sideEffects": [
31
- "**/*.css"
32
- ],
33
- "svelte": "./dist/index.js",
34
- "types": "./dist/index.d.ts",
35
- "type": "module",
36
- "exports": {
37
- ".": {
38
- "types": "./dist/index.d.ts",
39
- "svelte": "./dist/index.js"
40
- },
41
- "./vite": {
42
- "default": "./dist/server/vite.js"
43
- },
44
- "./css": "./dist/styles.css"
45
- },
46
- "peerDependencies": {
47
- "svelte": "^5.0.0"
48
- },
49
- "devDependencies": {
50
- "@eslint/compat": "^1.2.5",
51
- "@eslint/js": "^9.18.0",
52
- "@sveltejs/adapter-auto": "^4.0.0",
53
- "@sveltejs/kit": "^2.16.0",
54
- "@sveltejs/package": "^2.0.0",
55
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
56
- "@testing-library/jest-dom": "^6.6.3",
57
- "@testing-library/svelte": "^5.2.4",
58
- "eslint": "^9.18.0",
59
- "eslint-config-prettier": "^10.0.1",
60
- "eslint-plugin-svelte": "^3.0.0",
61
- "globals": "^16.0.0",
62
- "jsdom": "^26.0.0",
63
- "prettier": "^3.4.2",
64
- "prettier-plugin-svelte": "^3.3.3",
65
- "publint": "^0.3.2",
66
- "svelte": "^5.0.0",
67
- "svelte-check": "^4.0.0",
68
- "typescript": "^5.0.0",
69
- "typescript-eslint": "^8.20.0",
70
- "vite": "^6.2.5",
71
- "vitest": "^3.0.0"
72
- },
73
- "keywords": [
74
- "svelte"
75
- ]
2
+ "name": "lapikit",
3
+ "version": "0.0.0-insiders.fd9617d",
4
+ "license": "MIT",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "homepage": "https://lapikit.dev",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Nycolaide/lapikit.git",
12
+ "directory": "packages/lapikit"
13
+ },
14
+ "author": {
15
+ "name": "Nycolaide",
16
+ "email": "contact@lapikit.dev"
17
+ },
18
+ "funding": "https://buymeacoffee.com/nycolaide",
19
+ "bugs": "https://github.com/Nycolaide/lapikit/issues",
20
+ "scripts": {
21
+ "dev": "vite dev",
22
+ "build": "vite build && npm run prepack",
23
+ "preview": "vite preview",
24
+ "prepare": "svelte-kit sync || echo ''",
25
+ "prepack": "svelte-kit sync && svelte-package && publint",
26
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
27
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
28
+ "format": "prettier --write .",
29
+ "lint": "prettier --check . && eslint .",
30
+ "test:unit": "vitest",
31
+ "test": "npm run test:unit -- --run"
32
+ },
33
+ "files": [
34
+ "bin",
35
+ "dist",
36
+ "README.md",
37
+ "LICENSE",
38
+ "!dist/**/*.test.*",
39
+ "!dist/**/*.spec.*"
40
+ ],
41
+ "sideEffects": [
42
+ "**/*.css"
43
+ ],
44
+ "bin": {
45
+ "lapikit": "bin/index.js"
46
+ },
47
+ "svelte": "./dist/index.js",
48
+ "types": "./dist/index.d.ts",
49
+ "type": "module",
50
+ "exports": {
51
+ ".": {
52
+ "types": "./dist/index.d.ts",
53
+ "svelte": "./dist/index.js"
54
+ },
55
+ "./components": {
56
+ "svelte": "./dist/components/index.js",
57
+ "default": "./dist/components/index.js"
58
+ },
59
+ "./vite": {
60
+ "default": "./dist/internal/plugins/vite.js"
61
+ },
62
+ "./stores": {
63
+ "default": "./dist/stores/index.js"
64
+ },
65
+ "./actions": {
66
+ "default": "./dist/actions/index.js"
67
+ },
68
+ "./core/colors": {
69
+ "default": "./dist/internal/core/standard-colors.js"
70
+ },
71
+ "./styles": {
72
+ "types": "./dist/styles.css.d.ts",
73
+ "default": "./dist/styles.css"
74
+ },
75
+ "./themes": {
76
+ "types": "./dist/themes.css.d.ts",
77
+ "default": "./dist/themes.css"
78
+ },
79
+ "./labs/preprocess": {
80
+ "default": "./dist/entry-bundler.js"
81
+ },
82
+ "./labs/components": {
83
+ "svelte": "./dist/labs/components/index.js",
84
+ "default": "./dist/labs/components/index.js"
85
+ }
86
+ },
87
+ "peerDependencies": {
88
+ "svelte": "^5.0.0"
89
+ },
90
+ "devDependencies": {
91
+ "@eslint/compat": "^1.2.5",
92
+ "@eslint/js": "^9.18.0",
93
+ "@sveltejs/adapter-auto": "^4.0.0",
94
+ "@sveltejs/kit": "^2.16.0",
95
+ "@sveltejs/package": "^2.0.0",
96
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
97
+ "@testing-library/jest-dom": "^6.6.3",
98
+ "@testing-library/svelte": "^5.2.4",
99
+ "eslint": "^9.18.0",
100
+ "eslint-config-prettier": "^10.0.1",
101
+ "eslint-plugin-svelte": "^3.0.0",
102
+ "globals": "^16.0.0",
103
+ "jsdom": "^26.0.0",
104
+ "prettier": "^3.4.2",
105
+ "prettier-plugin-svelte": "^3.3.3",
106
+ "publint": "^0.3.2",
107
+ "svelte": "^5.0.0",
108
+ "svelte-check": "^4.0.0",
109
+ "typescript": "^5.0.0",
110
+ "typescript-eslint": "^8.20.0",
111
+ "vite": "^7.2.2",
112
+ "vitest": "^3.0.0"
113
+ },
114
+ "keywords": [
115
+ "svelte",
116
+ "sveltekit",
117
+ "components",
118
+ "ui",
119
+ "library",
120
+ "ui-library",
121
+ "design system",
122
+ "lapikit",
123
+ "material components",
124
+ "component library",
125
+ "frontend",
126
+ "svelte library",
127
+ "tailwindcss",
128
+ "unocss",
129
+ "component",
130
+ "theme",
131
+ "css",
132
+ "typescript"
133
+ ],
134
+ "dependencies": {
135
+ "prompts": "^2.4.2"
136
+ }
76
137
  }
package/dist/app.d.ts DELETED
@@ -1,13 +0,0 @@
1
- // See https://svelte.dev/docs/kit/types#app.d.ts
2
- // for information about these interfaces
3
- declare global {
4
- namespace App {
5
- // interface Error {}
6
- // interface Locals {}
7
- // interface PageData {}
8
- // interface PageState {}
9
- // interface Platform {}
10
- }
11
- }
12
-
13
- export {};
package/dist/app.html DELETED
@@ -1,12 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="%sveltekit.assets%/favicon.png" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- %sveltekit.head%
8
- </head>
9
- <body data-sveltekit-preload-data="hover">
10
- <div>%sveltekit.body%</div>
11
- </body>
12
- </html>
@@ -1 +0,0 @@
1
- export declare const parseColor: (input: string) => string;
@@ -1 +0,0 @@
1
- export declare const processCSS: (minified?: boolean, normalize?: boolean) => Promise<void>;
@@ -1,144 +0,0 @@
1
- import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
3
- import fs from 'fs';
4
- import fsPromises from 'fs/promises';
5
- import path from 'path';
6
- import { ansi, sendConsole } from './ansi.js';
7
- import { minify } from './minify.js';
8
- import { colors } from './themes.js';
9
- import { devices } from './devices.js';
10
- const __filename = fileURLToPath(import.meta.url);
11
- const __dirname = dirname(__filename);
12
- const __components = path.resolve('src/components');
13
- // temps
14
- const breakpoints = {
15
- _default: 0,
16
- desktop: 1024,
17
- tablet: '768vw',
18
- mobile: 480
19
- };
20
- export const processCSS = async (minified, normalize) => {
21
- console.log(ansi.bold.blue('Processing CSS...'));
22
- const _normalize = fs.readFileSync(path.resolve(__dirname, '../../styles/normalize.css'), 'utf-8');
23
- const _variables = fs.readFileSync(path.resolve(__dirname, '../../styles/variables.css'), 'utf-8');
24
- let styles = `${_variables}\n`;
25
- if (normalize)
26
- styles += `${_normalize}\n`;
27
- const colorScheme = colors();
28
- const deviceDisplay = devices();
29
- styles += `${colorScheme.root}\n`;
30
- styles += `${colorScheme.className}\n`;
31
- styles += `${deviceDisplay}\n`;
32
- if (fs.existsSync(__components) && fs.statSync(__components).isDirectory()) {
33
- const tresholds = {
34
- _default: '',
35
- static: '',
36
- min: '',
37
- max: '',
38
- all: ''
39
- };
40
- function loadComponentCSS(directory) {
41
- fs.readdirSync(directory).forEach((File) => {
42
- const absolutePath = path.join(directory, File);
43
- if (fs.statSync(absolutePath).isDirectory())
44
- return loadComponentCSS(absolutePath);
45
- else if (absolutePath.endsWith('.css') && !absolutePath.includes('/_')) {
46
- const content = parser(fs.readFileSync(absolutePath, 'utf-8'));
47
- tresholds._default += content.allExtracted
48
- .replaceAll('[breakpoint|min]', '[breakpoint]')
49
- .replaceAll('[breakpoint|max]', '[breakpoint]')
50
- .replaceAll('[breakpoint|all]', '[breakpoint]');
51
- tresholds.static += content.defaultExtracted;
52
- tresholds.min += content.minExtracted.replaceAll('[breakpoint|min]', '[breakpoint]');
53
- tresholds.max += content.maxExtracted.replaceAll('[breakpoint|max]', '[breakpoint]');
54
- tresholds.all += content.allModifierExtracted.replaceAll('[breakpoint|all]', '[breakpoint]');
55
- return (styles += `${content.cleaned}\n`);
56
- }
57
- });
58
- }
59
- loadComponentCSS(path.resolve(__dirname, '../../components'));
60
- for (const property in breakpoints) {
61
- if (property !== '_default') {
62
- const name = `.${/^\d/.test(property) ? `\\3${property}` : property}\\:`;
63
- const value = typeof breakpoints[property] === 'number'
64
- ? `${breakpoints[property]}px`
65
- : breakpoints[property];
66
- if (tresholds.static !== '' || tresholds.all !== '' || tresholds.min !== '') {
67
- styles += `@media screen and (min-width: ${value}) {\n`;
68
- if (tresholds.static !== '')
69
- styles += tresholds.static.replaceAll('[breakpoint]', name);
70
- if (tresholds.all !== '')
71
- styles += tresholds.all.replaceAll('[breakpoint]', name);
72
- if (tresholds.min !== '')
73
- styles += tresholds.min.replaceAll('[breakpoint]', name);
74
- styles += `}\n`;
75
- }
76
- if (tresholds.max !== '' || tresholds.all !== '') {
77
- styles += `@media screen and (max-width: ${value}) {\n`;
78
- if (tresholds.max !== '')
79
- styles += tresholds.max.replaceAll('[breakpoint]', name);
80
- if (tresholds.all !== '')
81
- styles += tresholds.all.replaceAll('[breakpoint]', name);
82
- styles += `}\n`;
83
- }
84
- }
85
- else {
86
- styles += tresholds._default.replaceAll('[breakpoint]', '.');
87
- }
88
- }
89
- }
90
- if (minified) {
91
- styles = minify(styles);
92
- sendConsole('success', 'css minified');
93
- }
94
- fsPromises.writeFile(path.resolve(__dirname, '../../styles.css'), styles);
95
- };
96
- const parser = (css) => {
97
- const regex = /([^{]+)\{([^}]+)\}/g;
98
- let match;
99
- const matchesToRemove = [];
100
- const extractedByType = {
101
- allExtracted: [],
102
- defaultExtracted: [],
103
- minExtracted: [],
104
- maxExtracted: [],
105
- allModifierExtracted: []
106
- };
107
- while ((match = regex.exec(css)) !== null) {
108
- const fullMatch = match[0];
109
- const selectors = match[1].trim();
110
- const body = match[2].trim();
111
- const selectorsArray = selectors.split(',').map((sel) => sel.trim());
112
- let matchedType = null;
113
- if (selectorsArray.some((sel) => sel.includes('[breakpoint|min]'))) {
114
- matchedType = 'minExtracted';
115
- }
116
- else if (selectorsArray.some((sel) => sel.includes('[breakpoint|max]'))) {
117
- matchedType = 'maxExtracted';
118
- }
119
- else if (selectorsArray.some((sel) => sel.includes('[breakpoint|all]'))) {
120
- matchedType = 'allModifierExtracted';
121
- }
122
- else if (selectorsArray.some((sel) => sel.includes('[breakpoint]'))) {
123
- matchedType = 'defaultExtracted';
124
- }
125
- if (matchedType) {
126
- const rule = `${selectors} {\n${body}\n}`;
127
- extractedByType.allExtracted.push(rule);
128
- extractedByType[matchedType].push(rule);
129
- matchesToRemove.push(fullMatch);
130
- }
131
- }
132
- let cleaned = css;
133
- for (const rule of matchesToRemove) {
134
- cleaned = cleaned.replace(rule, '').replace(/\n{2,}/g, '\n\n');
135
- }
136
- return {
137
- allExtracted: extractedByType.allExtracted.join('\n\n').trim(),
138
- defaultExtracted: extractedByType.defaultExtracted.join('\n\n').trim(),
139
- minExtracted: extractedByType.minExtracted.join('\n\n').trim(),
140
- maxExtracted: extractedByType.maxExtracted.join('\n\n').trim(),
141
- allModifierExtracted: extractedByType.allModifierExtracted.join('\n\n').trim(),
142
- cleaned: cleaned.trim()
143
- };
144
- };
@@ -1 +0,0 @@
1
- export declare const devices: () => string;
@@ -1,43 +0,0 @@
1
- const breakpoints = {
2
- mobileBreakpoint: 'sm',
3
- tabletBreakpoint: 'md',
4
- laptopBreakpoint: 'xl',
5
- thresholds: {
6
- none: 0, // 0px
7
- xs: '28rem', //448px
8
- sm: '40rem', //640px
9
- md: '48rem', //768px
10
- lg: '64rem', //1024px
11
- xl: '80rem', //1280px
12
- '2xl': '96rem', //1536px
13
- '3xl': '112rem' //1792px
14
- }
15
- };
16
- export const devices = () => {
17
- let css = ``;
18
- const list = {
19
- mobile: breakpoints.mobileBreakpoint,
20
- tablet: breakpoints.tabletBreakpoint,
21
- laptop: breakpoints.laptopBreakpoint
22
- };
23
- for (const [key, value] of Object.entries(list)) {
24
- const breakpointValue = breakpoints.thresholds[value];
25
- const breakpointValueMax = key !== 'laptop'
26
- ? breakpoints.thresholds[key === 'mobile' ? list.tablet : key == 'tablet' ? list.laptop : '']
27
- : undefined;
28
- css += `.device-${key}, .only-on-${key} {\n`;
29
- css += `display: none;\n`;
30
- css += `}\n`;
31
- css += `@media screen and (min-width: ${typeof breakpointValue === 'number' ? breakpointValue + 'px' : breakpointValue}) {\n`;
32
- css += `.device-${key} {\n`;
33
- css += `display: inherit !important;\n`;
34
- css += `}\n`;
35
- css += `}\n`;
36
- css += `@media screen and (min-width: ${typeof breakpointValue === 'number' ? breakpointValue + 'px' : breakpointValue}) ${breakpointValueMax ? ('and (max-width:' + typeof breakpointValue === 'number' ? breakpointValue + 'px' : breakpointValue + ')') : ''} {\n`;
37
- css += `.only-on-${key} {\n`;
38
- css += `display: inherit !important;\n`;
39
- css += `}\n`;
40
- css += `}\n`;
41
- }
42
- return css;
43
- };
@@ -1 +0,0 @@
1
- export declare const importer: () => Promise<any>;
@@ -1,13 +0,0 @@
1
- import path from 'path';
2
- import fs from 'fs';
3
- import { ansi } from './ansi.js';
4
- const app = process.cwd();
5
- const pathConfig = path.resolve(app, 'lapikit.config.js');
6
- export const importer = async () => {
7
- if (!fs.existsSync(pathConfig)) {
8
- console.error(ansi.color.cyan('lapikit'), ansi.bold.red('[error]'), 'config file not found\n', ansi.color.yellow('Could not find lapikit.config.js. See https://localhost/docs/kit/vite to learn more about the configuration file.'), '\n\n', ansi.color.blue('for initializing a new lapikit config, run:\n'), ' ' + ansi.variant.bold('npx lapikit init') + ' ' + ansi.bold.yellow('(preview)'), '\n\n');
9
- process.exit(1);
10
- }
11
- const content = await import(pathConfig);
12
- return content.default;
13
- };
@@ -1,4 +0,0 @@
1
- export declare const colors: () => {
2
- root: string;
3
- className: string;
4
- };