@mframework/ui 0.1.0-beta.3 → 0.1.0-beta.5
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/dist/module.d.mts +3 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +29 -7
- package/dist/runtime/assets/config/tailwind.conifg.js +37 -6
- package/dist/runtime/components/Gallery.d.vue.ts +0 -0
- package/dist/runtime/components/Gallery.vue +56 -0
- package/dist/runtime/components/Gallery.vue.d.ts +0 -0
- package/dist/runtime/composables/useMToast.d.ts +0 -5
- package/dist/runtime/composables/useMToast.js +9 -9
- package/dist/runtime/design/tokens.d.ts +0 -22
- package/dist/runtime/design/tokens.js +20 -20
- package/dist/runtime/plugins/builder.d.ts +0 -3
- package/dist/runtime/plugins/builder.js +328 -303
- package/dist/runtime/plugins/fontawesome.d.ts +0 -3
- package/dist/runtime/plugins/fontawesome.js +7 -7
- package/dist/runtime/plugins/formkit.d.ts +0 -3
- package/dist/runtime/plugins/formkit.js +5 -5
- package/dist/runtime/plugins/lightgallery.d.ts +0 -6
- package/dist/runtime/plugins/lightgallery.js +20 -14
- package/dist/runtime/plugins/motion.d.ts +0 -2
- package/dist/runtime/plugins/motion.js +3 -3
- package/dist/runtime/plugins/theme-switcher.d.ts +0 -2
- package/dist/runtime/plugins/theme-switcher.js +22 -25
- package/dist/runtime/plugins/theme.d.ts +0 -2
- package/dist/runtime/plugins/theme.js +46 -32
- package/dist/runtime/plugins/vuetify.d.ts +0 -3
- package/dist/runtime/plugins/vuetify.js +30 -30
- package/dist/runtime/search/client.d.ts +0 -2
- package/dist/runtime/search/client.js +12 -19
- package/dist/runtime/search/plugin.d.ts +0 -2
- package/dist/runtime/search/plugin.js +5 -5
- package/dist/runtime/styles/index.css +93 -0
- package/dist/runtime/styles/tailwind.css +1 -1
- package/package.json +8 -3
- package/dist/adapters/adapter-directus/src/types/ui.d.ts +0 -21
- package/dist/adapters/adapter-directus/src/types/ui.js +0 -1
- package/dist/module.d.ts +0 -6
- package/dist/module.js +0 -68
- package/dist/modules/ui/src/module.d.ts +0 -8
- package/dist/modules/ui/src/module.js +0 -75
- package/dist/modules/ui/src/runtime/composables/useMToast.d.ts +0 -5
- package/dist/modules/ui/src/runtime/composables/useMToast.js +0 -11
- package/dist/modules/ui/src/runtime/design/tokens.d.ts +0 -22
- package/dist/modules/ui/src/runtime/design/tokens.js +0 -22
- package/dist/modules/ui/src/runtime/plugins/builder.d.ts +0 -3
- package/dist/modules/ui/src/runtime/plugins/builder.js +0 -311
- package/dist/modules/ui/src/runtime/plugins/fontawesome.d.ts +0 -3
- package/dist/modules/ui/src/runtime/plugins/fontawesome.js +0 -9
- package/dist/modules/ui/src/runtime/plugins/formkit.d.ts +0 -3
- package/dist/modules/ui/src/runtime/plugins/formkit.js +0 -8
- package/dist/modules/ui/src/runtime/plugins/motion.d.ts +0 -2
- package/dist/modules/ui/src/runtime/plugins/motion.js +0 -5
- package/dist/modules/ui/src/runtime/plugins/theme-switcher.d.ts +0 -2
- package/dist/modules/ui/src/runtime/plugins/theme-switcher.js +0 -27
- package/dist/modules/ui/src/runtime/plugins/theme.d.ts +0 -2
- package/dist/modules/ui/src/runtime/plugins/theme.js +0 -44
- package/dist/modules/ui/src/runtime/plugins/vuetify.d.ts +0 -3
- package/dist/modules/ui/src/runtime/plugins/vuetify.js +0 -33
- package/dist/modules/ui/src/runtime/search/client.d.ts +0 -2
- package/dist/modules/ui/src/runtime/search/client.js +0 -21
- package/dist/modules/ui/src/runtime/search/plugin.d.ts +0 -2
- package/dist/modules/ui/src/runtime/search/plugin.js +0 -7
- package/dist/modules/ui/src/utils/color.d.ts +0 -2
- package/dist/modules/ui/src/utils/color.js +0 -11
- package/dist/modules/ui/src/utils/fonts.d.ts +0 -5
- package/dist/modules/ui/src/utils/fonts.js +0 -18
- package/dist/modules/ui/src/utils/formkit.d.ts +0 -12
- package/dist/modules/ui/src/utils/formkit.js +0 -59
- package/dist/modules/ui/src/utils/icons.d.ts +0 -4
- package/dist/modules/ui/src/utils/icons.js +0 -36
- package/dist/runtime/plugins/icon-switcher.d.ts +0 -2
- package/dist/runtime/plugins/icon-switcher.js +0 -24
- package/dist/types/ui/api/global-search.d.ts +0 -8
- package/dist/types/ui/api/global-search.js +0 -1
- package/dist/types/ui/blocks/block-button-group.d.ts +0 -6
- package/dist/types/ui/blocks/block-button-group.js +0 -1
- package/dist/types/ui/blocks/block-button.d.ts +0 -13
- package/dist/types/ui/blocks/block-button.js +0 -1
- package/dist/types/ui/blocks/block-column.d.ts +0 -18
- package/dist/types/ui/blocks/block-column.js +0 -1
- package/dist/types/ui/blocks/block-cta.d.ts +0 -11
- package/dist/types/ui/blocks/block-cta.js +0 -1
- package/dist/types/ui/blocks/block-divider.d.ts +0 -4
- package/dist/types/ui/blocks/block-divider.js +0 -1
- package/dist/types/ui/blocks/block-faq.d.ts +0 -11
- package/dist/types/ui/blocks/block-faq.js +0 -1
- package/dist/types/ui/blocks/block-form.d.ts +0 -7
- package/dist/types/ui/blocks/block-form.js +0 -1
- package/dist/types/ui/blocks/block-gallery.d.ts +0 -13
- package/dist/types/ui/blocks/block-gallery.js +0 -1
- package/dist/types/ui/blocks/block-hero.d.ts +0 -11
- package/dist/types/ui/blocks/block-hero.js +0 -1
- package/dist/types/ui/blocks/block-html.d.ts +0 -4
- package/dist/types/ui/blocks/block-html.js +0 -1
- package/dist/types/ui/blocks/block-logocloud.d.ts +0 -13
- package/dist/types/ui/blocks/block-logocloud.js +0 -1
- package/dist/types/ui/blocks/block-quote.d.ts +0 -10
- package/dist/types/ui/blocks/block-quote.js +0 -1
- package/dist/types/ui/blocks/block-richtext.d.ts +0 -7
- package/dist/types/ui/blocks/block-richtext.js +0 -1
- package/dist/types/ui/blocks/block-steps.d.ts +0 -21
- package/dist/types/ui/blocks/block-steps.js +0 -1
- package/dist/types/ui/blocks/block-team.d.ts +0 -6
- package/dist/types/ui/blocks/block-team.js +0 -1
- package/dist/types/ui/blocks/block-testimonial.d.ts +0 -13
- package/dist/types/ui/blocks/block-testimonial.js +0 -1
- package/dist/types/ui/blocks/block-video.d.ts +0 -9
- package/dist/types/ui/blocks/block-video.js +0 -1
- package/dist/types/ui/blocks/block.d.ts +0 -17
- package/dist/types/ui/blocks/block.js +0 -1
- package/dist/types/ui/blocks/index.d.ts +0 -18
- package/dist/types/ui/blocks/index.js +0 -1
- package/dist/types/ui/component.d.ts +0 -6
- package/dist/types/ui/component.js +0 -1
- package/dist/types/ui/content/category.d.ts +0 -10
- package/dist/types/ui/content/category.js +0 -1
- package/dist/types/ui/content/form.d.ts +0 -21
- package/dist/types/ui/content/form.js +0 -1
- package/dist/types/ui/content/index.d.ts +0 -6
- package/dist/types/ui/content/index.js +0 -1
- package/dist/types/ui/content/page.d.ts +0 -38
- package/dist/types/ui/content/page.js +0 -1
- package/dist/types/ui/content/post.d.ts +0 -38
- package/dist/types/ui/content/post.js +0 -1
- package/dist/types/ui/content/team.d.ts +0 -17
- package/dist/types/ui/content/team.js +0 -1
- package/dist/types/ui/content/testimonial.d.ts +0 -18
- package/dist/types/ui/content/testimonial.js +0 -1
- package/dist/types/ui/form.d.ts +0 -12
- package/dist/types/ui/form.js +0 -1
- package/dist/types/ui/help/index.d.ts +0 -51
- package/dist/types/ui/help/index.js +0 -1
- package/dist/types/ui/meta/analytics.d.ts +0 -21
- package/dist/types/ui/meta/analytics.js +0 -1
- package/dist/types/ui/meta/config.d.ts +0 -22
- package/dist/types/ui/meta/config.js +0 -1
- package/dist/types/ui/meta/globals.d.ts +0 -33
- package/dist/types/ui/meta/globals.js +0 -1
- package/dist/types/ui/meta/index.d.ts +0 -6
- package/dist/types/ui/meta/index.js +0 -1
- package/dist/types/ui/meta/navigation.d.ts +0 -31
- package/dist/types/ui/meta/navigation.js +0 -1
- package/dist/types/ui/meta/redirect.d.ts +0 -12
- package/dist/types/ui/meta/redirect.js +0 -1
- package/dist/types/ui/meta/seo.d.ts +0 -19
- package/dist/types/ui/meta/seo.js +0 -1
- package/dist/types/ui/os/contact.d.ts +0 -22
- package/dist/types/ui/os/contact.js +0 -1
- package/dist/types/ui/os/conversation.d.ts +0 -23
- package/dist/types/ui/os/conversation.js +0 -1
- package/dist/types/ui/os/index.d.ts +0 -16
- package/dist/types/ui/os/index.js +0 -1
- package/dist/types/ui/os/organization.d.ts +0 -51
- package/dist/types/ui/os/organization.js +0 -1
- package/dist/types/ui/os/os-activity.d.ts +0 -26
- package/dist/types/ui/os/os-activity.js +0 -1
- package/dist/types/ui/os/os-deal.d.ts +0 -42
- package/dist/types/ui/os/os-deal.js +0 -1
- package/dist/types/ui/os/os-expense.d.ts +0 -21
- package/dist/types/ui/os/os-expense.js +0 -1
- package/dist/types/ui/os/os-invoice.d.ts +0 -46
- package/dist/types/ui/os/os-invoice.js +0 -1
- package/dist/types/ui/os/os-item.d.ts +0 -17
- package/dist/types/ui/os/os-item.js +0 -1
- package/dist/types/ui/os/os-payment.d.ts +0 -27
- package/dist/types/ui/os/os-payment.js +0 -1
- package/dist/types/ui/os/os-project.d.ts +0 -45
- package/dist/types/ui/os/os-project.js +0 -1
- package/dist/types/ui/os/os-proposal.d.ts +0 -61
- package/dist/types/ui/os/os-proposal.js +0 -1
- package/dist/types/ui/os/os-settings.d.ts +0 -17
- package/dist/types/ui/os/os-settings.js +0 -1
- package/dist/types/ui/os/os-subscription.d.ts +0 -12
- package/dist/types/ui/os/os-subscription.js +0 -1
- package/dist/types/ui/os/os-task.d.ts +0 -32
- package/dist/types/ui/os/os-task.js +0 -1
- package/dist/types/ui/os/os-tax-rate.d.ts +0 -12
- package/dist/types/ui/os/os-tax-rate.js +0 -1
- package/dist/types/ui/pageComponentMap.d.ts +0 -2
- package/dist/types/ui/pageComponentMap.js +0 -7
- package/dist/types/ui/pagination.d.ts +0 -6
- package/dist/types/ui/pagination.js +0 -1
- package/dist/types/ui/schema.d.ts +0 -78
- package/dist/types/ui/schema.js +0 -1
- package/dist/types/ui/state.d.ts +0 -5
- package/dist/types/ui/state.js +0 -1
- package/dist/types/ui/system/file.d.ts +0 -47
- package/dist/types/ui/system/file.js +0 -1
- package/dist/types/ui/system/folder.d.ts +0 -8
- package/dist/types/ui/system/folder.js +0 -1
- package/dist/types/ui/system/index.d.ts +0 -4
- package/dist/types/ui/system/index.js +0 -1
- package/dist/types/ui/system/role.d.ts +0 -20
- package/dist/types/ui/system/role.js +0 -1
- package/dist/types/ui/system/user.d.ts +0 -57
- package/dist/types/ui/system/user.js +0 -1
- package/dist/types/ui.d.ts +0 -21
- package/dist/types/ui.js +0 -1
- package/dist/utils/color.d.ts +0 -2
- package/dist/utils/color.js +0 -11
- package/dist/utils/fonts.d.ts +0 -5
- package/dist/utils/fonts.js +0 -18
- package/dist/utils/formkit.d.ts +0 -12
- package/dist/utils/formkit.js +0 -59
- package/dist/utils/icons.d.ts +0 -4
- package/dist/utils/icons.js +0 -36
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from
|
|
2
|
-
import { plugin as formKitPlugin, defaultConfig } from
|
|
3
|
-
import
|
|
1
|
+
import { defineNuxtPlugin } from "nuxt/app";
|
|
2
|
+
import { plugin as formKitPlugin, defaultConfig } from "@formkit/vue";
|
|
3
|
+
import "@formkit/themes/genesis";
|
|
4
4
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
5
|
-
|
|
5
|
+
nuxtApp.vueApp.use(formKitPlugin, defaultConfig({
|
|
6
6
|
// You can inject your own inputs, locales, etc. here
|
|
7
|
-
|
|
7
|
+
}));
|
|
8
8
|
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import 'lightgallery/css/lightgallery.css';
|
|
2
|
-
import 'lightgallery/css/lg-zoom.css';
|
|
3
|
-
import 'lightgallery/css/lg-thumbnail.css';
|
|
4
|
-
import 'lightgallery/css/lg-video.css';
|
|
5
|
-
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
6
|
-
export default _default;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from 'nuxt/app'
|
|
2
|
-
import lightGallery from 'lightgallery'
|
|
3
|
-
import lgZoom from 'lg-zoom'
|
|
4
|
-
import lgVideo from 'lg-video'
|
|
5
|
-
import lgThumbnail from 'lg-thumbnail'
|
|
6
|
-
import 'lightgallery/css/lightgallery.css'
|
|
7
|
-
import 'lightgallery/css/lg-zoom.css'
|
|
8
|
-
import 'lightgallery/css/lg-thumbnail.css'
|
|
9
|
-
import 'lightgallery/css/lg-video.css'
|
|
1
|
+
import { defineNuxtPlugin } from 'nuxt/app'
|
|
2
|
+
import lightGallery from 'lightgallery'
|
|
3
|
+
import lgZoom from 'lg-zoom'
|
|
4
|
+
import lgVideo from 'lg-video'
|
|
5
|
+
import lgThumbnail from 'lg-thumbnail'
|
|
6
|
+
import 'lightgallery/css/lightgallery.css'
|
|
7
|
+
import 'lightgallery/css/lg-zoom.css'
|
|
8
|
+
import 'lightgallery/css/lg-thumbnail.css'
|
|
9
|
+
import 'lightgallery/css/lg-video.css'
|
|
10
|
+
|
|
10
11
|
export default defineNuxtPlugin(() => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
// You can expose a composable or directive later if you want.
|
|
13
|
+
// For now, this ensures CSS + plugins are bundled.
|
|
14
|
+
// Example directive could be added here if needed.
|
|
15
|
+
document.querySelectorAll('.lightgallery').forEach((element) => {
|
|
16
|
+
lightGallery(element as HTMLElement, {
|
|
17
|
+
plugins: [lgZoom, lgVideo, lgThumbnail],
|
|
18
|
+
speed: 500,
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from
|
|
2
|
-
import { MotionPlugin } from
|
|
1
|
+
import { defineNuxtPlugin } from "nuxt/app";
|
|
2
|
+
import { MotionPlugin } from "@vueuse/motion";
|
|
3
3
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
4
|
-
|
|
4
|
+
nuxtApp.vueApp.use(MotionPlugin);
|
|
5
5
|
});
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from
|
|
2
|
-
import { useTheme } from
|
|
1
|
+
import { defineNuxtPlugin } from "nuxt/app";
|
|
2
|
+
import { useTheme } from "vuetify";
|
|
3
3
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
toggleTheme,
|
|
25
|
-
current: () => theme.global.name.value
|
|
26
|
-
});
|
|
4
|
+
if (process.server) return;
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
const setTheme = (mode) => {
|
|
7
|
+
theme.global.name.value = mode;
|
|
8
|
+
document.documentElement.classList.toggle("dark", mode === "dark");
|
|
9
|
+
localStorage.setItem("mframework-theme", mode);
|
|
10
|
+
};
|
|
11
|
+
const toggleTheme = () => {
|
|
12
|
+
const current = theme.global.name.value === "light" ? "dark" : "light";
|
|
13
|
+
setTheme(current);
|
|
14
|
+
};
|
|
15
|
+
const saved = localStorage.getItem("mframework-theme");
|
|
16
|
+
if (saved === "light" || saved === "dark") {
|
|
17
|
+
setTheme(saved);
|
|
18
|
+
}
|
|
19
|
+
nuxtApp.provide("mTheme", {
|
|
20
|
+
setTheme,
|
|
21
|
+
toggleTheme,
|
|
22
|
+
current: () => theme.global.name.value
|
|
23
|
+
});
|
|
27
24
|
});
|
|
@@ -1,34 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
defineNuxtPlugin,
|
|
3
|
+
useRuntimeConfig
|
|
4
|
+
} from "nuxt/app";
|
|
5
|
+
import {
|
|
6
|
+
useTheme
|
|
7
|
+
} from "vuetify";
|
|
3
8
|
export default defineNuxtPlugin(() => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
if (process.server) return;
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const config = useRuntimeConfig();
|
|
12
|
+
const baseColors = {
|
|
13
|
+
primary: "var(--m-primary)",
|
|
14
|
+
secondary: "var(--m-secondary)",
|
|
15
|
+
accent: "var(--m-accent)",
|
|
16
|
+
surface: "var(--m-surface)",
|
|
17
|
+
background: "var(--m-muted)",
|
|
18
|
+
border: "var(--m-border)",
|
|
19
|
+
// Required Vuetify system colors
|
|
20
|
+
success: "#22c55e",
|
|
21
|
+
warning: "#f59e0b",
|
|
22
|
+
error: "#ef4444",
|
|
23
|
+
info: "#3b82f6",
|
|
24
|
+
// Vuetify internal required fields
|
|
25
|
+
"on-primary": "#ffffff",
|
|
26
|
+
"on-secondary": "#ffffff",
|
|
27
|
+
"on-surface": "#ffffff",
|
|
28
|
+
"on-background": "#ffffff",
|
|
29
|
+
"on-success": "#ffffff",
|
|
30
|
+
"on-warning": "#ffffff",
|
|
31
|
+
"on-error": "#ffffff",
|
|
32
|
+
"on-info": "#ffffff"
|
|
33
|
+
};
|
|
34
|
+
const defaultTheme = config.public.mframeworkUi?.theme || "light";
|
|
35
|
+
theme.global.name.value = defaultTheme;
|
|
36
|
+
theme.themes.value = {
|
|
37
|
+
light: {
|
|
38
|
+
dark: false,
|
|
39
|
+
colors: baseColors,
|
|
40
|
+
variables: {}
|
|
41
|
+
},
|
|
42
|
+
dark: {
|
|
43
|
+
dark: true,
|
|
44
|
+
colors: baseColors,
|
|
45
|
+
variables: {}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
34
48
|
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineNuxtPlugin, useRuntimeConfig } from
|
|
2
|
-
import { createVuetify } from
|
|
3
|
-
import * as components from
|
|
4
|
-
import * as directives from
|
|
5
|
-
import
|
|
1
|
+
import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
|
|
2
|
+
import { createVuetify } from "vuetify";
|
|
3
|
+
import * as components from "vuetify/components";
|
|
4
|
+
import * as directives from "vuetify/directives";
|
|
5
|
+
import "vuetify/styles";
|
|
6
6
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
}
|
|
7
|
+
const config = useRuntimeConfig();
|
|
8
|
+
const theme = config.public.mframeworkUi?.theme || "light";
|
|
9
|
+
const vuetify = createVuetify({
|
|
10
|
+
components,
|
|
11
|
+
directives,
|
|
12
|
+
theme: {
|
|
13
|
+
defaultTheme: theme,
|
|
14
|
+
themes: {
|
|
15
|
+
light: {
|
|
16
|
+
dark: false,
|
|
17
|
+
colors: {
|
|
18
|
+
primary: "#3b82f6",
|
|
19
|
+
secondary: "#64748b"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dark: {
|
|
23
|
+
dark: true,
|
|
24
|
+
colors: {
|
|
25
|
+
primary: "#3b82f6",
|
|
26
|
+
secondary: "#64748b"
|
|
27
|
+
}
|
|
30
28
|
}
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
nuxtApp.vueApp.use(vuetify);
|
|
33
33
|
});
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
export function getSearchClient() {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
mod;
|
|
15
|
-
if (typeof candidate !== 'function')
|
|
16
|
-
return null;
|
|
17
|
-
const host = process.env.NUXT_PUBLIC_SEARCHKIT_HOST;
|
|
18
|
-
if (!host)
|
|
19
|
-
return null;
|
|
20
|
-
return candidate({ host });
|
|
2
|
+
let mod;
|
|
3
|
+
try {
|
|
4
|
+
mod = require("@searchkit/instantsearch-client");
|
|
5
|
+
} catch {
|
|
6
|
+
console.warn("[mframework-ui] Searchkit client missing");
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const candidate = mod?.default?.default || mod?.default?.createClient || mod?.default || mod?.createClient || mod;
|
|
10
|
+
if (typeof candidate !== "function") return null;
|
|
11
|
+
const host = process.env.NUXT_PUBLIC_SEARCHKIT_HOST;
|
|
12
|
+
if (!host) return null;
|
|
13
|
+
return candidate({ host });
|
|
21
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getSearchClient } from
|
|
1
|
+
import { getSearchClient } from "./client.js";
|
|
2
2
|
export default (nuxtApp) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const client = getSearchClient();
|
|
4
|
+
const indexName = process.env.NUXT_PUBLIC_SEARCH_INDEX || "default";
|
|
5
|
+
nuxtApp.provide("mSearchClient", client);
|
|
6
|
+
nuxtApp.provide("mSearchIndex", indexName);
|
|
7
7
|
};
|
|
@@ -2,4 +2,97 @@
|
|
|
2
2
|
:root {
|
|
3
3
|
--m-primary: #3b82f6;
|
|
4
4
|
--m-secondary: #64748b;
|
|
5
|
+
--m-accent: #10b981;
|
|
6
|
+
--m-muted: #f3f4f6;
|
|
7
|
+
--m-surface: #ffffff;
|
|
8
|
+
--m-border: #e5e7eb;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dark {
|
|
12
|
+
--m-primary: #60a5fa;
|
|
13
|
+
--m-secondary: #94a3b8;
|
|
14
|
+
--m-accent: #34d399;
|
|
15
|
+
--m-muted: #1f2937;
|
|
16
|
+
--m-surface: #111827;
|
|
17
|
+
--m-border: #374151;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Let's highlight canvas boundaries */
|
|
21
|
+
#gjs {
|
|
22
|
+
border: 3px solid #444;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Theming */
|
|
26
|
+
/* Primary color for the background */
|
|
27
|
+
.gjs-one-bg {
|
|
28
|
+
background-color: #78366a;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Secondary color for the text color */
|
|
32
|
+
.gjs-two-color {
|
|
33
|
+
color: rgba(255, 255, 255, 0.7);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Tertiary color for the background */
|
|
37
|
+
.gjs-three-bg {
|
|
38
|
+
background-color: #ec5896;
|
|
39
|
+
color: white;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Quaternary color for the text color */
|
|
43
|
+
.gjs-four-color,
|
|
44
|
+
.gjs-four-color-h:hover {
|
|
45
|
+
color: #ec5896;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Reset some default styling */
|
|
49
|
+
.gjs-cv-canvas {
|
|
50
|
+
top: 0;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.gjs-block {
|
|
56
|
+
width: auto;
|
|
57
|
+
height: auto;
|
|
58
|
+
min-height: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.panel__top {
|
|
62
|
+
padding: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
display: flex;
|
|
65
|
+
position: initial;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.panel__basic-actions {
|
|
71
|
+
position: initial;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.editor-row {
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: flex-start;
|
|
77
|
+
align-items: stretch;
|
|
78
|
+
flex-wrap: nowrap;
|
|
79
|
+
height: 300px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.editor-canvas {
|
|
83
|
+
flex-grow: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.panel__right {
|
|
87
|
+
flex-basis: 230px;
|
|
88
|
+
position: relative;
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.panel__switcher {
|
|
93
|
+
position: initial;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.panel__devices {
|
|
97
|
+
position: initial;
|
|
5
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@import "tailwindcss/preflight";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mframework/ui",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Opiniated UI module for the M Framework.",
|
|
6
6
|
"keywords": [
|
|
@@ -13,11 +13,16 @@
|
|
|
13
13
|
],
|
|
14
14
|
"main": "dist/module.js",
|
|
15
15
|
"module": "dist/module.mjs",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/module.mjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
16
21
|
"files": [
|
|
17
22
|
"dist"
|
|
18
23
|
],
|
|
19
24
|
"scripts": {
|
|
20
|
-
"build": "
|
|
25
|
+
"build": "nuxt-module-build",
|
|
21
26
|
"dev": "nuxt-module-dev"
|
|
22
27
|
},
|
|
23
28
|
"peerDependencies": {
|
|
@@ -50,4 +55,4 @@
|
|
|
50
55
|
"sass-embedded": "^1.93.3",
|
|
51
56
|
"typescript": "^5.7.0"
|
|
52
57
|
}
|
|
53
|
-
}
|
|
58
|
+
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface Image {
|
|
2
|
-
url: string;
|
|
3
|
-
alt?: string;
|
|
4
|
-
width?: number;
|
|
5
|
-
height?: number;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
export interface Product {
|
|
9
|
-
id: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
price?: number;
|
|
12
|
-
images?: Image[];
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
export interface Category {
|
|
16
|
-
id: string;
|
|
17
|
-
name?: string;
|
|
18
|
-
slug?: string;
|
|
19
|
-
image?: string;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/module.d.ts
DELETED
package/dist/module.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { defineNuxtModule, addPlugin, createResolver, addComponentsDir, addImportsDir } from 'nuxt/kit';
|
|
2
|
-
export default defineNuxtModule({
|
|
3
|
-
meta: {
|
|
4
|
-
name: '@mframework/ui',
|
|
5
|
-
configKey: 'mframeworkUi'
|
|
6
|
-
},
|
|
7
|
-
defaults: {
|
|
8
|
-
theme: 'light',
|
|
9
|
-
builder: true
|
|
10
|
-
},
|
|
11
|
-
setup(options, nuxt) {
|
|
12
|
-
const resolver = createResolver(import.meta.url);
|
|
13
|
-
//
|
|
14
|
-
// 1. Ensure Vuetify loads FIRST
|
|
15
|
-
//
|
|
16
|
-
addPlugin({
|
|
17
|
-
src: resolver.resolve('./runtime/plugins/vuetify'),
|
|
18
|
-
mode: 'all'
|
|
19
|
-
});
|
|
20
|
-
//
|
|
21
|
-
// 2. Global styles (Tailwind, Vuetify overrides, tokens)
|
|
22
|
-
//
|
|
23
|
-
nuxt.options.css = nuxt.options.css || [];
|
|
24
|
-
nuxt.options.css.push(resolver.resolve('./runtime/styles/index.scss'));
|
|
25
|
-
//
|
|
26
|
-
// 3. Register core UI plugins
|
|
27
|
-
//
|
|
28
|
-
const plugins = [
|
|
29
|
-
'formkit',
|
|
30
|
-
'fontawesome',
|
|
31
|
-
'lightgallery',
|
|
32
|
-
'motion',
|
|
33
|
-
'theme'
|
|
34
|
-
];
|
|
35
|
-
plugins.forEach((name) => {
|
|
36
|
-
addPlugin({
|
|
37
|
-
src: resolver.resolve(`./runtime/plugins/${name}`),
|
|
38
|
-
mode: 'all'
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//
|
|
42
|
-
// 4. Register GrapesJS builder (client‑only)
|
|
43
|
-
//
|
|
44
|
-
if (options.builder) {
|
|
45
|
-
addPlugin({
|
|
46
|
-
src: resolver.resolve('./runtime/plugins/builder'),
|
|
47
|
-
mode: 'client'
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//
|
|
51
|
-
// 5. Auto‑import components & composables
|
|
52
|
-
//
|
|
53
|
-
addComponentsDir({
|
|
54
|
-
path: resolver.resolve('./runtime/components'),
|
|
55
|
-
prefix: 'M'
|
|
56
|
-
});
|
|
57
|
-
addImportsDir(resolver.resolve('./runtime/composables'));
|
|
58
|
-
//
|
|
59
|
-
// 6. Expose runtime config
|
|
60
|
-
//
|
|
61
|
-
nuxt.options.runtimeConfig.public.mframeworkUi = {
|
|
62
|
-
...(nuxt.options.runtimeConfig.public.mframeworkUi || {}),
|
|
63
|
-
...options
|
|
64
|
-
};
|
|
65
|
-
nuxt.options.tailwindcss = nuxt.options.tailwindcss || {};
|
|
66
|
-
nuxt.options.tailwindcss.configPath = resolver.resolve('./runtime/assets/config/tailwind.config.js');
|
|
67
|
-
}
|
|
68
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { defineNuxtModule, addPlugin, createResolver, addComponentsDir, addImportsDir } from 'nuxt/kit';
|
|
2
|
-
export default defineNuxtModule({
|
|
3
|
-
meta: {
|
|
4
|
-
name: '@mframework/ui',
|
|
5
|
-
configKey: 'mframeworkUi'
|
|
6
|
-
},
|
|
7
|
-
defaults: {
|
|
8
|
-
theme: 'light',
|
|
9
|
-
builder: true
|
|
10
|
-
},
|
|
11
|
-
setup(options, nuxt) {
|
|
12
|
-
const resolver = createResolver(import.meta.url);
|
|
13
|
-
//
|
|
14
|
-
// 1. Ensure Vuetify loads FIRST
|
|
15
|
-
//
|
|
16
|
-
addPlugin({
|
|
17
|
-
src: resolver.resolve('./runtime/plugins/vuetify'),
|
|
18
|
-
mode: 'all'
|
|
19
|
-
});
|
|
20
|
-
//
|
|
21
|
-
// 2. Global styles (Tailwind, Vuetify overrides, tokens)
|
|
22
|
-
//
|
|
23
|
-
nuxt.options.css = nuxt.options.css || [];
|
|
24
|
-
nuxt.options.css.push(resolver.resolve('./runtime/styles/index.scss'));
|
|
25
|
-
//
|
|
26
|
-
// 3. Register core UI plugins
|
|
27
|
-
//
|
|
28
|
-
const plugins = [
|
|
29
|
-
'formkit',
|
|
30
|
-
'fontawesome',
|
|
31
|
-
'lightgallery',
|
|
32
|
-
'motion',
|
|
33
|
-
'theme'
|
|
34
|
-
];
|
|
35
|
-
plugins.forEach((name) => {
|
|
36
|
-
addPlugin({
|
|
37
|
-
src: resolver.resolve(`./runtime/plugins/${name}`),
|
|
38
|
-
mode: 'all'
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//
|
|
42
|
-
// 4. Register GrapesJS builder (client‑only)
|
|
43
|
-
//
|
|
44
|
-
if (options.builder) {
|
|
45
|
-
addPlugin({
|
|
46
|
-
src: resolver.resolve('./runtime/plugins/builder'),
|
|
47
|
-
mode: 'client'
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//
|
|
51
|
-
// 5. Auto‑import components & composables
|
|
52
|
-
//
|
|
53
|
-
addComponentsDir({
|
|
54
|
-
path: resolver.resolve('./runtime/components'),
|
|
55
|
-
prefix: 'M'
|
|
56
|
-
});
|
|
57
|
-
addImportsDir(resolver.resolve('./runtime/composables'));
|
|
58
|
-
//
|
|
59
|
-
// 6. Expose runtime config
|
|
60
|
-
//
|
|
61
|
-
// Normalize builder option
|
|
62
|
-
const normalizedBuilder = typeof options.builder === 'boolean' ? {
|
|
63
|
-
enabled: options.builder
|
|
64
|
-
} :
|
|
65
|
-
options.builder || {
|
|
66
|
-
enabled: true
|
|
67
|
-
};
|
|
68
|
-
nuxt.options.runtimeConfig.public.mframeworkUi = {
|
|
69
|
-
theme: options.theme,
|
|
70
|
-
builder: normalizedBuilder
|
|
71
|
-
};
|
|
72
|
-
nuxt.options.tailwindcss = nuxt.options.tailwindcss || {};
|
|
73
|
-
nuxt.options.tailwindcss.configPath = resolver.resolve('./runtime/assets/config/tailwind.config.js');
|
|
74
|
-
}
|
|
75
|
-
});
|