@nuxt/devtools-ui-kit-nightly 2.0.0-beta.0-28940159.3b2c84c

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 +129 -0
  3. package/dist/assets/styles.css +1 -0
  4. package/dist/components/NBadge.vue +5 -0
  5. package/dist/components/NButton.vue +34 -0
  6. package/dist/components/NCard.vue +5 -0
  7. package/dist/components/NCheckbox.vue +36 -0
  8. package/dist/components/NCodeBlock.vue +51 -0
  9. package/dist/components/NDarkToggle.vue +77 -0
  10. package/dist/components/NDialog.vue +80 -0
  11. package/dist/components/NDrawer.vue +77 -0
  12. package/dist/components/NDropdown.vue +36 -0
  13. package/dist/components/NIcon.vue +9 -0
  14. package/dist/components/NIconTitle.vue +15 -0
  15. package/dist/components/NLink.vue +29 -0
  16. package/dist/components/NLoading.vue +10 -0
  17. package/dist/components/NMarkdown.vue +19 -0
  18. package/dist/components/NNavbar.vue +34 -0
  19. package/dist/components/NNotification.vue +48 -0
  20. package/dist/components/NPanelGrids.vue +5 -0
  21. package/dist/components/NRadio.vue +40 -0
  22. package/dist/components/NSectionBlock.vue +77 -0
  23. package/dist/components/NSelect.vue +37 -0
  24. package/dist/components/NSelectTabs.vue +49 -0
  25. package/dist/components/NSplitPane.vue +47 -0
  26. package/dist/components/NSwitch.vue +34 -0
  27. package/dist/components/NTextInput.vue +40 -0
  28. package/dist/components/NTip.vue +16 -0
  29. package/dist/composables/notification.d.ts +9 -0
  30. package/dist/composables/notification.mjs +7 -0
  31. package/dist/module.cjs +5 -0
  32. package/dist/module.d.mts +12 -0
  33. package/dist/module.d.ts +12 -0
  34. package/dist/module.json +9 -0
  35. package/dist/module.mjs +38 -0
  36. package/dist/runtime/client.d.ts +1 -0
  37. package/dist/runtime/client.js +2 -0
  38. package/dist/runtime/client.mjs +2 -0
  39. package/dist/types.d.mts +1 -0
  40. package/dist/types.d.ts +1 -0
  41. package/dist/unocss.d.mts +7 -0
  42. package/dist/unocss.d.ts +7 -0
  43. package/dist/unocss.mjs +168 -0
  44. package/module.cjs +6 -0
  45. package/package.json +68 -0
@@ -0,0 +1,168 @@
1
+ import { theme } from '@unocss/preset-mini';
2
+ import { fonts } from '@unocss/preset-mini/rules';
3
+ import { parseColor } from '@unocss/preset-mini/utils';
4
+ import { mergeDeep, presetUno, presetAttributify, presetTypography, presetIcons, presetWebFonts, transformerDirectives, transformerVariantGroup } from 'unocss';
5
+
6
+ function unocssPreset() {
7
+ return {
8
+ name: "@nuxt/devtools-ui-kit",
9
+ theme: mergeDeep(theme, {
10
+ colors: {
11
+ brand: "#00DC82",
12
+ primary: "#099e61",
13
+ context: "rgba(var(--nui-c-context),%alpha)"
14
+ }
15
+ }),
16
+ rules: [
17
+ [/^n-(.*)$/, ([, body], { theme }) => {
18
+ const color = parseColor(body, theme);
19
+ if (color?.cssColor?.type === "rgb" && color.cssColor.components) {
20
+ return {
21
+ "--nui-c-context": `${color.cssColor.components.join(",")}`
22
+ };
23
+ }
24
+ }],
25
+ [/^n-(.*)$/, fonts[1][1]],
26
+ ["n-dashed", { "border-style": "dashed" }],
27
+ ["n-solid", {
28
+ "background-color": "rgba(var(--nui-c-context), 1) !important",
29
+ "border-color": "rgba(var(--nui-c-context), 1)",
30
+ "color": "white !important"
31
+ }],
32
+ ["n-disabled", {
33
+ "opacity": 0.6,
34
+ "pointer-events": "none",
35
+ "filter": "saturate(0)"
36
+ }],
37
+ /**
38
+ * Credit to Nanda Syahrasyad (https://github.com/narendrasss)
39
+ *
40
+ * - https://github.com/narendrasss/NotANumber
41
+ * - https://www.nan.fyi/grid.svg
42
+ * - https://www.nan.fyi/grid-dark.svg
43
+ */
44
+ ["n-panel-grids-light", {
45
+ "background-image": `url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsla(0, 0%25, 98%25, 1)' fill='none'/%3E%3C/svg%3E")`,
46
+ "background-size": "40px 40px"
47
+ }],
48
+ ["n-panel-grids-dark", {
49
+ "background-image": `url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='hsl(0, 0%25, 8.5%25)'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsl(0, 0%25, 11.0%25)' fill='none'/%3E%3C/svg%3E");`,
50
+ "background-size": "40px 40px"
51
+ }]
52
+ ],
53
+ variants: [
54
+ (input) => {
55
+ const prefix = "n-disabled:";
56
+ if (input.startsWith(prefix)) {
57
+ return {
58
+ matcher: input.slice(prefix.length),
59
+ selector: (input2) => `[disabled] ${input2}, ${input2}[disabled]`
60
+ };
61
+ }
62
+ },
63
+ (input) => {
64
+ const prefix = "n-checked:";
65
+ if (input.startsWith(prefix)) {
66
+ return {
67
+ matcher: input.slice(prefix.length),
68
+ selector: (input2) => `[checked] ${input2}, ${input2}[checked]`
69
+ };
70
+ }
71
+ }
72
+ ],
73
+ shortcuts: {
74
+ // general
75
+ "n-bg-base": "bg-white dark:bg-[#151515]",
76
+ "n-bg-active": "bg-gray:5",
77
+ "n-bg-hover": "bg-gray:3",
78
+ "n-border-base": "border-gray/20",
79
+ "n-transition": "transition-all duration-200",
80
+ "n-focus-base": "ring-2 ring-context/50",
81
+ "n-active-base": "ring-3 ring-context/10",
82
+ "n-borderless": "!border-transparent !shadow-none",
83
+ // link
84
+ "n-link-base": "underline underline-offset-2 underline-black/20 dark:underline-white/40",
85
+ "n-link-hover": "decoration-dotted text-context underline-context! op100!",
86
+ // card
87
+ "n-card-base": "border n-border-base rounded n-bg-base shadow-sm",
88
+ // header
89
+ "n-header-upper": "text-sm uppercase mb-2 leading-1.2em tracking-wide op50",
90
+ // button
91
+ "n-button-base": "border n-border-base rounded shadow-sm px-1em py-0.25em inline-flex items-center gap-1 op80 !outline-none touch-manipulation",
92
+ "n-button-hover": "op100 !border-context text-context",
93
+ "n-button-active": "n-active-base bg-context/5",
94
+ "n-button-icon": "-ml-0.2em mr-0.2em text-1.1em",
95
+ // checkbox
96
+ "n-checkbox": "inline-flex gap-1 items-center rounded",
97
+ "n-checkbox-hover": "op100 n-bg-hover cursor-pointer",
98
+ "n-checkbox-box": "border n-border-base w-1.1em h-1.1em mr-1 text-white flex flex-none items-center rounded-sm overflow-visible",
99
+ "n-checkbox-box-checked": "bg-context border-context",
100
+ "n-checkbox-icon": "carbon-checkmark w-1em h-1em m-auto",
101
+ // radio
102
+ "n-radio-box": "border rounded n-border-base w-1.2em h-1.2em mr-1 text-white flex flex-none rounded-full overflow-visible",
103
+ "n-radio-hover": "op100 n-bg-hover cursor-pointer",
104
+ "n-radio-box-checked": "border-context",
105
+ "n-radio-inner": "bg-context rounded-1/2 w-0 h-0 m-auto",
106
+ "n-radio-inner-checked": "w-0.8em h-0.8em",
107
+ // switch
108
+ "n-switch-base": "inline-flex items-center select-none rounded-full pe-2",
109
+ "n-switch-hover": "op100 n-bg-hover cursor-pointer",
110
+ "n-switch-slider": "mr-1 rounded-full border n-border-base relative p-2px",
111
+ "n-switch-slider-checked": "border-context/20 bg-context/10",
112
+ "n-switch-thumb": "h-1em w-1em rounded-1/2 border n-border-base ml-0 mr-0.8em",
113
+ "n-switch-thumb-checked": "bg-context border-context ml-0.8em mr-0",
114
+ // tip
115
+ "n-tip-base": "bg-context/4 text-context px-1em py-0.4em rounded flex gap-2 items-center dark:bg-context/12",
116
+ // icon
117
+ "n-icon": "flex-none",
118
+ // code
119
+ "n-code-block": "dark:bg-[#121212] bg-white",
120
+ // icon-button
121
+ "n-icon-button": "aspect-1/1 w-1.6em h-1.6em flex items-center justify-center rounded op50 hover:op100 hover:n-bg-active",
122
+ // badge
123
+ "n-badge-base": "bg-context/10 text-context rounded whitespace-nowrap select-none",
124
+ "n-badge": "n-badge-base mx-0.5 px-1.5 py-0.5 text-xs",
125
+ // loading
126
+ "n-loading": "flex h-full w-full justify-center items-center",
127
+ "n-panel-grids": "n-panel-grids-light dark:n-panel-grids-dark",
128
+ "n-panel-grids-center": "n-panel-grids flex flex-col h-full gap-2 items-center justify-center",
129
+ // glass
130
+ "n-glass-effect": "backdrop-blur-6 bg-white/80 dark:bg-[#151515]/90",
131
+ "n-navbar-glass": "sticky z-10 top-0 n-glass-effect"
132
+ }
133
+ };
134
+ }
135
+ function extendUnocssOptions(user = {}) {
136
+ return {
137
+ ...user,
138
+ preflight: true,
139
+ presets: [
140
+ presetUno(),
141
+ presetAttributify(),
142
+ presetTypography(),
143
+ presetIcons({
144
+ prefix: ["i-", ""],
145
+ scale: 1.2,
146
+ extraProperties: {
147
+ "display": "inline-block",
148
+ "vertical-align": "middle"
149
+ }
150
+ // ...(user?.icons || {})
151
+ }),
152
+ presetWebFonts({
153
+ fonts: {
154
+ sans: "DM Sans",
155
+ mono: "DM Mono"
156
+ }
157
+ }),
158
+ unocssPreset(),
159
+ ...user.presets || []
160
+ ],
161
+ transformers: [
162
+ transformerDirectives(),
163
+ transformerVariantGroup()
164
+ ]
165
+ };
166
+ }
167
+
168
+ export { extendUnocssOptions, unocssPreset };
package/module.cjs ADDED
@@ -0,0 +1,6 @@
1
+ // CommonJS proxy to bypass jiti transforms from nuxt 2 and using native ESM
2
+ module.exports = function (...args) {
3
+ return import('./dist/module.mjs').then(m => m.default.call(this, ...args))
4
+ }
5
+
6
+ module.exports.meta = require('./package.json')
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@nuxt/devtools-ui-kit-nightly",
3
+ "type": "module",
4
+ "version": "2.0.0-beta.0-28940159.3b2c84c",
5
+ "license": "MIT",
6
+ "homepage": "https://devtools.nuxt.com/module/ui-kit",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/nuxt/devtools.git",
10
+ "directory": "packages/devtools-ui-kit"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/module.mjs",
15
+ "require": "./module.cjs"
16
+ },
17
+ "./module": {
18
+ "import": "./dist/module.mjs",
19
+ "require": "./module.cjs"
20
+ },
21
+ "./unocss": {
22
+ "import": "./dist/unocss.mjs"
23
+ }
24
+ },
25
+ "main": "./dist/module.mjs",
26
+ "files": [
27
+ "*.cjs",
28
+ "dist"
29
+ ],
30
+ "peerDependencies": {
31
+ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@2.0.0-beta.0-28940159.3b2c84c"
32
+ },
33
+ "dependencies": {
34
+ "@iconify-json/carbon": "^1.2.5",
35
+ "@iconify-json/logos": "^1.2.4",
36
+ "@iconify-json/ri": "^1.2.5",
37
+ "@iconify-json/tabler": "^1.2.14",
38
+ "@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@2.0.0-beta.0-28940159.3b2c84c",
39
+ "@nuxt/kit": "^3.15.1",
40
+ "@unocss/core": "^0.65.4",
41
+ "@unocss/nuxt": "^0.65.4",
42
+ "@unocss/preset-attributify": "^0.65.4",
43
+ "@unocss/preset-icons": "^0.65.4",
44
+ "@unocss/preset-mini": "^0.65.4",
45
+ "@unocss/reset": "^0.65.4",
46
+ "@vueuse/core": "^12.3.0",
47
+ "@vueuse/integrations": "^12.3.0",
48
+ "@vueuse/nuxt": "^12.3.0",
49
+ "defu": "^6.1.4",
50
+ "focus-trap": "^7.6.2",
51
+ "splitpanes": "^3.1.5",
52
+ "unocss": "^0.65.4",
53
+ "v-lazy-show": "^0.3.0"
54
+ },
55
+ "devDependencies": {
56
+ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@2.0.0-beta.0-28940159.3b2c84c",
57
+ "nuxt": "^3.15.1"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "scripts": {
63
+ "build": "nuxt-build-module build",
64
+ "stub": "nuxt-build-module build --stub",
65
+ "dev": "nuxi dev playground",
66
+ "playground:build": "nuxi generate playground"
67
+ }
68
+ }