@live-change/frontend-base 0.3.25 → 0.4.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.
Files changed (3) hide show
  1. package/lezer.js +17 -17
  2. package/package.json +28 -27
  3. package/vite-config.js +27 -29
package/lezer.js CHANGED
@@ -1,18 +1,18 @@
1
- const { parser: javascriptParser } = require("@lezer/javascript")
2
- const { parser: htmlParser } = require("@lezer/html")
3
- const { parser: markdownParser } = require("@lezer/markdown")
4
- const { parser: cssParser } = require("@lezer/css")
5
- const { parser: jsonParser } = require("@lezer/json")
6
- const { parser: cppParser } = require("@lezer/cpp")
7
- const { parser: sassParser } = require("@lezer/sass")
8
- const { parser: javaParser } = require("@lezer/java")
9
- const { parser: pythonParser } = require("@lezer/python")
10
- const { parser: phpParser } = require("@lezer/php")
11
- const { parser: rustParser } = require("@lezer/rust")
12
- const { parser: xmlParser } = require("@lezer/xml")
1
+ import { parser as javascriptParser } from "@lezer/javascript"
2
+ import { parser as htmlParser } from "@lezer/html"
3
+ import { parser as markdownParser } from "@lezer/markdown"
4
+ import { parser as cssParser } from "@lezer/css"
5
+ import { parser as jsonParser } from "@lezer/json"
6
+ import { parser as cppParser } from "@lezer/cpp"
7
+ import { parser as sassParser } from "@lezer/sass"
8
+ import { parser as javaParser } from "@lezer/java"
9
+ import { parser as pythonParser } from "@lezer/python"
10
+ import { parser as phpParser } from "@lezer/php"
11
+ import { parser as rustParser } from "@lezer/rust"
12
+ import { parser as xmlParser } from "@lezer/xml"
13
13
 
14
- const { highlightTree } = require("@lezer/highlight")
15
- const { defaultHighlightStyle } = require("@codemirror/language")
14
+ import { highlightTree } from "@lezer/highlight"
15
+ import { defaultHighlightStyle } from "@codemirror/language"
16
16
 
17
17
  const parsers = {
18
18
  javascript: javascriptParser,
@@ -36,7 +36,7 @@ const parsers = {
36
36
  xml: xmlParser,
37
37
  }
38
38
 
39
- function hightlight(code, language) {
39
+ function highlight(code, language) {
40
40
  //console.log("HIGHLIGHT", language, code)
41
41
  const parser = parsers[language]
42
42
  if(parser) {
@@ -60,6 +60,6 @@ function hightlight(code, language) {
60
60
  }
61
61
  }
62
62
 
63
- module.exports = {
64
- parsers, hightlight
63
+ export {
64
+ parsers, highlight
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-base",
3
- "version": "0.3.25",
3
+ "version": "0.4.0",
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",
@@ -19,6 +19,7 @@
19
19
  "generate": "vite build --ssrManifest --outDir dist/static && yarn build:server && node prerender",
20
20
  "debug": "node --inspect-brk server"
21
21
  },
22
+ "type": "module",
22
23
  "dependencies": {
23
24
  "@lezer/cpp": "^1.1.1",
24
25
  "@lezer/css": "^1.1.3",
@@ -32,25 +33,25 @@
32
33
  "@lezer/rust": "^1.0.1",
33
34
  "@lezer/sass": "^1.0.3",
34
35
  "@lezer/xml": "^1.0.2",
35
- "@live-change/cli": "0.7.39",
36
- "@live-change/dao": "0.5.22",
37
- "@live-change/dao-message": "0.5.22",
38
- "@live-change/dao-sockjs": "0.5.22",
39
- "@live-change/dao-vue3": "0.5.22",
40
- "@live-change/dao-websocket": "0.5.22",
41
- "@live-change/email-service": "0.3.41",
42
- "@live-change/password-authentication-service": "0.3.41",
43
- "@live-change/secret-code-service": "0.3.41",
44
- "@live-change/secret-link-service": "0.3.41",
45
- "@live-change/security-frontend": "^0.3.25",
46
- "@live-change/session-service": "0.3.41",
47
- "@live-change/user-service": "0.3.41",
36
+ "@live-change/cli": "0.8.0",
37
+ "@live-change/dao": "0.6.0",
38
+ "@live-change/dao-message": "0.6.0",
39
+ "@live-change/dao-sockjs": "0.6.0",
40
+ "@live-change/dao-vue3": "0.6.0",
41
+ "@live-change/dao-websocket": "0.6.0",
42
+ "@live-change/email-service": "0.4.0",
43
+ "@live-change/password-authentication-service": "0.4.0",
44
+ "@live-change/secret-code-service": "0.4.0",
45
+ "@live-change/secret-link-service": "0.4.0",
46
+ "@live-change/security-frontend": "^0.4.0",
47
+ "@live-change/session-service": "0.4.0",
48
+ "@live-change/user-service": "0.4.0",
48
49
  "@live-change/vue3-components": "0.2.34",
49
50
  "@live-change/vue3-ssr": "0.2.34",
50
51
  "@unhead/ssr": "^1.6.2",
51
- "@vitejs/plugin-vue": "^4.3.4",
52
+ "@vitejs/plugin-vue": "^5.0.4",
52
53
  "@vue/compiler-sfc": "^3.3.4",
53
- "@vueuse/core": "^10.4.1",
54
+ "@vueuse/core": "^10.7.2",
54
55
  "@vueuse/head": "^2.0.0",
55
56
  "@wekanteam/markdown-it-mermaid": "^0.6.4",
56
57
  "codeceptjs-assert": "^0.0.5",
@@ -75,10 +76,10 @@
75
76
  "markdown-it-task-lists": "^2.1.1",
76
77
  "primeflex": "^3.3.1",
77
78
  "primeicons": "^6.0.1",
78
- "primevue": "^3.40.1",
79
+ "primevue": "^3.48.1",
79
80
  "rollup-plugin-node-builtins": "^2.1.2",
80
- "rollup-plugin-visualizer": "5.9.2",
81
- "serialize-javascript": "^6.0.1",
81
+ "rollup-plugin-visualizer": "5.12.0",
82
+ "serialize-javascript": "^6.0.2",
82
83
  "serve-static": "^1.15.0",
83
84
  "unhead": "^1.6.2",
84
85
  "unplugin-vue-components": "^0.25.2",
@@ -89,23 +90,23 @@
89
90
  "vite-plugin-vue-images": "^0.6.1",
90
91
  "vue-i18n": "^9.4.0",
91
92
  "vue-meta": "^3.0.0-alpha.9",
92
- "vue-router": "^4.2.4",
93
+ "vue-router": "^4.2.5",
93
94
  "vue-shadow-dom": "4.2.0",
94
95
  "vue3-lazyload": "0.3.8",
95
- "vue3-scroll-border": "0.1.5"
96
+ "vue3-scroll-border": "0.1.6"
96
97
  },
97
98
  "devDependencies": {
98
- "@live-change/codeceptjs-helper": "0.7.39",
99
+ "@live-change/codeceptjs-helper": "0.8.0",
99
100
  "@wdio/selenium-standalone-service": "^8.15.0",
100
- "codeceptjs": "^3.5.4",
101
- "generate-password": "1.7.0",
102
- "playwright": "^1.37.1",
101
+ "codeceptjs": "^3.5.12",
102
+ "generate-password": "1.7.1",
103
+ "playwright": "^1.41.2",
103
104
  "random-profile-generator": "^2.3.0",
104
105
  "txtgen": "^3.0.6",
105
- "webdriverio": "^8.16.6"
106
+ "webdriverio": "^8.31.1"
106
107
  },
107
108
  "author": "",
108
109
  "license": "BSD-3-Clause",
109
110
  "description": "",
110
- "gitHead": "cf85cb6dbc2d7cb5bc89946e3b9ca24b415a7d25"
111
+ "gitHead": "a0ea609a891657b1c434d985a19d782558c4d2fd"
111
112
  }
package/vite-config.js CHANGED
@@ -1,31 +1,30 @@
1
- const { findFreePorts } = require("find-free-ports")
2
- const path = require('path')
3
- const vuePlugin = require('@vitejs/plugin-vue')
1
+ import { findFreePorts } from 'find-free-ports'
2
+ import path from 'path'
3
+ import vuePlugin from '@vitejs/plugin-vue'
4
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
5
+ import Markdown from 'unplugin-vue-markdown/vite'
6
+ import MarkdownItAnchor from 'markdown-it-anchor'
7
+ import MarkdownItSub from 'markdown-it-sub'
8
+ import MarkdownItSup from 'markdown-it-sup'
9
+ import MarkdownItFootnote from 'markdown-it-footnote'
10
+ import MarkdownItDefList from 'markdown-it-deflist'
11
+ import MarkdownItAbbr from 'markdown-it-abbr'
12
+ import MarkdownItMark from 'markdown-it-mark'
13
+ import MarkdownItKatex from 'markdown-it-katex'
14
+ import MarkdownItTaskLists from 'markdown-it-task-lists'
15
+ import MarkdownItTableOfContents from 'markdown-it-table-of-contents'
16
+ //import MarkdownItMermaid from 'markdown-it-mermaid'
17
17
 
18
- const { highlight } = require('@live-change/frontend-base/lezer.js')
18
+ import { highlight } from '@live-change/frontend-base/lezer.js'
19
19
 
20
- const Components = require('unplugin-vue-components/vite')
21
- const {
22
- PrimeVueResolver
23
- } = require('unplugin-vue-components/resolvers')
20
+ import Components from 'unplugin-vue-components/vite'
21
+ import { PrimeVueResolver } from 'unplugin-vue-components/resolvers'
24
22
 
25
- const { visualizer } = require('rollup-plugin-visualizer')
26
- const viteImages = require('vite-plugin-vue-images')
27
- const viteCompression = require('vite-plugin-compression')
28
- const { searchForWorkspaceRoot } = require('vite')
23
+ import { visualizer } from 'rollup-plugin-visualizer'
24
+ import viteImages from 'vite-plugin-vue-images'
25
+ import viteCompression from 'vite-plugin-compression'
26
+ import { searchForWorkspaceRoot } from 'vite'
27
+ import { fileURLToPath } from 'url'
29
28
 
30
29
  const ssrTransformCustomDir = () => {
31
30
  return {
@@ -36,9 +35,8 @@ const ssrTransformCustomDir = () => {
36
35
 
37
36
  let version = process.env.VERSION ?? 'unknown'
38
37
 
39
- module.exports = async ({ command, mode }, options = {
38
+ export default async ({ command, mode }, options = {
40
39
  ssrDisabledDirectives: ['ripple', 'styleclass', 'badge', 'shared-element', 'lazy']
41
-
42
40
  }) => {
43
41
  //console.log("VITE CONFIG", command, mode)
44
42
  return {
@@ -56,8 +54,8 @@ module.exports = async ({ command, mode }, options = {
56
54
  fs: {
57
55
  allow: [
58
56
  searchForWorkspaceRoot(process.cwd()),
59
- path.dirname(require.resolve('primeicons/package.json')),
60
- path.dirname(require.resolve('@fortawesome/fontawesome-free/package.json'))
57
+ path.dirname(fileURLToPath(import.meta.resolve('primeicons/package.json'))),
58
+ path.dirname(fileURLToPath(import.meta.resolve('@fortawesome/fontawesome-free/package.json'))),
61
59
  ]
62
60
  }
63
61
  },
@@ -90,7 +88,7 @@ module.exports = async ({ command, mode }, options = {
90
88
  md.use(MarkdownItMark)
91
89
  md.use(MarkdownItKatex)
92
90
  md.use(MarkdownItTaskLists)
93
- md.use(MarkdownItMermaid)
91
+ //md.use(MarkdownItMermaid)
94
92
  md.use(MarkdownItAnchor)
95
93
  md.use(MarkdownItTableOfContents, {
96
94
  includeLevel: [1, 2, 3],