From f234935218a6b81ad7015d3bb70ef28d8b21104f Mon Sep 17 00:00:00 2001 From: Makito Date: Wed, 21 Feb 2024 20:27:44 +0800 Subject: [PATCH] feat(expressions): expressions editor --- packages/core/expressions/LICENSE | 201 +++++++++ packages/core/expressions/README.md | 31 ++ packages/core/expressions/package.json | 77 ++++ packages/core/expressions/sandbox/App.vue | 49 +++ packages/core/expressions/sandbox/index.html | 25 ++ packages/core/expressions/sandbox/index.ts | 6 + .../core/expressions/sandbox/tsconfig.json | 13 + .../src/components/ExpressionsEditor.vue | 168 ++++++++ .../expressions/src/global-components.d.ts | 2 + packages/core/expressions/src/index.ts | 16 + .../core/expressions/src/schema-presets.ts | 49 +++ packages/core/expressions/src/setup-monaco.ts | 183 ++++++++ packages/core/expressions/tsconfig.build.json | 12 + packages/core/expressions/tsconfig.json | 23 + packages/core/expressions/vite.config.ts | 44 ++ pnpm-lock.yaml | 393 ++++++++++++++++++ 16 files changed, 1292 insertions(+) create mode 100644 packages/core/expressions/LICENSE create mode 100644 packages/core/expressions/README.md create mode 100644 packages/core/expressions/package.json create mode 100644 packages/core/expressions/sandbox/App.vue create mode 100644 packages/core/expressions/sandbox/index.html create mode 100644 packages/core/expressions/sandbox/index.ts create mode 100644 packages/core/expressions/sandbox/tsconfig.json create mode 100644 packages/core/expressions/src/components/ExpressionsEditor.vue create mode 100644 packages/core/expressions/src/global-components.d.ts create mode 100644 packages/core/expressions/src/index.ts create mode 100644 packages/core/expressions/src/schema-presets.ts create mode 100644 packages/core/expressions/src/setup-monaco.ts create mode 100644 packages/core/expressions/tsconfig.build.json create mode 100644 packages/core/expressions/tsconfig.json create mode 100644 packages/core/expressions/vite.config.ts diff --git a/packages/core/expressions/LICENSE b/packages/core/expressions/LICENSE new file mode 100644 index 0000000000..b45e572c88 --- /dev/null +++ b/packages/core/expressions/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Kong, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/core/expressions/README.md b/packages/core/expressions/README.md new file mode 100644 index 0000000000..ac7989d793 --- /dev/null +++ b/packages/core/expressions/README.md @@ -0,0 +1,31 @@ +# @kong-ui-public/expressions + +{A description of this package} + +- [Features](#features) +- [Requirements](#requirements) +- [Usage](#usage) + - [Install](#install) + - [Props](#props) + +## Features + +- List of package features + +## Requirements + +- List of package requirements (e.g. "`vue` and must be initialized in the host application") + +## Usage + +### Install + +{Installation instructions} + +### Props + +#### `example` + +- type: `Boolean` +- required: `false` +- default: `false` diff --git a/packages/core/expressions/package.json b/packages/core/expressions/package.json new file mode 100644 index 0000000000..2da71193aa --- /dev/null +++ b/packages/core/expressions/package.json @@ -0,0 +1,77 @@ +{ + "name": "@kong-ui-public/expressions", + "version": "0.0.1", + "type": "module", + "main": "./dist/expressions.umd.js", + "module": "./dist/expressions.es.js", + "types": "dist/types/index.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": { + "import": "./dist/expressions.es.js", + "require": "./dist/expressions.umd.js", + "types": "./dist/types/index.d.ts" + }, + "./package.json": "./package.json", + "./dist/*": "./dist/*" + }, + "publishConfig": { + "access": "public" + }, + "scripts": { + "dev": "cross-env USE_SANDBOX=true vite", + "build": "run-s typecheck build:package build:types", + "build:package": "vite build -m production", + "build:analyzer": "BUILD_VISUALIZER='core/expressions' vite build -m production", + "build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly", + "build:sandbox": "cross-env USE_SANDBOX=true vite build -m production", + "preview": "cross-env USE_SANDBOX=true vite preview", + "lint": "eslint '**/*.{js,jsx,ts,tsx,vue}' --ignore-path '../../../.eslintignore'", + "lint:fix": "eslint '**/*.{js,jsx,ts,tsx,vue}' --ignore-path '../../../.eslintignore' --fix", + "stylelint": "stylelint --allow-empty-input './src/**/*.{css,scss,sass,less,styl,vue}'", + "stylelint:fix": "stylelint --allow-empty-input './src/**/*.{css,scss,sass,less,styl,vue}' --fix", + "typecheck": "vue-tsc -p './tsconfig.build.json' --noEmit", + "test:component": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress run --component -b chrome --spec './src/**/*.cy.ts' --project '../../../.'", + "test:component:open": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress open --component -b chrome --project '../../../.'", + "test:unit": "cross-env FORCE_COLOR=1 vitest run", + "test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui" + }, + "devDependencies": { + "@kong/atc-router": "1.6.0-alpha.2", + "@kong/design-tokens": "1.12.7", + "@kong/kongponents": "9.0.0-alpha.105", + "monaco-editor": "0.21.3", + "vite-plugin-monaco-editor": "^1.1.0", + "vite-plugin-top-level-await": "^1.4.1", + "vite-plugin-wasm": "^3.3.0", + "vue": "^3.4.19" + }, + "repository": { + "type": "git", + "url": "https://github.com/Kong/public-ui-components.git", + "directory": "packages/core/expressions" + }, + "homepage": "https://github.com/Kong/public-ui-components/tree/main/packages/core/expressions", + "bugs": { + "url": "https://github.com/Kong/public-ui-components/issues" + }, + "author": "Kong, Inc.", + "license": "Apache-2.0", + "volta": { + "extends": "../../../package.json" + }, + "distSizeChecker": { + "errorLimit": "200KB" + }, + "peerDependencies": { + "@kong/atc-router": "1.6.0-alpha.2", + "@kong/kongponents": "9.0.0-alpha.105", + "monaco-editor": "0.21.3", + "vue": "^3.4.19" + }, + "dependencies": { + "@kong-ui-public/core": "workspace:^" + } +} diff --git a/packages/core/expressions/sandbox/App.vue b/packages/core/expressions/sandbox/App.vue new file mode 100644 index 0000000000..20a43117f6 --- /dev/null +++ b/packages/core/expressions/sandbox/App.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/packages/core/expressions/sandbox/index.html b/packages/core/expressions/sandbox/index.html new file mode 100644 index 0000000000..2b8d1ecb57 --- /dev/null +++ b/packages/core/expressions/sandbox/index.html @@ -0,0 +1,25 @@ + + + + + + + Expressions Component Sandbox + + + + + + + +
+ + + + diff --git a/packages/core/expressions/sandbox/index.ts b/packages/core/expressions/sandbox/index.ts new file mode 100644 index 0000000000..52668a0a54 --- /dev/null +++ b/packages/core/expressions/sandbox/index.ts @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import App from './App.vue' + +const app = createApp(App) + +app.mount('#app') diff --git a/packages/core/expressions/sandbox/tsconfig.json b/packages/core/expressions/sandbox/tsconfig.json new file mode 100644 index 0000000000..1ff7e79a74 --- /dev/null +++ b/packages/core/expressions/sandbox/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "baseUrl": "." + }, + "include": [ + "**/*.ts", + "**/*.vue", + ], + "exclude": [ + "node_modules" + ] +} diff --git a/packages/core/expressions/src/components/ExpressionsEditor.vue b/packages/core/expressions/src/components/ExpressionsEditor.vue new file mode 100644 index 0000000000..0d8e25c11b --- /dev/null +++ b/packages/core/expressions/src/components/ExpressionsEditor.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/packages/core/expressions/src/global-components.d.ts b/packages/core/expressions/src/global-components.d.ts new file mode 100644 index 0000000000..2f0048d672 --- /dev/null +++ b/packages/core/expressions/src/global-components.d.ts @@ -0,0 +1,2 @@ +// Import globally available components +import '@kong/kongponents/dist/types/global-components' diff --git a/packages/core/expressions/src/index.ts b/packages/core/expressions/src/index.ts new file mode 100644 index 0000000000..4cc532f58b --- /dev/null +++ b/packages/core/expressions/src/index.ts @@ -0,0 +1,16 @@ +import ExpressionsEditor from './components/ExpressionsEditor.vue' + +// Export Vue plugin +// We rarely want to export components as a plugin as we prefer to support proper tree-shaking in the host application. Only enable if you're packing a Vue plugin. +// export default { +// // Customize Vue plugin options as desired +// // Providing a `name` property allows for customizing the registered +// // name of your component (useful if exporting a single component). +// install: (app: App, options: { name?: string, [key: string]: any } = {}): void => { +// app.component(options.name || 'Expressions', Expressions) +// }, +// } + +export { ExpressionsEditor } + +export * from './schema-presets' diff --git a/packages/core/expressions/src/schema-presets.ts b/packages/core/expressions/src/schema-presets.ts new file mode 100644 index 0000000000..f01e8a73a4 --- /dev/null +++ b/packages/core/expressions/src/schema-presets.ts @@ -0,0 +1,49 @@ +import { Schema, type AstType } from '@kong/atc-router' + +const createSchema = (fieldTypeMapping: Record) => { + const schema = new Schema() + + for (const [type, fields] of Object.entries(fieldTypeMapping)) { + for (const field of fields) { + schema.addField(field, type as AstType) + } + } + + return schema +} + +export const EMPTY_SCHEMA = createSchema({}) + +export const HTTP_SCHEMA = createSchema({ + String: [ + 'net.protocol', + 'tls.sni', + 'http.method', + 'http.host', + 'http.path', + 'http.path.segments.*', + 'http.headers.*', + 'http.queries.*', + ], + Int: ['net.src.port', 'net.dst.port', 'http.path.segments.len'], + IpAddr: ['net.src.ip', 'net.dst.ip'], +}) + +export const STREAM_SCHEMA = createSchema({ + String: ['net.protocol', 'tls.sni'], + Int: ['net.src.port', 'net.dst.port'], + IpAddr: ['net.src.ip', 'net.dst.ip'], +}) + +export const PROTOCOL_TO_SCHEMA = { + http: HTTP_SCHEMA, + https: HTTP_SCHEMA, + grpc: HTTP_SCHEMA, + grpcs: HTTP_SCHEMA, + + tcp: STREAM_SCHEMA, + udp: STREAM_SCHEMA, + tls: STREAM_SCHEMA, + + tls_passthrough: STREAM_SCHEMA, +} diff --git a/packages/core/expressions/src/setup-monaco.ts b/packages/core/expressions/src/setup-monaco.ts new file mode 100644 index 0000000000..4b679473b4 --- /dev/null +++ b/packages/core/expressions/src/setup-monaco.ts @@ -0,0 +1,183 @@ +import type * as Monaco from 'monaco-editor' + +interface MonarchLanguage extends Monaco.languages.IMonarchLanguage { + keywords: string[]; +} + +const obj: Record = { + http: { + headers: {}, + queries: {}, + method: {}, + host: {}, + path: {}, + }, + net: { + protocol: {}, + src: { + ip: {}, + port: {}, + }, + dst: { + ip: {}, + port: {}, + }, + }, + tls: { + sni: {}, + }, +} + +let registered = false + +export const languageId = 'kong-expressions' +export const theme = 'kong-expressions-theme' + +export const registerRouteExpression = async (monaco: typeof Monaco) => { + if (registered) { + return + } + + registered = true + + const keywords = ['not', 'in', 'contains'] + + monaco.languages.register({ id: languageId }) + + monaco.languages.setMonarchTokensProvider(languageId, { + keywords, + tokenizer: { + root: [ + [/[a-zA-Z][\w$]*/, { + cases: { + '@keywords': 'keyword', + '@default': 'variable', + }, + }], + [/==|!=|~|\^=|=\^|>=?|<=?|&&|\|\|/, 'operators'], + [/[()]/, 'brackets'], + [/".*?"/, 'string'], + [/\d+/, 'number'], + ], + }, + } as MonarchLanguage) + + monaco.editor.defineTheme(theme, { + inherit: true, + base: 'vs', + rules: [ + { token: 'keyword', foreground: '#fe5433', fontStyle: 'bold' }, + { token: 'operators', foreground: '#fe5433', fontStyle: 'bold' }, + { token: 'string', foreground: '#009966' }, + { token: 'number', foreground: '#009966' }, + { token: 'variable', foreground: '#006699' }, + { token: 'brackets', foreground: '#993399' }, + ], + colors: { + 'editor.foreground': '#000000', + }, + }) + + monaco.languages.registerCompletionItemProvider(languageId, { + provideCompletionItems: (model, position) => { + const word = model.getWordUntilPosition(position) + const range = { + startLineNumber: position.lineNumber, + endLineNumber: position.lineNumber, + startColumn: word.startColumn, + endColumn: word.endColumn, + } + + const suggestions = keywords.map((key) => ({ + label: key, + kind: monaco.languages.CompletionItemKind.Keyword, + insertText: key, + range, + })) + + return { suggestions } + }, + }) + + monaco.languages.registerCompletionItemProvider(languageId, { + // run the following function when a period is typed + triggerCharacters: ['.'], + + // function to generate object autocompletion + provideCompletionItems: (model, position) => { + const word = model.getWordUntilPosition(position) + const range = { + startLineNumber: position.lineNumber, + endLineNumber: position.lineNumber, + startColumn: word.startColumn, + endColumn: word.endColumn, + } + // split everything the user has typed on the current line up at each space, and only look at the last word + const lastChars = model.getValueInRange({ + startLineNumber: position.lineNumber, + startColumn: 0, + endLineNumber: position.lineNumber, + endColumn: position.column, + }) + // nosemgrep: javascript.lang.security.audit.incomplete-sanitization.incomplete-sanitization + const words = lastChars.replace('\t', '').split(' ') + const activeTyping = words[words.length - 1] // what the user is currently typing (everything after the last space) + + // if a period is typed then we need to look at member objects of the `obj` object + const isMember = activeTyping.includes('.') + + // array of autocompletion results + const result: Monaco.languages.CompletionItem[] = [] + + // find the last token of the object the user is typing + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let lastToken: Record = obj + + if (isMember) { + // get a list of all members + const parents = activeTyping.split('.').slice(0, -1) + + lastToken = obj[parents[0]] + + if (!lastToken) { + return { suggestions: result } + } + + // loop through all the parents + for (let i = 1; i < parents.length; i++) { + const propToLookFor = parents[i] + + if (Object.prototype.hasOwnProperty.call(lastToken, propToLookFor)) { + // nosemgrep: javascript.lang.security.audit.prototype-pollution.prototype-pollution-loop.prototype-pollution-loop + lastToken = lastToken[propToLookFor] + } else { + // not valid + return { suggestions: result } + } + } + } + + // get all child properties of the last token + Object.keys(lastToken).forEach((key) => { + result.push({ + label: key, + kind: monaco.languages.CompletionItemKind.Property, + insertText: key, + range, + }) + }) + + return { + suggestions: result, + } + }, + }) + + monaco.languages.setLanguageConfiguration(languageId, { + brackets: [['(', ')']], + autoClosingPairs: [ + { open: '(', close: ')' }, + { open: '"', close: '"', notIn: ['string'] }, + ], + }) +} diff --git a/packages/core/expressions/tsconfig.build.json b/packages/core/expressions/tsconfig.build.json new file mode 100644 index 0000000000..577de9d6ae --- /dev/null +++ b/packages/core/expressions/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": [] + }, + "exclude": [ + "src/**/*.cy.ts", + "src/**/*.spec.ts", + "sandbox", + "dist" + ] +} diff --git a/packages/core/expressions/tsconfig.json b/packages/core/expressions/tsconfig.json new file mode 100644 index 0000000000..e34e90e4e4 --- /dev/null +++ b/packages/core/expressions/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "dist", + "declarationDir": "dist/types", + "types": [ + "node", + "vite/client", + "cypress", + "cypress/vue", + "../../../cypress/support" + ] + }, + "include": [ + "src/**/*", + "sandbox/**/*" + ], + "exclude": [ + "node_modules", + "dist" + ] +} diff --git a/packages/core/expressions/vite.config.ts b/packages/core/expressions/vite.config.ts new file mode 100644 index 0000000000..f6b0a70931 --- /dev/null +++ b/packages/core/expressions/vite.config.ts @@ -0,0 +1,44 @@ +import sharedViteConfig, { sanitizePackageName } from '../../../vite.config.shared' +import { resolve } from 'path' +import { defineConfig, mergeConfig } from 'vite' +import wasm from 'vite-plugin-wasm' +import topLevelAwait from 'vite-plugin-top-level-await' +import monacoEditorPlugin from 'vite-plugin-monaco-editor' + +// Package name MUST always match the kebab-case package name inside the component's package.json file and the name of your `/packages/{package-name}` directory +const packageName = 'expressions' +const sanitizedPackageName = sanitizePackageName(packageName) + +// Merge the shared Vite config with the local one defined below +const config = mergeConfig(sharedViteConfig, defineConfig({ + build: { + lib: { + // The kebab-case name of the exposed global variable. MUST be in the format `kong-ui-public-{package-name}` + // Example: name: 'kong-ui-public-demo-component' + formats: ['es'], + name: `kong-ui-public-${sanitizedPackageName}`, + entry: resolve(__dirname, './src/index.ts'), + fileName: (format) => `${sanitizedPackageName}.${format}.js`, + }, + rollupOptions: { + external: ['@kong/atc-router', 'monaco-editor'], + }, + }, + ...process.env.USE_SANDBOX && { + plugins: [ + wasm(), + topLevelAwait(), + monacoEditorPlugin.default({}), + ], + }, +})) + +// If we are trying to preview a build of the local `package/expressions/sandbox` directory, +// unset the lib, rollupOptions.external and rollupOptions.output.globals properties +if (process.env.USE_SANDBOX) { + config.build.lib = undefined + config.build.rollupOptions.external = undefined + config.build.rollupOptions.output.global = undefined +} + +export default config diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa6e2c4988..d0fbe05c43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -501,6 +501,37 @@ importers: specifier: ^3.4.13 version: 3.4.15(typescript@5.3.3) + packages/core/expressions: + dependencies: + '@kong-ui-public/core': + specifier: workspace:^ + version: link:../core + devDependencies: + '@kong/atc-router': + specifier: 1.6.0-alpha.2 + version: 1.6.0-alpha.2 + '@kong/design-tokens': + specifier: 1.12.7 + version: 1.12.7 + '@kong/kongponents': + specifier: 9.0.0-alpha.105 + version: 9.0.0-alpha.105(vue-router@4.2.5)(vue@3.4.19) + monaco-editor: + specifier: 0.21.3 + version: 0.21.3 + vite-plugin-monaco-editor: + specifier: ^1.1.0 + version: 1.1.0(monaco-editor@0.21.3) + vite-plugin-top-level-await: + specifier: ^1.4.1 + version: 1.4.1(vite@5.1.0) + vite-plugin-wasm: + specifier: ^3.3.0 + version: 3.3.0(vite@5.1.0) + vue: + specifier: ^3.4.19 + version: 3.4.19(typescript@5.3.3) + packages/core/forms: dependencies: '@kong/icons': @@ -1362,6 +1393,14 @@ packages: dependencies: '@babel/types': 7.23.6 + /@babel/parser@7.23.9: + resolution: {integrity: sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.6 + dev: true + /@babel/plugin-proposal-decorators@7.23.9(@babel/core@7.23.3): resolution: {integrity: sha512-hJhBCb0+NnTWybvWq2WpbCYDOcflSbx0t+BYP65e5R9GVnukiDTi+on5bFkk4p7QGuv190H6KfNiV9Knf/3cZA==} engines: {node: '>=6.9.0'} @@ -2339,6 +2378,10 @@ packages: vue: 3.4.15(typescript@5.3.3) dev: false + /@kong/atc-router@1.6.0-alpha.2: + resolution: {integrity: sha512-ecKFdQ4sow7CRkTg9AR1tIJny/9zmQqzrGhN84GvQ9m0vn5lDWCjOuzRZqRQpRpMFTrJwDkX8u7t8hoF4B6EeA==} + dev: true + /@kong/design-tokens@1.12.7: resolution: {integrity: sha512-gyUX+1hDUtgvMZgNvPxTrIF6lD5x2bd+qMx8EATQ9FE+naaMHvP+dFp6jmHAEVwY4yQrCWv6e4Et4UOG2XSuFA==} dev: true @@ -2359,6 +2402,15 @@ packages: dependencies: vue: 3.4.15(typescript@5.3.3) + /@kong/icons@1.8.14(vue@3.4.19): + resolution: {integrity: sha512-nJUTtLpqelKCTY8lS8VByWaHYUq1CuB5cBUX/q2FEDu5o6IKH/B7fEDQpb/pB1lLRYTqZXneHR/lGYjxy4u8eQ==} + engines: {node: '>=18.17.0'} + peerDependencies: + vue: '>= 3.3.4 < 4' + dependencies: + vue: 3.4.19(typescript@5.3.3) + dev: true + /@kong/kongponents@8.127.0(vue-router@4.2.5)(vue@3.4.15): resolution: {integrity: sha512-C/MFT+OZtyul62ElgHEggqMYPbLjXiRJg5GE3il8MZpaep2D5QV+F5UQ7frbA98TkZCCVBD4LpR0OmiwXKs+tg==} engines: {node: '>=v16.20.2'} @@ -2431,6 +2483,30 @@ packages: vue-router: 4.2.5(vue@3.4.15) dev: true + /@kong/kongponents@9.0.0-alpha.105(vue-router@4.2.5)(vue@3.4.19): + resolution: {integrity: sha512-ZCoA3RxtzHUAvBVcxmMvG7gF0nnlmj/pM+/ZvnVgOydfOIhgMPZ6Ou19XQa10gcGD+h90BhBJR4+TXAamkb/OQ==} + engines: {node: '>=v16.20.2'} + peerDependencies: + axios: ^1.6.7 + vue: '>= 3.3.4 < 4' + vue-router: ^4.2.5 + dependencies: + '@kong/icons': 1.8.14(vue@3.4.19) + '@popperjs/core': 2.11.8 + date-fns: 2.30.0 + date-fns-tz: 2.0.0(date-fns@2.30.0) + focus-trap: 7.5.4 + focus-trap-vue: 4.0.3(focus-trap@7.5.4)(vue@3.4.19) + popper.js: 1.16.1 + sortablejs: 1.15.2 + swrv: 1.0.4(vue@3.4.19) + uuid: 9.0.1 + v-calendar: 3.1.2(@popperjs/core@2.11.8)(vue@3.4.19) + vue: 3.4.19(typescript@5.3.3) + vue-draggable-next: 2.2.1(sortablejs@1.15.2)(vue@3.4.19) + vue-router: 4.2.5(vue@3.4.15) + dev: true + /@kong/swagger-ui-kong-theme-universal@4.3.3(react-dom@17.0.2)(react@17.0.2)(vue-router@4.2.5)(vue@3.4.15): resolution: {integrity: sha512-g89NLf7Vu19BJ157fVUkLIrjzTmNE74zGfzktK2rxdZgIUegt4VBDsG8K0MAxDwQELQqSK3kPkamgdD9j1eV3Q==} peerDependencies: @@ -3059,6 +3135,16 @@ packages: resolution: {integrity: sha512-NMrDy6EWh9TPdSRiHmHH2ye1v5U0gBD7pRYwSwJvomx7Bm4GG04vu63dYiVzebLOx2obPpJugew06xVP0Nk7hA==} dev: false + /@rollup/plugin-virtual@3.0.2: + resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dev: true + /@rollup/pluginutils@5.1.0: resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -3641,6 +3727,129 @@ packages: - debug dev: false + /@swc/core-darwin-arm64@1.4.2: + resolution: {integrity: sha512-1uSdAn1MRK5C1m/TvLZ2RDvr0zLvochgrZ2xL+lRzugLlCTlSA+Q4TWtrZaOz+vnnFVliCpw7c7qu0JouhgQIw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-darwin-x64@1.4.2: + resolution: {integrity: sha512-TYD28+dCQKeuxxcy7gLJUCFLqrwDZnHtC2z7cdeGfZpbI2mbfppfTf2wUPzqZk3gEC96zHd4Yr37V3Tvzar+lQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm-gnueabihf@1.4.2: + resolution: {integrity: sha512-Eyqipf7ZPGj0vplKHo8JUOoU1un2sg5PjJMpEesX0k+6HKE2T8pdyeyXODN0YTFqzndSa/J43EEPXm+rHAsLFQ==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-gnu@1.4.2: + resolution: {integrity: sha512-wZn02DH8VYPv3FC0ub4my52Rttsus/rFw+UUfzdb3tHMHXB66LqN+rR0ssIOZrH6K+VLN6qpTw9VizjyoH0BxA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-musl@1.4.2: + resolution: {integrity: sha512-3G0D5z9hUj9bXNcwmA1eGiFTwe5rWkuL3DsoviTj73TKLpk7u64ND0XjEfO0huVv4vVu9H1jodrKb7nvln/dlw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-x64-gnu@1.4.2: + resolution: {integrity: sha512-LFxn9U8cjmYHw3jrdPNqPAkBGglKE3tCZ8rA7hYyp0BFxuo7L2ZcEnPm4RFpmSCCsExFH+LEJWuMGgWERoktvg==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-x64-musl@1.4.2: + resolution: {integrity: sha512-dp0fAmreeVVYTUcb4u9njTPrYzKnbIH0EhH2qvC9GOYNNREUu2GezSIDgonjOXkHiTCvopG4xU7y56XtXj4VrQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-arm64-msvc@1.4.2: + resolution: {integrity: sha512-HlVIiLMQkzthAdqMslQhDkoXJ5+AOLUSTV6fm6shFKZKqc/9cJvr4S8UveNERL9zUficA36yM3bbfo36McwnvQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-ia32-msvc@1.4.2: + resolution: {integrity: sha512-WCF8faPGjCl4oIgugkp+kL9nl3nUATlzKXCEGFowMEmVVCFM0GsqlmGdPp1pjZoWc9tpYanoXQDnp5IvlDSLhA==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-x64-msvc@1.4.2: + resolution: {integrity: sha512-oV71rwiSpA5xre2C5570BhCsg1HF97SNLsZ/12xv7zayGzqr3yvFALFJN8tHKpqUdCB4FGPjoP3JFdV3i+1wUw==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core@1.4.2: + resolution: {integrity: sha512-vWgY07R/eqj1/a0vsRKLI9o9klGZfpLNOVEnrv4nrccxBgYPjcf22IWwAoaBJ+wpA7Q4fVjCUM8lP0m01dpxcg==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.5 + optionalDependencies: + '@swc/core-darwin-arm64': 1.4.2 + '@swc/core-darwin-x64': 1.4.2 + '@swc/core-linux-arm-gnueabihf': 1.4.2 + '@swc/core-linux-arm64-gnu': 1.4.2 + '@swc/core-linux-arm64-musl': 1.4.2 + '@swc/core-linux-x64-gnu': 1.4.2 + '@swc/core-linux-x64-musl': 1.4.2 + '@swc/core-win32-arm64-msvc': 1.4.2 + '@swc/core-win32-ia32-msvc': 1.4.2 + '@swc/core-win32-x64-msvc': 1.4.2 + dev: true + + /@swc/counter@0.1.3: + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + dev: true + + /@swc/types@0.1.5: + resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + dev: true + /@tootallnate/once@2.0.0: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -4265,6 +4474,16 @@ packages: estree-walker: 2.0.2 source-map-js: 1.0.2 + /@vue/compiler-core@3.4.19: + resolution: {integrity: sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==} + dependencies: + '@babel/parser': 7.23.9 + '@vue/shared': 3.4.19 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-dom@3.3.13: resolution: {integrity: sha512-EYRDpbLadGtNL0Gph+HoKiYqXLqZ0xSSpR5Dvnu/Ep7ggaCbjRDIus1MMxTS2Qm0koXED4xSlvTZaTnI8cYAsw==} dependencies: @@ -4277,6 +4496,13 @@ packages: '@vue/compiler-core': 3.4.15 '@vue/shared': 3.4.15 + /@vue/compiler-dom@3.4.19: + resolution: {integrity: sha512-vm6+cogWrshjqEHTzIDCp72DKtea8Ry/QVpQRYoyTIg9k7QZDX6D8+HGURjtmatfgM8xgCFtJJaOlCaRYRK3QA==} + dependencies: + '@vue/compiler-core': 3.4.19 + '@vue/shared': 3.4.19 + dev: true + /@vue/compiler-sfc@3.3.13: resolution: {integrity: sha512-DQVmHEy/EKIgggvnGRLx21hSqnr1smUS9Aq8tfxiiot8UR0/pXKHN9k78/qQ7etyQTFj5em5nruODON7dBeumw==} dependencies: @@ -4304,6 +4530,20 @@ packages: postcss: 8.4.33 source-map-js: 1.0.2 + /@vue/compiler-sfc@3.4.19: + resolution: {integrity: sha512-LQ3U4SN0DlvV0xhr1lUsgLCYlwQfUfetyPxkKYu7dkfvx7g3ojrGAkw0AERLOKYXuAGnqFsEuytkdcComei3Yg==} + dependencies: + '@babel/parser': 7.23.9 + '@vue/compiler-core': 3.4.19 + '@vue/compiler-dom': 3.4.19 + '@vue/compiler-ssr': 3.4.19 + '@vue/shared': 3.4.19 + estree-walker: 2.0.2 + magic-string: 0.30.7 + postcss: 8.4.35 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-ssr@3.3.13: resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==} dependencies: @@ -4316,6 +4556,13 @@ packages: '@vue/compiler-dom': 3.4.15 '@vue/shared': 3.4.15 + /@vue/compiler-ssr@3.4.19: + resolution: {integrity: sha512-P0PLKC4+u4OMJ8sinba/5Z/iDT84uMRRlrWzadgLA69opCpI1gG4N55qDSC+dedwq2fJtzmGald05LWR5TFfLw==} + dependencies: + '@vue/compiler-dom': 3.4.19 + '@vue/shared': 3.4.19 + dev: true + /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} @@ -4443,6 +4690,12 @@ packages: dependencies: '@vue/shared': 3.4.15 + /@vue/reactivity@3.4.19: + resolution: {integrity: sha512-+VcwrQvLZgEclGZRHx4O2XhyEEcKaBi50WbxdVItEezUf4fqRh838Ix6amWTdX0CNb/b6t3Gkz3eOebfcSt+UA==} + dependencies: + '@vue/shared': 3.4.19 + dev: true + /@vue/runtime-core@3.3.13: resolution: {integrity: sha512-1TzA5TvGuh2zUwMJgdfvrBABWZ7y8kBwBhm7BXk8rvdx2SsgcGfz2ruv2GzuGZNvL1aKnK8CQMV/jFOrxNQUMA==} dependencies: @@ -4455,6 +4708,13 @@ packages: '@vue/reactivity': 3.4.15 '@vue/shared': 3.4.15 + /@vue/runtime-core@3.4.19: + resolution: {integrity: sha512-/Z3tFwOrerJB/oyutmJGoYbuoadphDcJAd5jOuJE86THNZji9pYjZroQ2NFsZkTxOq0GJbb+s2kxTYToDiyZzw==} + dependencies: + '@vue/reactivity': 3.4.19 + '@vue/shared': 3.4.19 + dev: true + /@vue/runtime-dom@3.3.13: resolution: {integrity: sha512-JJkpE8R/hJKXqVTgUoODwS5wqKtOsmJPEqmp90PDVGygtJ4C0PtOkcEYXwhiVEmef6xeXcIlrT3Yo5aQ4qkHhQ==} dependencies: @@ -4469,6 +4729,14 @@ packages: '@vue/shared': 3.4.15 csstype: 3.1.3 + /@vue/runtime-dom@3.4.19: + resolution: {integrity: sha512-IyZzIDqfNCF0OyZOauL+F4yzjMPN2rPd8nhqPP2N1lBn3kYqJpPHHru+83Rkvo2lHz5mW+rEeIMEF9qY3PB94g==} + dependencies: + '@vue/runtime-core': 3.4.19 + '@vue/shared': 3.4.19 + csstype: 3.1.3 + dev: true + /@vue/server-renderer@3.3.13(vue@3.3.13): resolution: {integrity: sha512-vSnN+nuf6iSqTL3Qgx/9A+BT+0Zf/VJOgF5uMZrKjYPs38GMYyAU1coDyBNHauehXDaP+zl73VhwWv0vBRBHcg==} peerDependencies: @@ -4487,12 +4755,26 @@ packages: '@vue/shared': 3.4.15 vue: 3.4.15(typescript@5.3.3) + /@vue/server-renderer@3.4.19(vue@3.4.19): + resolution: {integrity: sha512-eAj2p0c429RZyyhtMRnttjcSToch+kTWxFPHlzGMkR28ZbF1PDlTcmGmlDxccBuqNd9iOQ7xPRPAGgPVj+YpQw==} + peerDependencies: + vue: 3.4.19 + dependencies: + '@vue/compiler-ssr': 3.4.19 + '@vue/shared': 3.4.19 + vue: 3.4.19(typescript@5.3.3) + dev: true + /@vue/shared@3.3.13: resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==} /@vue/shared@3.4.15: resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==} + /@vue/shared@3.4.19: + resolution: {integrity: sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==} + dev: true + /@vue/test-utils@2.4.3(vue@3.4.15): resolution: {integrity: sha512-F4K7mF+ad++VlTrxMJVRnenKSJmO6fkQt2wpRDiKDesQMkfpniGWsqEi/JevxGBo2qEkwwjvTUAoiGJLNx++CA==} peerDependencies: @@ -7800,6 +8082,16 @@ packages: focus-trap: 7.5.4 vue: 3.4.15(typescript@5.3.3) + /focus-trap-vue@4.0.3(focus-trap@7.5.4)(vue@3.4.19): + resolution: {integrity: sha512-cIX5rybkCAlNZ4IHYJ3nCFIsipDDljJHHjtTO2IgYWkVYg7X9ipUVdab3HzYp88kmHgMwjcB71LYnXRRsF6ZqQ==} + peerDependencies: + focus-trap: ^7.0.0 + vue: ^3.0.0 + dependencies: + focus-trap: 7.5.4 + vue: 3.4.19(typescript@5.3.3) + dev: true + /focus-trap@7.5.4: resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} dependencies: @@ -9922,6 +10214,13 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + /magic-string@0.30.7: + resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /make-dir@2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -10340,6 +10639,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /monaco-editor@0.21.3: + resolution: {integrity: sha512-9N7wATLpi+googstvtm6IKg97vPQ77FDYEpkow5tLriM/VJ0DaTRyUP4UVzcoH7KlPDX+e/rE7/imcOUeGkT6g==} + dev: true + /mrmime@1.0.1: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} @@ -11913,6 +12216,7 @@ packages: react: 16.14.0 scheduler: 0.19.1 dev: false + bundledDependencies: false /react-dom@17.0.2(react@17.0.2): resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} @@ -12017,6 +12321,7 @@ packages: object-assign: 4.1.1 prop-types: 15.8.1 dev: false + bundledDependencies: false /react@17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} @@ -13473,6 +13778,14 @@ packages: dependencies: vue: 3.4.15(typescript@5.3.3) + /swrv@1.0.4(vue@3.4.19): + resolution: {integrity: sha512-zjEkcP8Ywmj+xOJW3lIT65ciY/4AL4e/Or7Gj0MzU3zBJNMdJiT8geVZhINavnlHRMMCcJLHhraLTAiDOTmQ9g==} + peerDependencies: + vue: '>=3.2.26 < 4' + dependencies: + vue: 3.4.19(typescript@5.3.3) + dev: true + /symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: true @@ -14209,6 +14522,22 @@ packages: vue-screen-utils: 1.0.0-beta.13(vue@3.4.15) dev: true + /v-calendar@3.1.2(@popperjs/core@2.11.8)(vue@3.4.19): + resolution: {integrity: sha512-QDWrnp4PWCpzUblctgo4T558PrHgHzDtQnTeUNzKxfNf29FkCeFpwGd9bKjAqktaa2aJLcyRl45T5ln1ku34kg==} + peerDependencies: + '@popperjs/core': ^2.0.0 + vue: ^3.2.0 + dependencies: + '@popperjs/core': 2.11.8 + '@types/lodash': 4.14.202 + '@types/resize-observer-browser': 0.1.11 + date-fns: 2.30.0 + date-fns-tz: 2.0.0(date-fns@2.30.0) + lodash: 4.17.21 + vue: 3.4.19(typescript@5.3.3) + vue-screen-utils: 1.0.0-beta.13(vue@3.4.19) + dev: true + /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true @@ -14333,6 +14662,28 @@ packages: - supports-color dev: true + /vite-plugin-monaco-editor@1.1.0(monaco-editor@0.21.3): + resolution: {integrity: sha512-IvtUqZotrRoVqwT0PBBDIZPNraya3BxN/bfcNfnxZ5rkJiGcNtO5eAOWWSgT7zullIAEqQwxMU83yL9J5k7gww==} + peerDependencies: + monaco-editor: '>=0.33.0' + dependencies: + monaco-editor: 0.21.3 + dev: true + + /vite-plugin-top-level-await@1.4.1(vite@5.1.0): + resolution: {integrity: sha512-hogbZ6yT7+AqBaV6lK9JRNvJDn4/IJvHLu6ET06arNfo0t2IsyCaon7el9Xa8OumH+ESuq//SDf8xscZFE0rWw==} + peerDependencies: + vite: '>=2.8' + dependencies: + '@rollup/plugin-virtual': 3.0.2 + '@swc/core': 1.4.2 + uuid: 9.0.1 + vite: 5.1.0(@types/node@18.19.14)(sass@1.70.0) + transitivePeerDependencies: + - '@swc/helpers' + - rollup + dev: true + /vite-plugin-vue-devtools@7.0.14(vite@5.1.0): resolution: {integrity: sha512-6dr2qlLXgD5Kc4/ct4W/9IK2DYs/448j6Uird90LUACC5P8FULZmw9QbISYUtJusMhXgksqtirWesCImDS2aqQ==} engines: {node: '>=v14.21.3'} @@ -14373,6 +14724,14 @@ packages: - supports-color dev: true + /vite-plugin-wasm@3.3.0(vite@5.1.0): + resolution: {integrity: sha512-tVhz6w+W9MVsOCHzxo6SSMSswCeIw4HTrXEi6qL3IRzATl83jl09JVO1djBqPSwfjgnpVHNLYcaMbaDX5WB/pg==} + peerDependencies: + vite: ^2 || ^3 || ^4 || ^5 + dependencies: + vite: 5.1.0(@types/node@18.19.14)(sass@1.70.0) + dev: true + /vite@5.1.0(@types/node@18.19.14)(sass@1.70.0): resolution: {integrity: sha512-STmSFzhY4ljuhz14bg9LkMTk3d98IO6DIArnTY6MeBwiD1Za2StcQtz7fzOUnRCqrHSD5+OS2reg4HOz1eoLnw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -14515,6 +14874,16 @@ packages: sortablejs: 1.15.2 vue: 3.4.15(typescript@5.3.3) + /vue-draggable-next@2.2.1(sortablejs@1.15.2)(vue@3.4.19): + resolution: {integrity: sha512-EAMS1IRHF0kZO0o5PMOinsQsXIqsrKT1hKmbICxG3UEtn7zLFkLxlAtajcCcUTisNvQ6TtCB5COjD9a1raNADw==} + peerDependencies: + sortablejs: ^1.14.0 + vue: ^3.2.2 + dependencies: + sortablejs: 1.15.2 + vue: 3.4.19(typescript@5.3.3) + dev: true + /vue-eslint-parser@9.3.1(eslint@8.56.0): resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==} engines: {node: ^14.17.0 || >=16.0.0} @@ -14575,6 +14944,14 @@ packages: vue: 3.4.15(typescript@5.3.3) dev: true + /vue-screen-utils@1.0.0-beta.13(vue@3.4.19): + resolution: {integrity: sha512-EJ/8TANKhFj+LefDuOvZykwMr3rrLFPLNb++lNBqPOpVigT2ActRg6icH9RFQVm4nHwlHIHSGm5OY/Clar9yIg==} + peerDependencies: + vue: ^3.2.0 + dependencies: + vue: 3.4.19(typescript@5.3.3) + dev: true + /vue-template-compiler@2.7.14: resolution: {integrity: sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==} dependencies: @@ -14624,6 +15001,22 @@ packages: '@vue/shared': 3.4.15 typescript: 5.3.3 + /vue@3.4.19(typescript@5.3.3): + resolution: {integrity: sha512-W/7Fc9KUkajFU8dBeDluM4sRGc/aa4YJnOYck8dkjgZoXtVsn3OeTGni66FV1l3+nvPA7VBFYtPioaGKUmEADw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@vue/compiler-dom': 3.4.19 + '@vue/compiler-sfc': 3.4.19 + '@vue/runtime-dom': 3.4.19 + '@vue/server-renderer': 3.4.19(vue@3.4.19) + '@vue/shared': 3.4.19 + typescript: 5.3.3 + dev: true + /w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'}