@mapomodule/uikit 2.0.0-beta.1 → 2.0.0-beta.3

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 (90) hide show
  1. package/dist/index.d.mts +3 -2
  2. package/dist/index.d.ts +3 -2
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.mjs +0 -17
  5. package/dist/module.d.mts +30 -2
  6. package/dist/module.d.ts +27 -2
  7. package/dist/module.d.ts.map +1 -0
  8. package/dist/module.json +1 -1
  9. package/dist/module.mjs +109 -13
  10. package/dist/runtime/assets/main.css +1 -0
  11. package/dist/runtime/components/MapoConfirmDialog.vue +33 -0
  12. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
  13. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
  14. package/dist/runtime/components/MapoDetail.vue +598 -0
  15. package/dist/runtime/components/MapoDetail.vue.d.ts +401 -0
  16. package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
  17. package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
  18. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
  19. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
  20. package/dist/runtime/components/MapoList.vue +191 -0
  21. package/dist/runtime/components/MapoList.vue.d.ts +111 -0
  22. package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
  23. package/dist/runtime/components/MapoListActions.vue +112 -0
  24. package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
  25. package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
  26. package/dist/runtime/components/MapoListFilters.vue +244 -0
  27. package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
  28. package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
  29. package/dist/runtime/components/MapoListHead.vue +9 -0
  30. package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
  31. package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
  32. package/dist/runtime/components/MapoListQuickEdit.vue +119 -0
  33. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
  34. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
  35. package/dist/runtime/components/MapoListTable.vue +660 -0
  36. package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
  37. package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
  38. package/dist/runtime/components/MapoListTabs.vue +38 -0
  39. package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
  40. package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
  41. package/dist/runtime/components/MapoLogin.vue +193 -0
  42. package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
  43. package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
  44. package/dist/runtime/components/MapoLogoutButton.vue +25 -0
  45. package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
  46. package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
  47. package/dist/runtime/components/MapoRootComponents.vue +9 -0
  48. package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
  49. package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
  50. package/dist/runtime/components/MapoSidebar.vue +87 -0
  51. package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
  52. package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
  53. package/dist/runtime/components/MapoSidebarList.vue +27 -0
  54. package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
  55. package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
  56. package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
  57. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
  58. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
  59. package/dist/runtime/components/MapoSidebarProfile.vue +51 -0
  60. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
  61. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
  62. package/dist/runtime/components/MapoSnackBar.vue +38 -0
  63. package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
  64. package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
  65. package/dist/runtime/components/MapoThemeToggle.vue +19 -0
  66. package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
  67. package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
  68. package/dist/runtime/components/MapoTopbar.vue +30 -0
  69. package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
  70. package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
  71. package/dist/runtime/layouts/default.vue +43 -0
  72. package/dist/runtime/layouts/default.vue.d.ts +20 -0
  73. package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
  74. package/dist/runtime/layouts/empty.vue +9 -0
  75. package/dist/runtime/layouts/empty.vue.d.ts +14 -0
  76. package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
  77. package/dist/runtime/page-meta.nuxt.d.ts +45 -0
  78. package/dist/runtime/pages/index.vue +13 -0
  79. package/dist/runtime/pages/index.vue.d.ts +4 -0
  80. package/dist/runtime/pages/index.vue.d.ts.map +1 -0
  81. package/dist/runtime/pages/login.vue +7 -0
  82. package/dist/runtime/pages/login.vue.d.ts +4 -0
  83. package/dist/runtime/pages/login.vue.d.ts.map +1 -0
  84. package/dist/runtime/types/list.d.ts +59 -0
  85. package/dist/runtime/types/list.d.ts.map +1 -0
  86. package/dist/runtime/types/list.js +0 -0
  87. package/dist/types.d.mts +6 -10
  88. package/package.json +6 -6
  89. package/dist/index.d.cts +0 -2
  90. package/dist/module.d.cts +0 -2
package/dist/index.d.mts CHANGED
@@ -1,2 +1,3 @@
1
- export * from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.js";
2
- export { default } from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.js";
1
+ export { MapoUikitOptions } from './module.mjs';
2
+ export { ActionContext, ActionDescriptor, ActiveFilter, FilterChoice, FilterDescriptor, ListColumn, ListTabItem } from '../dist/runtime/types/list.js';
3
+ import '@nuxt/schema';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export * from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.js";
2
- export { default } from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.js";
1
+ export type { MapoUikitOptions } from "./module";
2
+ export type { ListColumn, FilterChoice, FilterDescriptor, ActiveFilter, ActionContext, ActionDescriptor, ListTabItem, } from "./runtime/types/list.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,MAAM,yBAAyB,CAAC"}
package/dist/index.mjs CHANGED
@@ -1,18 +1 @@
1
- import { createJiti } from "file:///home/runner/work/mapo-new/mapo-new/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs";
2
1
 
3
- const jiti = createJiti(import.meta.url, {
4
- "interopDefault": true,
5
- "alias": {
6
- "@mapomodule/uikit": "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit"
7
- },
8
- "transformOptions": {
9
- "babel": {
10
- "plugins": []
11
- }
12
- }
13
- })
14
-
15
- /** @type {import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.js")} */
16
- const _module = await jiti.import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.ts");
17
-
18
- export default _module?.default ?? _module;
package/dist/module.d.mts CHANGED
@@ -1,2 +1,30 @@
1
- export * from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.js";
2
- export { default } from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.js";
1
+ import { NuxtModule } from '@nuxt/schema';
2
+ import '../dist/runtime/types/list.js';
3
+
4
+ interface MapoUikitOptions {
5
+ /**
6
+ * Path to a CSS file that is injected after the base uikit CSS.
7
+ * Use it to override Tailwind theme tokens or add global styles.
8
+ *
9
+ * @example
10
+ * nuxt.config.ts
11
+ * mapoUikit: { css: '~/assets/css/theme.css' }
12
+ *
13
+ * assets/css/theme.css
14
+ * @import "@nuxt/ui";
15
+ * :root {
16
+ * --color-primary-500: oklch(0.7 0.2 240);
17
+ * }
18
+ */
19
+ css?: string;
20
+ /**
21
+ * Default Nuxt UI component config merged into nuxt.options.ui.
22
+ * Deep-merged so the consuming app can override individual keys.
23
+ * @see https://ui.nuxt.com/getting-started/theme
24
+ */
25
+ ui?: Record<string, unknown>;
26
+ }
27
+ declare const _default: NuxtModule<MapoUikitOptions, MapoUikitOptions, false>;
28
+
29
+ export { _default as default };
30
+ export type { MapoUikitOptions };
package/dist/module.d.ts CHANGED
@@ -1,2 +1,27 @@
1
- export * from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.js";
2
- export { default } from "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.js";
1
+ import type { NuxtModule } from "@nuxt/schema";
2
+ export interface MapoUikitOptions {
3
+ /**
4
+ * Path to a CSS file that is injected after the base uikit CSS.
5
+ * Use it to override Tailwind theme tokens or add global styles.
6
+ *
7
+ * @example
8
+ * nuxt.config.ts
9
+ * mapoUikit: { css: '~/assets/css/theme.css' }
10
+ *
11
+ * assets/css/theme.css
12
+ * @import "@nuxt/ui";
13
+ * :root {
14
+ * --color-primary-500: oklch(0.7 0.2 240);
15
+ * }
16
+ */
17
+ css?: string;
18
+ /**
19
+ * Default Nuxt UI component config merged into nuxt.options.ui.
20
+ * Deep-merged so the consuming app can override individual keys.
21
+ * @see https://ui.nuxt.com/getting-started/theme
22
+ */
23
+ ui?: Record<string, unknown>;
24
+ }
25
+ declare const _default: NuxtModule<MapoUikitOptions, MapoUikitOptions, false>;
26
+ export default _default;
27
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;;AAED,wBA+I0C"}
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
3
  "configKey": "mapoUikit",
4
- "version": "2.0.0-beta.1",
4
+ "version": "2.0.0-beta.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,18 +1,114 @@
1
- import { createJiti } from "file:///home/runner/work/mapo-new/mapo-new/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs";
1
+ import { readFileSync, existsSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { defineNuxtModule, createResolver, addTypeTemplate, addComponent, addLayout, extendPages } from '@nuxt/kit';
2
4
 
3
- const jiti = createJiti(import.meta.url, {
4
- "interopDefault": true,
5
- "alias": {
6
- "@mapomodule/uikit": "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit"
5
+ const module$1 = defineNuxtModule({
6
+ meta: {
7
+ name: "@mapomodule/uikit",
8
+ configKey: "mapoUikit"
7
9
  },
8
- "transformOptions": {
9
- "babel": {
10
- "plugins": []
10
+ defaults: {
11
+ ui: {}
12
+ },
13
+ // @nuxt/ui must be declared BEFORE mapomodule in the consuming app's modules[]
14
+ // so that @nuxt/icon's Icon component is available in SSR. Installing it via
15
+ // installModule() from inside another module causes an SSR Icon infinite loop.
16
+ moduleDependencies: {
17
+ "@nuxt/ui": {}
18
+ },
19
+ async setup(options, nuxt) {
20
+ const resolver = createResolver(import.meta.url);
21
+ addTypeTemplate({
22
+ filename: "types/mapo-uikit-page-meta.d.ts",
23
+ getContents: () => readFileSync(
24
+ resolver.resolve("./runtime/page-meta.nuxt.d.ts"),
25
+ "utf-8"
26
+ )
27
+ });
28
+ nuxt.options.css.unshift(resolver.resolve("./runtime/assets/main.css"));
29
+ nuxt.options.vite.server ??= {};
30
+ nuxt.options.vite.server.fs ??= {};
31
+ nuxt.options.vite.server.fs.allow ??= [];
32
+ nuxt.options.vite.server.fs.allow.push(resolver.resolve("."));
33
+ if (options.css) {
34
+ nuxt.options.css.push(options.css);
35
+ }
36
+ if (options.ui && Object.keys(options.ui).length) {
37
+ nuxt.options.ui = { ...options.ui, ...nuxt.options.ui ?? {} };
11
38
  }
39
+ const components = [
40
+ "MapoSnackBar",
41
+ "MapoConfirmDialog",
42
+ "MapoLogin",
43
+ "MapoRootComponents",
44
+ "MapoSidebar",
45
+ "MapoSidebarList",
46
+ "MapoSidebarListItem",
47
+ "MapoLogoutButton",
48
+ "MapoSidebarProfile",
49
+ "MapoTopbar",
50
+ "MapoDetail",
51
+ "MapoDetailLangSwitch",
52
+ "MapoList",
53
+ "MapoListHead",
54
+ "MapoListTabs",
55
+ "MapoListFilters",
56
+ "MapoListActions",
57
+ "MapoListQuickEdit",
58
+ "MapoListTable"
59
+ ];
60
+ for (const name of components) {
61
+ addComponent({
62
+ name,
63
+ filePath: resolver.resolve(`./runtime/components/${name}.vue`)
64
+ });
65
+ }
66
+ addLayout(
67
+ { src: resolver.resolve("./runtime/layouts/default.vue") },
68
+ "mapo-default"
69
+ );
70
+ addLayout(
71
+ { src: resolver.resolve("./runtime/layouts/empty.vue") },
72
+ "mapo-empty"
73
+ );
74
+ nuxt.hook("modules:done", () => {
75
+ const iconOpts = nuxt.options;
76
+ iconOpts.icon ??= {};
77
+ iconOpts.icon.serverBundle ??= {};
78
+ const existing = iconOpts.icon.serverBundle.collections ?? [];
79
+ iconOpts.icon.serverBundle.collections = Array.from(
80
+ /* @__PURE__ */ new Set([...existing, "lucide"])
81
+ );
82
+ });
83
+ nuxt.hook("components:extend", (components2) => {
84
+ const overrideDir = resolve(nuxt.options.srcDir, "mapooverride");
85
+ if (!existsSync(overrideDir)) return;
86
+ for (const component of components2) {
87
+ const c = component;
88
+ const overridePath = resolve(overrideDir, `${c.name}.vue`);
89
+ if (existsSync(overridePath)) {
90
+ c.filePath = overridePath;
91
+ c.shortPath = `mapooverride/${c.name}.vue`;
92
+ }
93
+ }
94
+ });
95
+ extendPages((pages) => {
96
+ if (!pages.some((p) => p.path === "/login"))
97
+ pages.push({
98
+ name: "mapo-login",
99
+ path: "/login",
100
+ file: resolver.resolve("./runtime/pages/login.vue"),
101
+ meta: { layout: "mapo-empty" }
102
+ });
103
+ if (!pages.some((p) => p.path === "/"))
104
+ pages.push({
105
+ name: "mapo-index",
106
+ path: "/",
107
+ file: resolver.resolve("./runtime/pages/index.vue"),
108
+ meta: { layout: "mapo-default" }
109
+ });
110
+ });
12
111
  }
13
- })
14
-
15
- /** @type {import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.js")} */
16
- const _module = await jiti.import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.ts");
112
+ });
17
113
 
18
- export default _module?.default ?? _module;
114
+ export { module$1 as default };
@@ -0,0 +1 @@
1
+ @import "tailwindcss";@import "@nuxt/ui";@source "../components/**/*.vue";@source "../layouts/**/*.vue";@source "../pages/**/*.vue";@source "../../../../form/src/runtime/components/**/*.vue";@source "../../../../form/src/runtime/composables/**/*.ts";@source inline("col-span-1 col-span-2 col-span-3 col-span-4 col-span-5 col-span-6 col-span-7 col-span-8 col-span-9 col-span-10 col-span-11 col-span-12");@source inline("md:col-span-1 md:col-span-2 md:col-span-3 md:col-span-4 md:col-span-5 md:col-span-6 md:col-span-7 md:col-span-8 md:col-span-9 md:col-span-10 md:col-span-11 md:col-span-12");@source inline("grid-cols-12");@source inline("flex-1 min-h-0 h-full");.mapo-group-expand-body,.mapo-group-expand-body .mapo-form-field,.mapo-group-expand-body .mapo-form-field>div,.mapo-group-expand-body>*{flex:1;min-height:0}.mapo-group-expand-body [contenteditable],.mapo-group-expand-body textarea{height:100%!important;overflow-y:auto!important;resize:none!important}.mapo-group-expand-body .mapo-form-field>div>*{height:100%}@layer base{body,html{height:100%}:root{--mapo-topbar-height:56px}#__nuxt,#__nuxt>*{height:100%}}
@@ -0,0 +1,33 @@
1
+ <script setup>
2
+ import { useConfirmStore } from "@mapomodule/store/runtime/stores/confirm";
3
+ const store = useConfirmStore();
4
+ </script>
5
+
6
+ <template>
7
+ <UModal v-model:open="store.active" :dismissible="false">
8
+ <template #content>
9
+ <div class="p-6 space-y-4">
10
+ <div class="space-y-1">
11
+ <h3 class="text-base font-semibold text-highlighted">
12
+ {{ store.options?.title ?? "Confirm" }}
13
+ </h3>
14
+ <p class="text-sm text-muted">
15
+ {{ store.options?.message }}
16
+ </p>
17
+ </div>
18
+
19
+ <div class="flex justify-end gap-3">
20
+ <UButton variant="ghost" color="neutral" @click="store.cancel()">
21
+ {{ store.options?.cancelText ?? "Cancel" }}
22
+ </UButton>
23
+ <UButton
24
+ :color="store.options?.dangerous ? 'error' : 'primary'"
25
+ @click="store.confirm()"
26
+ >
27
+ {{ store.options?.confirmText ?? "Confirm" }}
28
+ </UButton>
29
+ </div>
30
+ </div>
31
+ </template>
32
+ </UModal>
33
+ </template>
@@ -0,0 +1,4 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ //# sourceMappingURL=MapoConfirmDialog.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapoConfirmDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoConfirmDialog.vue"],"names":[],"mappings":"AAqKA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}