@liftkit-vue/nuxt 0.1.0 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 annrie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/module.d.mts CHANGED
@@ -1,5 +1,25 @@
1
1
  import { NuxtModule } from '@nuxt/schema';
2
2
 
3
+ interface ModuleOptions {
4
+ /**
5
+ * CSS インジェクション設定
6
+ * - 'full': 全 CSS を注入(デフォルト、現在の動作)
7
+ * - 'tokens': デザイントークン(変数)のみ
8
+ * - 'none': CSS を注入しない(ユーザーが手動管理)
9
+ */
10
+ css: 'full' | 'tokens' | 'none';
11
+ /**
12
+ * 要素リセット CSS を含めるか
13
+ * false にすると *, button, body, a 等の要素セレクタを除外
14
+ * Nuxt UI 等の外部 UI フレームワーク使用時は false 推奨
15
+ */
16
+ includeReset: boolean;
17
+ /**
18
+ * コンポーネントの自動インポートを有効化
19
+ */
20
+ components: boolean;
21
+ }
3
22
  declare const module$1: NuxtModule;
4
23
 
5
24
  export { module$1 as default };
25
+ export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@liftkit-vue/nuxt",
3
3
  "configKey": "liftkit",
4
- "version": "0.1.0",
4
+ "version": "0.2.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
- "unbuild": "unknown"
7
+ "unbuild": "3.6.1"
8
8
  }
9
9
  }
package/dist/module.mjs CHANGED
@@ -5,61 +5,118 @@ const module$1 = defineNuxtModule({
5
5
  name: "@liftkit-vue/nuxt",
6
6
  configKey: "liftkit"
7
7
  },
8
- defaults: {},
9
- setup(_options, nuxt) {
8
+ defaults: {
9
+ css: "full",
10
+ includeReset: true,
11
+ components: true
12
+ },
13
+ setup(options, nuxt) {
10
14
  const resolver = createResolver(import.meta.url);
11
- const coreCssPath = resolver.resolve("../../core/src/css/index.css");
12
- nuxt.options.css.push(coreCssPath);
15
+ if (options.css !== "none") {
16
+ if (options.css === "tokens") {
17
+ const tokensCssPath = resolver.resolve("../../core/src/css/liftkit-tokens.css");
18
+ nuxt.options.css.push(tokensCssPath);
19
+ } else {
20
+ if (options.includeReset) {
21
+ const coreCssPath = resolver.resolve("../../core/src/css/index.css");
22
+ nuxt.options.css.push(coreCssPath);
23
+ } else {
24
+ const tokensCssPath = resolver.resolve("../../core/src/css/liftkit-tokens.css");
25
+ nuxt.options.css.push(tokensCssPath);
26
+ const utilityCssFiles = [
27
+ "align-items",
28
+ "align-self",
29
+ "aspect-ratios",
30
+ "border-radius",
31
+ "column-span",
32
+ "display",
33
+ "text-color",
34
+ "flexboxes",
35
+ "gaps",
36
+ "justify-content",
37
+ "margins",
38
+ "opacity",
39
+ "overflow",
40
+ "padding",
41
+ "position",
42
+ "scale",
43
+ "shadows",
44
+ "text-alignment",
45
+ "typography",
46
+ "width",
47
+ "height",
48
+ "text-columns",
49
+ "borders",
50
+ "pointer-events",
51
+ "scrim",
52
+ "z-index",
53
+ "cursor",
54
+ "breaks",
55
+ "background-colors",
56
+ "whitespace",
57
+ "border-color",
58
+ "border-style",
59
+ "border-width"
60
+ ];
61
+ for (const file of utilityCssFiles) {
62
+ nuxt.options.css.push(resolver.resolve(`../../core/src/css/${file}.css`));
63
+ }
64
+ nuxt.options.css.push(resolver.resolve("../../core/src/css/lk-components.css"));
65
+ }
66
+ }
67
+ }
13
68
  addPlugin(resolver.resolve("./runtime/plugin"));
14
- const coreComponents = "../../core/src/components";
15
- const components = [
16
- // Layout
17
- "LkContainer",
18
- "LkColumn",
19
- "LkRow",
20
- "LkSection",
21
- "LkGrid",
22
- "LkPlaceholderBlock",
23
- // Typography & Display
24
- "LkHeading",
25
- "LkText",
26
- "LkBadge",
27
- "LkIcon",
28
- "LkImage",
29
- "LkSticker",
30
- // Material
31
- "LkStateLayer",
32
- "LkMaterialLayer",
33
- // Interactive
34
- "LkButton",
35
- "LkIconButton",
36
- "LkMenuItem",
37
- "LkSwitch",
38
- "LkTextInput",
39
- // Tabs
40
- "LkTabLink",
41
- "LkTabMenu",
42
- "LkTabs",
43
- "LkTabContent",
44
- // Complex
45
- "LkCard",
46
- "LkSelect",
47
- "LkSnackbar",
48
- "LkNavbar",
49
- // Theme
50
- "LkTheme",
51
- "LkThemeController"
52
- ].map((name) => ({ name, path: `${coreComponents}/${name}.vue` }));
53
- components.push(
54
- { name: "LkDropdown", path: `${coreComponents}/LkDropdown/LkDropdown.vue` },
55
- { name: "LkDropdownTrigger", path: `${coreComponents}/LkDropdown/LkDropdownTrigger.vue` },
56
- { name: "LkDropdownMenu", path: `${coreComponents}/LkDropdown/LkDropdownMenu.vue` }
57
- );
58
- for (const { name, path } of components) {
59
- addComponent({
60
- name,
61
- filePath: resolver.resolve(path)
62
- });
69
+ if (options.components) {
70
+ const coreComponents = "../../core/src/components";
71
+ const components = [
72
+ // Layout
73
+ "LkContainer",
74
+ "LkColumn",
75
+ "LkRow",
76
+ "LkSection",
77
+ "LkGrid",
78
+ "LkPlaceholderBlock",
79
+ // Typography & Display
80
+ "LkHeading",
81
+ "LkText",
82
+ "LkBadge",
83
+ "LkIcon",
84
+ "LkImage",
85
+ "LkSticker",
86
+ // Material
87
+ "LkStateLayer",
88
+ "LkMaterialLayer",
89
+ // Interactive
90
+ "LkButton",
91
+ "LkIconButton",
92
+ "LkMenuItem",
93
+ "LkSwitch",
94
+ "LkTextInput",
95
+ // Tabs
96
+ "LkTabLink",
97
+ "LkTabMenu",
98
+ "LkTabs",
99
+ "LkTabContent",
100
+ // Complex
101
+ "LkCard",
102
+ "LkSelect",
103
+ "LkSnackbar",
104
+ "LkNavbar",
105
+ // Theme
106
+ "LkTheme",
107
+ "LkThemeController"
108
+ ].map((name) => ({ name, path: `${coreComponents}/${name}.vue` }));
109
+ components.push(
110
+ { name: "LkDropdown", path: `${coreComponents}/LkDropdown/LkDropdown.vue` },
111
+ { name: "LkDropdownTrigger", path: `${coreComponents}/LkDropdown/LkDropdownTrigger.vue` },
112
+ { name: "LkDropdownMenu", path: `${coreComponents}/LkDropdown/LkDropdownMenu.vue` }
113
+ );
114
+ for (const { name, path } of components) {
115
+ addComponent({
116
+ name,
117
+ filePath: resolver.resolve(path)
118
+ });
119
+ }
63
120
  }
64
121
  }
65
122
  });
package/dist/types.d.mts CHANGED
@@ -1,7 +1,3 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module.mjs'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
1
  export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liftkit-vue/nuxt",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Nuxt 4 module for LiftKit Vue - auto-imports components and CSS design tokens",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -29,14 +29,12 @@
29
29
  "types": "./dist/types.d.mts"
30
30
  }
31
31
  },
32
- "files": ["dist"],
33
- "scripts": {
34
- "build": "nuxt-module-build build",
35
- "typecheck": "vue-tsc --noEmit"
36
- },
32
+ "files": [
33
+ "dist"
34
+ ],
37
35
  "dependencies": {
38
- "@liftkit-vue/core": "workspace:*",
39
- "@nuxt/kit": "^4.3.1"
36
+ "@nuxt/kit": "^4.3.1",
37
+ "@liftkit-vue/core": "^0.2.1"
40
38
  },
41
39
  "devDependencies": {
42
40
  "@nuxt/module-builder": "^1.0.2",
@@ -45,5 +43,9 @@
45
43
  "vue": "^3.5.0",
46
44
  "vue-tsc": "^2.2.0",
47
45
  "typescript": "^5.7.0"
46
+ },
47
+ "scripts": {
48
+ "build": "nuxt-module-build build",
49
+ "typecheck": "vue-tsc --noEmit"
48
50
  }
49
- }
51
+ }