@live-change/frontend-base 0.2.54 → 0.2.56
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/Page.vue +2 -2
- package/package.json +32 -13
- package/vite-config.js +83 -0
package/Page.vue
CHANGED
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
40
|
|
|
41
|
-
console.log("SETUP PAGE!!!")
|
|
41
|
+
//console.log("SETUP PAGE!!!")
|
|
42
42
|
|
|
43
43
|
import { computed } from 'vue'
|
|
44
44
|
import { useRoute } from 'vue-router'
|
|
45
45
|
const route = useRoute()
|
|
46
46
|
|
|
47
|
-
const pageType = computed(() => route
|
|
47
|
+
const pageType = computed(() => route?.meta?.pageType ?? 'simple' )
|
|
48
48
|
|
|
49
49
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/frontend-base",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.56",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "lcli memDev --enableSessions --initScript ./init.js --templatePath ../../base-frontend/index.html",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -20,30 +20,46 @@
|
|
|
20
20
|
"debug": "node --inspect-brk server"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@live-change/cli": "0.7.
|
|
24
|
-
"@live-change/dao": "0.5.
|
|
25
|
-
"@live-change/dao-message": "0.5.
|
|
26
|
-
"@live-change/dao-sockjs": "0.5.
|
|
27
|
-
"@live-change/dao-vue3": "0.5.
|
|
28
|
-
"@live-change/dao-websocket": "0.5.
|
|
23
|
+
"@live-change/cli": "0.7.32",
|
|
24
|
+
"@live-change/dao": "0.5.21",
|
|
25
|
+
"@live-change/dao-message": "0.5.21",
|
|
26
|
+
"@live-change/dao-sockjs": "0.5.21",
|
|
27
|
+
"@live-change/dao-vue3": "0.5.21",
|
|
28
|
+
"@live-change/dao-websocket": "0.5.21",
|
|
29
29
|
"@live-change/email-service": "0.3.30",
|
|
30
30
|
"@live-change/password-authentication-service": "0.3.30",
|
|
31
31
|
"@live-change/secret-code-service": "0.3.30",
|
|
32
32
|
"@live-change/secret-link-service": "0.3.30",
|
|
33
|
-
"@live-change/security-frontend": "^0.2.
|
|
33
|
+
"@live-change/security-frontend": "^0.2.56",
|
|
34
34
|
"@live-change/session-service": "0.3.30",
|
|
35
35
|
"@live-change/user-service": "0.3.30",
|
|
36
|
-
"@live-change/vue3-components": "0.2.
|
|
37
|
-
"@live-change/vue3-ssr": "0.2.
|
|
36
|
+
"@live-change/vue3-components": "0.2.29",
|
|
37
|
+
"@live-change/vue3-ssr": "0.2.29",
|
|
38
38
|
"@unhead/ssr": "^1.6.2",
|
|
39
39
|
"@vitejs/plugin-vue": "^4.3.4",
|
|
40
40
|
"@vue/compiler-sfc": "^3.3.4",
|
|
41
41
|
"@vueuse/core": "^10.4.1",
|
|
42
42
|
"@vueuse/head": "^1.3.1",
|
|
43
|
+
"@wekanteam/markdown-it-mermaid": "^0.6.4",
|
|
43
44
|
"codeceptjs-assert": "^0.0.5",
|
|
44
45
|
"compression": "^1.7.4",
|
|
45
46
|
"cross-env": "^7.0.3",
|
|
46
47
|
"get-port-sync": "1.0.1",
|
|
48
|
+
"markdown-it-abbr": "^1.0.4",
|
|
49
|
+
"markdown-it-anchor": "^8.6.7",
|
|
50
|
+
"markdown-it-deflist": "^2.1.0",
|
|
51
|
+
"markdown-it-echarts": "^0.1.3",
|
|
52
|
+
"markdown-it-footnote": "^3.0.3",
|
|
53
|
+
"markdown-it-highlight": "^0.2.0",
|
|
54
|
+
"markdown-it-katex": "^2.0.3",
|
|
55
|
+
"markdown-it-mark": "^3.0.1",
|
|
56
|
+
"markdown-it-plugin-echarts": "^0.0.1",
|
|
57
|
+
"markdown-it-prism": "^2.3.0",
|
|
58
|
+
"markdown-it-source-map": "^0.1.1",
|
|
59
|
+
"markdown-it-sub": "^1.0.0",
|
|
60
|
+
"markdown-it-sup": "^1.0.0",
|
|
61
|
+
"markdown-it-table-of-contents": "^0.6.0",
|
|
62
|
+
"markdown-it-task-lists": "^2.1.1",
|
|
47
63
|
"primeflex": "^3.3.1",
|
|
48
64
|
"primeicons": "^6.0.1",
|
|
49
65
|
"primevue": "^3.34.1",
|
|
@@ -52,17 +68,20 @@
|
|
|
52
68
|
"serialize-javascript": "^6.0.1",
|
|
53
69
|
"serve-static": "^1.15.0",
|
|
54
70
|
"unhead": "^1.6.2",
|
|
71
|
+
"unplugin-vue-components": "^0.25.2",
|
|
72
|
+
"unplugin-vue-markdown": "^0.24.3",
|
|
55
73
|
"v-shared-element": "3.1.1",
|
|
56
74
|
"vite-plugin-compression": "0.5.1",
|
|
75
|
+
"vite-plugin-pages": "^0.31.0",
|
|
57
76
|
"vite-plugin-vue-images": "^0.6.1",
|
|
58
|
-
"vue-i18n": "^9.
|
|
77
|
+
"vue-i18n": "^9.4.0",
|
|
59
78
|
"vue-meta": "^3.0.0-alpha.9",
|
|
60
79
|
"vue-router": "^4.2.4",
|
|
61
80
|
"vue3-lazyload": "0.3.8",
|
|
62
81
|
"vue3-scroll-border": "0.1.5"
|
|
63
82
|
},
|
|
64
83
|
"devDependencies": {
|
|
65
|
-
"@live-change/codeceptjs-helper": "0.7.
|
|
84
|
+
"@live-change/codeceptjs-helper": "0.7.32",
|
|
66
85
|
"@wdio/selenium-standalone-service": "^8.15.0",
|
|
67
86
|
"codeceptjs": "^3.5.4",
|
|
68
87
|
"generate-password": "1.7.0",
|
|
@@ -74,5 +93,5 @@
|
|
|
74
93
|
"author": "",
|
|
75
94
|
"license": "BSD-3-Clause",
|
|
76
95
|
"description": "",
|
|
77
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "73eeefa38a8af813aa244a711de9765eedfba306"
|
|
78
97
|
}
|
package/vite-config.js
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
const { findFreePorts } = require("find-free-ports")
|
|
2
2
|
const path = require('path')
|
|
3
3
|
const vuePlugin = require('@vitejs/plugin-vue')
|
|
4
|
+
|
|
5
|
+
const Markdown = require('unplugin-vue-markdown/vite')
|
|
6
|
+
const MarkdownItAnchor = require('markdown-it-anchor')
|
|
7
|
+
const MarkdownItSub = require('markdown-it-sub')
|
|
8
|
+
const MarkdownItSup = require('markdown-it-sup')
|
|
9
|
+
const MarkdownItFootnote = require('markdown-it-footnote')
|
|
10
|
+
const MarkdownItDefList = require('markdown-it-deflist')
|
|
11
|
+
const MarkdownItAbbr = require('markdown-it-abbr')
|
|
12
|
+
const MarkdownItMark = require('markdown-it-mark')
|
|
13
|
+
const MarkdownItKatex = require('markdown-it-katex')
|
|
14
|
+
const MarkdownItTaskLists = require('markdown-it-task-lists')
|
|
15
|
+
const MarkdownItTableOfContents = require('markdown-it-table-of-contents')
|
|
16
|
+
const MarkdownItMermaid = require('markdown-it-mermaid').default
|
|
17
|
+
|
|
18
|
+
const { parser: javascriptParser } = require("@lezer/javascript")
|
|
19
|
+
const { highlightTree } = require("@lezer/highlight")
|
|
20
|
+
const { defaultHighlightStyle } = require("@codemirror/language")
|
|
21
|
+
|
|
22
|
+
const Components = require('unplugin-vue-components/vite')
|
|
4
23
|
const { visualizer } = require('rollup-plugin-visualizer')
|
|
5
24
|
const viteImages = require('vite-plugin-vue-images')
|
|
6
25
|
const viteCompression = require('vite-plugin-compression')
|
|
@@ -15,6 +34,7 @@ const ssrTransformCustomDir = () => {
|
|
|
15
34
|
|
|
16
35
|
module.exports = async ({ command, mode }) => {
|
|
17
36
|
console.log("VITE CONFIG", command, mode)
|
|
37
|
+
//const MarkdownItEcharts = await import('markdown-it-echarts')
|
|
18
38
|
return {
|
|
19
39
|
define: {
|
|
20
40
|
ENV_BASE_HREF: JSON.stringify(process.env.BASE_HREF || 'http://localhost:8001')
|
|
@@ -33,6 +53,7 @@ module.exports = async ({ command, mode }) => {
|
|
|
33
53
|
},
|
|
34
54
|
plugins: [
|
|
35
55
|
vuePlugin({
|
|
56
|
+
include: [/\.vue$/, /\.md$/],
|
|
36
57
|
template: {
|
|
37
58
|
compilerOptions: {
|
|
38
59
|
// whitespace: "preserve",
|
|
@@ -46,6 +67,67 @@ module.exports = async ({ command, mode }) => {
|
|
|
46
67
|
}
|
|
47
68
|
},
|
|
48
69
|
}),
|
|
70
|
+
Markdown({
|
|
71
|
+
headEnabled: true,
|
|
72
|
+
markdownItOptions: {
|
|
73
|
+
html: true,
|
|
74
|
+
linkify: true,
|
|
75
|
+
typographer: true,
|
|
76
|
+
highlight: function (code, lang) {
|
|
77
|
+
//console.log("HIGHLIGHT", lang, str)
|
|
78
|
+
const tree = javascriptParser.parse(code)
|
|
79
|
+
let pos = 0
|
|
80
|
+
const output = []
|
|
81
|
+
highlightTree(tree, defaultHighlightStyle, (from, to, classes) => {
|
|
82
|
+
if(from > pos) output.push(`<span>${
|
|
83
|
+
code.slice(pos, from).replace(/</g, "<").replace(/>/g, ">")
|
|
84
|
+
}</span>`)
|
|
85
|
+
console.log("HIGHLIGHT", from, to, classes, code.slice(from, to))
|
|
86
|
+
output.push(`<span class="${classes}">${
|
|
87
|
+
code.slice(from, to).replace(/</g, "<").replace(/>/g, ">")
|
|
88
|
+
}</span>`)
|
|
89
|
+
pos = to
|
|
90
|
+
})
|
|
91
|
+
if(code.length > pos) output.push(`<span>${
|
|
92
|
+
code.slice(pos).replace(/</g, "<").replace(/>/g, ">")
|
|
93
|
+
}</span>`)
|
|
94
|
+
return `<pre>${output.join('')}</pre>`
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
markdownItSetup(md) {
|
|
98
|
+
md.use(MarkdownItSub)
|
|
99
|
+
md.use(MarkdownItSup)
|
|
100
|
+
md.use(MarkdownItFootnote)
|
|
101
|
+
md.use(MarkdownItDefList)
|
|
102
|
+
md.use(MarkdownItAbbr)
|
|
103
|
+
md.use(MarkdownItMark)
|
|
104
|
+
md.use(MarkdownItKatex)
|
|
105
|
+
md.use(MarkdownItTaskLists)
|
|
106
|
+
//md.use(MarkdownItEcharts)
|
|
107
|
+
md.use(MarkdownItMermaid)
|
|
108
|
+
md.use(MarkdownItAnchor)
|
|
109
|
+
md.use(MarkdownItTableOfContents, {
|
|
110
|
+
includeLevel: [1, 2, 3],
|
|
111
|
+
containerClass: 'table-of-contents',
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
console.log('MDO', md.options.highlight.toString())
|
|
115
|
+
},
|
|
116
|
+
wrapperClasses: 'markdown-body'
|
|
117
|
+
}),
|
|
118
|
+
Components({
|
|
119
|
+
types: [{
|
|
120
|
+
from: 'vue-router',
|
|
121
|
+
names: ['RouterLink', 'RouterView'],
|
|
122
|
+
}],
|
|
123
|
+
// allow auto load markdown components under `./src/components/`
|
|
124
|
+
dirs: ['src/components'],
|
|
125
|
+
// search for subdirectories
|
|
126
|
+
deep: true,
|
|
127
|
+
extensions: ['vue', 'md'],
|
|
128
|
+
// allow auto import and register components used in markdown
|
|
129
|
+
customLoaderMatcher: path => path.endsWith('.md'),
|
|
130
|
+
}),
|
|
49
131
|
viteImages({ extensions: ['jpg', 'jpeg', 'png', 'svg', 'webp'] }),
|
|
50
132
|
viteCompression({ algorithm: 'brotliCompress', ext: '.br' }),
|
|
51
133
|
viteCompression({ algorithm: 'gzip', ext: '.gz' }),
|
|
@@ -117,6 +199,7 @@ module.exports = async ({ command, mode }) => {
|
|
|
117
199
|
'@live-change/url-frontend',
|
|
118
200
|
'@live-change/user-frontend',
|
|
119
201
|
'@live-change/wysiwyg-frontend',
|
|
202
|
+
'@live-change/frontend-auto-form',
|
|
120
203
|
'vue3-scroll-border',
|
|
121
204
|
'pretty-bytes',
|
|
122
205
|
'primevue',
|