@mframework/ui 0.0.6-beta6 → 0.1.0-beta.0
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/package.json +31 -21
- package/module.ts +0 -72
- package/runtime/assets/config/tailwind.conifg.js +0 -11
- package/runtime/assets/css/tailwind.css +0 -11
- package/runtime/design/tokens.ts +0 -22
- package/runtime/plugins/icon-switcher.ts +0 -32
- package/runtime/plugins/theme.ts +0 -29
- package/runtime/plugins/vuetify.js +0 -12
- package/runtime/plugins/vuetify.ts +0 -64
- package/runtime/search/client.ts +0 -25
- package/runtime/search/components/MSearch.vue +0 -19
- package/runtime/search/plugin.ts +0 -9
- package/tsconfig.json +0 -16
- package/type.d.ts +0 -5
- package/types/ui/api/global-search.js +0 -1
- package/types/ui/api/global-search.ts +0 -8
- package/types/ui/blocks/block-button-group.js +0 -1
- package/types/ui/blocks/block-button-group.ts +0 -7
- package/types/ui/blocks/block-button.js +0 -1
- package/types/ui/blocks/block-button.ts +0 -14
- package/types/ui/blocks/block-column.js +0 -1
- package/types/ui/blocks/block-column.ts +0 -20
- package/types/ui/blocks/block-cta.js +0 -1
- package/types/ui/blocks/block-cta.ts +0 -10
- package/types/ui/blocks/block-divider.js +0 -1
- package/types/ui/blocks/block-divider.ts +0 -4
- package/types/ui/blocks/block-faq.js +0 -1
- package/types/ui/blocks/block-faq.ts +0 -12
- package/types/ui/blocks/block-form.js +0 -1
- package/types/ui/blocks/block-form.ts +0 -8
- package/types/ui/blocks/block-gallery.js +0 -1
- package/types/ui/blocks/block-gallery.ts +0 -14
- package/types/ui/blocks/block-hero.js +0 -1
- package/types/ui/blocks/block-hero.ts +0 -12
- package/types/ui/blocks/block-html.js +0 -1
- package/types/ui/blocks/block-html.ts +0 -4
- package/types/ui/blocks/block-logocloud.js +0 -1
- package/types/ui/blocks/block-logocloud.ts +0 -14
- package/types/ui/blocks/block-quote.js +0 -1
- package/types/ui/blocks/block-quote.ts +0 -11
- package/types/ui/blocks/block-richtext.js +0 -1
- package/types/ui/blocks/block-richtext.ts +0 -7
- package/types/ui/blocks/block-steps.js +0 -1
- package/types/ui/blocks/block-steps.ts +0 -22
- package/types/ui/blocks/block-team.js +0 -1
- package/types/ui/blocks/block-team.ts +0 -6
- package/types/ui/blocks/block-testimonial.js +0 -1
- package/types/ui/blocks/block-testimonial.ts +0 -14
- package/types/ui/blocks/block-video.js +0 -1
- package/types/ui/blocks/block-video.ts +0 -10
- package/types/ui/blocks/block.js +0 -1
- package/types/ui/blocks/block.ts +0 -49
- package/types/ui/blocks/index.js +0 -1
- package/types/ui/blocks/index.ts +0 -18
- package/types/ui/component.js +0 -1
- package/types/ui/component.ts +0 -7
- package/types/ui/content/category.js +0 -1
- package/types/ui/content/category.ts +0 -11
- package/types/ui/content/form.js +0 -1
- package/types/ui/content/form.ts +0 -20
- package/types/ui/content/index.js +0 -1
- package/types/ui/content/index.ts +0 -6
- package/types/ui/content/page.js +0 -1
- package/types/ui/content/page.ts +0 -76
- package/types/ui/content/post.js +0 -1
- package/types/ui/content/post.ts +0 -39
- package/types/ui/content/team.js +0 -1
- package/types/ui/content/team.ts +0 -16
- package/types/ui/content/testimonial.js +0 -1
- package/types/ui/content/testimonial.ts +0 -19
- package/types/ui/env.d.ts +0 -8
- package/types/ui/form.js +0 -1
- package/types/ui/form.ts +0 -17
- package/types/ui/help/index.js +0 -1
- package/types/ui/help/index.ts +0 -53
- package/types/ui/meta/analytics.js +0 -1
- package/types/ui/meta/analytics.ts +0 -18
- package/types/ui/meta/config.js +0 -1
- package/types/ui/meta/config.ts +0 -21
- package/types/ui/meta/globals.js +0 -1
- package/types/ui/meta/globals.ts +0 -30
- package/types/ui/meta/index.js +0 -1
- package/types/ui/meta/index.ts +0 -6
- package/types/ui/meta/navigation.js +0 -1
- package/types/ui/meta/navigation.ts +0 -32
- package/types/ui/meta/redirect.js +0 -1
- package/types/ui/meta/redirect.ts +0 -13
- package/types/ui/meta/seo.js +0 -1
- package/types/ui/meta/seo.ts +0 -19
- package/types/ui/os/contact.js +0 -1
- package/types/ui/os/contact.ts +0 -23
- package/types/ui/os/conversation.js +0 -1
- package/types/ui/os/conversation.ts +0 -25
- package/types/ui/os/index.js +0 -1
- package/types/ui/os/index.ts +0 -16
- package/types/ui/os/organization.js +0 -1
- package/types/ui/os/organization.ts +0 -54
- package/types/ui/os/os-activity.js +0 -1
- package/types/ui/os/os-activity.ts +0 -28
- package/types/ui/os/os-deal.js +0 -1
- package/types/ui/os/os-deal.ts +0 -45
- package/types/ui/os/os-expense.js +0 -1
- package/types/ui/os/os-expense.ts +0 -22
- package/types/ui/os/os-invoice.js +0 -1
- package/types/ui/os/os-invoice.ts +0 -48
- package/types/ui/os/os-item.js +0 -1
- package/types/ui/os/os-item.ts +0 -18
- package/types/ui/os/os-payment.js +0 -1
- package/types/ui/os/os-payment.ts +0 -29
- package/types/ui/os/os-project.js +0 -1
- package/types/ui/os/os-project.ts +0 -47
- package/types/ui/os/os-proposal.js +0 -1
- package/types/ui/os/os-proposal.ts +0 -84
- package/types/ui/os/os-settings.js +0 -1
- package/types/ui/os/os-settings.ts +0 -19
- package/types/ui/os/os-subscription.js +0 -1
- package/types/ui/os/os-subscription.ts +0 -12
- package/types/ui/os/os-task.js +0 -1
- package/types/ui/os/os-task.ts +0 -34
- package/types/ui/os/os-tax-rate.js +0 -1
- package/types/ui/os/os-tax-rate.ts +0 -13
- package/types/ui/pageComponentMap.js +0 -7
- package/types/ui/pageComponentMap.ts +0 -8
- package/types/ui/pagination.js +0 -1
- package/types/ui/pagination.ts +0 -6
- package/types/ui/schema.d.ts +0 -39
- package/types/ui/schema.js +0 -1
- package/types/ui/schema.ts +0 -151
- package/types/ui/state.js +0 -1
- package/types/ui/state.ts +0 -5
- package/types/ui/system/file.js +0 -1
- package/types/ui/system/file.ts +0 -46
- package/types/ui/system/folder.js +0 -1
- package/types/ui/system/folder.ts +0 -8
- package/types/ui/system/index.js +0 -1
- package/types/ui/system/index.ts +0 -4
- package/types/ui/system/role.js +0 -1
- package/types/ui/system/role.ts +0 -21
- package/types/ui/system/user.js +0 -1
- package/types/ui/system/user.ts +0 -56
- package/types/ui.js +0 -1
- package/types/ui.ts +0 -23
- package/utils/color.js +0 -11
- package/utils/color.ts +0 -14
- package/utils/fonts.js +0 -18
- package/utils/fonts.ts +0 -24
- package/utils/formkit.js +0 -59
- package/utils/formkit.ts +0 -75
- package/utils/icons.js +0 -36
- package/utils/icons.ts +0 -62
package/package.json
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mframework/ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Opiniated UI module for the M Framework.",
|
|
6
|
+
"main": "dist/module.cjs",
|
|
7
|
+
"module": "dist/module.mjs",
|
|
8
|
+
"types": "dist/module.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
5
12
|
"keywords": [
|
|
13
|
+
"vue",
|
|
14
|
+
"nuxt",
|
|
6
15
|
"ui",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"m-framework",
|
|
16
|
+
"components",
|
|
17
|
+
"mframework",
|
|
10
18
|
"meeovi"
|
|
11
19
|
],
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"author": "M Framework",
|
|
14
|
-
"type": "module",
|
|
15
|
-
"main": "module.ts",
|
|
16
|
-
"exports": {
|
|
17
|
-
"./module": "./module.ts"
|
|
18
|
-
},
|
|
19
|
-
"types": "./types.d.ts",
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "
|
|
21
|
+
"build": "nuxt-module-build",
|
|
22
|
+
"dev": "nuxt-module-dev"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"nuxt": "^3.13.0",
|
|
26
|
+
"vue": "^3.5.0"
|
|
22
27
|
},
|
|
23
28
|
"dependencies": {
|
|
24
29
|
"@formkit/nuxt": "^1.7.2",
|
|
@@ -26,17 +31,22 @@
|
|
|
26
31
|
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
|
27
32
|
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
28
33
|
"@fortawesome/vue-fontawesome": "^3.1.2",
|
|
34
|
+
"@grapesjs/studio-sdk": "^1.0.57",
|
|
29
35
|
"@mdi/font": "^7.4.47",
|
|
30
|
-
"@nuxt/
|
|
31
|
-
"@nuxt/kit": "^4.3.1",
|
|
36
|
+
"@nuxt/image": "^2.0.0",
|
|
32
37
|
"@vueuse/motion": "^3.0.3",
|
|
38
|
+
"izitoast": "^1.4.0",
|
|
39
|
+
"lg-thumbnail": "^1.2.1",
|
|
40
|
+
"lg-video": "^1.4.0",
|
|
41
|
+
"lg-zoom": "^1.3.0",
|
|
42
|
+
"lightgallery": "^2.9.0",
|
|
33
43
|
"tailwindcss": "^4.1.18",
|
|
34
|
-
"
|
|
35
|
-
"vuetify": "^
|
|
36
|
-
"vuetify-nuxt-module": "^0.19.5"
|
|
44
|
+
"vuetify": "^3.7.0",
|
|
45
|
+
"vuetify-nuxt-module": "^0.18.8"
|
|
37
46
|
},
|
|
38
47
|
"devDependencies": {
|
|
39
48
|
"sass": "^1.94.2",
|
|
40
|
-
"sass-embedded": "^1.93.3"
|
|
49
|
+
"sass-embedded": "^1.93.3",
|
|
50
|
+
"typescript": "^5.7.0"
|
|
41
51
|
}
|
|
42
|
-
}
|
|
52
|
+
}
|
package/module.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// @mframework/ui/module.ts
|
|
2
|
-
import {
|
|
3
|
-
defineNuxtModule,
|
|
4
|
-
addPlugin,
|
|
5
|
-
addComponentsDir,
|
|
6
|
-
createResolver,
|
|
7
|
-
installModule,
|
|
8
|
-
resolveModule
|
|
9
|
-
} from '@nuxt/kit'
|
|
10
|
-
|
|
11
|
-
export interface MFrameworkUiOptions {
|
|
12
|
-
image?: Record<string, any>
|
|
13
|
-
fonts?: Record<string, any>
|
|
14
|
-
vuetify?: {
|
|
15
|
-
vuetifyOptions?: Record<string, any>
|
|
16
|
-
}
|
|
17
|
-
tailwind?: {
|
|
18
|
-
enable?: boolean
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default defineNuxtModule<MFrameworkUiOptions>({
|
|
23
|
-
meta: {
|
|
24
|
-
name: '@mframework/ui',
|
|
25
|
-
configKey: 'mframeworkUi'
|
|
26
|
-
},
|
|
27
|
-
defaults: {
|
|
28
|
-
image: {},
|
|
29
|
-
fonts: {},
|
|
30
|
-
vuetify: {
|
|
31
|
-
vuetifyOptions: {
|
|
32
|
-
icons: {
|
|
33
|
-
defaultSet: 'mdi'
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
tailwind: {
|
|
38
|
-
enable: true
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
async setup(options, nuxt) {
|
|
43
|
-
const { resolve } = createResolver(import.meta.url)
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
// 1. Expose options to runtime
|
|
47
|
-
//
|
|
48
|
-
nuxt.options.runtimeConfig.public.mframeworkUi = options
|
|
49
|
-
|
|
50
|
-
//
|
|
51
|
-
// 2. Install @nuxt/fonts
|
|
52
|
-
//
|
|
53
|
-
await installModule('@nuxt/fonts', options.fonts || {})
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
// 3. Install Vuetify via vuetify-nuxt-module (optional).
|
|
57
|
-
// First check whether the consuming project actually has `vuetify`
|
|
58
|
-
// installed to avoid Nuxt failing during module resolution.
|
|
59
|
-
//
|
|
60
|
-
let vuetifyModulePath: string | null = null
|
|
61
|
-
try {
|
|
62
|
-
vuetifyModulePath = resolveModule('vuetify-nuxt-module', { paths: [nuxt.options.modulesDir] })
|
|
63
|
-
} catch (err) {
|
|
64
|
-
// Module not found, skip Vuetify installation
|
|
65
|
-
console.warn('[mframework-ui] Vuetify not found, skipping Vuetify setup.')
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (vuetifyModulePath) {
|
|
69
|
-
await installModule(vuetifyModulePath, options.vuetify || {})
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
})
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/* @mframework/ui/runtime/assets/css/tailwind.css */
|
|
2
|
-
|
|
3
|
-
/* Tailwind base (if using Tailwind 3 style) */
|
|
4
|
-
@tailwind base;
|
|
5
|
-
@tailwind components;
|
|
6
|
-
@tailwind utilities;
|
|
7
|
-
|
|
8
|
-
/* Vuetify + Tailwind coexistence tips:
|
|
9
|
-
- Avoid global resets that fight Vuetify
|
|
10
|
-
- Prefer utility classes for layout, spacing, etc.
|
|
11
|
-
*/
|
package/runtime/design/tokens.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const tokens = {
|
|
2
|
-
colors: {
|
|
3
|
-
primary: '#4f46e5',
|
|
4
|
-
secondary: '#64748b',
|
|
5
|
-
success: '#22c55e',
|
|
6
|
-
warning: '#f59e0b',
|
|
7
|
-
error: '#ef4444',
|
|
8
|
-
surface: '#ffffff',
|
|
9
|
-
background: '#f8fafc'
|
|
10
|
-
},
|
|
11
|
-
radius: {
|
|
12
|
-
sm: '4px',
|
|
13
|
-
md: '8px',
|
|
14
|
-
lg: '12px'
|
|
15
|
-
},
|
|
16
|
-
spacing: {
|
|
17
|
-
xs: '4px',
|
|
18
|
-
sm: '8px',
|
|
19
|
-
md: '16px',
|
|
20
|
-
lg: '24px'
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import { useVuetify } from 'vuetify-nuxt-module/runtime'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin((nuxtApp) => {
|
|
5
|
-
const vuetify = useVuetify()
|
|
6
|
-
|
|
7
|
-
// If Vuetify isn't ready yet, skip plugin initialization
|
|
8
|
-
if (!vuetify || !vuetify.framework) {
|
|
9
|
-
console.warn('[mframework-ui] Vuetify not ready for icon-switcher plugin')
|
|
10
|
-
return
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const stored =
|
|
14
|
-
typeof localStorage !== 'undefined'
|
|
15
|
-
? localStorage.getItem('mframework-icon-set')
|
|
16
|
-
: null
|
|
17
|
-
|
|
18
|
-
const initial = stored || 'mdi'
|
|
19
|
-
|
|
20
|
-
vuetify.framework.icons = vuetify.framework.icons || {}
|
|
21
|
-
vuetify.framework.icons.defaultSet = initial
|
|
22
|
-
|
|
23
|
-
const setIconSet = (name: string) => {
|
|
24
|
-
vuetify.framework.icons.defaultSet = name
|
|
25
|
-
localStorage.setItem('mframework-icon-set', name)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
nuxtApp.provide('mIcons', {
|
|
29
|
-
setIconSet,
|
|
30
|
-
current: () => vuetify.framework.icons.defaultSet
|
|
31
|
-
})
|
|
32
|
-
})
|
package/runtime/plugins/theme.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useTheme } from 'vuetify'
|
|
2
|
-
|
|
3
|
-
export default (nuxtApp: any) => {
|
|
4
|
-
const theme = useTheme()
|
|
5
|
-
// Attempt to read runtime config from nuxtApp (fallbacks to undefined)
|
|
6
|
-
const config: any = (nuxtApp && (nuxtApp as any).$config && (nuxtApp as any).$config.public && (nuxtApp as any).$config.public.mframeworkUi) || {}
|
|
7
|
-
|
|
8
|
-
// 1. Load persisted theme
|
|
9
|
-
const stored = typeof localStorage !== 'undefined' ? localStorage.getItem('mframework-theme') : null
|
|
10
|
-
const initial = stored || config?.theme?.default || 'light'
|
|
11
|
-
;(theme as any).global.name.value = initial
|
|
12
|
-
|
|
13
|
-
// 2. Expose a global toggle
|
|
14
|
-
const toggleTheme = () => {
|
|
15
|
-
const newTheme = (theme as any).global.current.value.dark ? 'light' : 'dark'
|
|
16
|
-
;(theme as any).global.name.value = newTheme
|
|
17
|
-
if (typeof localStorage !== 'undefined') localStorage.setItem('mframework-theme', newTheme)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// 3. Expose to app
|
|
21
|
-
nuxtApp.provide('mTheme', {
|
|
22
|
-
theme,
|
|
23
|
-
toggleTheme,
|
|
24
|
-
setTheme: (name: string) => {
|
|
25
|
-
;(theme as any).global.name.value = name
|
|
26
|
-
if (typeof localStorage !== 'undefined') localStorage.setItem('mframework-theme', name)
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createVuetify } from 'vuetify';
|
|
2
|
-
import * as components from 'vuetify/components';
|
|
3
|
-
import * as directives from 'vuetify/directives';
|
|
4
|
-
import 'vuetify/styles';
|
|
5
|
-
import { defineNuxtPlugin } from '#app';
|
|
6
|
-
export default defineNuxtPlugin((nuxtApp) => {
|
|
7
|
-
const vuetify = createVuetify({
|
|
8
|
-
components,
|
|
9
|
-
directives
|
|
10
|
-
});
|
|
11
|
-
nuxtApp.vueApp.use(vuetify);
|
|
12
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// plugins/vuetify.ts
|
|
2
|
-
import '@mdi/font/css/materialdesignicons.css'
|
|
3
|
-
|
|
4
|
-
import 'vuetify/styles'
|
|
5
|
-
import { createVuetify } from 'vuetify'
|
|
6
|
-
import { aliases, fa } from 'vuetify/iconsets/fa-svg'
|
|
7
|
-
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
8
|
-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
9
|
-
import { fas } from '@fortawesome/free-solid-svg-icons'
|
|
10
|
-
import * as components from 'vuetify/components'
|
|
11
|
-
import * as labsComponents from 'vuetify/labs/components'
|
|
12
|
-
import * as directives from 'vuetify/directives'
|
|
13
|
-
import { mdi } from 'vuetify/iconsets/mdi'
|
|
14
|
-
|
|
15
|
-
// Register fontawesome icons at module scope
|
|
16
|
-
library.add(fas)
|
|
17
|
-
|
|
18
|
-
// Create Vuetify instance at module scope so other runtime plugins can import it
|
|
19
|
-
export const vuetify = createVuetify({
|
|
20
|
-
ssr: true,
|
|
21
|
-
directives,
|
|
22
|
-
icons: {
|
|
23
|
-
defaultSet: 'fa',
|
|
24
|
-
aliases,
|
|
25
|
-
sets: {
|
|
26
|
-
fa,
|
|
27
|
-
mdi,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
components: {
|
|
31
|
-
...components,
|
|
32
|
-
...labsComponents,
|
|
33
|
-
},
|
|
34
|
-
theme: {
|
|
35
|
-
defaultTheme: 'light',
|
|
36
|
-
themes: {
|
|
37
|
-
light: {
|
|
38
|
-
dark: false,
|
|
39
|
-
variables: {}, // required to avoid Vuetify crash
|
|
40
|
-
colors: {
|
|
41
|
-
primary: '#6200EE',
|
|
42
|
-
'primary-darken-1': '#3700B3',
|
|
43
|
-
secondary: '#03DAC6',
|
|
44
|
-
'secondary-darken-1': '#018786',
|
|
45
|
-
error: '#B00020',
|
|
46
|
-
info: '#2196F3',
|
|
47
|
-
success: '#4CAF50',
|
|
48
|
-
warning: '#FB8C00',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
dark: {
|
|
52
|
-
dark: true,
|
|
53
|
-
variables: {},
|
|
54
|
-
colors: {},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
export default (nuxtApp: any) => {
|
|
61
|
-
// Register FontAwesome component on the actual Vue app instance
|
|
62
|
-
nuxtApp.vueApp.component('font-awesome-icon', FontAwesomeIcon)
|
|
63
|
-
nuxtApp.vueApp.use(vuetify)
|
|
64
|
-
}
|
package/runtime/search/client.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { SearchClient } from 'instantsearch.js'
|
|
2
|
-
|
|
3
|
-
export function getSearchClient(): SearchClient | null {
|
|
4
|
-
let mod: any
|
|
5
|
-
try {
|
|
6
|
-
mod = require('@searchkit/instantsearch-client')
|
|
7
|
-
} catch {
|
|
8
|
-
console.warn('[mframework-ui] Searchkit client missing')
|
|
9
|
-
return null
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const candidate =
|
|
13
|
-
mod?.default?.default ||
|
|
14
|
-
mod?.default?.createClient ||
|
|
15
|
-
mod?.default ||
|
|
16
|
-
mod?.createClient ||
|
|
17
|
-
mod
|
|
18
|
-
|
|
19
|
-
if (typeof candidate !== 'function') return null
|
|
20
|
-
|
|
21
|
-
const host = process.env.NUXT_PUBLIC_SEARCHKIT_HOST
|
|
22
|
-
if (!host) return null
|
|
23
|
-
|
|
24
|
-
return candidate({ host })
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ais-instant-search :search-client="client" :index-name="index">
|
|
3
|
-
<ais-search-box />
|
|
4
|
-
<ais-hits>
|
|
5
|
-
<template #item="{ item }">
|
|
6
|
-
<slot name="hit" :item="item">
|
|
7
|
-
<div class="p-2 border rounded">
|
|
8
|
-
<ais-highlight attribute="title" :hit="item" />
|
|
9
|
-
</div>
|
|
10
|
-
</slot>
|
|
11
|
-
</template>
|
|
12
|
-
</ais-hits>
|
|
13
|
-
</ais-instant-search>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup lang="ts">
|
|
17
|
-
const client = inject('mSearchClient')
|
|
18
|
-
const index = inject('mSearchIndex')
|
|
19
|
-
</script>
|
package/runtime/search/plugin.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getSearchClient } from './client'
|
|
2
|
-
|
|
3
|
-
export default (nuxtApp: any) => {
|
|
4
|
-
const client = getSearchClient()
|
|
5
|
-
const indexName = process.env.NUXT_PUBLIC_SEARCH_INDEX || 'default'
|
|
6
|
-
|
|
7
|
-
nuxtApp.provide('mSearchClient', client)
|
|
8
|
-
nuxtApp.provide('mSearchIndex', indexName)
|
|
9
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"emitDeclarationOnly": false,
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"target": "ESNext",
|
|
9
|
-
"strict": true,
|
|
10
|
-
"jsx": "react-jsx",
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"noEmitOnError": false
|
|
13
|
-
},
|
|
14
|
-
"include": ["runtime/**/*", "src/**/*", "types/**/*"],
|
|
15
|
-
"exclude": ["node_modules", "dist"]
|
|
16
|
-
}
|
package/type.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Post, Page } from '../content';
|
|
2
|
-
|
|
3
|
-
export interface BlockButton {
|
|
4
|
-
id: string;
|
|
5
|
-
sort: number | null;
|
|
6
|
-
type: ('pages' | 'posts' | 'external') | null;
|
|
7
|
-
label: string | null;
|
|
8
|
-
color: 'primary' | 'white' | 'gray' | 'white' | 'black';
|
|
9
|
-
variant: 'solid' | 'outline' | 'ghost' | 'link' | 'soft';
|
|
10
|
-
page: string | Page | null;
|
|
11
|
-
post: string | Post | null;
|
|
12
|
-
external_url: string | null;
|
|
13
|
-
icon: string | null;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { File } from '../system';
|
|
2
|
-
import type { BlockButtonGroup } from '.';
|
|
3
|
-
|
|
4
|
-
export interface BlockColumn {
|
|
5
|
-
headline?: string | null;
|
|
6
|
-
id?: string;
|
|
7
|
-
title?: string | null;
|
|
8
|
-
rows?: (number | BlockColumnRow)[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface BlockColumnRow {
|
|
12
|
-
block_columns?: (string | BlockColumn) | null;
|
|
13
|
-
content?: string | null;
|
|
14
|
-
headline?: string | null;
|
|
15
|
-
id?: string;
|
|
16
|
-
image?: (string | File) | null;
|
|
17
|
-
image_position?: string | null;
|
|
18
|
-
title?: string | null;
|
|
19
|
-
button_group?: (string | BlockButtonGroup) | null;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BlockButtonGroup } from '.';
|
|
2
|
-
|
|
3
|
-
export interface BlockCta {
|
|
4
|
-
buttons?: { [key: string]: any } | null;
|
|
5
|
-
content?: string | null;
|
|
6
|
-
headline?: string | null;
|
|
7
|
-
id?: string;
|
|
8
|
-
title?: string | null;
|
|
9
|
-
button_group?: (string | BlockButtonGroup) | null;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface BlockFaq {
|
|
2
|
-
faqs?: BlockFaqQuestion[] | null;
|
|
3
|
-
headline?: string | null;
|
|
4
|
-
id?: string;
|
|
5
|
-
title?: string | null;
|
|
6
|
-
alignment?: 'left' | 'center' | null;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface BlockFaqQuestion {
|
|
10
|
-
title: string | null;
|
|
11
|
-
answer: string | null;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { File } from '../system';
|
|
2
|
-
|
|
3
|
-
export interface BlockGallery {
|
|
4
|
-
headline?: string | null;
|
|
5
|
-
id?: string;
|
|
6
|
-
title?: string | null;
|
|
7
|
-
gallery_items?: BlockGalleryFile[] | null;
|
|
8
|
-
}
|
|
9
|
-
export interface BlockGalleryFile {
|
|
10
|
-
block_gallery?: (string | BlockGallery) | null;
|
|
11
|
-
directus_files_id?: (string | File) | null;
|
|
12
|
-
id?: number;
|
|
13
|
-
sort?: number | null;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { File } from '../system';
|
|
2
|
-
import type { BlockButtonGroup } from '.';
|
|
3
|
-
|
|
4
|
-
export interface BlockHero {
|
|
5
|
-
id?: string;
|
|
6
|
-
title?: string | null;
|
|
7
|
-
headline?: string | null;
|
|
8
|
-
content?: string | null;
|
|
9
|
-
image?: (string | File) | null;
|
|
10
|
-
image_position?: 'left' | 'right' | null;
|
|
11
|
-
button_group?: (string | BlockButtonGroup) | null;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { File } from '../system';
|
|
2
|
-
|
|
3
|
-
export interface BlockLogocloud {
|
|
4
|
-
headline?: string | null;
|
|
5
|
-
id?: string;
|
|
6
|
-
title?: string | null;
|
|
7
|
-
logos?: (string | BlockLogocloudFile)[];
|
|
8
|
-
}
|
|
9
|
-
export interface BlockLogocloudFile {
|
|
10
|
-
id?: string;
|
|
11
|
-
sort?: number | null;
|
|
12
|
-
block_logocloud_id?: (string | BlockLogocloud) | null;
|
|
13
|
-
directus_files_id?: (string | File) | null;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { File } from '../system';
|
|
2
|
-
|
|
3
|
-
export interface BlockQuote {
|
|
4
|
-
background_color?: string | null;
|
|
5
|
-
content?: string | null;
|
|
6
|
-
headline?: string | null;
|
|
7
|
-
id?: string;
|
|
8
|
-
image?: (string | File) | null;
|
|
9
|
-
subtitle?: string | null;
|
|
10
|
-
title?: string | null;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { File } from '../system';
|
|
2
|
-
import type { BlockButtonGroup } from '.';
|
|
3
|
-
|
|
4
|
-
export interface BlockStep {
|
|
5
|
-
id?: string;
|
|
6
|
-
title?: string | null;
|
|
7
|
-
headline?: string | null;
|
|
8
|
-
/** If enabled, image position is mframeworkd between left and right. */
|
|
9
|
-
mframework_image_position?: boolean;
|
|
10
|
-
/** Show the step numbers on the website. For example: (Step 1, Step 2, etc) */
|
|
11
|
-
show_step_numbers?: boolean | null;
|
|
12
|
-
steps?: (number | BlockStepItem)[];
|
|
13
|
-
}
|
|
14
|
-
export interface BlockStepItem {
|
|
15
|
-
id?: string;
|
|
16
|
-
title?: string | null;
|
|
17
|
-
content?: string | null;
|
|
18
|
-
image?: (string | File) | null;
|
|
19
|
-
sort?: number | null;
|
|
20
|
-
block_steps?: (string | BlockStep) | null;
|
|
21
|
-
button_group?: (string | BlockButtonGroup) | null;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|