diff --git a/packages/legacy/.eslintrc.js b/.eslintrc.js similarity index 77% rename from packages/legacy/.eslintrc.js rename to .eslintrc.js index a980c78c..3f074a46 100644 --- a/packages/legacy/.eslintrc.js +++ b/.eslintrc.js @@ -120,7 +120,15 @@ var rules = { 'no-empty-function' : 'off', 'react/prop-types' : 'off', 'react/no-unknown-property' : ['error', { ignore : ['css'] }], + '@typescript-eslint/consistent-type-imports' : [ + 'error', + { + prefer: 'type-imports', + fixStyle: 'separate-type-imports', + } + ], '@typescript-eslint/no-empty-function' : 'off', + '@typescript-eslint/no-import-type-side-effects': 'error', '@typescript-eslint/no-non-null-asserted-nullish-coalescing' : 'warn', 'no-unused-vars' : 'off', '@typescript-eslint/no-unused-vars' : 'warn', @@ -128,6 +136,8 @@ var rules = { '@emotion/no-vanilla' : 'error', '@emotion/import-from-emotion' : 'error', '@emotion/styled-import' : 'error', + 'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks + 'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies }; module.exports = { @@ -153,12 +163,38 @@ module.exports = { typescript : {} } }, - "rules" : rules, overrides : [ { + files : ["*.ts", "*.tsx"], + plugins: [ + "react-hooks", + ], + rules : rules, + }, + { + extends : [], + parser : null, + parserOptions : {}, + settings : {}, files : ["*.js"], rules : rules, }, + { + "files" : ["*.json", "*.json5", "*.jsonc"], + parser: "jsonc-eslint-parser", + parserOptions : {}, + extends: [ + // add more generic rulesets here, such as: + // 'eslint:recommended', + // "plugin:jsonc/recommended-with-jsonc", + ], + "rules" : { + "key-spacing" : "off", + "max-len" : "off", + "quote-props" : ["error", "always"], + "quotes" : ["error", "double"], + }, + }, { "files" : ["spec/**"], "plugins" : ["jest", "@emotion"], diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 31253e48..32374ce4 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -17,13 +17,13 @@ jobs: - uses: actions/setup-node@v3 id: setup-node with: - node-version: ${{ matrix.node }} + node-version: 20 - uses: pnpm/action-setup@v2 name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false # See: https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time diff --git a/.github/workflows/tests.yml b/.github/workflows/build-and-test.yml similarity index 87% rename from .github/workflows/tests.yml rename to .github/workflows/build-and-test.yml index 98ea96c2..7c6f6d85 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/build-and-test.yml @@ -1,4 +1,4 @@ -name: tests +name: build & test on: workflow_call: @@ -15,7 +15,7 @@ on: - '**.nix' - 'flake.lock' - '.github/workflows/*.yml' - - '!.github/workflows/tests.yml' + - '!.github/workflows/build-and-test.yml' - '!.github/workflows/lint.yml' - '!.github/workflows/build.yml' - '!.github/workflows/test.yml' @@ -33,9 +33,6 @@ on: - 'flake.lock' workflow_dispatch: -env: - CACHE_DIR: installs - jobs: lint: uses: ./.github/workflows/lint.yml @@ -44,9 +41,7 @@ jobs: uses: ./.github/workflows/build.yml test: - needs: [build] uses: ./.github/workflows/test.yml test-e2e: - needs: [build] uses: ./.github/workflows/test-e2e.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c912c9e..daa29bbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,19 +5,22 @@ on: workflow_dispatch: env: - CACHE_DIR: installs + CACHE_DIR: dist MAIN_PACKAGE_PATH: packages/legacy jobs: build: name: Build - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + + concurrency: + group: '${{ github.workflow }}-build-${{ matrix.node }}-${{ github.head_ref || github.ref_name }}' + cancel-in-progress: true strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - node: ['14.x', '16.x', '18.x'] + node: [16, 18, 20] steps: - uses: actions/checkout@v3 @@ -29,9 +32,7 @@ jobs: # results down the file id: build-cache-key run: | - if command -v shasum; then sum() { shasum -a 256 "$@"; } ; else sum() { sha256sum "$@"; }; fi - fragment=$(< package.json command grep 'version"\|"name"\|"files"\|"main"\|"build' | sum | command head -c8) - echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}-${fragment}" | tee -a $GITHUB_OUTPUT + echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json', '**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}" | tee -a $GITHUB_OUTPUT shell: bash - name: Restore build cache @@ -52,7 +53,7 @@ jobs: name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false # See: https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time @@ -76,28 +77,14 @@ jobs: if: steps.build_cache.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile --strict-peer-dependencies - # For rsync support in Windows - - uses: GuillaumeFalourd/setup-rsync@v1.1 - if: ${{ startsWith(runner.os, 'windows') && steps.build_cache.outputs.cache-hit != 'true' }} - - name: Build cache on ${{ runner.os }} if: steps.build_cache.outputs.cache-hit != 'true' shell: bash run: | - pnpm run -r build-dist + pnpm run dist - - name: Save built artefacts to cache + - name: Test build artifacts sanity if: steps.build_cache.outputs.cache-hit != 'true' shell: bash run: | - # Due to GitHub's stupid cp, need to use rsync instead. - for i in dist; do \ - mkdir -p ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}" ; \ - ls -la "${MAIN_PACKAGE_PATH}/$i"; \ - echo rsync -a "${MAIN_PACKAGE_PATH}/$i" ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/"; \ - rsync -a "${MAIN_PACKAGE_PATH}/$i" ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/"; \ - done - echo ls -la ${{ env.CACHE_DIR }} - ls -la ${{ env.CACHE_DIR }} - echo ls -la ${{ env.CACHE_DIR }}/** - ls -la ${{ env.CACHE_DIR }}/** + pnpm run test:dist diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f05ac033..ea39c157 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,38 +9,36 @@ env: jobs: lint: - name: Lint on NodeJS ${{ matrix.node }} + name: Lint runs-on: ubuntu-latest + concurrency: + group: '${{ github.workflow }}-lint-${{ matrix.node }}-${{ github.head_ref || github.ref_name }}' + cancel-in-progress: true + strategy: fail-fast: false matrix: - node: ['18.x'] + node: [20] steps: - uses: actions/checkout@v3 with: fetch-depth: 1 - - name: Calculate a fragment of cache key - id: cache-key - run: | - echo "fragment=$(< package.json command grep '"lint"' | command sha256sum | command head -c8)" >> $GITHUB_OUTPUT - shell: bash - - name: Restore test cache id: test_cache uses: actions/cache@v3 with: path: ${{ env.CACHE_TEST_DIR }} - key: lint-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/*eslintrc*', '**/.*eslintrc*', '**/src/**', '**/pnpm-lock.yaml') }}-${{ steps.cache-key.outputs.fragment }} + key: lint-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json', '**/*eslintrc*', '**/.*eslintrc*', '**/src/**', '**/pnpm-lock.yaml') }} - uses: pnpm/action-setup@v2 if: steps.test_cache.outputs.cache-hit != 'true' name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false # See: https: @@ -67,6 +65,5 @@ jobs: - if: steps.test_cache.outputs.cache-hit != 'true' run: | - pnpm run -r lint-typecheck + pnpm run lint-typecheck mkdir -p ${{ env.CACHE_TEST_DIR }} - touch ${{ env.CACHE_TEST_DIR }}/pass diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60b3b237..feb32b1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,21 +20,20 @@ on: # default: 'false' env: - CACHE_DIR: installs - MAIN_PACKAGE_PATH: packages/legacy + CACHE_DIR: dist jobs: tests: # XXX: does not skip for some reason # if: github.events.inputs.skip_tests != 'true' - uses: ./.github/workflows/tests.yml + uses: ./.github/workflows/build-and-test.yml publish: needs: [tests] runs-on: ubuntu-latest strategy: matrix: - node: ['16.x'] + node: [18] fail-fast: false steps: @@ -47,9 +46,7 @@ jobs: # results down the file id: build-cache-key run: | - if command -v shasum; then sum() { shasum -a 256 "$@"; } ; else sum() { sha256sum "$@"; }; fi - fragment=$(< package.json command grep 'version"\|"name"\|"files"\|"main"\|"build' | sum | command head -c8) - echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}-${fragment}" | tee -a $GITHUB_OUTPUT + echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json', '**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}" | tee -a $GITHUB_OUTPUT shell: bash - uses: actions/setup-node@v3 @@ -62,7 +59,7 @@ jobs: name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false # See: https: @@ -84,10 +81,6 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile --strict-peer-dependencies - # For rsync support in Windows - - uses: GuillaumeFalourd/setup-rsync@v1.1 - if: startsWith(runner.os, 'windows') - - name: Restore cache id: build_cache uses: actions/cache@v3 @@ -95,45 +88,25 @@ jobs: path: ${{ env.CACHE_DIR }} key: ${{ steps.build-cache-key.outputs.key }} - - name: Restore cache to working directory - shell: bash - run: | - echo ls -la ${{ env.CACHE_DIR }}/ - ls -la ${{ env.CACHE_DIR }}/ - echo ls -la ${{ env.CACHE_DIR }}/* - ls -la ${{ env.CACHE_DIR }}/* - echo ls -la . - ls -la . - for i in dist; do \ - echo rsync -a ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/$i" "${MAIN_PACKAGE_PATH}/"; \ - rsync -a ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/$i" "${MAIN_PACKAGE_PATH}/"; \ - done - echo ls -la . - ls -la . - echo ls -la "${MAIN_PACKAGE_PATH}"/dist - ls -la "${MAIN_PACKAGE_PATH}"/dist - echo ls -la "${MAIN_PACKAGE_PATH}"/dist/* - ls -la "${MAIN_PACKAGE_PATH}"/dist/* - - name: Create a new version - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.next_version != 'skip' }} + if: ${{ github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' && github.event.inputs.next_version != 'skip' }} shell: bash run: | git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - cd "${MAIN_PACKAGE_PATH}" - pnpm version --new-version ${{ github.event.inputs.next_version }} - git add -u - git commit -m "chore: Release ${{ github.event.inputs.next_version }}" - git tag -a "${{ github.event.inputs.next_version }}" -mBump + # cd to where project package.json is + # pnpm version \ + # --new-version ${{ github.event.inputs.next_version }} \ + # --message "chore: Release ${{ github.event.inputs.next_version }}" + pnpm bump-version ${{ github.event.inputs.next_version }} + # Push commit along with tag git push origin --tags : - name: Publish to npm run: | - cd "${MAIN_PACKAGE_PATH}" - diff -u {,dist/}package.json | \ + diff -u {,dist/}package.json || \ cp {,dist/}package.json pnpm publish dist --access public --no-git-checks env: diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index f6d00c0d..767dd160 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -5,9 +5,8 @@ on: workflow_dispatch: env: - CACHE_DIR: installs + CACHE_DIR: dist CACHE_TEST_DIR: cache-test-e2e - MAIN_PACKAGE_PATH: packages/legacy PANERON_TEST_DIR_NAME: paneron-for-tests jobs: @@ -15,13 +14,19 @@ jobs: name: E2E Test runs-on: ${{ matrix.os }} + concurrency: + group: '${{ github.workflow }}-e2e-${{ matrix.os }}-${{ matrix.node }}-${{ matrix.paneron_ref }}-${{ github.head_ref || github.ref_name }}' + cancel-in-progress: true + strategy: fail-fast: false matrix: # os: [ubuntu-latest, macos-latest, windows-latest] os: [macos-latest, windows-latest] # XXX: Skipping Linux since e2e tests show tooling problems (#96) - node: ['14.x', '16.x', '18.x'] - paneron_ref: ['1ab232b008ba9709c9a80512c0eceaeb525515bf'] + node: [16, 18, 20] + paneron_ref: + # - '1ab232b008ba9709c9a80512c0eceaeb525515bf' + - 'v2.1.4' steps: - name: Check out repo @@ -34,16 +39,7 @@ jobs: # results down the file id: build-cache-key run: | - if command -v shasum; then sum() { shasum -a 256 "$@"; } ; else sum() { sha256sum "$@"; }; fi - fragment=$(< package.json command grep 'version"\|"name"\|"files"\|"main"\|"build' | sum | command head -c8) - echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}-${fragment}" | tee -a $GITHUB_OUTPUT - shell: bash - - - name: Calculate a fragment of cache key - id: cache-key - run: | - if command -v shasum; then sum() { shasum -a 256 "$@"; } ; else sum() { sha256sum "$@"; }; fi - echo "fragment=$(< package.json command grep '"test:e2e"' | sum | command head -c8)" >> $GITHUB_OUTPUT + echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json', '**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}" | tee -a $GITHUB_OUTPUT shell: bash - name: Restore test cache @@ -51,7 +47,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.CACHE_TEST_DIR }} - key: tests-e2e-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('e2e_tests/**', '**/src/**', '**/.swcrc', '**/.npmrc', 'tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml', '.github/workflows/test-e2e.yml') }}-${{ steps.cache-key.outputs.fragment }} + key: tests-e2e-${{ matrix.os }}-${{ matrix.node }}-${{ matrix.paneron_ref }}-${{ hashFiles('package.json', 'e2e_tests/**', '**/src/**', '**/.swcrc', '**/.npmrc', 'tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml', '.github/workflows/test-e2e.yml') }} - name: Set up Node JS if: steps.test_cache.outputs.cache-hit != 'true' @@ -65,7 +61,7 @@ jobs: name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false # See: https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time @@ -91,7 +87,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.CACHE_DIR }} - key: build-${{ runner.os }}-${{ matrix.node }}-${{ matrix.paneron_ref }}-${{ hashFiles('.github/workflows/test-e2e.yml') }} + key: build-Ubuntu-${{ matrix.node }}-${{ matrix.paneron_ref }}-${{ hashFiles('.github/workflows/test-e2e.yml') }} - name: Check out Paneron repo uses: actions/checkout@v3 @@ -99,16 +95,16 @@ jobs: with: repository: 'paneron/paneron' fetch-depth: 1 - path: ${{ env.CACHE_DIR }}/${{ env.PANERON_TEST_DIR_NAME }} + path: ${{ env.PANERON_TEST_DIR_NAME }} ref: ${{ matrix.paneron_ref }} - name: Build Paneron cache if: ${{ steps.paneron_build_cache.outputs.cache-hit != 'true' && steps.test_cache.outputs.cache-hit != 'true' }} shell: bash run: | - pushd ${{ env.CACHE_DIR }}/${{ env.PANERON_TEST_DIR_NAME }} + pushd ${{ env.PANERON_TEST_DIR_NAME }} # Work around node js 17+ OpenSSL - if [[ ${{ matrix.node }} = 18* ]]; then \ + if [[ ${{ matrix.node }} =~ ^1[89]|^[2-9]. ]]; then \ export NODE_OPTIONS=--openssl-legacy-provider; \ fi # NOTE: Switch to pnpm when Paneron switches to pnpm. @@ -129,10 +125,6 @@ jobs: run: | sudo apt-get install -y xvfb - # For rsync support in Windows - - uses: GuillaumeFalourd/setup-rsync@v1.1 - if: ${{ startsWith(runner.os, 'windows') && steps.test_cache.outputs.cache-hit != 'true' }} - - name: Restore build cache if: steps.test_cache.outputs.cache-hit != 'true' uses: actions/cache@v3 @@ -140,31 +132,9 @@ jobs: path: ${{ env.CACHE_DIR }} key: ${{ steps.build-cache-key.outputs.key }} - - name: Restore build cache to working directory - if: steps.test_cache.outputs.cache-hit != 'true' - shell: bash - run: | - echo ls -la ${{ env.CACHE_DIR }}/ - ls -la ${{ env.CACHE_DIR }}/ - echo ls -la ${{ env.CACHE_DIR }}/* - ls -la ${{ env.CACHE_DIR }}/* - for i in dist; do \ - echo rsync -a ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/$i" "${MAIN_PACKAGE_PATH}/"; \ - rsync -a ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/$i" "${MAIN_PACKAGE_PATH}/"; \ - done - echo ls -la . - ls -la . - echo ls -la "${MAIN_PACKAGE_PATH}"/dist - ls -la "${MAIN_PACKAGE_PATH}"/dist - - if: ${{ steps.test_cache.outputs.cache-hit != 'true' }} uses: GabrielBB/xvfb-action@v1.6 with: - run: pnpm run -r test:e2e + run: pnpm run test:e2e # working-directory: ./ #optional options: "-screen 0 1280x960x24" - - - if: ${{ steps.test_cache.outputs.cache-hit != 'true' }} - run: | - mkdir -p ${{ env.CACHE_TEST_DIR }} - touch ${{ env.CACHE_TEST_DIR }}/pass diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d7cd6aa..f032bde1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,20 +5,22 @@ on: workflow_dispatch: env: - CACHE_DIR: installs + CACHE_DIR: dist CACHE_TEST_DIR: cache-test - MAIN_PACKAGE_PATH: packages/legacy jobs: test: name: Test - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + + concurrency: + group: '${{ github.workflow }}-test-${{ matrix.node }}-${{ github.head_ref || github.ref_name }}' + cancel-in-progress: true strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - node: ['14.x', '16.x', '18.x'] + node: [16, 18, 20] steps: - uses: actions/checkout@v3 @@ -30,16 +32,7 @@ jobs: # results down the file id: build-cache-key run: | - if command -v shasum; then sum() { shasum -a 256 "$@"; } ; else sum() { sha256sum "$@"; }; fi - fragment=$(< package.json command grep 'version"\|"name"\|"files"\|"main"\|"build' | sum | command head -c8) - echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}-${fragment}" | tee -a $GITHUB_OUTPUT - shell: bash - - - name: Calculate a fragment of cache key - id: cache-key - run: | - if command -v shasum; then sum() { shasum -a 256 "$@"; } ; else sum() { sha256sum "$@"; }; fi - echo "fragment=$(< package.json command grep '"test"' | sum | command head -c8)" >> $GITHUB_OUTPUT + echo "key=build-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json', '**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml') }}" | tee -a $GITHUB_OUTPUT shell: bash - name: Restore test cache @@ -47,7 +40,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.CACHE_TEST_DIR }} - key: tests-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml', '.github/workflows/test.yml') }}-${{ steps.cache-key.outputs.fragment }} + key: tests-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json', '**/src/**', '**/.swcrc', '**/.npmrc', '**/tsconfig*.json', '**/pnpm-lock.yaml', '.github/workflows/build.yml', '.github/workflows/test.yml') }} - uses: actions/setup-node@v3 if: steps.test_cache.outputs.cache-hit != 'true' @@ -60,7 +53,7 @@ jobs: name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false # See: https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time @@ -84,10 +77,6 @@ jobs: if: steps.test_cache.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile --strict-peer-dependencies - # For rsync support in Windows - - uses: GuillaumeFalourd/setup-rsync@v1.1 - if: ${{ startsWith(runner.os, 'windows') && steps.test_cache.outputs.cache-hit != 'true' }} - - name: Restore build cache if: steps.test_cache.outputs.cache-hit != 'true' uses: actions/cache@v3 @@ -95,25 +84,6 @@ jobs: path: ${{ env.CACHE_DIR }} key: ${{ steps.build-cache-key.outputs.key }} - - name: Restore build cache to working directory - if: steps.test_cache.outputs.cache-hit != 'true' - shell: bash - run: | - echo ls -la ${{ env.CACHE_DIR }}/ - ls -la ${{ env.CACHE_DIR }}/ - echo ls -la ${{ env.CACHE_DIR }}/* - ls -la ${{ env.CACHE_DIR }}/* - for i in dist; do \ - echo rsync -a ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/$i" "${MAIN_PACKAGE_PATH}/"; \ - rsync -a ${{ env.CACHE_DIR }}/"${MAIN_PACKAGE_PATH}/$i" "${MAIN_PACKAGE_PATH}/"; \ - done - echo ls -la . - ls -la . - echo ls -la "${MAIN_PACKAGE_PATH}"/dist - ls -la "${MAIN_PACKAGE_PATH}"/dist - - if: steps.test_cache.outputs.cache-hit != 'true' run: | - pnpm run -r test:unit - mkdir -p ${{ env.CACHE_TEST_DIR }} - touch ${{ env.CACHE_TEST_DIR }}/pass + pnpm run test:unit diff --git a/.gitignore b/.gitignore index a579e6a6..a2f9c92f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,12 @@ +test_outputs/ /paneron /compiled /dist .vs +*.d.ts +*.d.ts.map + .pnpm-store/ # Created by https://www.toptal.com/developers/gitignore/api/osx,vim,linux,emacs,eclipse,windows,textmate,webstorm,sublimetext,intellij+all,visualstudiocode,node,yarn diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000..c160a771 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --no -- commitlint --edit ${1} diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100755 index 00000000..8932b0e3 --- /dev/null +++ b/.husky/prepare-commit-msg @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +# HUSKY_DEBUG_LEVEL +# +# 0 - quiet +# 1 - warnings only +# 2 - logs and warnings only +# 3 - debug logs, normal logs and warnings +DEBUG_LEVEL="${HUSKY_DEBUG_LEVEL:-1}" + +warn() { + ((DEBUG_LEVEL <= 0)) || echo "(warn)[husky/prepare-commit-msg] $*" +} >&2 + +log() { + ((DEBUG_LEVEL <= 1)) || echo "[husky/prepare-commit-msg] $*" +} >&2 + +debug() { + ((DEBUG_LEVEL <= 2)) || echo "(debug)[husky/prepare-commit-msg] $*" +} >&2 + +print_args() { + i=1 + for arg in "$@" + do + debug "arg \$$i: $arg == ${!i}" + ((++i)) + done +} + + +main() { + local husky_hook="$(dirname -- "$0")/_/husky.sh" + if [[ -r "${husky_hook}" ]] + then + . "${husky_hook}" + else + debug "husky hook '${husky_hook}' not found. Skipping prepare-commit-msg." + exit + fi + + print_args "$@" + + if [[ -e .git/rebase-merge ]] || [[ -e .git/rebase-apply ]] + then + debug 'Rebase in progress' + + if [[ -e .git/rebase-merge/interactive ]] + then + log 'Interactive rebase in progress. Skipping prepare-commit-msg.' + exit + fi + fi + + case "$2" in + message) + log "Git message given. Skipping prepare-commit-msg." + exit + ;; + commit) + log "Probably amending commit. Skipping prepare-commit-msg." + exit + ;; + esac + + if exec < /dev/tty + then + npx cz --hook + fi +} + +main "$@" diff --git a/.swcrc b/.swcrc new file mode 100644 index 00000000..b574e5e6 --- /dev/null +++ b/.swcrc @@ -0,0 +1,30 @@ +{ + "$schema": "http://json.schemastore.org/swcrc", + "module": { + "type": "commonjs" + }, + "minify": true, + "jsc": { + "externalHelpers": false, + "minify": { + "compress": false, + "format": { + "comments": "some" + } + }, + "paths": { + "@": [ + "src/plugin" + ], + "@/*": [ + "src/*" + ] + }, + "baseUrl": ".", + "parser": { + "syntax": "typescript", + "tsx": true, + "decorators": true + } + } +} diff --git a/README.adoc b/README.adoc index f58cbe2d..da6aaad1 100644 --- a/README.adoc +++ b/README.adoc @@ -1,24 +1,21 @@ = Paneron extension for MMEL models ifdef::env-github[] -image:https://github.com/paneron/extension-hls/actions/workflows/test.yml/badge.svg[ - "Test Status", - link="https://github.com/paneron/extension-hls/actions/workflows/test.yml"] -image:https://github.com/paneron/extension-hls/actions/workflows/build.yml/badge.svg[ - "Build Status", - link="https://github.com/paneron/extension-hls/actions/workflows/build.yml"] -image:https://github.com/paneron/extension-hls/actions/workflows/audit.yml/badge.svg[ - "Audit Status", - link="https://github.com/paneron/extension-hls/actions/workflows/audit.yml"] -image:https://github.com/paneron/extension-hls/actions/workflows/release.yml/badge.svg[ - "Release Status", - link="https://github.com/paneron/extension-hls/actions/workflows/release.yml"] -image:https://img.shields.io/github/v/release/paneron/extension-hls?display_name=tag&include_prereleases&sort=semver[ +image:https://img.shields.io/github/v/release/paneron/extension-smart?display_name=tag&include_prereleases&sort=semver[ GitHub release (latest SemVer including pre-releases), - link="https://www.npmjs.com/package/@paneron/extension-hls" + link="https://www.npmjs.com/package/@paneron/extension-smart" ] +image:https://github.com/paneron/extension-smart/actions/workflows/build-and-test.yml/badge.svg[ + "Build / Test", + link="https://github.com/paneron/extension-smart/actions/workflows/build-and-test.yml"] +image:https://github.com/paneron/extension-smart/actions/workflows/audit.yml/badge.svg[ + "Audit Status", + link="https://github.com/paneron/extension-smart/actions/workflows/audit.yml"] +image:https://github.com/paneron/extension-smart/actions/workflows/release.yml/badge.svg[ + "Release Status", + link="https://github.com/paneron/extension-smart/actions/workflows/release.yml"] endif::[] == Roadmap -Tracked https://github.com/paneron/extension-hls/issues/29[here in #29] +Tracked https://github.com/paneron/extension-smart/issues/29[here in #29] diff --git a/packages/legacy/codecept.conf.ts b/codecept.conf.ts similarity index 100% rename from packages/legacy/codecept.conf.ts rename to codecept.conf.ts diff --git a/packages/legacy/codeceptjs_presettings.ts b/codeceptjs_presettings.ts similarity index 100% rename from packages/legacy/codeceptjs_presettings.ts rename to codeceptjs_presettings.ts diff --git a/commitlint.config.ts b/commitlint.config.ts new file mode 100644 index 00000000..3c8ac3fa --- /dev/null +++ b/commitlint.config.ts @@ -0,0 +1,54 @@ +import type { UserConfig } from '@commitlint/types'; +import { RuleConfigSeverity } from '@commitlint/types'; + +const Configuration: UserConfig = { + /* + * Resolve and load @commitlint/config-conventional from node_modules. + * Referenced packages must be installed + */ + 'extends' : ['@commitlint/config-conventional'], + /* + * Resolve and load conventional-changelog-atom from node_modules. + * Referenced packages must be installed + */ + // parserPreset: 'conventional-changelog-atom', + /* + * Resolve and load @commitlint/format from node_modules. + * Referenced package must be installed + */ + 'formatter' : '@commitlint/format', + /* + * Any rules defined here will override rules from @commitlint/config-conventional + */ + 'rules' : { + 'subject-case' : [RuleConfigSeverity.Warning, 'always', ['sentence-case']], + 'scope-case' : [RuleConfigSeverity.Disabled], + 'header-max-length' : [RuleConfigSeverity.Error, 'always', 150], + }, + /* + * Functions that return true if commitlint should ignore the given message. + */ + 'ignores' : [(commit) => commit === ''], + /* + * Whether commitlint uses the default ignore rules. + */ + 'defaultIgnores' : true, + /* + * Custom URL to show upon failure + */ + 'helpUrl' : + 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint', + /* + * Custom prompt configs + */ + 'prompt' : { + messages : {}, + questions : { + type : { + description : 'please input type:', + }, + }, + }, +}; + +module.exports = Configuration; diff --git a/packages/legacy/e2e_tests/paneron_initialization_test.ts b/e2e_tests/paneron_initialization_test.ts similarity index 100% rename from packages/legacy/e2e_tests/paneron_initialization_test.ts rename to e2e_tests/paneron_initialization_test.ts diff --git a/packages/legacy/jest.config.ts b/jest.config.ts similarity index 100% rename from packages/legacy/jest.config.ts rename to jest.config.ts diff --git a/package.json b/package.json index bdebe4da..67b1333a 100644 --- a/package.json +++ b/package.json @@ -1,25 +1,139 @@ { - "name": "@paneron/smartytrams", - "version": "0.0.1", - "description": "MMEL, SMART, etc.", - "main": "plugin.js", - "repository": "https://github.com/paneron/extension-hls", + "name": "@paneron/extension-smart", + "version": "1.0.0-dev23", + "description": "Paneron extension for SMART model editing", + "repository": "https://github.com/paneron/extension-smart", "author": { "name": "Ribose Inc.", "email": "open.source@ribose.com" }, + "paneronExtension": { + "title": "SMART", + "iconURL": "https://www.glossarist.org/SymbolLoupe.png", + "featured": true, + "requiredHostAppVersion": "^2.2.0" + }, + "src_dir": "src", + "dist_dir": "dist", "scripts": { + "prepare": "ts-patch install -s; husky install", "preinstall": "npx only-allow pnpm", - "build": "pnpm run -r build", - "clean": "pnpm run -r clean", - "dev": "pnpm run -r dev", - "fix": "pnpm run -r fix", - "lint": "pnpm run -r lint", - "test": "pnpm run -r test" + "diagnose": "tsc --diagnostics", + "typecheck": "tsc -p tsconfig.build.json --noEmit", + "build:decl": "tsc -p tsconfig.build.json --emitDeclarationOnly", + "build:decl:watch": "pnpm run build:decl --watch", + "tsc": "tsc -p tsconfig.build.json", + "posttsc": "pnpm run postbuild", + "build": "swc ${npm_package_src_dir} --sync --ignore '*.test.*' --out-dir ${npm_package_dist_dir} --copy-files --extensions '.ts,.tsx,.js,.jsx,.json'", + "postbuild": "cp package.json ${npm_package_dist_dir}/", + "build:watch": "pnpm run build --watch", + "postbuild:watch": "pnpm run postbuild", + "inject": "mkdirp $HOME/'Library/Application Support'/Paneron/plugins/${npm_package_name}; rsync -a ${npm_package_dist_dir}/ $HOME/'Library/Application Support'/Paneron/plugins/${npm_package_name}/", + "dist": "concurrently npm:build npm:build:decl", + "dist:watch": "concurrently npm:build:watch npm:build:decl:watch", + "build-inject": "pnpm run build && pnpm run inject", + "build-typecheck": "concurrently npm:build npm:typecheck", + "clean-build": "pnpm run clean; pnpm run build", + "clean-build-typecheck": "pnpm run clean; pnpm run build-typecheck", + "clean-build-inject": "pnpm run clean; pnpm run build-inject", + "clean-build-typecheck-inject": "pnpm run clean-build-typecheck && pnpm run inject", + "lint": "eslint ${npm_package_src_dir}/ --ext .ts,.tsx", + "clean": "rimraf ${npm_package_dist_dir}/* *.tsbuildinfo", + "test:e2e": "codeceptjs run", + "test:e2e:def": "codeceptjs def", + "test:unit": "jest", + "test:unit:watch": "jest --watch", + "test": "concurrently npm:test:unit npm:test:e2e", + "test:dist": "./scripts/test-dist", + "test:watch": "concurrently npm:test:unit:watch #npm:test:e2e:watch", + "lint-typecheck": "concurrently npm:lint npm:typecheck", + "bump": "pnpm version --message \"chore: Release v%s\n\nCommand used: pnpm bump %s\" --new-version ", + "bump:dev": "pnpm version --new-version prerelease --preid dev --message \"chore: Release v%s\n\nCommand used: pnpm bump:dev\"", + "fix": "pnpm run lint --fix" + }, + "files": [ + "dist" + ], + "main": "plugin.js", + "types": "plugin.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/*" + ] + } + }, + "resolutions": { + "@types/react": "17.0.53", + "react": "17.0.2" + }, + "devDependencies": { + "@blueprintjs/core": "~4.17.8", + "@blueprintjs/icons": "~4.14.5", + "@blueprintjs/popover2": "~1.13.12", + "@blueprintjs/select": "~4.9.12", + "@codeceptjs/configure": "^0.10.0", + "@commitlint/cli": "^17.7.1", + "@commitlint/config-conventional": "^17.7.0", + "@commitlint/cz-commitlint": "^17.7.1", + "@commitlint/types": "^17.4.4", + "@emotion/eslint-plugin": "^11.11.0", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", + "@paneron/libmmel": "^0.1.3", + "@react-three/drei": "^7.27.5", + "@react-three/fiber": "^7.0.29", + "@riboseinc/paneron-extension-glossarist": "^2.0.11", + "@riboseinc/paneron-extension-kit": "^2.2.0", + "@swc/cli": "^0.1.62", + "@swc/core": "^1.3.68", + "@swc/helpers": "^0.5.1", + "@swc/jest": "^0.2.26", + "@types/jest": "^29.5.1", + "@types/react": "17.0.53", + "@types/three": "^0.152.0", + "@types/webpack-env": "^1.18.0", + "@typescript-eslint/eslint-plugin": "^5.59.6", + "@typescript-eslint/parser": "^5.59.6", + "chokidar": "^3.5.3", + "codeceptjs": "^3.4.1", + "commitizen": "^4.3.0", + "concurrently": "^8.0.1", + "electron": "^24.3.0", + "eslint": "^8.40.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-hooks": "^4.6.0", + "fast-check": "^3.8.2", + "husky": "^8.0.3", + "immer": "^10.0.2", + "jest": "^29.5.0", + "liquidjs": "^9.42.1", + "mkdirp": "^3.0.1", + "playwright": "^1.33.0", + "prop-types": "^15.8.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-flow-renderer": "~9.6.4", + "react-mathjax2": "^0.0.2", + "regenerator-runtime": "^0.13.11", + "rimraf": "^5.0.1", + "run-script-os": "^1.1.6", + "three": "^0.146.0", + "three-stdlib": "^2.17.3", + "ts-jest": "^29.1.0", + "ts-node": "^10.9.1", + "ts-patch": "^3.0.2", + "tsconfig-paths": "^4.2.0", + "tslib": "^2.6.1", + "typescript": "5.1.6", + "typescript-transform-paths": "^3.4.6" }, - "resolutions": {}, - "dependencies": { - "@paneron/extension-hls": "workspace:*" + "config": { + "commitizen": { + "path": "@commitlint/cz-commitlint" + } }, "license": "MIT" } diff --git a/packages/legacy/.gitignore b/packages/legacy/.gitignore deleted file mode 100644 index 69341fd8..00000000 --- a/packages/legacy/.gitignore +++ /dev/null @@ -1 +0,0 @@ -test_outputs/ diff --git a/packages/legacy/.swcrc b/packages/legacy/.swcrc deleted file mode 100644 index 78eddb36..00000000 --- a/packages/legacy/.swcrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/swcrc", - "module": { - "type": "commonjs" - }, - "jsc": { - "externalHelpers": false, - "parser": { - "syntax": "typescript", - "tsx": true, - "decorators": true - } - } -} diff --git a/packages/legacy/package.json b/packages/legacy/package.json deleted file mode 100644 index 3f3fd0be..00000000 --- a/packages/legacy/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "name": "@paneron/extension-hls", - "version": "1.0.0-dev23", - "description": "Paneron extension for SMART model editing", - "main": "plugin.js", - "repository": "https://github.com/paneron/extension-hls", - "author": { - "name": "Ribose Inc.", - "email": "open.source@ribose.com" - }, - "paneronExtension": { - "title": "SMART", - "iconURL": "https://www.glossarist.org/SymbolLoupe.png", - "featured": true, - "requiredHostAppVersion": "^1.0.0-beta18" - }, - "src_dir": "src", - "dist_dir": "dist", - "scripts": { - "preinstall": "npx only-allow pnpm", - "diagnose": "tsc --diagnostics", - "typecheck": "tsc -p tsconfig.build.json --noEmit", - "build:decl": "tsc -p tsconfig.build.json --emitDeclarationOnly", - "build": "run-script-os", - "build:default": "swc ${npm_package_src_dir} --sync --ignore '*.test.*' --out-dir ${npm_package_dist_dir} --copy-files --extensions '.ts,.tsx,.js,.jsx,.json' && cp package.json ${npm_package_dist_dir}/", - "build:win32": "mkdirp %npm_package_dist_dir% && swc %npm_package_src_dir% --sync --out-dir %npm_package_dist_dir% --copy-files --extensions '.ts,.tsx,.js,.jsx,.json' && copy package.json %npm_package_dist_dir%", - "inject": "run-script-os", - "inject:mac": "mkdirp $HOME/'Library/Application Support'/Paneron/plugins/${npm_package_name}; rsync -a ${npm_package_dist_dir}/ $HOME/'Library/Application Support'/Paneron/plugins/${npm_package_name}/", - "inject:win32": "mkdirp \"%appdata%\\Paneron\\plugins\\@paneron\\extension-hls\" && xcopy /e /y %npm_package_dist_dir% \"%appdata%\\Paneron\\plugins\\@paneron\\extension-hls\" > nul", - "build-dist": "concurrently npm:build npm:build:decl", - "build-inject": "pnpm run build && pnpm run inject", - "build-typecheck": "concurrently npm:build npm:typecheck", - "clean-build": "pnpm run clean; pnpm run build", - "clean-build-typecheck": "pnpm run clean; pnpm run build-typecheck", - "clean-build-inject": "pnpm run clean; pnpm run build-inject", - "clean-build-typecheck-inject": "pnpm run clean-build-typecheck && pnpm run inject", - "lint": "run-script-os", - "lint:default": "eslint ${npm_package_src_dir}/ --ext .ts,.tsx", - "lint:win32": "eslint %npm_package_src_dir%/ --ext .ts,.tsx", - "clean": "run-script-os", - "clean:default": "rimraf ${npm_package_dist_dir}/* *.tsbuildinfo", - "clean:win32": "rimraf %npm_package_dist_dir%/* *.tsbuildinfo", - "test:e2e": "codeceptjs run", - "test:e2e:def": "codeceptjs def", - "test:unit": "jest", - "test:unit:watch": "jest --watch", - "test": "concurrently npm:test:unit npm:test:e2e", - "test:watch": "concurrently npm:test:unit:watch #npm:test:e2e:watch", - "lint-typecheck": "concurrently npm:lint npm:typecheck", - "fix": "pnpm run lint --fix" - }, - "files": [ - "README.adoc", - "*.js", - "*.js.map", - "*.d.ts", - "**/*.js", - "**/*.js.map", - "**/*.d.ts" - ], - "resolutions": { - "@types/react": "16.14.34", - "react": "16.14.0" - }, - "devDependencies": { - "@blueprintjs/core": "~4.17.8", - "@blueprintjs/icons": "~4.14.5", - "@blueprintjs/popover2": "~1.13.12", - "@blueprintjs/select": "~4.9.12", - "@emotion/eslint-plugin": "^11.10.0", - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", - "@react-three/drei": "^7.27.5", - "@react-three/fiber": "^7.0.29", - "@riboseinc/paneron-extension-glossarist": "^2.0.7", - "@riboseinc/paneron-extension-kit": "^2.0.7", - "@swc/cli": "^0.1.62", - "@swc/core": "^1.3.58", - "@swc/helpers": "^0.5.1", - "@swc/jest": "^0.2.26", - "@types/jest": "^29.5.1", - "@types/node": "20.2.0", - "@types/react": "18.2.6", - "@types/react-reconciler": "^0.28.2", - "@types/three": "^0.152.0", - "@types/webpack-env": "^1.18.0", - "@typescript-eslint/eslint-plugin": "^5.59.6", - "@typescript-eslint/parser": "^5.59.6", - "codeceptjs": "^3.4.1", - "concurrently": "^8.0.1", - "electron": "^24.3.0", - "eslint": "^8.40.0", - "eslint-import-resolver-typescript": "^3.5.5", - "eslint-plugin-jest": "^27.2.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-react": "^7.32.2", - "eslint-plugin-react-hooks": "^4.6.0", - "fast-check": "^3.8.2", - "immer": "^10.0.2", - "jest": "^29.5.0", - "liquidjs": "^9.42.1", - "mkdirp": "^3.0.1", - "playwright": "^1.33.0", - "prop-types": "^15.8.1", - "react": "16.14.0", - "react-dom": "^16.14.0", - "react-flow-renderer": "~9.6.4", - "react-mathjax2": "^0.0.2", - "regenerator-runtime": "^0.13.11", - "rimraf": "^5.0.1", - "run-script-os": "^1.1.6", - "three": "^0.146.0", - "three-stdlib": "^2.17.3", - "ts-jest": "^29.1.0", - "ts-node": "^10.9.1", - "typescript": "4.9.5" - }, - "license": "MIT" -} diff --git a/packages/legacy/src/migrations/initial.ts b/packages/legacy/src/migrations/initial.ts deleted file mode 100644 index fe4e32f3..00000000 --- a/packages/legacy/src/migrations/initial.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { DatasetMigrationFunction } from '@riboseinc/paneron-extension-kit/types/migrations'; - -/** - * Initialize data for the plugin. - * Used by Paneron plugin. - */ - -const initializeDataset: DatasetMigrationFunction = async () => { - return { - versionAfter : '1.0.0-dev6', - bufferChangeset : {}, - }; -}; - -export default initializeDataset; diff --git a/packages/legacy/src/smart/model/editor/components/terms.ts b/packages/legacy/src/smart/model/editor/components/terms.ts deleted file mode 100644 index 82fe4e3c..00000000 --- a/packages/legacy/src/smart/model/editor/components/terms.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MMELTerm } from '../../../serialize/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ItemAction, useItems } from './itemTemplate'; - -type command = 'terms'; -type ownType = MMELTerm; -const value = 'terms'; - -export type TermsAction = ItemAction; - -export function useTerms( - x: Record -): UndoReducerInterface, TermsAction> { - return useItems(x, value); -} diff --git a/packages/legacy/src/smart/model/editor/components/vars.ts b/packages/legacy/src/smart/model/editor/components/vars.ts deleted file mode 100644 index a0e3f54f..00000000 --- a/packages/legacy/src/smart/model/editor/components/vars.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MMELVariable } from '../../../serialize/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; - -type command = 'vars'; -type ownType = MMELVariable; -const value = 'vars'; - -export type VarAction = ItemAction & { - cascade?: ModelAction[]; -}; - -export function useVars( - x: Record -): UndoReducerInterface, VarAction> { - return useItems(x, value); -} diff --git a/packages/legacy/src/smart/model/editor/components/view.ts b/packages/legacy/src/smart/model/editor/components/view.ts deleted file mode 100644 index 8fe308ac..00000000 --- a/packages/legacy/src/smart/model/editor/components/view.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MMELView } from '../../../serialize/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; - -type command = 'view'; -type ownType = MMELView; -const value = 'view'; - -export type ViewAction = ItemAction & { - cascade?: ModelAction[]; -}; - -export function useView( - x: Record -): UndoReducerInterface, ViewAction> { - return useItems(x, value); -} diff --git a/packages/legacy/src/smart/serialize/MMEL.ts b/packages/legacy/src/smart/serialize/MMEL.ts deleted file mode 100644 index e72606d1..00000000 --- a/packages/legacy/src/smart/serialize/MMEL.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { - parseComment, - parseFigure, - parseLink, - parseMetaData, - parseNote, - parseProvision, - parseReference, - parseRole, - parseSection, - parseTable, - parseTerm, - parseVariable, - parseView, -} from './handler/supporthandler'; -import { MMELModel } from './interface/model'; -import { MMELremovePackage, MMELtokenize } from './util/tokenizer'; -import { parseApproval, parseProcess } from './handler/processhandler'; -import { - parseDataClass, - parseEnum, - parseRegistry, -} from './handler/datahandler'; -import { - parseEndEvent, - parseSignalCatchEvent, - parseStartEvent, - parseTimerEvent, -} from './handler/eventhandler'; -import { parseEGate, parseSubprocess } from './handler/flowcontrolhandler'; -import { - toCommentModel, - toEnumModel, - toFigModel, - toLinkModel, - toMetaDataModel, - toNodeModel, - toNoteModel, - toProvisionModel, - toReferenceModel, - toRoleModel, - toSectionModel, - toSubprocessModel, - toTableModel, - toTermsModel, - toVariableModel, - toViewProfile as toViewProfileModel, -} from './util/serailizeformater'; -import { validateModel } from './util/validation'; -import { MODELVERSION } from '../utils/constants'; - -/** - * the function to convert text to MMEL - */ -export function textToMMEL(x: string): MMELModel { - const pm = parseModel(x); - validateModel(pm); - return pm; -} - -/** - * the function to convert MMEL to text - */ -export function MMELToText(model: MMELModel): string { - let out = ''; - if (model.root !== '') { - out += 'root ' + model.root + '\n\n'; - } - out += 'version "' + MODELVERSION + '"\n\n'; - out += toMetaDataModel(model.meta) + '\n'; - for (const r in model.roles) { - out += toRoleModel(model.roles[r]) + '\n'; - } - for (const e in model.elements) { - out += toNodeModel(model.elements[e]) + '\n'; - } - for (const r in model.provisions) { - out += toProvisionModel(model.provisions[r]) + '\n'; - } - for (const e in model.enums) { - out += toEnumModel(model.enums[e]) + '\n'; - } - for (const p in model.pages) { - out += toSubprocessModel(model.pages[p]) + '\n'; - } - for (const v in model.vars) { - out += toVariableModel(model.vars[v]) + '\n'; - } - for (const v in model.notes) { - out += toNoteModel(model.notes[v]) + '\n'; - } - for (const v in model.views) { - out += toViewProfileModel(model.views[v]) + '\n'; - } - for (const r in model.refs) { - out += toReferenceModel(model.refs[r]) + '\n'; - } - for (const t in model.terms) { - out += toTermsModel(model.terms[t]) + '\n'; - } - for (const t in model.tables) { - out += toTableModel(model.tables[t]) + '\n'; - } - for (const t in model.figures) { - out += toFigModel(model.figures[t]) + '\n'; - } - for (const t in model.sections) { - out += toSectionModel(model.sections[t]) + '\n'; - } - for (const t in model.links) { - out += toLinkModel(model.links[t]) + '\n'; - } - for (const t in model.comments) { - out += toCommentModel(model.comments[t]) + '\n'; - } - return out; -} - -function parseModel(input: string): MMELModel { - const model: MMELModel = { - meta : parseMetaData(''), - roles : {}, - provisions : {}, - pages : {}, - elements : {}, - refs : {}, - enums : {}, - vars : {}, - notes : {}, - views : {}, - terms : {}, - tables : {}, - figures : {}, - sections : {}, - links : {}, - comments : {}, - root : '', - version : '', - }; - - const token: string[] = MMELtokenize(input); - let i = 0; - while (i < token.length) { - const command: string = token[i++]; - if (command === 'root') { - model.root = token[i++].trim(); - } else if (command === 'metadata') { - model.meta = parseMetaData(token[i++]); - } else if (command === 'role') { - const r = parseRole(token[i++], token[i++]); - model.roles[r.id] = r; - } else if (command === 'provision') { - const p = parseProvision(token[i++], token[i++]); - model.provisions[p.id] = p; - } else if (command === 'process') { - const p = parseProcess(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'class') { - const p = parseDataClass(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'data_registry') { - const p = parseRegistry(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'start_event') { - const p = parseStartEvent(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'end_event') { - const p = parseEndEvent(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'timer_event') { - const p = parseTimerEvent(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'exclusive_gateway') { - const p = parseEGate(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'subprocess') { - const p = parseSubprocess(token[i++], token[i++]); - model.pages[p.id] = p; - } else if (command === 'reference') { - const p = parseReference(token[i++], token[i++]); - model.refs[p.id] = p; - } else if (command === 'approval') { - const p = parseApproval(token[i++], token[i++]); - model.elements[p.id] = p; - } else if (command === 'enum') { - const p = parseEnum(token[i++], token[i++]); - model.enums[p.id] = p; - } else if (command === 'measurement') { - const v = parseVariable(token[i++], token[i++]); - model.vars[v.id] = v; - } else if (command === 'view') { - const v = parseView(token[i++], token[i++]); - model.views[v.id] = v; - } else if (command === 'note') { - const v = parseNote(token[i++], token[i++]); - model.notes[v.id] = v; - } else if (command === 'signal_catch_event') { - const e = parseSignalCatchEvent(token[i++], token[i++]); - model.elements[e.id] = e; - } else if (command === 'term') { - const e = parseTerm(token[i++], token[i++]); - model.terms[e.id] = e; - } else if (command === 'table') { - const t = parseTable(token[i++], token[i++]); - model.tables[t.id] = t; - } else if (command === 'figure') { - const t = parseFigure(token[i++], token[i++]); - model.figures[t.id] = t; - } else if (command === 'section') { - const t = parseSection(token[i++], token[i++]); - model.sections[t.id] = t; - } else if (command === 'link') { - const t = parseLink(token[i++], token[i++]); - model.links[t.id] = t; - } else if (command === 'comment') { - const c = parseComment(token[i++], token[i++]); - model.comments[c.id] = c; - } else if (command === 'version') { - model.version = MMELremovePackage(token[i++]); - } else { - throw Error('Unknown command ' + command); - } - } - return model; -} diff --git a/packages/legacy/src/smart/serialize/handler/datahandler.ts b/packages/legacy/src/smart/serialize/handler/datahandler.ts deleted file mode 100644 index 97ce1369..00000000 --- a/packages/legacy/src/smart/serialize/handler/datahandler.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { DataType } from '../interface/baseinterface'; -import { - MMELDataAttribute, - MMELDataClass, - MMELEnum, - MMELEnumValue, - MMELRegistry, -} from '../interface/datainterface'; -import { - MMELremovePackage, - MMELtokenizeAttributes, - MMELtokenizePackage, - MMELtokenizeSet, -} from '../util/tokenizer'; - -export function parseDataAttribute( - basic: string, - details: string -): MMELDataAttribute { - const attribute: MMELDataAttribute = { - id : '', - type : '', - modality : '', - cardinality : '', - definition : '', - ref : new Set(), - datatype : DataType.DATAATTRIBUTE, - }; - - let index = basic.indexOf('['); - if (index !== -1) { - attribute.cardinality = basic.substring(index + 1, basic.length - 1).trim(); - basic = basic.substring(0, index); - } - index = basic.indexOf(':'); - if (index !== -1) { - attribute.type = basic.substring(index + 1).trim(); - basic = basic.substring(0, index); - } - attribute.id = basic.trim(); - if (details !== '') { - const t: string[] = MMELtokenizePackage(details); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'modality') { - attribute.modality = t[i++]; - } else if (command === 'definition') { - attribute.definition = MMELremovePackage(t[i++]); - } else if (command === 'reference') { - attribute.ref = MMELtokenizeSet(t[i++]); - } else { - throw new Error( - 'Parsing error: data class attribute. ID ' + - attribute.id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: data class attribute. ID ' + - attribute.id + - ': Expecting value for ' + - command - ); - } - } - } - return attribute; -} - -export function parseDataClass(id: string, data: string): MMELDataClass { - const dc: MMELDataClass = { - id : id, - attributes : {}, - datatype : DataType.DATACLASS, - }; - - if (data !== '') { - const t: string[] = MMELtokenizeAttributes(data); - let i = 0; - while (i < t.length) { - const basic: string = t[i++]; - if (i < t.length) { - const details: string = t[i++]; - const att = parseDataAttribute(basic.trim(), details); - dc.attributes[att.id] = att; - } else { - throw new Error( - 'Parsing error: class. ID ' + id + ': Expecting { after ' + basic - ); - } - } - } - return dc; -} - -export function parseEnumValue(id: string, data: string): MMELEnumValue { - const ev: MMELEnumValue = { - id : id, - value : '', - datatype : DataType.ENUMVALUE, - }; - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'definition') { - ev.value = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: enum value. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: enum value. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return ev; -} - -export function parseEnum(id: string, data: string): MMELEnum { - const e: MMELEnum = { - id : id, - values : {}, - datatype : DataType.ENUM, - }; - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const vid: string = t[i++]; - if (i < t.length) { - const vcontent: string = t[i++]; - const ev = parseEnumValue(vid, vcontent); - e.values[ev.id] = ev; - } else { - throw new Error( - 'Parsing error: enum. ID ' + - id + - ': Empty definition for value ' + - vid - ); - } - } - } - return e; -} - -export function parseRegistry(id: string, data: string): MMELRegistry { - const reg: MMELRegistry = { - id : id, - title : '', - data : '', - datatype : DataType.REGISTRY, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'title') { - reg.title = MMELremovePackage(t[i++]); - } else if (command === 'data_class') { - reg.data = t[i++]; - } else { - throw new Error( - 'Parsing error: registry. ID ' + id + ': Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: registry. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return reg; -} diff --git a/packages/legacy/src/smart/serialize/handler/eventhandler.ts b/packages/legacy/src/smart/serialize/handler/eventhandler.ts deleted file mode 100644 index 7c676f35..00000000 --- a/packages/legacy/src/smart/serialize/handler/eventhandler.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { DataType } from '../interface/baseinterface'; -import { MMELremovePackage, MMELtokenizePackage } from '../util/tokenizer'; -import { - MMELEndEvent, - MMELSignalCatchEvent, - MMELStartEvent, - MMELTimerEvent, -} from '../interface/eventinterface'; - -export function parseEndEvent(id: string, data: string): MMELEndEvent { - const end: MMELEndEvent = { - id : id, - datatype : DataType.ENDEVENT, - }; - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - if (t.length > 0) { - throw new Error( - 'Parsing error: end_event. ID ' + id + ': Expecting empty body' - ); - } - } - return end; -} - -export function parseSignalCatchEvent( - id: string, - data: string -): MMELSignalCatchEvent { - const sc: MMELSignalCatchEvent = { - id : id, - datatype : DataType.SIGNALCATCHEVENT, - signal : '', - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'catch') { - sc.signal = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: Signal Catch Event. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: Signal Catch Event. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return sc; -} - -export function parseStartEvent(id: string, data: string): MMELStartEvent { - const start: MMELStartEvent = { - id : id, - datatype : DataType.STARTEVENT, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - if (t.length > 0) { - throw new Error( - 'Parsing error: start_event. ID ' + id + ': Expecting empty body' - ); - } - } - return start; -} - -export function parseTimerEvent(id: string, data: string): MMELTimerEvent { - const te: MMELTimerEvent = { - id : id, - datatype : DataType.TIMEREVENT, - type : '', - para : '', - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'type') { - te.type = t[i++]; - } else if (command === 'para') { - te.para = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: Timer Event. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: Timer Event. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return te; -} diff --git a/packages/legacy/src/smart/serialize/handler/flowcontrolhandler.ts b/packages/legacy/src/smart/serialize/handler/flowcontrolhandler.ts deleted file mode 100644 index 49a7c0ac..00000000 --- a/packages/legacy/src/smart/serialize/handler/flowcontrolhandler.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { DataType } from '../interface/baseinterface'; -import { - MMELEdge, - MMELEGate, - MMELSubprocess, - MMELSubprocessComponent, -} from '../interface/flowcontrolinterface'; -import { MMELremovePackage, MMELtokenizePackage } from '../util/tokenizer'; - -export function parseEdge(id: string, data: string): MMELEdge { - const edge: MMELEdge = { - datatype : DataType.EDGE, - id : id, - from : '', - to : '', - description : '', - condition : '', - }; - - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'from') { - edge.from = t[i++]; - } else if (command === 'description') { - edge.description = MMELremovePackage(t[i++]); - } else if (command === 'condition') { - edge.condition = MMELremovePackage(t[i++]); - } else if (command === 'to') { - edge.to = t[i++]; - } else { - throw new Error( - 'Parsing error: process flow. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: process flow. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - return edge; -} - -export function parseSubprocess(id: string, data: string): MMELSubprocess { - const sub: MMELSubprocess = { - id : id, - childs : {}, - edges : {}, - data : {}, - datatype : DataType.SUBPROCESS, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'elements') { - readElements(sub, MMELremovePackage(t[i++])); - } else if (command === 'process_flow') { - readEdges(sub, MMELremovePackage(t[i++])); - } else if (command === 'data') { - readData(sub, MMELremovePackage(t[i++])); - } else { - throw new Error( - 'Parsing error: subprocess. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: subprocess. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return sub; -} - -function readElements(sub: MMELSubprocess, data: string) { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const name: string = t[i++]; - if (i < t.length) { - const id = name.trim(); - const nc = parseSubprocessComponent(id, t[i++]); - sub.childs[nc.element] = nc; - } else { - throw new Error( - 'Parsing error: elements in subprocess. Expecting value for ' + name - ); - } - } -} - -function readData(sub: MMELSubprocess, data: string) { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const name: string = t[i++]; - if (i < t.length) { - const id = name.trim(); - const nc = parseSubprocessComponent(id, t[i++]); - sub.data[nc.element] = nc; - } else { - throw new Error( - 'Parsing error: data in subprocess. Expecting value for ' + name - ); - } - } -} - -function readEdges(sub: MMELSubprocess, data: string) { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const id: string = t[i++]; - if (i < t.length) { - const edge = parseEdge(id.trim(), t[i++]); - sub.edges[edge.id] = edge; - } else { - throw new Error( - 'Parsing error: edges in subprocess. Expecting value for ' + id - ); - } - } -} - -export function parseSubprocessComponent( - elm: string, - data: string -): MMELSubprocessComponent { - const com: MMELSubprocessComponent = { - element : elm, - x : 0, - y : 0, - datatype : DataType.SUBPROCESSCOMPONENT, - }; - - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'x') { - com.x = parseFloat(t[i++]); - } else if (command === 'y') { - com.y = parseFloat(t[i++]); - } else { - throw new Error( - 'Parsing error: components in subprocess. Element ' + - elm + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: edges in subprocess. Expecting value for ' + command - ); - } - } - return com; -} - -export function parseEGate(id: string, data: string): MMELEGate { - const egate: MMELEGate = { - id : id, - datatype : DataType.EGATE, - label : '', - }; - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'label') { - egate.label = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: Exclusive gateway. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: Exclusive gateway. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return egate; -} diff --git a/packages/legacy/src/smart/serialize/handler/processhandler.ts b/packages/legacy/src/smart/serialize/handler/processhandler.ts deleted file mode 100644 index 6bda1d78..00000000 --- a/packages/legacy/src/smart/serialize/handler/processhandler.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { DataType } from '../interface/baseinterface'; -import { MMELApproval, MMELProcess } from '../interface/processinterface'; -import { - MMELremovePackage, - MMELtokenizePackage, - MMELtokenizeSet, -} from '../util/tokenizer'; - -export function parseApproval(id: string, data: string): MMELApproval { - const app: MMELApproval = { - id : id, - datatype : DataType.APPROVAL, - name : '', - modality : '', - actor : '', - approver : '', - records : new Set(), - ref : new Set(), - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'modality') { - app.modality = t[i++]; - } else if (command === 'name') { - app.name = MMELremovePackage(t[i++]); - } else if (command === 'actor') { - app.actor = t[i++]; - } else if (command === 'approve_by') { - app.approver = t[i++]; - } else if (command === 'approval_record') { - app.records = MMELtokenizeSet(t[i++]); - } else if (command === 'reference') { - app.ref = MMELtokenizeSet(t[i++]); - } else { - throw new Error( - 'Parsing error: approval. ID ' + id + ': Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: approval. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return app; -} - -export function parseProcess(id: string, data: string): MMELProcess { - const p: MMELProcess = { - id : id, - datatype : DataType.PROCESS, - name : '', - modality : '', - actor : '', - output : new Set(), - input : new Set(), - notes : new Set(), - provision : new Set(), - links : new Set(), - tables : new Set(), - figures : new Set(), - comments : new Set(), - page : '', - measure : [], - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'modality') { - p.modality = t[i++]; - } else if (command === 'name') { - p.name = MMELremovePackage(t[i++]); - } else if (command === 'actor') { - p.actor = t[i++]; - } else if (command === 'subprocess') { - p.page = t[i++]; - } else if (command === 'validate_provision') { - p.provision = MMELtokenizeSet(t[i++]); - } else if (command === 'links') { - p.links = MMELtokenizeSet(t[i++]); - } else if (command === 'validate_measurement') { - p.measure = MMELtokenizePackage(t[i++]).flatMap(x => - MMELremovePackage(x) - ); - } else if (command === 'output') { - p.output = MMELtokenizeSet(t[i++]); - } else if (command === 'table') { - p.tables = MMELtokenizeSet(t[i++]); - } else if (command === 'figure') { - p.figures = MMELtokenizeSet(t[i++]); - } else if (command === 'note') { - p.notes = MMELtokenizeSet(t[i++]); - } else if (command === 'comment') { - p.comments = MMELtokenizeSet(t[i++]); - } else if (command === 'reference_data_registry') { - p.input = MMELtokenizeSet(t[i++]); - } else { - throw new Error( - 'Parsing error: process. ID ' + id + ': Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: process. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return p; -} diff --git a/packages/legacy/src/smart/serialize/handler/supporthandler.ts b/packages/legacy/src/smart/serialize/handler/supporthandler.ts deleted file mode 100644 index c9fb95a2..00000000 --- a/packages/legacy/src/smart/serialize/handler/supporthandler.ts +++ /dev/null @@ -1,597 +0,0 @@ -import { DataType } from '../interface/baseinterface'; -import { - BINARY_TYPE, - LINK_TYPE, - MMELComment, - MMELFigure, - MMELLink, - MMELMetadata, - MMELNote, - MMELProvision, - MMELReference, - MMELRole, - MMELTable, - MMELTerm, - MMELTextSection, - MMELVariable, - MMELVarSetting, - MMELView, - NOTE_TYPE, - VarType, -} from '../interface/supportinterface'; -import { - MMELremovePackage, - MMELtokenizePackage, - MMELtokenizeSet, -} from '../util/tokenizer'; - -export function parseMetaData(x: string): MMELMetadata { - const meta: MMELMetadata = { - schema : '', - author : '', - title : '', - edition : '', - namespace : '', - shortname : '', - datatype : DataType.METADATA, - }; - if (x !== '') { - const t: string[] = MMELtokenizePackage(x); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'title') { - meta.title = MMELremovePackage(t[i++]); - } else if (command === 'schema') { - meta.schema = MMELremovePackage(t[i++]); - } else if (command === 'edition') { - meta.edition = MMELremovePackage(t[i++]); - } else if (command === 'author') { - meta.author = MMELremovePackage(t[i++]); - } else if (command === 'namespace') { - meta.namespace = MMELremovePackage(t[i++]); - } else if (command === 'shortname') { - meta.shortname = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: metadata. Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: metadata. Expecting value for ' + command - ); - } - } - } - return meta; -} - -export function parseProvision(id: string, data: string): MMELProvision { - const pro: MMELProvision = { - id : id, - modality : '', - condition : '', - ref : new Set(), - datatype : DataType.PROVISION, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'modality') { - pro.modality = t[i++]; - } else if (command === 'condition') { - pro.condition = MMELremovePackage(t[i++]); - } else if (command === 'reference') { - pro.ref = MMELtokenizeSet(t[i++]); - } - } else { - throw new Error( - 'Parsing error: provision. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return pro; -} - -export function parseReference(id: string, data: string): MMELReference { - const ref: MMELReference = { - id : id, - document : '', - clause : '', - title : '', - datatype : DataType.REFERENCE, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'document') { - ref.document = MMELremovePackage(t[i++]); - } else if (command === 'clause') { - ref.clause = MMELremovePackage(t[i++]); - } else if (command === 'title') { - ref.title = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: reference. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: reference. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return ref; -} - -export function parseRole(id: string, data: string): MMELRole { - const role: MMELRole = { - id : id, - name : '', - datatype : DataType.ROLE, - }; - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'name') { - role.name = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: role. ID ' + id + ': Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: role. ID ' + id + ': Expecting value for ' + command - ); - } - } - return role; -} - -export function parseVariable(id: string, data: string): MMELVariable { - const v: MMELVariable = { - id : id, - type : VarType.DATA, - definition : '', - description : '', - datatype : DataType.VARIABLE, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'type') { - v.type = t[i++] as VarType; - } else if (command === 'definition') { - v.definition = MMELremovePackage(t[i++]); - } else if (command === 'description') { - v.description = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: variable. ID ' + id + ': Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: variable. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return v; -} - -export function parseView(id: string, data: string): MMELView { - const v: MMELView = { - id : id, - name : '', - profile : {}, - datatype : DataType.VIEW, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'name') { - v.name = MMELremovePackage(t[i++]); - } else if (command === 'variables') { - v.profile = parseSettings(t[i++]); - } else { - throw new Error( - 'Parsing error: view. ID ' + id + ': Unknown keyword ' + command - ); - } - } else { - throw new Error( - 'Parsing error: variable. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return v; -} - -function to2DArray(data: string[], column: number): string[][] { - let count = 0; - let row: string[] = []; - const ret: string[][] = []; - for (const x of data) { - row[count++] = MMELremovePackage(x); - if (count >= column) { - ret.push(row); - row = []; - count = 0; - } - } - return ret; -} - -export function parseComment(id: string, data: string): MMELComment { - const c: MMELComment = { - id, - username : '', - message : '', - feedback : new Set(), - resolved : false, - timestamp : '', - datatype : DataType.COMMENT, - }; - if (data !== '') { - const t = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (command === 'resolved') { - c.resolved = true; - } else if (i < t.length) { - if (command === 'username') { - c.username = MMELremovePackage(t[i++]); - } else if (command === 'message') { - c.message = MMELremovePackage(t[i++]); - } else if (command === 'feedback') { - c.feedback = MMELtokenizeSet(t[i++]); - } else if (command === 'timestamp') { - c.timestamp = MMELremovePackage(t[i++]); - } else { - throw new Error( - `Parsing error: Comment. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: Comment. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return c; -} - -export function parseLink(id: string, data: string): MMELLink { - const s: MMELLink = { - id, - title : '', - description : '', - link : '', - type : 'REPO', - datatype : DataType.LINK, - }; - if (data !== '') { - const t = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'title') { - s.title = MMELremovePackage(t[i++]); - } else if (command === 'description') { - s.description = MMELremovePackage(t[i++]); - } else if (command === 'link') { - s.link = MMELremovePackage(t[i++]); - } else if (command === 'type') { - s.type = t[i++] as LINK_TYPE; - } else { - throw new Error( - `Parsing error: Link. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: link. ID ' + id + ': Expecting value for ' + command - ); - } - } - } - return s; -} - -export function parseSection(id: string, data: string): MMELTextSection { - const s: MMELTextSection = { - id, - title : '', - content : '', - datatype : DataType.SECTION, - }; - if (data !== '') { - const t = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'title') { - s.title = MMELremovePackage(t[i++]); - } else if (command === 'content') { - s.content = MMELremovePackage(t[i++]); - } else { - throw new Error( - `Parsing error: section. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: section. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return s; -} - -export function parseFigure(id: string, data: string): MMELFigure { - const fig: MMELFigure = { - id, - title : '', - data : '', - type : 'fig', - datatype : DataType.FIGURE, - }; - - if (data !== '') { - const t = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'title') { - fig.title = MMELremovePackage(t[i++]); - } else if (command === 'data') { - fig.data = MMELremovePackage(t[i++]); - } else if (command === 'type') { - fig.type = t[i++] as BINARY_TYPE; - } else { - throw new Error( - `Parsing error: figure. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: figure. ID ' + id + ': Expecting value for ' + command - ); - } - } - } - return fig; -} - -export function parseTable(id: string, data: string): MMELTable { - const table: MMELTable = { - id, - title : '', - columns : 1, - data : [], - domain : [], - classDisplay : '', - datatype : DataType.TABLE, - }; - - let cells: string[] = []; - if (data !== '') { - const t = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'title') { - table.title = MMELremovePackage(t[i++]); - } else if (command === 'columns') { - table.columns = parseInt(MMELremovePackage(t[i++])); - } else if (command === 'display') { - table.classDisplay = MMELremovePackage(t[i++]); - } else if (command === 'data') { - cells = MMELtokenizePackage(t[i++]); - } else if (command === 'domain') { - table.domain = MMELtokenizePackage(t[i++]).map(x => - MMELremovePackage(x) - ); - } else { - throw new Error( - `Parsing error: table. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: table. ID ' + id + ': Expecting value for ' + command - ); - } - } - } - table.data = to2DArray(cells, table.columns); - return table; -} - -export function parseTerm(id: string, data: string): MMELTerm { - const v: MMELTerm = { - id, - term : '', - admitted : [], - definition : '', - notes : [], - datatype : DataType.TERMS, - }; - - if (data !== '') { - const t = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'term') { - v.term = MMELremovePackage(t[i++]); - } else if (command === 'admitted') { - v.admitted.push(MMELremovePackage(t[i++])); - } else if (command === 'definition') { - v.definition = MMELremovePackage(t[i++]); - } else if (command === 'note') { - v.notes.push(MMELremovePackage(t[i++])); - } else { - throw new Error( - `Parsing error: term. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: term. ID ' + id + ': Expecting value for ' + command - ); - } - } - } - return v; -} - -export function parseNote(id: string, data: string): MMELNote { - const v: MMELNote = { - id : id, - type : 'NOTE', - message : '', - ref : new Set(), - datatype : DataType.NOTE, - }; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'type') { - v.type = t[i++] as NOTE_TYPE; - } else if (command === 'message') { - v.message = MMELremovePackage(t[i++]); - } else if (command === 'reference') { - v.ref = MMELtokenizeSet(t[i++]); - } else { - throw new Error( - `Parsing error: note. ID ${id}: Unknown keyword ${command}` - ); - } - } else { - throw new Error( - 'Parsing error: note. ID ' + id + ': Expecting value for ' + command - ); - } - } - } - return v; -} - -function parseSettings(data: string): Record { - const profile: Record = {}; - - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const id = t[i++]; - if (i < t.length) { - profile[id] = parseVarSetting(id, t[i++]); - } else { - throw new Error( - 'Parsing error: variable profile setting. ID ' + - id + - ': Expecting { after ' + - id - ); - } - } - } - return profile; -} - -function parseVarSetting(id: string, data: string): MMELVarSetting { - const setting: MMELVarSetting = { - id, - isConst : true, - value : '', - }; - if (data !== '') { - const t: string[] = MMELtokenizePackage(data); - let i = 0; - while (i < t.length) { - const command: string = t[i++]; - if (i < t.length) { - if (command === 'required') { - setting.isConst = t[i++] === 'true'; - } else if (command === 'value') { - setting.value = MMELremovePackage(t[i++]); - } else { - throw new Error( - 'Parsing error: variable setting. ID ' + - id + - ': Unknown keyword ' + - command - ); - } - } else { - throw new Error( - 'Parsing error: variable setting. ID ' + - id + - ': Expecting value for ' + - command - ); - } - } - } - return setting; -} diff --git a/packages/legacy/src/smart/serialize/interface/baseinterface.ts b/packages/legacy/src/smart/serialize/interface/baseinterface.ts deleted file mode 100644 index cac97e04..00000000 --- a/packages/legacy/src/smart/serialize/interface/baseinterface.ts +++ /dev/null @@ -1,42 +0,0 @@ -// all object types in MMEL -export enum DataType { - DATAATTRIBUTE = 'attribute', - DATACLASS = 'dc', - ENUMVALUE = 'enumvalue', - ENUM = 'enum', - REGISTRY = 'reg', - ENDEVENT = 'end', - SIGNALCATCHEVENT = 'signal', - STARTEVENT = 'start', - TIMEREVENT = 'timer', - EDGE = 'edge', - SUBPROCESS = 'subprocess', - SUBPROCESSCOMPONENT = 'subprocesscomponent', - EGATE = 'egate', - VARIABLE = 'var', - APPROVAL = 'approval', - PROCESS = 'process', - ROLE = 'role', - METADATA = 'metadata', - PROVISION = 'provision', - REFERENCE = 'ref', - VIEW = 'view', - NOTE = 'note', - TERMS = 'terms', - TABLE = 'table', - FIGURE = 'figure', - SECTION = 'section', - LINK = 'link', - COMMENT = 'comment', -} - -// the base interface for all objects in MMEL -export interface MMELObject { - datatype: DataType; - globalId?: string; -} - -// the elements in the MMEL diagram -export interface MMELNode extends MMELObject { - id: string; -} diff --git a/packages/legacy/src/smart/serialize/interface/datainterface.ts b/packages/legacy/src/smart/serialize/interface/datainterface.ts deleted file mode 100644 index 2a525ebc..00000000 --- a/packages/legacy/src/smart/serialize/interface/datainterface.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { DataType, MMELNode, MMELObject } from './baseinterface'; - -// data structure for data attribute -export interface MMELDataAttribute extends MMELObject { - id: string; - type: string; - modality: string; - cardinality: string; - definition: string; - ref: Set; - datatype: DataType.DATAATTRIBUTE; -} - -// data structure for data class -export interface MMELDataClass extends MMELNode { - id: string; - attributes: Record; - datatype: DataType.DATACLASS; -} - -// data structure for enum value -export interface MMELEnumValue extends MMELObject { - id: string; - value: string; - datatype: DataType.ENUMVALUE; -} - -// data structure for enum -export interface MMELEnum extends MMELObject { - id: string; - values: Record; - datatype: DataType.ENUM; -} - -// data structure for Registry -export interface MMELRegistry extends MMELNode { - title: string; - data: string; // ID of the underlying data class - datatype: DataType.REGISTRY; -} diff --git a/packages/legacy/src/smart/serialize/interface/eventinterface.ts b/packages/legacy/src/smart/serialize/interface/eventinterface.ts deleted file mode 100644 index 0cfd435d..00000000 --- a/packages/legacy/src/smart/serialize/interface/eventinterface.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { DataType, MMELNode } from './baseinterface'; - -export type MMELEventNode = MMELNode; - -export type MMELEndEvent = MMELEventNode; - -export interface MMELSignalCatchEvent extends MMELEventNode { - id: string; - signal: string; - datatype: DataType.SIGNALCATCHEVENT; -} - -export interface MMELStartEvent extends MMELEventNode { - id: string; - datatype: DataType.STARTEVENT; -} - -export interface MMELTimerEvent extends MMELEventNode { - id: string; - type: string; - para: string; - datatype: DataType.TIMEREVENT; -} diff --git a/packages/legacy/src/smart/serialize/interface/flowcontrolinterface.ts b/packages/legacy/src/smart/serialize/interface/flowcontrolinterface.ts deleted file mode 100644 index 94ce7393..00000000 --- a/packages/legacy/src/smart/serialize/interface/flowcontrolinterface.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { DataType, MMELNode, MMELObject } from './baseinterface'; - -export interface MMELSubprocessComponent extends MMELObject { - element: string; - x: number; - y: number; - datatype: DataType.SUBPROCESSCOMPONENT; -} - -export interface MMELEdge extends MMELObject { - id: string; - from: string; - to: string; - description: string; - condition: string; - datatype: DataType.EDGE; -} - -export interface MMELSubprocess extends MMELObject { - id: string; - childs: Record; - edges: Record; - data: Record; - datatype: DataType.SUBPROCESS; -} - -export interface MMELEGate extends MMELNode { - label: string; - datatype: DataType.EGATE; -} diff --git a/packages/legacy/src/smart/serialize/interface/model.ts b/packages/legacy/src/smart/serialize/interface/model.ts deleted file mode 100644 index 21e18cd8..00000000 --- a/packages/legacy/src/smart/serialize/interface/model.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { MMELNode } from './baseinterface'; -import { MMELEnum } from './datainterface'; -import { MMELSubprocess } from './flowcontrolinterface'; -import { - MMELComment, - MMELFigure, - MMELLink, - MMELMetadata, - MMELNote, - MMELProvision, - MMELReference, - MMELRole, - MMELTable, - MMELTerm, - MMELTextSection, - MMELVariable, - MMELView, -} from './supportinterface'; - -export interface MMELModel { - meta: MMELMetadata; - roles: Record; - provisions: Record; - elements: Record; - refs: Record; - enums: Record; - vars: Record; - pages: Record; - views: Record; - notes: Record; - terms: Record; - tables: Record; - figures: Record; - sections: Record; - links: Record; - comments: Record; - - root: string; - version: string; -} diff --git a/packages/legacy/src/smart/serialize/interface/processinterface.ts b/packages/legacy/src/smart/serialize/interface/processinterface.ts deleted file mode 100644 index e4374984..00000000 --- a/packages/legacy/src/smart/serialize/interface/processinterface.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { DataType, MMELNode } from './baseinterface'; - -export interface MMELApproval extends MMELNode { - id: string; - name: string; - modality: string; - actor: string; - approver: string; - records: Set; - ref: Set; - datatype: DataType.APPROVAL; -} - -export interface MMELProcess extends MMELNode { - id: string; - name: string; - modality: string; - actor: string; - output: Set; - input: Set; - provision: Set; - links: Set; - notes: Set; - tables: Set; - figures: Set; - comments: Set; - page: string; - measure: string[]; - datatype: DataType.PROCESS; -} diff --git a/packages/legacy/src/smart/serialize/interface/supportinterface.ts b/packages/legacy/src/smart/serialize/interface/supportinterface.ts deleted file mode 100644 index c200089b..00000000 --- a/packages/legacy/src/smart/serialize/interface/supportinterface.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { DataType, MMELObject } from './baseinterface'; - -export enum VarType { - DATA = 'NUMERIC', - LISTDATA = 'DATALIST', - TEXT = 'TEXT', - DERIVED = 'DERIVED', - BOOLEAN = 'TRUE/FALSE', - TABLE = 'TABLE_REFERENCE', - TABLEITEM = 'TABLE_OPTIONS', -} - -export const NOTE_TYPES = [ - 'NOTE', - 'EXAMPLE', - 'DEFINITION', - 'COMMENTARY', -] as const; - -export const BINARY_TYPES = ['fig', 'video', '3d'] as const; - -export type NOTE_TYPE = typeof NOTE_TYPES[number]; -export type BINARY_TYPE = typeof BINARY_TYPES[number]; - -export const LINK_TYPES = ['REPO', 'URL'] as const; -export type LINK_TYPE = typeof LINK_TYPES[number]; - -export interface MMELMetadata extends MMELObject { - schema: string; - author: string; - title: string; - shortname: string; - edition: string; - namespace: string; - datatype: DataType.METADATA; -} - -export interface MMELReference extends MMELObject { - id: string; - document: string; - clause: string; - title: string; - datatype: DataType.REFERENCE; -} - -export interface MMELProvision extends MMELObject { - id: string; - modality: string; - condition: string; - ref: Set; - datatype: DataType.PROVISION; -} - -export interface MMELRole extends MMELObject { - id: string; - name: string; - datatype: DataType.ROLE; -} - -export interface MMELVariable extends MMELObject { - id: string; - type: VarType; - definition: string; - description: string; - datatype: DataType.VARIABLE; -} - -export interface MMELVarSetting { - id: string; - isConst: boolean; - value: string; -} - -export interface MMELView extends MMELObject { - datatype: DataType.VIEW; - id: string; - name: string; - profile: Record; -} - -export interface MMELNote extends MMELObject { - id: string; - type: NOTE_TYPE; - message: string; - ref: Set; - datatype: DataType.NOTE; -} - -export interface MMELTerm extends MMELObject { - id: string; - term: string; - admitted: string[]; - definition: string; - notes: string[]; - datatype: DataType.TERMS; -} - -export interface MMELTable extends MMELObject { - id: string; - title: string; - columns: number; - data: string[][]; - domain: string[]; - classDisplay: string; - datatype: DataType.TABLE; -} - -export interface MMELFigure extends MMELObject { - id: string; - title: string; - data: string; - type: BINARY_TYPE; - datatype: DataType.FIGURE; -} - -export interface MMELTextSection extends MMELObject { - id: string; - title: string; - content: string; - datatype: DataType.SECTION; -} - -export interface MMELLink extends MMELObject { - id: string; - title: string; - description: string; - link: string; - type: LINK_TYPE; - datatype: DataType.LINK; -} - -export interface MMELComment extends MMELObject { - id: string; - username: string; - message: string; - feedback: Set; - resolved: boolean; - timestamp: string; - datatype: DataType.COMMENT; -} diff --git a/packages/legacy/src/smart/serialize/readme.md b/packages/legacy/src/smart/serialize/readme.md deleted file mode 100644 index 0d73e7f1..00000000 --- a/packages/legacy/src/smart/serialize/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Introduction - -This folder contains the data model for MMEL model. Note that this model does not contain runtime information. So, there is another model 'EditorModel' which is like an upgraded version of the model for the runtime. - -# Folders - -1. The interface folder - - Contains the data structures of different elements in the model -1. The handler folder - - Contains the codes for parsing MMEL structure to MMEL model -1. The util folder - - Provides other utility functions (Check the comments inside) - -# MMEL.ts - -It is the main model definition and API. - diff --git a/packages/legacy/src/smart/serialize/util/serailizeformater.ts b/packages/legacy/src/smart/serialize/util/serailizeformater.ts deleted file mode 100644 index f56fd2f3..00000000 --- a/packages/legacy/src/smart/serialize/util/serailizeformater.ts +++ /dev/null @@ -1,513 +0,0 @@ -import { MMELNode } from '../interface/baseinterface'; -import { - MMELDataAttribute, - MMELDataClass, - MMELEnum, - MMELEnumValue, - MMELRegistry, -} from '../interface/datainterface'; -import { - MMELEndEvent, - MMELSignalCatchEvent, - MMELStartEvent, - MMELTimerEvent, -} from '../interface/eventinterface'; -import { - MMELEdge, - MMELEGate, - MMELSubprocess, - MMELSubprocessComponent, -} from '../interface/flowcontrolinterface'; -import { MMELApproval, MMELProcess } from '../interface/processinterface'; -import { - MMELComment, - MMELFigure, - MMELLink, - MMELMetadata, - MMELNote, - MMELProvision, - MMELReference, - MMELRole, - MMELTable, - MMELTerm, - MMELTextSection, - MMELVariable, - MMELVarSetting, - MMELView, -} from '../interface/supportinterface'; -import { - isApproval, - isDataClass, - isEGate, - isEndEvent, - isProcess, - isRegistry, - isSignalEvent, - isStartEvent, - isTimerEvent, -} from './validation'; - -/** - * Convert the model to text - */ -export function toNodeModel(x: MMELNode): string { - if (isDataClass(x)) { - return toDataClassModel(x); - } else if (isRegistry(x)) { - return toRegistryModel(x); - } else if (isEndEvent(x)) { - return toEndEventModel(x); - } else if (isSignalEvent(x)) { - return toSignalCatchEventModel(x); - } else if (isStartEvent(x)) { - return toStartEventModel(x); - } else if (isTimerEvent(x)) { - return toTimerEventModel(x); - } else if (isEGate(x)) { - return toEGateModel(x); - } else if (isApproval(x)) { - return toApprovalModel(x); - } else if (isProcess(x)) { - return toProcessModel(x); - } - throw new Error('Unknown object' + x); -} - -function toDataAttributeModel(a: MMELDataAttribute): string { - let out: string = ' ' + a.id; - if (a.type !== '') { - out += ': ' + a.type; - } - if (a.cardinality !== '') { - out += '[' + a.cardinality + ']'; - } - out += ' {\n'; - out += ' definition "' + a.definition + '"\n'; - if (a.modality !== '') { - out += ' modality ' + a.modality + '\n'; - } - if (a.ref.size > 0) { - out += ' reference {\n'; - for (const r of a.ref) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - out += ' }\n'; - return out; -} - -function toDataClassModel(dc: MMELDataClass): string { - let out: string = 'class ' + dc.id + ' {\n'; - for (const a in dc.attributes) { - out += toDataAttributeModel(dc.attributes[a]); - } - out += '}\n'; - return out; -} - -function toEnumValueModel(ev: MMELEnumValue): string { - let out: string = ' ' + ev.id + ' {\n'; - out += ' definition "' + ev.value + '"\n'; - out += ' }\n'; - return out; -} - -export function toEnumModel(e: MMELEnum): string { - let out: string = 'enum ' + e.id + ' {\n'; - for (const v in e.values) { - out += toEnumValueModel(e.values[v]); - } - out += '}\n'; - return out; -} - -function toRegistryModel(reg: MMELRegistry): string { - let out: string = 'data_registry ' + reg.id + ' {\n'; - out += ' title "' + reg.title + '"\n'; - if (reg.data !== '') { - out += ' data_class ' + reg.data + '\n'; - } - out += '}\n'; - return out; -} - -function toEndEventModel(end: MMELEndEvent): string { - return 'end_event ' + end.id + ' {\n}\n'; -} - -function toSignalCatchEventModel(sc: MMELSignalCatchEvent): string { - let out: string = 'signal_catch_event ' + sc.id + ' {\n'; - if (sc.signal !== '') { - out += ' catch "' + sc.signal + '"\n'; - } - out += '}\n'; - return out; -} - -function toStartEventModel(s: MMELStartEvent): string { - return 'start_event ' + s.id + ' {\n}\n'; -} - -function toTimerEventModel(te: MMELTimerEvent): string { - let out: string = 'timer_event ' + te.id + ' {\n'; - if (te.type !== '') { - out += ' type ' + te.type + '\n'; - } - if (te.para !== '') { - out += ' para "' + te.para + '"\n'; - } - out += '}\n'; - return out; -} - -function toEdgeModel(edge: MMELEdge): string { - let out: string = ' ' + edge.id + ' {\n'; - if (edge.from !== '') { - out += ' from ' + edge.from + '\n'; - } - if (edge.to !== '') { - out += ' to ' + edge.to + '\n'; - } - if (edge.description !== '') { - out += ' description "' + edge.description + '"\n'; - } - if (edge.condition !== '') { - out += ' condition "' + edge.condition + '"\n'; - } - out += ' }\n'; - return out; -} - -export function toSubprocessModel(sub: MMELSubprocess): string { - let out: string = 'subprocess ' + sub.id + ' {\n'; - out += ' elements {\n'; - for (const x in sub.childs) { - out += toSubprocessComponentModel(sub.childs[x]); - } - out += ' }\n'; - out += ' process_flow {\n'; - for (const e in sub.edges) { - out += toEdgeModel(sub.edges[e]); - } - out += ' }\n'; - out += ' data {\n'; - for (const d in sub.data) { - out += toSubprocessComponentModel(sub.data[d]); - } - out += ' }\n'; - out += '}\n'; - return out; -} - -function toSubprocessComponentModel(com: MMELSubprocessComponent): string { - if (com.element === '') { - return ''; - } - let out: string = ' ' + com.element + ' {\n'; - out += ' x ' + com.x + '\n'; - out += ' y ' + com.y + '\n'; - out += ' }\n'; - return out; -} - -function toEGateModel(egate: MMELEGate): string { - let out: string = 'exclusive_gateway ' + egate.id + ' {\n'; - if (egate.label !== '') { - out += ' label "' + egate.label + '"\n'; - } - out += '}\n'; - return out; -} - -export function toVariableModel(v: MMELVariable): string { - let out: string = 'measurement ' + v.id + ' {\n'; - out += ' type ' + v.type + '\n'; - if (v.definition !== '') { - out += ' definition "' + v.definition + '"\n'; - } - if (v.description !== '') { - out += ' description "' + v.description + '"\n'; - } - out += '}\n'; - return out; -} - -export function toViewProfile(v: MMELView): string { - let out: string = 'view ' + v.id + ' {\n'; - out += ' name "' + v.name + '"\n'; - out += ' variables {\n'; - for (const e in v.profile) { - out += toVarSettingModel(v.profile[e]); - } - out += ' }\n'; - out += '}\n'; - return out; -} - -export function toNoteModel(x: MMELNote): string { - let out: string = 'note ' + x.id + ' {\n'; - out += ' type ' + x.type + '\n'; - out += ' message "' + x.message + '"\n'; - if (x.ref.size > 0) { - out += ' reference {\n'; - for (const r of x.ref) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - out += '}\n'; - return out; -} - -export function toVarSettingModel(v: MMELVarSetting): string { - let out = ` ${v.id} {\n`; - out += ` required ${v.isConst ? 'true' : 'false'}\n`; - out += ` value "${v.value}"\n`; - out += ' }\n'; - return out; -} - -export function toMetaDataModel(meta: MMELMetadata): string { - let out = 'metadata {\n'; - out += ' title "' + meta.title + '"\n'; - out += ' schema "' + meta.schema + '"\n'; - out += ' edition "' + meta.edition + '"\n'; - out += ' author "' + meta.author + '"\n'; - out += ' shortname "' + meta.shortname + '"\n'; - out += ' namespace "' + meta.namespace + '"\n'; - out += '}\n'; - return out; -} - -export function toProvisionModel(pro: MMELProvision): string { - let out: string = 'provision ' + pro.id + ' {\n'; - out += ' condition "' + pro.condition + '"\n'; - if (pro.modality !== '') { - out += ' modality ' + pro.modality + '\n'; - } - if (pro.ref.size > 0) { - out += ' reference {\n'; - for (const r of pro.ref) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - out += '}\n'; - return out; -} - -export function toReferenceModel(ref: MMELReference): string { - return ( - 'reference ' + - ref.id + - ' {\n' + - ' document "' + - ref.document + - '"\n' + - ' clause "' + - ref.clause + - '"\n' + - ' title "' + - ref.title + - '"\n' + - '}\n' - ); -} - -export function toTermsModel(term: MMELTerm): string { - let out: string = 'term ' + term.id + ' {\n'; - out += ' term "' + term.term + '"\n'; - out += ' definition "' + term.definition + '"\n'; - for (const x of term.admitted) { - out += ' admitted "' + x + '"\n'; - } - for (const x of term.notes) { - out += ' note "' + x + '"\n'; - } - out += '}\n'; - return out; -} - -export function toFigModel(fig: MMELFigure): string { - return ( - `figure ${fig.id} {\n` + - ` title "${fig.title}"\n` + - ` data "${fig.data}"\n` + - ` type ${fig.type ?? 'fig'}\n` + - '}\n' - ); -} - -export function toSectionModel(s: MMELTextSection): string { - return ( - `section ${s.id} {\n` + - ` title "${s.title}"\n` + - ` content "${s.content}"\n` + - '}\n' - ); -} - -export function toLinkModel(l: MMELLink): string { - let out: string = 'link ' + l.id + ' {\n'; - out += ' title "' + l.title + '"\n'; - out += ' description "' + l.description + '"\n'; - out += ' link "' + l.link + '"\n'; - out += ' type ' + l.type + '\n'; - out += '}\n'; - return out; -} - -export function toCommentModel(c: MMELComment): string { - let out: string = 'comment ' + c.id + ' {\n'; - out += ' username "' + c.username + '"\n'; - out += ' message "' + c.message + '"\n'; - out += ' timestamp "' + c.timestamp + '"\n'; - if (c.feedback.size > 0) { - out += ' feedback {\n'; - for (const r of c.feedback) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (c.resolved) { - out += ' resolved\n'; - } - out += '}\n'; - return out; -} - -export function toTableModel(table: MMELTable): string { - let out: string = 'table ' + table.id + ' {\n'; - out += ' title "' + table.title + '"\n'; - out += ' columns "' + table.columns + '"\n'; - out += ' display "' + table.classDisplay + '"\n'; - out += ' domain {\n'; - for (const d of table.domain) { - out += ' "' + d + '"\n'; - } - out += ' }\n'; - out += ' data {\n'; - for (const row of table.data) { - out += ' ' + row.map(x => `"${x}"`).join(' ') + '\n'; - } - out += ' }\n'; - out += '}\n'; - return out; -} - -export function toRoleModel(role: MMELRole): string { - let out: string = 'role ' + role.id + ' {\n'; - out += ' name "' + role.name + '"\n'; - out += '}\n'; - return out; -} - -function toApprovalModel(app: MMELApproval): string { - let out: string = 'approval ' + app.id + ' {\n'; - out += ' name "' + app.name + '"\n'; - if (app.actor !== '') { - out += ' actor ' + app.actor + '\n'; - } - if (app.modality !== '') { - out += ' modality ' + app.modality + '\n'; - } - if (app.approver !== '') { - out += ' approve_by ' + app.approver + '\n'; - } - if (app.records.size > 0) { - out += ' approval_record {\n'; - for (const dr of app.records) { - out += ' ' + dr + '\n'; - } - out += ' }\n'; - } - if (app.ref.size > 0) { - out += ' reference {\n'; - for (const r of app.ref) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - out += '}\n'; - return out; -} - -export function toProcessModel(process: MMELProcess): string { - let out: string = 'process ' + process.id + ' {\n'; - out += ' name "' + process.name + '"\n'; - if (process.actor !== '') { - out += ' actor ' + process.actor + '\n'; - } - if (process.modality !== '') { - out += ' modality ' + process.modality + '\n'; - } - if (process.input.size > 0) { - out += ' reference_data_registry {\n'; - for (const dr of process.input) { - out += ' ' + dr + '\n'; - } - out += ' }\n'; - } - if (process.provision.size > 0) { - out += ' validate_provision {\n'; - for (const r of process.provision) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (process.links.size > 0) { - out += ' links {\n'; - for (const r of process.links) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (process.notes.size > 0) { - out += ' note {\n'; - for (const r of process.notes) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (process.measure.length > 0) { - out += ' validate_measurement {\n'; - for (const v of process.measure) { - out += ' "' + v + '"\n'; - } - out += ' }\n'; - } - if (process.tables.size > 0) { - out += ' table {\n'; - for (const r of process.tables) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (process.figures.size > 0) { - out += ' figure {\n'; - for (const r of process.figures) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (process.output.size > 0) { - out += ' output {\n'; - for (const c of process.output) { - out += ' ' + c + '\n'; - } - out += ' }\n'; - } - if (process.comments.size > 0) { - out += ' comment {\n'; - for (const r of process.comments) { - out += ' ' + r + '\n'; - } - out += ' }\n'; - } - if (process.page !== '') { - out += ' subprocess ' + process.page + '\n'; - } - out += '}\n'; - return out; -} diff --git a/packages/legacy/src/smart/serialize/util/tokenizer.ts b/packages/legacy/src/smart/serialize/util/tokenizer.ts deleted file mode 100644 index 51316631..00000000 --- a/packages/legacy/src/smart/serialize/util/tokenizer.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Parsing is done by tokenizing the text files, and then converting the tokens to the model. - * Not much error handling is implemented as the MMEL file structure is assumed to be correct. - */ - -import { isSpace } from '../../utils/ModelFunctions'; - -/** - * Convert text to an array of tokens - */ -export function MMELtokenize(x: string): string[] { - const set: string[] = []; - let t = ''; - let i = 0; - while (i < x.length) { - let char: string = x.charAt(i); - if (!isSpace(char)) { - t += char; - i++; - if (char === '"') { - while (i < x.length && x.charAt(i) !== '"') { - t += x.charAt(i); - i++; - } - t += x.charAt(i); - i++; - } else if (char === '{') { - let count = 1; - while (i < x.length && count > 0) { - char = x.charAt(i); - if (char === '{') { - count++; - } - if (char === '}') { - count--; - } - t += char; - i++; - } - i++; - } else { - while (i < x.length && !isSpace(x.charAt(i))) { - t += x.charAt(i); - i++; - } - } - set.push(t); - t = ''; - } else { - i++; - } - } - return set; -} - -/** - * The next item is enclosed by something, say "". Remove the enclosing stuffs and perform tokenization - */ -export function MMELtokenizePackage(x: string): string[] { - return MMELtokenize(MMELremovePackage(x)); -} - -/** - * The data is a set of IDs enclosed in {}. Remove the {} and put each ID into a set - */ -export function MMELtokenizeSet(x: string): Set { - const set = new Set(); - MMELtokenizePackage(x).forEach(y => set.add(y)); - return set; -} - -/** - * Remove the enclosing stuffs - */ -export function MMELremovePackage(x: string): string { - if (x.length >= 2) { - return x.substring(1, x.length - 1); - } else { - return x; - } -} - -/** - * It is specifically used for parsing attribute definitions - */ -export function MMELtokenizeAttributes(x: string): string[] { - x = MMELremovePackage(x); - const set: string[] = []; - let t = ''; - let i = 0; - while (i < x.length) { - let char: string = x.charAt(i); - if (!isSpace(char)) { - t += char; - i++; - if (char === '{') { - let count = 1; - while (i < x.length && count > 0) { - char = x.charAt(i); - if (char === '{') { - count++; - } - if (char === '}') { - count--; - } - t += char; - i++; - } - i++; - } else { - while (i < x.length && x.charAt(i) !== '{') { - t += x.charAt(i); - i++; - } - } - set.push(t); - t = ''; - } else { - i++; - } - } - return set; -} diff --git a/packages/legacy/src/smart/serialize/util/validation.ts b/packages/legacy/src/smart/serialize/util/validation.ts deleted file mode 100644 index 50685e54..00000000 --- a/packages/legacy/src/smart/serialize/util/validation.ts +++ /dev/null @@ -1,268 +0,0 @@ -/** - * Perform basic validation on the parsed model - */ - -import { DataType, MMELNode, MMELObject } from '../interface/baseinterface'; -import { - MMELDataAttribute, - MMELDataClass, - MMELRegistry, -} from '../interface/datainterface'; -import { - MMELEndEvent, - MMELSignalCatchEvent, - MMELStartEvent, - MMELTimerEvent, -} from '../interface/eventinterface'; -import { - MMELEdge, - MMELEGate, - MMELSubprocess, - MMELSubprocessComponent, -} from '../interface/flowcontrolinterface'; -import { MMELModel } from '../interface/model'; -import { MMELApproval, MMELProcess } from '../interface/processinterface'; -import { - MMELProvision, - MMELReference, - MMELRole, - MMELVariable, - MMELView, -} from '../interface/supportinterface'; - -function validateAttribute( - attribute: MMELDataAttribute, - refs: Record -): void { - for (const x in attribute.ref) { - if (x === '' || refs[x] === undefined) { - throw new Error( - `Error in resolving IDs in 'reference' for data attributes '${attribute.id}'` - ); - } - } -} - -function validateDataClass( - dc: MMELDataClass, - refs: Record -): void { - for (const x in dc.attributes) { - validateAttribute(dc.attributes[x], refs); - } -} - -function validateRegistry( - reg: MMELRegistry, - nodes: Record -): void { - if (reg.data === '' || !isDataClass(nodes[reg.data])) { - throw new Error( - `Error in resolving IDs in 'data class' for registry '${reg.id}'` - ); - } -} - -function validateEdge( - edge: MMELEdge, - elements: Record -): void { - if (edge.from === '' || elements[edge.from] === undefined) { - throw new Error(`Error in resolving IDs in 'from' for edge '${edge.id}'`); - } - if (edge.to === '' || elements[edge.to] === undefined) { - throw new Error(`Error in resolving IDs in 'to' for edge '${edge.id}'`); - } -} - -function validateSubprocess( - com: MMELSubprocess, - nodes: Record -): void { - for (const x in com.childs) { - validateSubprocessComponent(com.childs[x], nodes); - } - for (const x in com.data) { - validateSubprocessComponent(com.data[x], nodes); - } - for (const e in com.edges) { - validateEdge(com.edges[e], com.childs); - } -} - -function validateSubprocessComponent( - com: MMELSubprocessComponent, - nodes: Record -): void { - if (com.element === '' || nodes[com.element] === undefined) { - throw new Error( - `Error in resolving IDs in 'from' for graph node ${com.element}` - ); - } -} - -function validateApproval( - app: MMELApproval, - roles: Record, - refs: Record, - nodes: Record -): void { - if (app.actor !== '' && roles[app.actor] === undefined) { - throw new Error( - `Error in resolving IDs in 'actor' for process '${app.id}'` - ); - } - if (app.approver !== '' && roles[app.approver] === undefined) { - throw new Error( - `Error in resolving IDs in 'approver' for process '${app.id}'` - ); - } - for (const x in app.records) { - if (nodes[x] === undefined || !isRegistry(nodes[x])) { - throw new Error( - `Error in resolving IDs in 'approval record' for process '${app.id}'` - ); - } - } - for (const x in app.ref) { - if (refs[x] === undefined) { - throw new Error( - `Error in resolving IDs in 'input' for process '${app.id}'` - ); - } - } -} - -function validateProcess( - p: MMELProcess, - nodes: Record, - provisions: Record, - roles: Record, - pages: Record -): void { - for (const x in p.output) { - if (nodes[x] === undefined || !isRegistry(nodes[x])) { - throw new Error( - `Error in resolving IDs in 'output' for process '${p.id}'` - ); - } - } - for (const x in p.input) { - if (nodes[x] === undefined || !isRegistry(nodes[x])) { - throw new Error( - `Error in resolving IDs in 'input' for process '${p.id}'` - ); - } - } - for (const x in p.provision) { - if (provisions[x] === undefined) { - throw new Error( - `Error in resolving IDs in 'provision' for process '${p.id}'` - ); - } - } - if (p.actor !== '' && roles[p.actor] === undefined) { - throw new Error( - `Error in resolving IDs in 'actor' ${p.actor} for process ${p.id}` - ); - } - if (p.page !== '' && pages[p.page] === undefined) { - throw new Error( - `Error in resolving IDs in 'subprocess' for process '${p.id}'` - ); - } -} - -function validateProvision( - pro: MMELProvision, - refs: Record -): void { - for (const x in pro.ref) { - if (refs[x] === undefined) { - throw new Error( - `Error in resolving IDs in 'reference' for provision ${pro.id}` - ); - } - } -} - -function validateView(view: MMELView, vars: Record) { - for (const x in view.profile) { - if (vars[x] === undefined) { - throw new Error(`Error in resolving variable IDs in view ${view.id}`); - } - } -} - -export function validateModel(model: MMELModel): void { - if (model.root === '' || model.pages[model.root] === undefined) { - throw Error('Root element not found'); - } - for (const p in model.pages) { - validateSubprocess(model.pages[p], model.elements); - } - for (const p in model.provisions) { - validateProvision(model.provisions[p], model.refs); - } - for (const p in model.elements) { - const node = model.elements[p]; - if (isApproval(node)) { - validateApproval(node, model.roles, model.refs, model.elements); - } else if (isRegistry(node)) { - validateRegistry(node, model.elements); - } else if (isDataClass(node)) { - validateDataClass(node, model.refs); - } else if (isProcess(node)) { - validateProcess( - node, - model.elements, - model.provisions, - model.roles, - model.pages - ); - } - } - for (const v in model.views) { - validateView(model.views[v], model.vars); - } -} - -export function isPage(x: MMELObject): x is MMELSubprocess { - return x.datatype === DataType.SUBPROCESS; -} - -export function isProcess(x: MMELNode): x is MMELProcess { - return x.datatype === DataType.PROCESS; -} - -export function isDataClass(x: MMELNode): x is MMELDataClass { - return x.datatype === DataType.DATACLASS; -} - -export function isRegistry(x: MMELNode): x is MMELRegistry { - return x.datatype === DataType.REGISTRY; -} - -export function isApproval(x: MMELNode): x is MMELApproval { - return x.datatype === DataType.APPROVAL; -} - -export function isEndEvent(x: MMELNode): x is MMELEndEvent { - return x.datatype === DataType.ENDEVENT; -} - -export function isStartEvent(x: MMELNode): x is MMELStartEvent { - return x.datatype === DataType.STARTEVENT; -} - -export function isTimerEvent(x: MMELNode): x is MMELTimerEvent { - return x.datatype === DataType.TIMEREVENT; -} - -export function isSignalEvent(x: MMELNode): x is MMELSignalCatchEvent { - return x.datatype === DataType.SIGNALCATCHEVENT; -} - -export function isEGate(x: MMELNode): x is MMELEGate { - return x.datatype === DataType.EGATE; -} diff --git a/packages/legacy/tsconfig.json b/packages/legacy/tsconfig.json deleted file mode 100644 index 8b9d32eb..00000000 --- a/packages/legacy/tsconfig.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "compilerOptions": { - "target": "esnext", - "module": "commonjs", - "moduleResolution": "node", - "strict": true, - "incremental": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "skipLibCheck": true, - "newLine": "lf", - "declaration": true, - "declarationMap": true, - "jsx": "react", - "outDir": "dist", - "typeRoots": [ - "../../src/@types", - "./node_modules/@types" - ], - "composite": true, - "module": "esnext", - "allowSyntheticDefaultImports": true, - "resolveJsonModule": true, - "esModuleInterop": true, - "baseUrl": ".", - "paths": { - } - }, - "include": [ - "**.json", - "*.ts", - "src" - ], - "exclude": [ - "node_modules", - "dist", - "compiled", - "backup" - ], - "ts-node": { - "swc": true, - "compilerOptions": { - "module": "CommonJS" - }, - "files": true - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7aab36ad..d542fa98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,36 +1,227 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + '@types/react': 17.0.53 + react: 17.0.2 + importers: .: - dependencies: - '@paneron/extension-hls': - specifier: workspace:* - version: link:packages/legacy + devDependencies: + '@blueprintjs/core': + specifier: ~4.17.8 + version: 4.17.8(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@blueprintjs/icons': + specifier: ~4.14.5 + version: 4.14.5 + '@blueprintjs/popover2': + specifier: ~1.13.12 + version: 1.13.12(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@blueprintjs/select': + specifier: ~4.9.12 + version: 4.9.14(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@codeceptjs/configure': + specifier: ^0.10.0 + version: 0.10.0(codeceptjs@3.4.1) + '@commitlint/cli': + specifier: ^17.7.1 + version: 17.7.1(@swc/core@1.3.68) + '@commitlint/config-conventional': + specifier: ^17.7.0 + version: 17.7.0 + '@commitlint/cz-commitlint': + specifier: ^17.7.1 + version: 17.7.1(@swc/core@1.3.68)(commitizen@4.3.0)(inquirer@8.2.6) + '@commitlint/types': + specifier: ^17.4.4 + version: 17.4.4 + '@emotion/eslint-plugin': + specifier: ^11.11.0 + version: 11.11.0(eslint@8.40.0) + '@emotion/react': + specifier: ^11.11.1 + version: 11.11.1(@types/react@17.0.53)(react@17.0.2) + '@emotion/styled': + specifier: ^11.11.0 + version: 11.11.0(@emotion/react@11.11.1)(@types/react@17.0.53)(react@17.0.2) + '@paneron/libmmel': + specifier: ^0.1.3 + version: 0.1.3 + '@react-three/drei': + specifier: ^7.27.5 + version: 7.27.5(@react-three/fiber@7.0.29)(react-dom@17.0.2)(react@17.0.2)(three@0.146.0) + '@react-three/fiber': + specifier: ^7.0.29 + version: 7.0.29(react-dom@17.0.2)(react@17.0.2)(three@0.146.0) + '@riboseinc/paneron-extension-glossarist': + specifier: ^2.0.11 + version: 2.0.11 + '@riboseinc/paneron-extension-kit': + specifier: ^2.2.0 + version: 2.2.0(@paneron/libmmel@0.1.3)(@riboseinc/isogit-lfs@0.2.0)(immer@10.0.2)(react-helmet@6.1.0) + '@swc/cli': + specifier: ^0.1.62 + version: 0.1.62(@swc/core@1.3.68)(chokidar@3.5.3) + '@swc/core': + specifier: ^1.3.68 + version: 1.3.68(@swc/helpers@0.5.1) + '@swc/helpers': + specifier: ^0.5.1 + version: 0.5.1 + '@swc/jest': + specifier: ^0.2.26 + version: 0.2.26(@swc/core@1.3.68) + '@types/jest': + specifier: ^29.5.1 + version: 29.5.1 + '@types/react': + specifier: 17.0.53 + version: 17.0.53 + '@types/three': + specifier: ^0.152.0 + version: 0.152.0 + '@types/webpack-env': + specifier: ^1.18.0 + version: 1.18.0 + '@typescript-eslint/eslint-plugin': + specifier: ^5.59.6 + version: 5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.40.0)(typescript@5.1.6) + '@typescript-eslint/parser': + specifier: ^5.59.6 + version: 5.59.6(eslint@8.40.0)(typescript@5.1.6) + chokidar: + specifier: ^3.5.3 + version: 3.5.3 + codeceptjs: + specifier: ^3.4.1 + version: 3.4.1 + commitizen: + specifier: ^4.3.0 + version: 4.3.0(@swc/core@1.3.68) + concurrently: + specifier: ^8.0.1 + version: 8.0.1 + electron: + specifier: ^24.3.0 + version: 24.3.0 + eslint: + specifier: ^8.40.0 + version: 8.40.0 + eslint-import-resolver-typescript: + specifier: ^3.5.5 + version: 3.5.5(@typescript-eslint/parser@5.59.6)(eslint-plugin-import@2.26.0)(eslint@8.40.0) + eslint-plugin-jest: + specifier: ^27.2.1 + version: 27.2.1(@typescript-eslint/eslint-plugin@5.59.6)(eslint@8.40.0)(jest@29.5.0)(typescript@5.1.6) + eslint-plugin-react: + specifier: ^7.32.2 + version: 7.32.2(eslint@8.40.0) + eslint-plugin-react-hooks: + specifier: ^4.6.0 + version: 4.6.0(eslint@8.40.0) + fast-check: + specifier: ^3.8.2 + version: 3.8.2 + husky: + specifier: ^8.0.3 + version: 8.0.3 + immer: + specifier: ^10.0.2 + version: 10.0.2 + jest: + specifier: ^29.5.0 + version: 29.5.0(@types/node@20.4.7)(ts-node@10.9.1) + liquidjs: + specifier: ^9.42.1 + version: 9.42.1 + mkdirp: + specifier: ^3.0.1 + version: 3.0.1 + playwright: + specifier: ^1.33.0 + version: 1.33.0 + prop-types: + specifier: ^15.8.1 + version: 15.8.1 + react: + specifier: 17.0.2 + version: 17.0.2 + react-dom: + specifier: ^17.0.2 + version: 17.0.2(react@17.0.2) + react-flow-renderer: + specifier: ~9.6.4 + version: 9.6.11(react-dom@17.0.2)(react@17.0.2) + react-mathjax2: + specifier: ^0.0.2 + version: 0.0.2 + regenerator-runtime: + specifier: ^0.13.11 + version: 0.13.11 + rimraf: + specifier: ^5.0.1 + version: 5.0.1 + run-script-os: + specifier: ^1.1.6 + version: 1.1.6 + three: + specifier: ^0.146.0 + version: 0.146.0 + three-stdlib: + specifier: ^2.17.3 + version: 2.17.3(three@0.146.0) + ts-jest: + specifier: ^29.1.0 + version: 29.1.0(@babel/core@7.20.2)(jest@29.5.0)(typescript@5.1.6) + ts-node: + specifier: ^10.9.1 + version: 10.9.1(@swc/core@1.3.68)(@types/node@20.4.7)(typescript@5.1.6) + ts-patch: + specifier: ^3.0.2 + version: 3.0.2 + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + tslib: + specifier: ^2.6.1 + version: 2.6.1 + typescript: + specifier: 5.1.6 + version: 5.1.6 + typescript-transform-paths: + specifier: ^3.4.6 + version: 3.4.6(typescript@5.1.6) packages/legacy: devDependencies: '@blueprintjs/core': specifier: ~4.17.8 - version: 4.17.8(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) + version: 4.17.8(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) '@blueprintjs/icons': specifier: ~4.14.5 version: 4.14.5 '@blueprintjs/popover2': specifier: ~1.13.12 - version: 1.13.12(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) + version: 1.13.12(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) '@blueprintjs/select': specifier: ~4.9.12 - version: 4.9.14(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) + version: 4.9.14(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) '@emotion/eslint-plugin': - specifier: ^11.10.0 - version: 11.10.0(eslint@8.40.0) + specifier: ^11.11.0 + version: 11.11.0(eslint@8.40.0) '@emotion/react': - specifier: ^11.10.5 - version: 11.10.5(@babel/core@7.20.2)(@types/react@18.2.6)(react@16.14.0) + specifier: ^11.11.1 + version: 11.11.1(@types/react@17.0.53)(react@16.14.0) '@emotion/styled': - specifier: ^11.10.5 - version: 11.10.5(@babel/core@7.20.2)(@emotion/react@11.10.5)(@types/react@18.2.6)(react@16.14.0) + specifier: ^11.11.0 + version: 11.11.0(@emotion/react@11.11.1)(@types/react@17.0.53)(react@16.14.0) + '@paneron/libmmel': + specifier: workspace:* + version: link:../libmmel '@react-three/drei': specifier: ^7.27.5 version: 7.27.5(@react-three/fiber@7.0.29)(react-dom@16.14.0)(react@16.14.0)(three@0.146.0) @@ -38,23 +229,23 @@ importers: specifier: ^7.0.29 version: 7.0.29(react-dom@16.14.0)(react@16.14.0)(three@0.146.0) '@riboseinc/paneron-extension-glossarist': - specifier: ^2.0.7 - version: 2.0.7 + specifier: ^2.0.11 + version: 2.0.11 '@riboseinc/paneron-extension-kit': - specifier: ^2.0.7 - version: 2.0.7(@riboseinc/isogit-lfs@0.1.6) + specifier: ^2.1.0 + version: 2.1.0(@riboseinc/isogit-lfs@0.2.0) '@swc/cli': specifier: ^0.1.62 - version: 0.1.62(@swc/core@1.3.58) + version: 0.1.62(@swc/core@1.3.68) '@swc/core': - specifier: ^1.3.58 - version: 1.3.58(@swc/helpers@0.5.1) + specifier: ^1.3.68 + version: 1.3.68(@swc/helpers@0.5.1) '@swc/helpers': specifier: ^0.5.1 version: 0.5.1 '@swc/jest': specifier: ^0.2.26 - version: 0.2.26(@swc/core@1.3.58) + version: 0.2.26(@swc/core@1.3.68) '@types/jest': specifier: ^29.5.1 version: 29.5.1 @@ -62,11 +253,8 @@ importers: specifier: 20.2.0 version: 20.2.0 '@types/react': - specifier: 18.2.6 - version: 18.2.6 - '@types/react-reconciler': - specifier: ^0.28.2 - version: 0.28.2 + specifier: 17.0.53 + version: 17.0.53 '@types/three': specifier: ^0.152.0 version: 0.152.0 @@ -157,12 +345,99 @@ importers: ts-jest: specifier: ^29.1.0 version: 29.1.0(@babel/core@7.20.2)(jest@29.5.0)(typescript@4.9.5) + ts-node: + specifier: ^10.9.1 + version: 10.9.1(@swc/core@1.3.68)(@types/node@20.2.0)(typescript@4.9.5) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + typescript: + specifier: 4.9.5 + version: 4.9.5 + typescript-transform-paths: + specifier: ^3.4.6 + version: 3.4.6(typescript@4.9.5) + + packages/libmmel: + devDependencies: + '@swc/cli': + specifier: ^0.1.62 + version: 0.1.62(@swc/core@1.3.58) + '@swc/core': + specifier: ^1.3.58 + version: 1.3.58 + '@swc/jest': + specifier: ^0.2.26 + version: 0.2.26(@swc/core@1.3.58) + '@types/jest': + specifier: ^29.5.1 + version: 29.5.1 + '@types/node': + specifier: 20.2.0 + version: 20.2.0 + '@typescript-eslint/eslint-plugin': + specifier: ^5.59.6 + version: 5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.40.0)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: ^5.59.6 + version: 5.59.6(eslint@8.40.0)(typescript@4.9.5) + concurrently: + specifier: ^8.0.1 + version: 8.0.1 + eslint: + specifier: ^8.40.0 + version: 8.40.0 + eslint-import-resolver-typescript: + specifier: ^3.5.5 + version: 3.5.5(@typescript-eslint/parser@5.59.6)(eslint-plugin-import@2.26.0)(eslint@8.40.0) + eslint-plugin-jest: + specifier: ^27.2.1 + version: 27.2.1(@typescript-eslint/eslint-plugin@5.59.6)(eslint@8.40.0)(jest@29.5.0)(typescript@4.9.5) + eslint-plugin-node: + specifier: ^11.1.0 + version: 11.1.0(eslint@8.40.0) + eslint-plugin-react: + specifier: ^7.32.2 + version: 7.32.2(eslint@8.40.0) + eslint-plugin-react-hooks: + specifier: ^4.6.0 + version: 4.6.0(eslint@8.40.0) + fast-check: + specifier: ^3.8.2 + version: 3.8.2 + immer: + specifier: ^10.0.2 + version: 10.0.2 + jest: + specifier: ^29.5.0 + version: 29.5.0(@types/node@20.2.0)(ts-node@10.9.1) + mkdirp: + specifier: ^3.0.1 + version: 3.0.1 + prop-types: + specifier: ^15.8.1 + version: 15.8.1 + rimraf: + specifier: ^5.0.1 + version: 5.0.1 + run-script-os: + specifier: ^1.1.6 + version: 1.1.6 + ts-jest: + specifier: ^29.1.0 + version: 29.1.0(@babel/core@7.20.2)(jest@29.5.0)(typescript@4.9.5) ts-node: specifier: ^10.9.1 version: 10.9.1(@swc/core@1.3.58)(@types/node@20.2.0)(typescript@4.9.5) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 typescript: specifier: 4.9.5 version: 4.9.5 + typescript-transform-paths: + specifier: ^3.4.6 + version: 3.4.6(typescript@4.9.5) packages: @@ -231,21 +506,21 @@ packages: '@aws-sdk/types': 3.329.0 '@aws-sdk/util-buffer-from': 3.310.0 '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@aws-sdk/is-array-buffer@3.310.0: resolution: {integrity: sha512-urnbcCR+h9NWUnmOtet/s4ghvzsidFmspfhYaHAmSRdy9yDjdjBJMFjjsn85A1ODUktztm+cVncXjQ38WCMjMQ==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@aws-sdk/types@3.329.0: resolution: {integrity: sha512-wFBW4yciDfzQBSFmWNaEvHShnSGLMxSu9Lls6EUf6xDMavxSB36bsrVRX6CyAo/W0NeIIyEOW1LclGPgJV1okg==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@aws-sdk/util-buffer-from@3.310.0: @@ -253,20 +528,20 @@ packages: engines: {node: '>=14.0.0'} dependencies: '@aws-sdk/is-array-buffer': 3.310.0 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@aws-sdk/util-locate-window@3.310.0: resolution: {integrity: sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@aws-sdk/util-utf8-browser@3.259.0: resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@aws-sdk/util-utf8@3.310.0: @@ -274,7 +549,7 @@ packages: engines: {node: '>=14.0.0'} dependencies: '@aws-sdk/util-buffer-from': 3.310.0 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@babel/code-frame@7.18.6: @@ -619,7 +894,7 @@ packages: resolution: {integrity: sha512-qcC7nWW9TTSS7aDxE5gbo9vrxo+IOpC6/Kzpi0rdOBYFDd02PppCdnCCjGYw1/IopSsZ9EWqDLmD7zuy0H+WEA==} dev: true - /@blueprintjs/core@4.17.8(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0): + /@blueprintjs/core@4.17.8(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-hPspPY3luquQlVBlEyJVQT6nYXNl+ABOcqXFiURaneFsweKh/cjlp0ERmiypVh4XsewzmpOa2REePtfI1defAw==} hasBin: true peerDependencies: @@ -634,7 +909,7 @@ packages: '@blueprintjs/icons': 4.14.5 '@juggle/resize-observer': 3.4.0 '@types/dom4': 2.0.2 - '@types/react': 18.2.6 + '@types/react': 17.0.53 classnames: 2.3.2 dom4: 2.1.6 normalize.css: 8.0.1 @@ -646,7 +921,34 @@ packages: tslib: 2.5.0 dev: true - /@blueprintjs/core@4.18.0(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0): + /@blueprintjs/core@4.17.8(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-hPspPY3luquQlVBlEyJVQT6nYXNl+ABOcqXFiURaneFsweKh/cjlp0ERmiypVh4XsewzmpOa2REePtfI1defAw==} + hasBin: true + peerDependencies: + '@types/react': ^16.14.32 || 17 || 18 + react: ^16.8 || 17 || 18 + react-dom: ^16.8 || 17 || 18 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@blueprintjs/colors': 4.1.22 + '@blueprintjs/icons': 4.14.5 + '@juggle/resize-observer': 3.4.0 + '@types/dom4': 2.0.2 + '@types/react': 17.0.53 + classnames: 2.3.2 + dom4: 2.1.6 + normalize.css: 8.0.1 + popper.js: 1.16.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-popper: 1.3.11(react@17.0.2) + react-transition-group: 4.4.5(react-dom@17.0.2)(react@17.0.2) + tslib: 2.5.0 + dev: true + + /@blueprintjs/core@4.18.0(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-BZk+wglL5KGcZC9/ziJWT6TH7frjW469O6FPSN1thFdzKYj6XATpfTSP0g0L90UW6r8yskCcUOo1Faw3jRoFTA==} hasBin: true peerDependencies: @@ -661,7 +963,7 @@ packages: '@blueprintjs/icons': 4.15.0 '@juggle/resize-observer': 3.4.0 '@types/dom4': 2.0.2 - '@types/react': 18.2.6 + '@types/react': 17.0.53 classnames: 2.3.2 dom4: 2.1.6 normalize.css: 8.0.1 @@ -673,6 +975,33 @@ packages: tslib: 2.5.0 dev: true + /@blueprintjs/core@4.18.0(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-BZk+wglL5KGcZC9/ziJWT6TH7frjW469O6FPSN1thFdzKYj6XATpfTSP0g0L90UW6r8yskCcUOo1Faw3jRoFTA==} + hasBin: true + peerDependencies: + '@types/react': ^16.14.32 || 17 || 18 + react: ^16.8 || 17 || 18 + react-dom: ^16.8 || 17 || 18 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@blueprintjs/colors': 4.1.22 + '@blueprintjs/icons': 4.15.0 + '@juggle/resize-observer': 3.4.0 + '@types/dom4': 2.0.2 + '@types/react': 17.0.53 + classnames: 2.3.2 + dom4: 2.1.6 + normalize.css: 8.0.1 + popper.js: 1.16.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-popper: 1.3.11(react@17.0.2) + react-transition-group: 4.4.5(react-dom@17.0.2)(react@17.0.2) + tslib: 2.5.0 + dev: true + /@blueprintjs/icons@4.14.5: resolution: {integrity: sha512-Nvfina9vy3E1JJpISd/TNJeEc3UxJ+QM/rJbYgWlPaVU9iowfHSEHDdDtbKeFj9E0oDUzTYOJ4aNp0vjJ2B6/Q==} dependencies: @@ -689,7 +1018,7 @@ packages: tslib: 2.5.0 dev: true - /@blueprintjs/popover2@1.13.12(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0): + /@blueprintjs/popover2@1.13.12(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-1pn7eRnI/FAqgJT0SDFJRUMKQnP1mhGGd7bOpCpg+Q2hiuk8YTlYClPgYneoRGtLhK3JLyby66UofdAyFklWWQ==} peerDependencies: '@types/react': ^16.14.32 || 17 || 18 @@ -699,19 +1028,41 @@ packages: '@types/react': optional: true dependencies: - '@blueprintjs/core': 4.17.8(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) + '@blueprintjs/core': 4.17.8(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) '@juggle/resize-observer': 3.4.0 - '@popperjs/core': 2.11.6 - '@types/react': 18.2.6 + '@popperjs/core': 2.11.7 + '@types/react': 17.0.53 classnames: 2.3.2 dom4: 2.1.6 react: 16.14.0 react-dom: 16.14.0(react@16.14.0) - react-popper: 2.3.0(@popperjs/core@2.11.6)(react-dom@16.14.0)(react@16.14.0) + react-popper: 2.3.0(@popperjs/core@2.11.7)(react-dom@16.14.0)(react@16.14.0) + tslib: 2.5.0 + dev: true + + /@blueprintjs/popover2@1.13.12(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-1pn7eRnI/FAqgJT0SDFJRUMKQnP1mhGGd7bOpCpg+Q2hiuk8YTlYClPgYneoRGtLhK3JLyby66UofdAyFklWWQ==} + peerDependencies: + '@types/react': ^16.14.32 || 17 || 18 + react: ^16.8 || 17 || 18 + react-dom: ^16.8 || 17 || 18 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@blueprintjs/core': 4.17.8(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@juggle/resize-observer': 3.4.0 + '@popperjs/core': 2.11.7 + '@types/react': 17.0.53 + classnames: 2.3.2 + dom4: 2.1.6 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-popper: 2.3.0(@popperjs/core@2.11.7)(react-dom@17.0.2)(react@17.0.2) tslib: 2.5.0 dev: true - /@blueprintjs/popover2@1.14.1(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0): + /@blueprintjs/popover2@1.14.1(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-/KU4qb4BTny4JKUt4OOl9y2L5NJd7PRCL5Ti58ctCG3bOa6y/hh3vgQWq7jhSGz+dVGxowGMtvEjvaj1rZKSew==} peerDependencies: '@types/react': ^16.14.32 || 17 || 18 @@ -721,10 +1072,10 @@ packages: '@types/react': optional: true dependencies: - '@blueprintjs/core': 4.18.0(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) + '@blueprintjs/core': 4.18.0(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) '@juggle/resize-observer': 3.4.0 '@popperjs/core': 2.11.7 - '@types/react': 18.2.6 + '@types/react': 17.0.53 classnames: 2.3.2 dom4: 2.1.6 react: 16.14.0 @@ -733,57 +1084,296 @@ packages: tslib: 2.5.0 dev: true - /@blueprintjs/select@4.9.14(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0): - resolution: {integrity: sha512-pJsrEsoYgunF0xLusVhd7gMeR59uFdC7uvwlN2tm8qM0vWpzZSlSCwD2FdlQCt3Co76JhmVPyxOxbnUKm55gkw==} - peerDependencies: - '@types/react': ^16.14.32 || 17 || 18 - react: ^16.8 || 17 || 18 - react-dom: ^16.8 || 17 || 18 - peerDependenciesMeta: - '@types/react': - optional: true + /@blueprintjs/popover2@1.14.1(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-/KU4qb4BTny4JKUt4OOl9y2L5NJd7PRCL5Ti58ctCG3bOa6y/hh3vgQWq7jhSGz+dVGxowGMtvEjvaj1rZKSew==} + peerDependencies: + '@types/react': ^16.14.32 || 17 || 18 + react: ^16.8 || 17 || 18 + react-dom: ^16.8 || 17 || 18 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@blueprintjs/core': 4.18.0(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@juggle/resize-observer': 3.4.0 + '@popperjs/core': 2.11.7 + '@types/react': 17.0.53 + classnames: 2.3.2 + dom4: 2.1.6 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-popper: 2.3.0(@popperjs/core@2.11.7)(react-dom@17.0.2)(react@17.0.2) + tslib: 2.5.0 + dev: true + + /@blueprintjs/select@4.9.14(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0): + resolution: {integrity: sha512-pJsrEsoYgunF0xLusVhd7gMeR59uFdC7uvwlN2tm8qM0vWpzZSlSCwD2FdlQCt3Co76JhmVPyxOxbnUKm55gkw==} + peerDependencies: + '@types/react': ^16.14.32 || 17 || 18 + react: ^16.8 || 17 || 18 + react-dom: ^16.8 || 17 || 18 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@blueprintjs/core': 4.18.0(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) + '@blueprintjs/popover2': 1.14.1(@types/react@17.0.53)(react-dom@16.14.0)(react@16.14.0) + '@types/react': 17.0.53 + classnames: 2.3.2 + react: 16.14.0 + react-dom: 16.14.0(react@16.14.0) + tslib: 2.5.0 + dev: true + + /@blueprintjs/select@4.9.14(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-pJsrEsoYgunF0xLusVhd7gMeR59uFdC7uvwlN2tm8qM0vWpzZSlSCwD2FdlQCt3Co76JhmVPyxOxbnUKm55gkw==} + peerDependencies: + '@types/react': ^16.14.32 || 17 || 18 + react: ^16.8 || 17 || 18 + react-dom: ^16.8 || 17 || 18 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@blueprintjs/core': 4.18.0(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@blueprintjs/popover2': 1.14.1(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) + '@types/react': 17.0.53 + classnames: 2.3.2 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + tslib: 2.5.0 + dev: true + + /@chevrotain/cst-dts-gen@10.1.2: + resolution: {integrity: sha512-E/XrL0QlzExycPzwhOEZGVOheJ/Clr5uNv3oCds88MiNqEmg3UU1iauZk7DhjsUo3jgEW4lf0I5HRl7/HC5ZkQ==} + dependencies: + '@chevrotain/gast': 10.1.2 + '@chevrotain/types': 10.1.2 + lodash: 4.17.21 + dev: true + + /@chevrotain/gast@10.1.2: + resolution: {integrity: sha512-er+TcxUOMuGOPoiOq8CJsRm92zGE4YPIYtyxJfxoVwVgtj4AMrPNCmrHvYaK/bsbt2DaDuFdcbbAfM9bcBXW6Q==} + dependencies: + '@chevrotain/types': 10.1.2 + lodash: 4.17.21 + dev: true + + /@chevrotain/types@10.1.2: + resolution: {integrity: sha512-4qF9SmmWKv8AIG/3d+71VFuqLumNCQTP5GoL0CW6x7Ay2OdXm6FUgWFLTMneGUjYUk2C+MSCf7etQfdq3LEr1A==} + dev: true + + /@chevrotain/utils@10.1.2: + resolution: {integrity: sha512-bbZIpW6fdyf7FMaeDmw3cBbkTqsecxEkwlVKgVfqqXWBPLH6azxhPA2V9F7OhoZSVrsnMYw7QuyK6qutXPjEew==} + dev: true + + /@codeceptjs/configure@0.10.0(codeceptjs@3.4.1): + resolution: {integrity: sha512-MxuXmvpZQuUalyU8YPCPTN7fHPLyzBNxJmktqmwsqlNQzh3h5S51Z7SCewZrG0qu6QG5BW3dahMjXq/z6v1Brg==} + peerDependencies: + codeceptjs: '>= 2.3.3' + dependencies: + codeceptjs: 3.4.1 + lodash.merge: 4.6.2 + lodash.mergewith: 4.6.2 + dev: true + + /@codeceptjs/configure@0.8.0: + resolution: {integrity: sha512-fwB44Ww1/dVX5l0ZKL8/bDcAcmgTMqKDMr3hNTItyKeD0kcoLIEQWHGlVpgkZzCrRzmgMnywAuOA7t7AWxcvGw==} + dependencies: + lodash.merge: 4.6.2 + lodash.mergewith: 4.6.2 + dev: true + + /@codeceptjs/helper@1.0.2: + resolution: {integrity: sha512-QKuyw4cGVa78YYj+g02RXitcUYpV4qKjZDHxfCIH2w8lJIr1FQohRD3o/MpcqEnvp475HQJN/OyWhdUBstJupA==} + dev: true + + /@commitlint/cli@17.7.1(@swc/core@1.3.68): + resolution: {integrity: sha512-BCm/AT06SNCQtvFv921iNhudOHuY16LswT0R3OeolVGLk8oP+Rk9TfQfgjH7QPMjhvp76bNqGFEcpKojxUNW1g==} + engines: {node: '>=v14'} + hasBin: true + dependencies: + '@commitlint/format': 17.4.4 + '@commitlint/lint': 17.7.0 + '@commitlint/load': 17.7.1(@swc/core@1.3.68) + '@commitlint/read': 17.5.1 + '@commitlint/types': 17.4.4 + execa: 5.1.1 + lodash.isfunction: 3.0.9 + resolve-from: 5.0.0 + resolve-global: 1.0.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + + /@commitlint/config-conventional@17.7.0: + resolution: {integrity: sha512-iicqh2o6et+9kWaqsQiEYZzfLbtoWv9uZl8kbI8EGfnc0HeGafQBF7AJ0ylN9D/2kj6txltsdyQs8+2fTMwWEw==} + engines: {node: '>=v14'} + dependencies: + conventional-changelog-conventionalcommits: 6.1.0 + dev: true + + /@commitlint/config-validator@17.6.7: + resolution: {integrity: sha512-vJSncmnzwMvpr3lIcm0I8YVVDJTzyjy7NZAeXbTXy+MPUdAr9pKyyg7Tx/ebOQ9kqzE6O9WT6jg2164br5UdsQ==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/types': 17.4.4 + ajv: 8.12.0 + dev: true + + /@commitlint/cz-commitlint@17.7.1(@swc/core@1.3.68)(commitizen@4.3.0)(inquirer@8.2.6): + resolution: {integrity: sha512-6hxY9TNBrEFCL9EE0t59617TIZZDHwbieMbvfM9PLpC2SadYD+YnDb9yZoaSHq3pI10g6BFoiDzF6ADWOgNnpw==} + engines: {node: '>=v14'} + peerDependencies: + commitizen: ^4.0.3 + inquirer: ^8.0.0 + dependencies: + '@commitlint/ensure': 17.6.7 + '@commitlint/load': 17.7.1(@swc/core@1.3.68) + '@commitlint/types': 17.4.4 + chalk: 4.1.2 + commitizen: 4.3.0(@swc/core@1.3.68) + inquirer: 8.2.6 + lodash.isplainobject: 4.0.6 + word-wrap: 1.2.5 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + + /@commitlint/ensure@17.6.7: + resolution: {integrity: sha512-mfDJOd1/O/eIb/h4qwXzUxkmskXDL9vNPnZ4AKYKiZALz4vHzwMxBSYtyL2mUIDeU9DRSpEUins8SeKtFkYHSw==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/types': 17.4.4 + lodash.camelcase: 4.3.0 + lodash.kebabcase: 4.1.1 + lodash.snakecase: 4.1.1 + lodash.startcase: 4.4.0 + lodash.upperfirst: 4.3.1 + dev: true + + /@commitlint/execute-rule@17.4.0: + resolution: {integrity: sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==} + engines: {node: '>=v14'} + dev: true + + /@commitlint/format@17.4.4: + resolution: {integrity: sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/types': 17.4.4 + chalk: 4.1.2 + dev: true + + /@commitlint/is-ignored@17.7.0: + resolution: {integrity: sha512-043rA7m45tyEfW7Zv2vZHF++176MLHH9h70fnPoYlB1slKBeKl8BwNIlnPg4xBdRBVNPaCqvXxWswx2GR4c9Hw==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/types': 17.4.4 + semver: 7.5.4 + dev: true + + /@commitlint/lint@17.7.0: + resolution: {integrity: sha512-TCQihm7/uszA5z1Ux1vw+Nf3yHTgicus/+9HiUQk+kRSQawByxZNESeQoX9ujfVd3r4Sa+3fn0JQAguG4xvvbA==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/is-ignored': 17.7.0 + '@commitlint/parse': 17.7.0 + '@commitlint/rules': 17.7.0 + '@commitlint/types': 17.4.4 + dev: true + + /@commitlint/load@17.7.1(@swc/core@1.3.68): + resolution: {integrity: sha512-S/QSOjE1ztdogYj61p6n3UbkUvweR17FQ0zDbNtoTLc+Hz7vvfS7ehoTMQ27hPSjVBpp7SzEcOQu081RLjKHJQ==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/config-validator': 17.6.7 + '@commitlint/execute-rule': 17.4.0 + '@commitlint/resolve-extends': 17.6.7 + '@commitlint/types': 17.4.4 + '@types/node': 20.4.7 + chalk: 4.1.2 + cosmiconfig: 8.2.0 + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.4.7)(cosmiconfig@8.2.0)(ts-node@10.9.1)(typescript@5.1.6) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + resolve-from: 5.0.0 + ts-node: 10.9.1(@swc/core@1.3.68)(@types/node@20.4.7)(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + + /@commitlint/message@17.4.2: + resolution: {integrity: sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==} + engines: {node: '>=v14'} + dev: true + + /@commitlint/parse@17.7.0: + resolution: {integrity: sha512-dIvFNUMCUHqq5Abv80mIEjLVfw8QNuA4DS7OWip4pcK/3h5wggmjVnlwGCDvDChkw2TjK1K6O+tAEV78oxjxag==} + engines: {node: '>=v14'} dependencies: - '@blueprintjs/core': 4.18.0(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) - '@blueprintjs/popover2': 1.14.1(@types/react@18.2.6)(react-dom@16.14.0)(react@16.14.0) - '@types/react': 18.2.6 - classnames: 2.3.2 - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) - tslib: 2.5.0 + '@commitlint/types': 17.4.4 + conventional-changelog-angular: 6.0.0 + conventional-commits-parser: 4.0.0 dev: true - /@chevrotain/cst-dts-gen@10.1.2: - resolution: {integrity: sha512-E/XrL0QlzExycPzwhOEZGVOheJ/Clr5uNv3oCds88MiNqEmg3UU1iauZk7DhjsUo3jgEW4lf0I5HRl7/HC5ZkQ==} + /@commitlint/read@17.5.1: + resolution: {integrity: sha512-7IhfvEvB//p9aYW09YVclHbdf1u7g7QhxeYW9ZHSO8Huzp8Rz7m05aCO1mFG7G8M+7yfFnXB5xOmG18brqQIBg==} + engines: {node: '>=v14'} dependencies: - '@chevrotain/gast': 10.1.2 - '@chevrotain/types': 10.1.2 - lodash: 4.17.21 + '@commitlint/top-level': 17.4.0 + '@commitlint/types': 17.4.4 + fs-extra: 11.1.1 + git-raw-commits: 2.0.11 + minimist: 1.2.8 dev: true - /@chevrotain/gast@10.1.2: - resolution: {integrity: sha512-er+TcxUOMuGOPoiOq8CJsRm92zGE4YPIYtyxJfxoVwVgtj4AMrPNCmrHvYaK/bsbt2DaDuFdcbbAfM9bcBXW6Q==} + /@commitlint/resolve-extends@17.6.7: + resolution: {integrity: sha512-PfeoAwLHtbOaC9bGn/FADN156CqkFz6ZKiVDMjuC2N5N0740Ke56rKU7Wxdwya8R8xzLK9vZzHgNbuGhaOVKIg==} + engines: {node: '>=v14'} dependencies: - '@chevrotain/types': 10.1.2 - lodash: 4.17.21 + '@commitlint/config-validator': 17.6.7 + '@commitlint/types': 17.4.4 + import-fresh: 3.3.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + resolve-global: 1.0.0 dev: true - /@chevrotain/types@10.1.2: - resolution: {integrity: sha512-4qF9SmmWKv8AIG/3d+71VFuqLumNCQTP5GoL0CW6x7Ay2OdXm6FUgWFLTMneGUjYUk2C+MSCf7etQfdq3LEr1A==} + /@commitlint/rules@17.7.0: + resolution: {integrity: sha512-J3qTh0+ilUE5folSaoK91ByOb8XeQjiGcdIdiB/8UT1/Rd1itKo0ju/eQVGyFzgTMYt8HrDJnGTmNWwcMR1rmA==} + engines: {node: '>=v14'} + dependencies: + '@commitlint/ensure': 17.6.7 + '@commitlint/message': 17.4.2 + '@commitlint/to-lines': 17.4.0 + '@commitlint/types': 17.4.4 + execa: 5.1.1 dev: true - /@chevrotain/utils@10.1.2: - resolution: {integrity: sha512-bbZIpW6fdyf7FMaeDmw3cBbkTqsecxEkwlVKgVfqqXWBPLH6azxhPA2V9F7OhoZSVrsnMYw7QuyK6qutXPjEew==} + /@commitlint/to-lines@17.4.0: + resolution: {integrity: sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg==} + engines: {node: '>=v14'} dev: true - /@codeceptjs/configure@0.8.0: - resolution: {integrity: sha512-fwB44Ww1/dVX5l0ZKL8/bDcAcmgTMqKDMr3hNTItyKeD0kcoLIEQWHGlVpgkZzCrRzmgMnywAuOA7t7AWxcvGw==} + /@commitlint/top-level@17.4.0: + resolution: {integrity: sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g==} + engines: {node: '>=v14'} dependencies: - lodash.merge: 4.6.2 - lodash.mergewith: 4.6.2 + find-up: 5.0.0 dev: true - /@codeceptjs/helper@1.0.2: - resolution: {integrity: sha512-QKuyw4cGVa78YYj+g02RXitcUYpV4qKjZDHxfCIH2w8lJIr1FQohRD3o/MpcqEnvp475HQJN/OyWhdUBstJupA==} + /@commitlint/types@17.4.4: + resolution: {integrity: sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ==} + engines: {node: '>=v14'} + dependencies: + chalk: 4.1.2 dev: true /@cspotcode/source-map-support@0.8.1: @@ -831,38 +1421,34 @@ packages: - supports-color dev: true - /@emotion/babel-plugin@11.10.5(@babel/core@7.20.2): - resolution: {integrity: sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA==} - peerDependencies: - '@babel/core': ^7.0.0 + /@emotion/babel-plugin@11.11.0: + resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: - '@babel/core': 7.20.2 '@babel/helper-module-imports': 7.18.6 - '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.20.2) '@babel/runtime': 7.20.1 - '@emotion/hash': 0.9.0 - '@emotion/memoize': 0.8.0 - '@emotion/serialize': 1.1.1 + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/serialize': 1.1.2 babel-plugin-macros: 3.1.0 convert-source-map: 1.9.0 escape-string-regexp: 4.0.0 find-root: 1.1.0 source-map: 0.5.7 - stylis: 4.1.3 + stylis: 4.2.0 dev: true - /@emotion/cache@11.10.5: - resolution: {integrity: sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==} + /@emotion/cache@11.11.0: + resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} dependencies: - '@emotion/memoize': 0.8.0 - '@emotion/sheet': 1.2.1 - '@emotion/utils': 1.2.0 - '@emotion/weak-memoize': 0.3.0 - stylis: 4.1.3 + '@emotion/memoize': 0.8.1 + '@emotion/sheet': 1.2.2 + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + stylis: 4.2.0 dev: true - /@emotion/eslint-plugin@11.10.0(eslint@8.40.0): - resolution: {integrity: sha512-nWpuoQQrzI9aM9fgn+Pbb0pOau4BhheXyVqHcOYKFq46uSuSR2ivZaDwwCJKI6ScA8Pm7OcoOpwdRH2iisf9cg==} + /@emotion/eslint-plugin@11.11.0(eslint@8.40.0): + resolution: {integrity: sha512-jCOYqU/0Sqm+g+6D7QuIlG99q8YAF0T7BP98zQF/MPZKfbcm46z5mizXn0YlhZ9AYZfNtZ1DeODXdncYxZzR4Q==} engines: {node: '>=6'} peerDependencies: eslint: 6 || 7 || 8 @@ -870,102 +1456,144 @@ packages: eslint: 8.40.0 dev: true - /@emotion/hash@0.9.0: - resolution: {integrity: sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==} + /@emotion/hash@0.9.1: + resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} dev: true - /@emotion/is-prop-valid@1.2.0: - resolution: {integrity: sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==} + /@emotion/is-prop-valid@1.2.1: + resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} dependencies: - '@emotion/memoize': 0.8.0 + '@emotion/memoize': 0.8.1 dev: true - /@emotion/memoize@0.8.0: - resolution: {integrity: sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==} + /@emotion/memoize@0.8.1: + resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} dev: true - /@emotion/react@11.10.5(@babel/core@7.20.2)(@types/react@18.2.6)(react@16.14.0): - resolution: {integrity: sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A==} + /@emotion/react@11.11.1(@types/react@17.0.53)(react@16.14.0): + resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: - '@babel/core': ^7.0.0 '@types/react': '*' react: '>=16.8.0' peerDependenciesMeta: - '@babel/core': - optional: true '@types/react': optional: true dependencies: - '@babel/core': 7.20.2 '@babel/runtime': 7.20.1 - '@emotion/babel-plugin': 11.10.5(@babel/core@7.20.2) - '@emotion/cache': 11.10.5 - '@emotion/serialize': 1.1.1 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.0(react@16.14.0) - '@emotion/utils': 1.2.0 - '@emotion/weak-memoize': 0.3.0 - '@types/react': 18.2.6 + '@emotion/babel-plugin': 11.11.0 + '@emotion/cache': 11.11.0 + '@emotion/serialize': 1.1.2 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@16.14.0) + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + '@types/react': 17.0.53 hoist-non-react-statics: 3.3.2 react: 16.14.0 dev: true - /@emotion/serialize@1.1.1: - resolution: {integrity: sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==} + /@emotion/react@11.11.1(@types/react@17.0.53)(react@17.0.2): + resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} + peerDependencies: + '@types/react': '*' + react: '>=16.8.0' + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.20.1 + '@emotion/babel-plugin': 11.11.0 + '@emotion/cache': 11.11.0 + '@emotion/serialize': 1.1.2 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@17.0.2) + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + '@types/react': 17.0.53 + hoist-non-react-statics: 3.3.2 + react: 17.0.2 + dev: true + + /@emotion/serialize@1.1.2: + resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} dependencies: - '@emotion/hash': 0.9.0 - '@emotion/memoize': 0.8.0 - '@emotion/unitless': 0.8.0 - '@emotion/utils': 1.2.0 + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/unitless': 0.8.1 + '@emotion/utils': 1.2.1 csstype: 3.1.1 dev: true - /@emotion/sheet@1.2.1: - resolution: {integrity: sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA==} + /@emotion/sheet@1.2.2: + resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} dev: true - /@emotion/styled@11.10.5(@babel/core@7.20.2)(@emotion/react@11.10.5)(@types/react@18.2.6)(react@16.14.0): - resolution: {integrity: sha512-8EP6dD7dMkdku2foLoruPCNkRevzdcBaY6q0l0OsbyJK+x8D9HWjX27ARiSIKNF634hY9Zdoedh8bJCiva8yZw==} + /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@17.0.53)(react@16.14.0): + resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} peerDependencies: - '@babel/core': ^7.0.0 '@emotion/react': ^11.0.0-rc.0 '@types/react': '*' react: '>=16.8.0' peerDependenciesMeta: - '@babel/core': - optional: true '@types/react': optional: true dependencies: - '@babel/core': 7.20.2 '@babel/runtime': 7.20.1 - '@emotion/babel-plugin': 11.10.5(@babel/core@7.20.2) - '@emotion/is-prop-valid': 1.2.0 - '@emotion/react': 11.10.5(@babel/core@7.20.2)(@types/react@18.2.6)(react@16.14.0) - '@emotion/serialize': 1.1.1 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.0(react@16.14.0) - '@emotion/utils': 1.2.0 - '@types/react': 18.2.6 + '@emotion/babel-plugin': 11.11.0 + '@emotion/is-prop-valid': 1.2.1 + '@emotion/react': 11.11.1(@types/react@17.0.53)(react@16.14.0) + '@emotion/serialize': 1.1.2 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@16.14.0) + '@emotion/utils': 1.2.1 + '@types/react': 17.0.53 react: 16.14.0 dev: true - /@emotion/unitless@0.8.0: - resolution: {integrity: sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==} + /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@17.0.53)(react@17.0.2): + resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} + peerDependencies: + '@emotion/react': ^11.0.0-rc.0 + '@types/react': '*' + react: '>=16.8.0' + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.20.1 + '@emotion/babel-plugin': 11.11.0 + '@emotion/is-prop-valid': 1.2.1 + '@emotion/react': 11.11.1(@types/react@17.0.53)(react@17.0.2) + '@emotion/serialize': 1.1.2 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@17.0.2) + '@emotion/utils': 1.2.1 + '@types/react': 17.0.53 + react: 17.0.2 + dev: true + + /@emotion/unitless@0.8.1: + resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} dev: true - /@emotion/use-insertion-effect-with-fallbacks@1.0.0(react@16.14.0): - resolution: {integrity: sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==} + /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@16.14.0): + resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} peerDependencies: react: '>=16.8.0' dependencies: react: 16.14.0 dev: true - /@emotion/utils@1.2.0: - resolution: {integrity: sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==} + /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@17.0.2): + resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 17.0.2 + dev: true + + /@emotion/utils@1.2.1: + resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} dev: true - /@emotion/weak-memoize@0.3.0: - resolution: {integrity: sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==} + /@emotion/weak-memoize@0.3.1: + resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} dev: true /@eslint-community/eslint-utils@4.4.0(eslint@8.40.0): @@ -1047,6 +1675,18 @@ packages: warning: 4.0.3 dev: true + /@hypnosphi/create-react-context@0.3.1(prop-types@15.8.1)(react@17.0.2): + resolution: {integrity: sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==} + peerDependencies: + prop-types: ^15.0.0 + react: '>=0.14.0' + dependencies: + gud: 1.0.0 + prop-types: 15.8.1 + react: 17.0.2 + warning: 4.0.3 + dev: true + /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -1146,13 +1786,6 @@ packages: jest-mock: 29.5.0 dev: true - /@jest/expect-utils@29.4.3: - resolution: {integrity: sha512-/6JWbkxHOP8EoS8jeeTd9dTfc9Uawi+43oLKHfp6zzux3U2hqOOVnV3ai4RpDYHOccL6g+5nrxpoc8DmJxtXVQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.4.3 - dev: true - /@jest/expect-utils@29.5.0: resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1397,6 +2030,10 @@ packages: fastq: 1.11.1 dev: true + /@paneron/libmmel@0.1.3: + resolution: {integrity: sha512-BmpcuqowAj4DubcPZ76xqi70xOiJtIMs/XakgvM3lpQWaeFj0avRpGJX1Lcag2R/FZnWlxm1AwYVsnE9FfVfVA==} + dev: true + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1413,11 +2050,7 @@ packages: open: 8.4.0 picocolors: 1.0.0 tiny-glob: 0.2.9 - tslib: 2.5.0 - dev: true - - /@popperjs/core@2.11.6: - resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} + tslib: 2.6.1 dev: true /@popperjs/core@2.11.7: @@ -1434,6 +2067,16 @@ packages: react: 16.14.0 dev: true + /@react-spring/animated@9.5.2(react@17.0.2): + resolution: {integrity: sha512-oRlX+MmYLbK8IuUZR7SQUnRjXxJ4PMIZeBkBd1SUWVgVJAHMTfJzPltzm+I6p59qX+qLlklYHfnWaonQKDqLuQ==} + peerDependencies: + react: ^16.8.0 || >=17.0.0 || >=18.0.0 + dependencies: + '@react-spring/shared': 9.5.2(react@17.0.2) + '@react-spring/types': 9.5.2 + react: 17.0.2 + dev: true + /@react-spring/core@9.5.2(react@16.14.0): resolution: {integrity: sha512-UMRtFH6EfebMp/NMDGCUY5+hZFXsg9iT9hzt/iPzJSz2WMXKBjLoFZHJXcmiVOrIhzHmg1O0pFECn1Wp6pZ5Gw==} peerDependencies: @@ -1446,6 +2089,18 @@ packages: react: 16.14.0 dev: true + /@react-spring/core@9.5.2(react@17.0.2): + resolution: {integrity: sha512-UMRtFH6EfebMp/NMDGCUY5+hZFXsg9iT9hzt/iPzJSz2WMXKBjLoFZHJXcmiVOrIhzHmg1O0pFECn1Wp6pZ5Gw==} + peerDependencies: + react: ^16.8.0 || >=17.0.0 || >=18.0.0 + dependencies: + '@react-spring/animated': 9.5.2(react@17.0.2) + '@react-spring/rafz': 9.5.2 + '@react-spring/shared': 9.5.2(react@17.0.2) + '@react-spring/types': 9.5.2 + react: 17.0.2 + dev: true + /@react-spring/rafz@9.5.2: resolution: {integrity: sha512-xHSRXKKBI/wDUkZGrspkOm4VlgN6lZi8Tw9Jzibp9QKf3neoof+U2mDNgklvnLaasymtUwAq9o4ZfFvQIVNgPQ==} dev: true @@ -1460,6 +2115,16 @@ packages: react: 16.14.0 dev: true + /@react-spring/shared@9.5.2(react@17.0.2): + resolution: {integrity: sha512-/OSf2sjwY4BUnjZL6xMC+H3WxOOhMUCk+yZwgdj40XuyUpk6E6tYyiPeD9Yq5GLsZHodkvE1syVMRVReL4ndAg==} + peerDependencies: + react: ^16.8.0 || >=17.0.0 || >=18.0.0 + dependencies: + '@react-spring/rafz': 9.5.2 + '@react-spring/types': 9.5.2 + react: 17.0.2 + dev: true + /@react-spring/three@9.5.2(@react-three/fiber@7.0.29)(react@16.14.0)(three@0.146.0): resolution: {integrity: sha512-3H7Lv8BJZ3dajh0yJA3m9rEbqz5ZNrTCAkhVOeLqgvBlcWU5qVs4luYA1Z7H4vZnLqVtzv+kHAyg3XIpuTOXhQ==} peerDependencies: @@ -1476,6 +2141,22 @@ packages: three: 0.146.0 dev: true + /@react-spring/three@9.5.2(@react-three/fiber@7.0.29)(react@17.0.2)(three@0.146.0): + resolution: {integrity: sha512-3H7Lv8BJZ3dajh0yJA3m9rEbqz5ZNrTCAkhVOeLqgvBlcWU5qVs4luYA1Z7H4vZnLqVtzv+kHAyg3XIpuTOXhQ==} + peerDependencies: + '@react-three/fiber': '>=6.0' + react: ^16.11.0 || >=17.0.0 || >=18.0.0 + three: '>=0.126' + dependencies: + '@react-spring/animated': 9.5.2(react@17.0.2) + '@react-spring/core': 9.5.2(react@17.0.2) + '@react-spring/shared': 9.5.2(react@17.0.2) + '@react-spring/types': 9.5.2 + '@react-three/fiber': 7.0.29(react-dom@17.0.2)(react@17.0.2)(three@0.146.0) + react: 17.0.2 + three: 0.146.0 + dev: true + /@react-spring/types@9.5.2: resolution: {integrity: sha512-n/wBRSHPqTmEd4BFWY6TeR1o/UY+3ujoqMxLjqy90CcY/ozJzDRuREL3c+pxMeTF2+B7dX33dTPCtFMX51nbxg==} dev: true @@ -1513,6 +2194,39 @@ packages: zustand: 3.7.2(react@16.14.0) dev: true + /@react-three/drei@7.27.5(@react-three/fiber@7.0.29)(react-dom@17.0.2)(react@17.0.2)(three@0.146.0): + resolution: {integrity: sha512-LD0BvN+toHnyn7TV+M50+MbtVIX1PXwHX9RXRa6wgBBDFWBRXNUQb37401+vgzqYV61/JZtxd+b4kM+OYZGpkg==} + peerDependencies: + '@react-three/fiber': '>=6.0' + react: '>=17.0' + react-dom: '>=17.0' + three: '>=0.128.0' + peerDependenciesMeta: + react-dom: + optional: true + dependencies: + '@babel/runtime': 7.20.1 + '@react-spring/three': 9.5.2(@react-three/fiber@7.0.29)(react@17.0.2)(three@0.146.0) + '@react-three/fiber': 7.0.29(react-dom@17.0.2)(react@17.0.2)(three@0.146.0) + '@use-gesture/react': 10.2.18(react@17.0.2) + detect-gpu: 3.1.30 + glsl-noise: 0.0.0 + lodash.omit: 4.5.0 + lodash.pick: 4.4.0 + react: 17.0.2 + react-composer: 5.0.3(react@17.0.2) + react-dom: 17.0.2(react@17.0.2) + react-merge-refs: 1.1.0 + stats.js: 0.17.0 + three: 0.146.0 + three-mesh-bvh: 0.5.17(three@0.146.0) + three-stdlib: 2.17.3(three@0.146.0) + troika-three-text: 0.44.0(three@0.146.0) + use-asset: 1.0.4(react@17.0.2) + utility-types: 3.10.0 + zustand: 3.7.2(react@17.0.2) + dev: true + /@react-three/fiber@7.0.29(react-dom@16.14.0)(react@16.14.0)(three@0.146.0): resolution: {integrity: sha512-TE+/iaGrjluGsPwN2RkLXxKD4ak+unsh0YKIFKGcuAOW9jYcAyMGKAtgFO8MS7/HNCrZZQQSg23sJ8IPgtdkDg==} peerDependencies: @@ -1539,8 +2253,34 @@ packages: zustand: 3.7.2(react@16.14.0) dev: true - /@riboseinc/isogit-lfs@0.1.6(@aws-crypto/sha256-universal@2.0.2)(isomorphic-git@1.23.0): - resolution: {integrity: sha512-LX/FQZTUXIrAR+loZFWHYND5g41KTrS5yZukqDvMgQK3nOnkeLAwtcrb3Lysjg2VwNXQN3KSVD6UeuGr1FlnxA==} + /@react-three/fiber@7.0.29(react-dom@17.0.2)(react@17.0.2)(three@0.146.0): + resolution: {integrity: sha512-TE+/iaGrjluGsPwN2RkLXxKD4ak+unsh0YKIFKGcuAOW9jYcAyMGKAtgFO8MS7/HNCrZZQQSg23sJ8IPgtdkDg==} + peerDependencies: + react: '>=17.0' + react-dom: '>=17.0' + three: '>=0.133' + peerDependenciesMeta: + react-dom: + optional: true + dependencies: + '@babel/runtime': 7.20.1 + '@types/react-reconciler': 0.26.7 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-merge-refs: 1.1.0 + react-reconciler: 0.26.2(react@17.0.2) + react-three-fiber: 0.0.0-deprecated + react-use-measure: 2.1.1(react-dom@17.0.2)(react@17.0.2) + resize-observer-polyfill: 1.5.1 + scheduler: 0.20.2 + three: 0.146.0 + use-asset: 1.0.4(react@17.0.2) + utility-types: 3.10.0 + zustand: 3.7.2(react@17.0.2) + dev: true + + /@riboseinc/isogit-lfs@0.2.0(@aws-crypto/sha256-universal@2.0.2)(isomorphic-git@1.23.0): + resolution: {integrity: sha512-g+CCScF6x1le+S5zD4gp35clc/wxQMq3eOrMgppsLV51SP/TikHOpT2p50mPSoXN4/u2ZMIdPeJucHXNBBsKzw==} peerDependencies: '@aws-crypto/sha256-universal': ^2.0.0 isomorphic-git: ^1.7.8 @@ -1549,16 +2289,30 @@ packages: isomorphic-git: 1.23.0 dev: true - /@riboseinc/paneron-extension-glossarist@2.0.7: - resolution: {integrity: sha512-mj/HTmXG5J7h5OQIWQT1wbljkb0PWcuBn13QOraaTo9WAjFl5vv2wG+R5Tm9sP6PGMEFjYt4jq8LEe7M1Zczow==} + /@riboseinc/paneron-extension-glossarist@2.0.11: + resolution: {integrity: sha512-0LT2Mnj1U7Tzcl6RIKVOlpT5tSBzDwvh+rIm6+vBU3Egps9poLk9XW0yEFLHTPbAF2lVosKeRnO1hKi8448Rqw==} + dev: true + + /@riboseinc/paneron-extension-kit@2.1.0(@riboseinc/isogit-lfs@0.2.0): + resolution: {integrity: sha512-Hi7cyo4k+NNQ+tZVxWqfvfKJUvV5yFlK/mUfcCrhKhDpqrfZhGv1QKXm1QLfQJmzj/B+ztCSEXJmGDkRwyncpg==} + peerDependencies: + '@riboseinc/isogit-lfs': 0.2.0 + dependencies: + '@riboseinc/isogit-lfs': 0.2.0(@aws-crypto/sha256-universal@2.0.2)(isomorphic-git@1.23.0) dev: true - /@riboseinc/paneron-extension-kit@2.0.7(@riboseinc/isogit-lfs@0.1.6): - resolution: {integrity: sha512-q1aSeaN+lA72TiARINQRS2ugjMsbwx3Shf227ZuW46ShJ/I0ZkPvsUgIw5L17/JgVzpCzvT/q7NhL50VEPzpYQ==} + /@riboseinc/paneron-extension-kit@2.2.0(@paneron/libmmel@0.1.3)(@riboseinc/isogit-lfs@0.2.0)(immer@10.0.2)(react-helmet@6.1.0): + resolution: {integrity: sha512-fYbejKKb//Nyp9DK01bwqPSH5MCNUZJxZZ7t2fZkpveU8WE7IX+GGt+amKLaaDDGmDvh1ePQhHX1cXD7dJGOag==} peerDependencies: - '@riboseinc/isogit-lfs': 0.1.6 + '@paneron/libmmel': ~0.1.3 + '@riboseinc/isogit-lfs': 0.2.0 + immer: ^9.0.2 + react-helmet: ^6.1.0 dependencies: - '@riboseinc/isogit-lfs': 0.1.6(@aws-crypto/sha256-universal@2.0.2)(isomorphic-git@1.23.0) + '@paneron/libmmel': 0.1.3 + '@riboseinc/isogit-lfs': 0.2.0(@aws-crypto/sha256-universal@2.0.2)(isomorphic-git@1.23.0) + immer: 10.0.2 + react-helmet: 6.1.0(react@17.0.2) dev: true /@sideway/address@4.1.4: @@ -1608,7 +2362,48 @@ packages: optional: true dependencies: '@mole-inc/bin-wrapper': 8.0.1 - '@swc/core': 1.3.58(@swc/helpers@0.5.1) + '@swc/core': 1.3.58 + commander: 7.2.0 + fast-glob: 3.2.12 + semver: 7.3.8 + slash: 3.0.0 + source-map: 0.7.4 + dev: true + + /@swc/cli@0.1.62(@swc/core@1.3.68): + resolution: {integrity: sha512-kOFLjKY3XH1DWLfXL1/B5MizeNorHR8wHKEi92S/Zi9Md/AK17KSqR8MgyRJ6C1fhKHvbBCl8wboyKAFXStkYw==} + engines: {node: '>= 12.13'} + hasBin: true + peerDependencies: + '@swc/core': ^1.2.66 + chokidar: ^3.5.1 + peerDependenciesMeta: + chokidar: + optional: true + dependencies: + '@mole-inc/bin-wrapper': 8.0.1 + '@swc/core': 1.3.68(@swc/helpers@0.5.1) + commander: 7.2.0 + fast-glob: 3.2.12 + semver: 7.3.8 + slash: 3.0.0 + source-map: 0.7.4 + dev: true + + /@swc/cli@0.1.62(@swc/core@1.3.68)(chokidar@3.5.3): + resolution: {integrity: sha512-kOFLjKY3XH1DWLfXL1/B5MizeNorHR8wHKEi92S/Zi9Md/AK17KSqR8MgyRJ6C1fhKHvbBCl8wboyKAFXStkYw==} + engines: {node: '>= 12.13'} + hasBin: true + peerDependencies: + '@swc/core': ^1.2.66 + chokidar: ^3.5.1 + peerDependenciesMeta: + chokidar: + optional: true + dependencies: + '@mole-inc/bin-wrapper': 8.0.1 + '@swc/core': 1.3.68(@swc/helpers@0.5.1) + chokidar: 3.5.3 commander: 7.2.0 fast-glob: 3.2.12 semver: 7.3.8 @@ -1625,6 +2420,15 @@ packages: dev: true optional: true + /@swc/core-darwin-arm64@1.3.68: + resolution: {integrity: sha512-Z5pNxeuP2NxpOHTzDQkJs0wAPLnTlglZnR3WjObijwvdwT/kw1Y5EPDKM/BVSIeG40SPMkDLBbI0aj0qyXzrBA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@swc/core-darwin-x64@1.3.58: resolution: {integrity: sha512-XUdKXRIu8S7N5kmrtd0Nxf3uPIgZhQbgVHPhkvYH+Qwb+uXsdltKPiRwhvLI9M0yF3fvIrKtGJ8qUJdH5ih4zw==} engines: {node: '>=10'} @@ -1634,17 +2438,53 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.58: - resolution: {integrity: sha512-9M3/5RzjCXnz94a1kxb+0eBzqyZkxzeYTMmvcjIJSy7MVvWNuy0wHuh+x96X/6197g40P9LkzAiZ7q0DvxSPQQ==} + /@swc/core-darwin-x64@1.3.68: + resolution: {integrity: sha512-ZHl42g6yXhfX4PzAQ0BNvBXpt/OcbAHfubWRN6eXELK3fiNnxL7QBW1if7iizlq6iA+Mj1pwHyyUit1pz0+fgA==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm-gnueabihf@1.3.58: + resolution: {integrity: sha512-9M3/5RzjCXnz94a1kxb+0eBzqyZkxzeYTMmvcjIJSy7MVvWNuy0wHuh+x96X/6197g40P9LkzAiZ7q0DvxSPQQ==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm-gnueabihf@1.3.68: + resolution: {integrity: sha512-Mk8f6KCOQ2CNAR4PtWajIjS6XKSSR7ZYDOCf1GXRxhS3qEyQH7V8elWvqWYqHcT4foO60NUmxA/NOM/dQrdO1A==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-gnu@1.3.58: + resolution: {integrity: sha512-hRjJIJdnYUAZlUi9ACCrsfS/hSFP4MmZRaUVOlQOif578Rw4kQlxsxFd1Rh1bhzUCid0KyZOyCvRzHSD/2ONgw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-gnu@1.3.68: + resolution: {integrity: sha512-RhBllggh9t9sIxaRgRcGrVaS7fDk6KsIqR6b9+dwU5OyDr4ZyHWw1ZaH/1/HAebuXYhNBjoNUiRtca6lKRIPgQ==} engines: {node: '>=10'} - cpu: [arm] + cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@swc/core-linux-arm64-gnu@1.3.58: - resolution: {integrity: sha512-hRjJIJdnYUAZlUi9ACCrsfS/hSFP4MmZRaUVOlQOif578Rw4kQlxsxFd1Rh1bhzUCid0KyZOyCvRzHSD/2ONgw==} + /@swc/core-linux-arm64-musl@1.3.58: + resolution: {integrity: sha512-3wrqZbRhbTKtxcQebMAMGKtyypL6BQU0OwqzAk4dBIgm9GaH45xu7sH2OekfHMp3vuj4uWuere+tYtr9HU7xcQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1652,8 +2492,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl@1.3.58: - resolution: {integrity: sha512-3wrqZbRhbTKtxcQebMAMGKtyypL6BQU0OwqzAk4dBIgm9GaH45xu7sH2OekfHMp3vuj4uWuere+tYtr9HU7xcQ==} + /@swc/core-linux-arm64-musl@1.3.68: + resolution: {integrity: sha512-8K3zjU+tFgn6yGDEeD343gkKaHU9dhz77NiVkI1VzwRaT/Ag5pwl5eMQ1yStm8koNFzn3zq6rGjHfI5g2yI5Wg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1670,6 +2510,15 @@ packages: dev: true optional: true + /@swc/core-linux-x64-gnu@1.3.68: + resolution: {integrity: sha512-4xAnvsBOyeTL0AB8GWlRKDM/hsysJ5jr5qvdKKI3rZfJgnnxl/xSX6TJKPsJ8gygfUJ3BmfCbmUmEyeDZ3YPvA==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-linux-x64-musl@1.3.58: resolution: {integrity: sha512-xPwxgPLxSWXsK9Yf792SsUmLKISdShAI9o/Kk6jjv0r7PRBS25hZ5FyOjAb/rMbAzDcmyGKHevKc3TMUPSMjwg==} engines: {node: '>=10'} @@ -1679,6 +2528,15 @@ packages: dev: true optional: true + /@swc/core-linux-x64-musl@1.3.68: + resolution: {integrity: sha512-RCpaBo1fcpy1EFdjF+I7N4lfzOaHXVV0iMw/ABM+0PD6tp3V/9pxsguaZyeAHyEiUlDA6PZ4TfXv5zfnXEgW4Q==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-win32-arm64-msvc@1.3.58: resolution: {integrity: sha512-HW61trwkYGiaFprc+fJay6IKJ3scdquSdJaXsyumGF+jc/5kokQzNfY+JH6RWpk0/8zHnUWI4e+iNGuMYxYGeA==} engines: {node: '>=10'} @@ -1688,6 +2546,15 @@ packages: dev: true optional: true + /@swc/core-win32-arm64-msvc@1.3.68: + resolution: {integrity: sha512-v2WZvXrSslYEpY1nqpItyamL4DyaJinmOkXvM8Bc1LLKU5rGuvmBdjUYg/5Y+o0AUynuiWubpgHNOkBWiCvfqw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@swc/core-win32-ia32-msvc@1.3.58: resolution: {integrity: sha512-nODSJgHCY8GU6qHR9ieoxshaFD5GYGrPen/6VUvQkGwnV/yMI2Yvecgd1vLSUV4v67ZruPhIkP9OJruD+Juwhg==} engines: {node: '>=10'} @@ -1697,6 +2564,15 @@ packages: dev: true optional: true + /@swc/core-win32-ia32-msvc@1.3.68: + resolution: {integrity: sha512-HH5NJrIdzkJs+1xxprie0qSCMBeL9yeEhcC1yZTzYv8bwmabOUSdtKIqS55iYP/2hLWn9CTbvKPmLOIhCopW3Q==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@swc/core-win32-x64-msvc@1.3.58: resolution: {integrity: sha512-If/uQ3MW6Pdtah2FHhfBY2xBdBXBJzOusXpFQAkwNbaxnrJgpqIIxpYphwsJMDQp6ooSS3U90YizW7mJNxb6UA==} engines: {node: '>=10'} @@ -1706,7 +2582,16 @@ packages: dev: true optional: true - /@swc/core@1.3.58(@swc/helpers@0.5.1): + /@swc/core-win32-x64-msvc@1.3.68: + resolution: {integrity: sha512-9HZVtLQUgK8r/yXQdwe0VBexbIcrY6+fBROhs7AAPWdewpaUeLkwQEJk6TbYr9CQuHw26FFGg6SjwAiqXF+kgQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core@1.3.58: resolution: {integrity: sha512-tSDcHXMBQIo2ohQ/0ryZnUA+0mBrVhe49+cR+QsFru+XEhCok1BLqdE6cZ2a+sgZ1I+Dmw8aTxYm8Ox64PSKPQ==} engines: {node: '>=10'} requiresBuild: true @@ -1715,8 +2600,6 @@ packages: peerDependenciesMeta: '@swc/helpers': optional: true - dependencies: - '@swc/helpers': 0.5.1 optionalDependencies: '@swc/core-darwin-arm64': 1.3.58 '@swc/core-darwin-x64': 1.3.58 @@ -1730,10 +2613,34 @@ packages: '@swc/core-win32-x64-msvc': 1.3.58 dev: true + /@swc/core@1.3.68(@swc/helpers@0.5.1): + resolution: {integrity: sha512-njGQuJO+Wy06dEayt70cf0c/KI3HGjm4iW9LLViVLBuYNzJ4SSdNfzejludzufu6im+dsDJ0i3QjgWhAIcVHMQ==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/helpers': 0.5.1 + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.68 + '@swc/core-darwin-x64': 1.3.68 + '@swc/core-linux-arm-gnueabihf': 1.3.68 + '@swc/core-linux-arm64-gnu': 1.3.68 + '@swc/core-linux-arm64-musl': 1.3.68 + '@swc/core-linux-x64-gnu': 1.3.68 + '@swc/core-linux-x64-musl': 1.3.68 + '@swc/core-win32-arm64-msvc': 1.3.68 + '@swc/core-win32-ia32-msvc': 1.3.68 + '@swc/core-win32-x64-msvc': 1.3.68 + dev: true + /@swc/helpers@0.5.1: resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /@swc/jest@0.2.26(@swc/core@1.3.58): @@ -1743,7 +2650,18 @@ packages: '@swc/core': '*' dependencies: '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.58(@swc/helpers@0.5.1) + '@swc/core': 1.3.58 + jsonc-parser: 3.2.0 + dev: true + + /@swc/jest@0.2.26(@swc/core@1.3.68): + resolution: {integrity: sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==} + engines: {npm: '>= 7.0.0'} + peerDependencies: + '@swc/core': '*' + dependencies: + '@jest/create-cache-key-function': 27.5.1 + '@swc/core': 1.3.68(@swc/helpers@0.5.1) jsonc-parser: 3.2.0 dev: true @@ -2012,7 +2930,7 @@ packages: /@types/hoist-non-react-statics@3.3.1: resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} dependencies: - '@types/react': 18.2.6 + '@types/react': 17.0.53 hoist-non-react-statics: 3.3.2 dev: true @@ -2039,8 +2957,8 @@ packages: /@types/jest@29.5.1: resolution: {integrity: sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==} dependencies: - expect: 29.4.3 - pretty-format: 29.4.3 + expect: 29.5.0 + pretty-format: 29.5.0 dev: true /@types/json-schema@7.0.11: @@ -2057,6 +2975,10 @@ packages: '@types/node': 20.2.0 dev: true + /@types/minimist@1.2.2: + resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} + dev: true + /@types/node@18.16.7: resolution: {integrity: sha512-MFg7ua/bRtnA1hYE3pVyWxGd/r7aMqjNOdHvlSsXV3n8iaeGKkOaPzpJh6/ovf4bEXWcojkeMJpTsq3mzXW4IQ==} dev: true @@ -2065,6 +2987,14 @@ packages: resolution: {integrity: sha512-3iD2jaCCziTx04uudpJKwe39QxXgSUnpxXSvRQjRvHPxFQfmfP4NXIm/NURVeNlTCc+ru4WqjYGTmpXrW9uMlw==} dev: true + /@types/node@20.4.7: + resolution: {integrity: sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==} + dev: true + + /@types/normalize-package-data@2.4.1: + resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + dev: true + /@types/offscreencanvas@2019.7.0: resolution: {integrity: sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==} dev: true @@ -2084,26 +3014,20 @@ packages: /@types/react-reconciler@0.26.7: resolution: {integrity: sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==} dependencies: - '@types/react': 18.2.6 - dev: true - - /@types/react-reconciler@0.28.2: - resolution: {integrity: sha512-8tu6lHzEgYPlfDf/J6GOQdIc+gs+S2yAqlby3zTsB3SP2svlqTYe5fwZNtZyfactP74ShooP2vvi1BOp9ZemWw==} - dependencies: - '@types/react': 18.2.6 + '@types/react': 17.0.53 dev: true /@types/react-redux@7.1.24: resolution: {integrity: sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ==} dependencies: '@types/hoist-non-react-statics': 3.3.1 - '@types/react': 18.2.6 + '@types/react': 17.0.53 hoist-non-react-statics: 3.3.2 redux: 4.2.0 dev: true - /@types/react@18.2.6: - resolution: {integrity: sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA==} + /@types/react@17.0.53: + resolution: {integrity: sha512-1yIpQR2zdYu1Z/dc1OxC+MA6GR240u3gcnP4l6mvj/PJiVaqHsQPmWttsvHsfnhfPbU2FuGmo0wSITPygjBmsw==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 @@ -2206,6 +3130,34 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin@5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.40.0)(typescript@5.1.6): + resolution: {integrity: sha512-sXtOgJNEuRU5RLwPUb1jxtToZbgvq3M6FPpY4QENxoOggK+UpTxUBpj6tD8+Qh2g46Pi9We87E+eHnUw8YcGsw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.59.6(eslint@8.40.0)(typescript@5.1.6) + '@typescript-eslint/scope-manager': 5.59.6 + '@typescript-eslint/type-utils': 5.59.6(eslint@8.40.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.6(eslint@8.40.0)(typescript@5.1.6) + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.40.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.0 + natural-compare-lite: 1.4.0 + semver: 7.3.8 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@5.59.6(eslint@8.40.0)(typescript@4.9.5): resolution: {integrity: sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2226,12 +3178,24 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@5.52.0: - resolution: {integrity: sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==} + /@typescript-eslint/parser@5.59.6(eslint@8.40.0)(typescript@5.1.6): + resolution: {integrity: sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@typescript-eslint/types': 5.52.0 - '@typescript-eslint/visitor-keys': 5.52.0 + '@typescript-eslint/scope-manager': 5.59.6 + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/typescript-estree': 5.59.6(typescript@5.1.6) + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.40.0 + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color dev: true /@typescript-eslint/scope-manager@5.59.6: @@ -2262,9 +3226,24 @@ packages: - supports-color dev: true - /@typescript-eslint/types@5.52.0: - resolution: {integrity: sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==} + /@typescript-eslint/type-utils@5.59.6(eslint@8.40.0)(typescript@5.1.6): + resolution: {integrity: sha512-A4tms2Mp5yNvLDlySF+kAThV9VTBPCvGf0Rp8nl/eoDX9Okun8byTKoj3fJ52IJitjWOk0fKPNQhXEB++eNozQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 5.59.6(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.6(eslint@8.40.0)(typescript@5.1.6) + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.40.0 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color dev: true /@typescript-eslint/types@5.59.6: @@ -2272,8 +3251,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree@5.52.0(typescript@4.9.5): - resolution: {integrity: sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==} + /@typescript-eslint/typescript-estree@5.59.6(typescript@4.9.5): + resolution: {integrity: sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2281,8 +3260,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.52.0 - '@typescript-eslint/visitor-keys': 5.52.0 + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/visitor-keys': 5.59.6 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 @@ -2293,7 +3272,7 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.59.6(typescript@4.9.5): + /@typescript-eslint/typescript-estree@5.59.6(typescript@5.1.6): resolution: {integrity: sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2308,33 +3287,33 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.52.0(eslint@8.40.0)(typescript@4.9.5): - resolution: {integrity: sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==} + /@typescript-eslint/utils@5.59.6(eslint@8.40.0)(typescript@4.9.5): + resolution: {integrity: sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.52.0 - '@typescript-eslint/types': 5.52.0 - '@typescript-eslint/typescript-estree': 5.52.0(typescript@4.9.5) + '@typescript-eslint/scope-manager': 5.59.6 + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/typescript-estree': 5.59.6(typescript@4.9.5) eslint: 8.40.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.40.0) semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@5.59.6(eslint@8.40.0)(typescript@4.9.5): + /@typescript-eslint/utils@5.59.6(eslint@8.40.0)(typescript@5.1.6): resolution: {integrity: sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2345,7 +3324,7 @@ packages: '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.59.6 '@typescript-eslint/types': 5.59.6 - '@typescript-eslint/typescript-estree': 5.59.6(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.59.6(typescript@5.1.6) eslint: 8.40.0 eslint-scope: 5.1.1 semver: 7.3.8 @@ -2354,20 +3333,12 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@5.52.0: - resolution: {integrity: sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.52.0 - eslint-visitor-keys: 3.4.1 - dev: true - /@typescript-eslint/visitor-keys@5.59.6: resolution: {integrity: sha512-zEfbFLzB9ETcEJ4HZEEsCR9HHeNku5/Qw1jSS5McYJv5BR+ftYXwFFAH5Al+xkGaZEqowMwl7uoJjQb1YSPF8Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.59.6 - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.1 dev: true /@use-gesture/core@10.2.18: @@ -2383,10 +3354,27 @@ packages: react: 16.14.0 dev: true + /@use-gesture/react@10.2.18(react@17.0.2): + resolution: {integrity: sha512-MJQ5q/huXIER3st3bsmuWA7lxcdwZd28KJoBPFPNxKFenjF47smaiCCf+dLjUBiTV0DiIYAN4pXK19KxwfnUgg==} + peerDependencies: + react: '>= 16.8.0' + dependencies: + '@use-gesture/core': 10.2.18 + react: 17.0.2 + dev: true + /@webgpu/glslang@0.0.15: resolution: {integrity: sha512-niT+Prh3Aff8Uf1MVBVUsaNjFj9rJAKDXuoHIKiQbB+6IUP/3J3JIhBNyZ7lDhytvXxw6ppgnwKZdDJ08UMj4Q==} dev: true + /JSONStream@1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + dev: true + /abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: true @@ -2425,6 +3413,15 @@ packages: uri-js: 4.4.1 dev: true + /ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + /ansi-colors@4.1.1: resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} engines: {node: '>=6'} @@ -2512,6 +3509,10 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true + /array-ify@1.0.0: + resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} + dev: true + /array-includes@3.1.6: resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} engines: {node: '>= 0.4'} @@ -2558,6 +3559,11 @@ packages: get-intrinsic: 1.1.3 dev: true + /arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + dev: true + /arrify@2.0.1: resolution: {integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==} engines: {node: '>=8'} @@ -2575,6 +3581,11 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true + /at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + dev: true + /axios@1.4.0: resolution: {integrity: sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==} dependencies: @@ -2670,6 +3681,10 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: true + /bidi-js@1.0.2: resolution: {integrity: sha512-rzSy/k7WdX5zOyeHHCOixGXbCHkyogkxPKL2r8QtzHmVQDiWCXUWa18bLdMWT9CYMLOYTjWpTHawuev2ouYJVw==} dependencies: @@ -2706,12 +3721,21 @@ packages: engines: {node: '>=8'} dev: true + /bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + /bo-selector@0.0.10: resolution: {integrity: sha512-Drm8W3MFLNhzHTXG93g8ll7wBlmiRr5C9W8R0sbsNQp/8h1IoPnzDH4dEQuJx8VaNq02io2ZfFnzKC1s64xRJg==} dev: true /boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + requiresBuild: true dev: true optional: true @@ -2771,6 +3795,13 @@ packages: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true + /buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + /cacheable-lookup@5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} @@ -2789,6 +3820,11 @@ packages: responselike: 2.0.1 dev: true + /cachedir@2.3.0: + resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} + engines: {node: '>=6'} + dev: true + /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -2805,7 +3841,16 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.5.0 + tslib: 2.6.1 + dev: true + + /camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 dev: true /camelcase@5.3.1: @@ -2826,7 +3871,7 @@ packages: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 upper-case-first: 2.0.2 dev: true @@ -2886,7 +3931,7 @@ packages: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /char-regex@1.0.2: @@ -2963,10 +4008,27 @@ packages: restore-cursor: 2.0.0 dev: true + /cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + dependencies: + restore-cursor: 3.1.0 + dev: true + + /cli-spinners@2.9.0: + resolution: {integrity: sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==} + engines: {node: '>=6'} + dev: true + /cli-width@2.2.1: resolution: {integrity: sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==} dev: true + /cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + dev: true + /cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: @@ -2990,6 +4052,11 @@ packages: mimic-response: 1.0.1 dev: true + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + dev: true + /clsx@1.2.1: resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} engines: {node: '>=6'} @@ -3085,6 +4152,37 @@ packages: engines: {node: '>= 10'} dev: true + /commitizen@4.3.0(@swc/core@1.3.68): + resolution: {integrity: sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==} + engines: {node: '>= 12'} + hasBin: true + dependencies: + cachedir: 2.3.0 + cz-conventional-changelog: 3.3.0(@swc/core@1.3.68) + dedent: 0.7.0 + detect-indent: 6.1.0 + find-node-modules: 2.1.3 + find-root: 1.1.0 + fs-extra: 9.1.0 + glob: 7.2.3 + inquirer: 8.2.5 + is-utf8: 0.2.1 + lodash: 4.17.21 + minimist: 1.2.7 + strip-bom: 4.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + + /compare-func@2.0.0: + resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + dependencies: + array-ify: 1.0.0 + dot-prop: 5.3.0 + dev: true + /concat-map@0.0.1: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true @@ -3116,7 +4214,7 @@ packages: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 upper-case: 2.0.2 dev: true @@ -3127,6 +4225,35 @@ packages: safe-buffer: 5.2.1 dev: true + /conventional-changelog-angular@6.0.0: + resolution: {integrity: sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==} + engines: {node: '>=14'} + dependencies: + compare-func: 2.0.0 + dev: true + + /conventional-changelog-conventionalcommits@6.1.0: + resolution: {integrity: sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==} + engines: {node: '>=14'} + dependencies: + compare-func: 2.0.0 + dev: true + + /conventional-commit-types@3.0.0: + resolution: {integrity: sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==} + dev: true + + /conventional-commits-parser@4.0.0: + resolution: {integrity: sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==} + engines: {node: '>=14'} + hasBin: true + dependencies: + JSONStream: 1.3.5 + is-text-path: 1.0.1 + meow: 8.1.2 + split2: 3.2.2 + dev: true + /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true @@ -3135,15 +4262,40 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true + /cosmiconfig-typescript-loader@4.4.0(@types/node@20.4.7)(cosmiconfig@8.2.0)(ts-node@10.9.1)(typescript@5.1.6): + resolution: {integrity: sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==} + engines: {node: '>=v14.21.3'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=7' + ts-node: '>=10' + typescript: '>=4' + dependencies: + '@types/node': 20.4.7 + cosmiconfig: 8.2.0 + ts-node: 10.9.1(@swc/core@1.3.68)(@types/node@20.4.7)(typescript@5.1.6) + typescript: 5.1.6 + dev: true + /cosmiconfig@7.0.1: resolution: {integrity: sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==} engines: {node: '>=10'} dependencies: - '@types/parse-json': 4.0.0 + '@types/parse-json': 4.0.0 + import-fresh: 3.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + yaml: 1.10.2 + dev: true + + /cosmiconfig@8.2.0: + resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} + engines: {node: '>=14'} + dependencies: import-fresh: 3.3.0 + js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 - yaml: 1.10.2 dev: true /crc-32@1.2.2: @@ -3188,6 +4340,23 @@ packages: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} dev: true + /cz-conventional-changelog@3.3.0(@swc/core@1.3.68): + resolution: {integrity: sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==} + engines: {node: '>= 10'} + dependencies: + chalk: 2.4.2 + commitizen: 4.3.0(@swc/core@1.3.68) + conventional-commit-types: 3.0.0 + lodash.map: 4.6.0 + longest: 2.0.1 + word-wrap: 1.2.3 + optionalDependencies: + '@commitlint/load': 17.7.1(@swc/core@1.3.68) + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + /d3-color@3.1.0: resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} engines: {node: '>=12'} @@ -3253,6 +4422,11 @@ packages: d3-transition: 3.0.1(d3-selection@3.0.0) dev: true + /dargs@7.0.0: + resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} + engines: {node: '>=8'} + dev: true + /date-fns@2.29.3: resolution: {integrity: sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==} engines: {node: '>=0.11'} @@ -3297,6 +4471,19 @@ packages: supports-color: 8.1.1 dev: true + /decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + dev: true + + /decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + dev: true + /decamelize@4.0.0: resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} engines: {node: '>=10'} @@ -3345,6 +4532,12 @@ packages: engines: {node: '>=0.10.0'} dev: true + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + dependencies: + clone: 1.0.4 + dev: true + /defer-to-connect@2.0.1: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} @@ -3368,12 +4561,22 @@ packages: engines: {node: '>=0.4.0'} dev: true + /detect-file@1.0.0: + resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} + engines: {node: '>=0.10.0'} + dev: true + /detect-gpu@3.1.30: resolution: {integrity: sha512-WUOk8imHH56AWVt6iHry69qbNEFsPjtS6qsinurfxeI3bVYQZzFk8zECTaodLxfeRad7QspDjjkJWkp5vBo8WA==} dependencies: webgl-constants: 1.1.1 dev: true + /detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: true + /detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -3381,6 +4584,7 @@ packages: /detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} + requiresBuild: true dev: true optional: true @@ -3439,7 +4643,14 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 + dev: true + + /dot-prop@5.3.0: + resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} + engines: {node: '>=8'} + dependencies: + is-obj: 2.0.0 dev: true /draco3d@1.4.3: @@ -3572,6 +4783,7 @@ packages: /es6-error@4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} + requiresBuild: true dev: true optional: true @@ -3604,7 +4816,7 @@ packages: resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} dependencies: debug: 3.2.7 - resolve: 1.22.1 + resolve: 1.22.4 transitivePeerDependencies: - supports-color dev: true @@ -3654,7 +4866,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.6(eslint@8.40.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.59.6(eslint@8.40.0)(typescript@5.1.6) debug: 3.2.7 eslint: 8.40.0 eslint-import-resolver-node: 0.3.6 @@ -3684,7 +4896,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.6(eslint@8.40.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.59.6(eslint@8.40.0)(typescript@5.1.6) array-includes: 3.1.6 array.prototype.flat: 1.3.1 debug: 2.6.9 @@ -3693,11 +4905,11 @@ packages: eslint-import-resolver-node: 0.3.6 eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.59.6)(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) has: 1.0.3 - is-core-module: 2.11.0 + is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 object.values: 1.1.6 - resolve: 1.22.1 + resolve: 1.22.4 tsconfig-paths: 3.14.1 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -3719,7 +4931,7 @@ packages: optional: true dependencies: '@typescript-eslint/eslint-plugin': 5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.40.0)(typescript@4.9.5) - '@typescript-eslint/utils': 5.52.0(eslint@8.40.0)(typescript@4.9.5) + '@typescript-eslint/utils': 5.59.6(eslint@8.40.0)(typescript@4.9.5) eslint: 8.40.0 jest: 29.5.0(@types/node@20.2.0)(ts-node@10.9.1) transitivePeerDependencies: @@ -3727,6 +4939,28 @@ packages: - typescript dev: true + /eslint-plugin-jest@27.2.1(@typescript-eslint/eslint-plugin@5.59.6)(eslint@8.40.0)(jest@29.5.0)(typescript@5.1.6): + resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^5.0.0 + eslint: ^7.0.0 || ^8.0.0 + jest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + jest: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.40.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.6(eslint@8.40.0)(typescript@5.1.6) + eslint: 8.40.0 + jest: 29.5.0(@types/node@20.4.7)(ts-node@10.9.1) + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /eslint-plugin-node@11.1.0(eslint@8.40.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} @@ -3798,31 +5032,11 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.40.0): - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.40.0 - eslint-visitor-keys: 2.1.0 - dev: true - /eslint-visitor-keys@1.3.0: resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} engines: {node: '>=4'} dev: true - /eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys@3.3.0: - resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /eslint-visitor-keys@3.4.1: resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3961,15 +5175,11 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect@29.4.3: - resolution: {integrity: sha512-uC05+Q7eXECFpgDrHdXA4k2rpMyStAYPItEDLyQDo5Ta7fVkJnNA/4zh/OIVkVVNZ1oOK1PipQoyNjuZ6sz6Dg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /expand-tilde@2.0.2: + resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} + engines: {node: '>=0.10.0'} dependencies: - '@jest/expect-utils': 29.4.3 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.4.3 - jest-message-util: 29.4.3 - jest-util: 29.4.3 + homedir-polyfill: 1.0.3 dev: true /expect@29.5.0: @@ -4128,6 +5338,13 @@ packages: to-regex-range: 5.0.1 dev: true + /find-node-modules@2.1.3: + resolution: {integrity: sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==} + dependencies: + findup-sync: 4.0.0 + merge: 2.1.1 + dev: true + /find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} dev: true @@ -4155,6 +5372,16 @@ packages: semver-regex: 4.0.5 dev: true + /findup-sync@4.0.0: + resolution: {integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==} + engines: {node: '>= 8'} + dependencies: + detect-file: 1.0.0 + is-glob: 4.0.3 + micromatch: 4.0.5 + resolve-dir: 1.0.1 + dev: true + /flat-cache@3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -4204,6 +5431,15 @@ packages: mime-types: 2.1.35 dev: true + /fs-extra@11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -4213,6 +5449,16 @@ packages: universalify: 0.1.2 dev: true + /fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + dependencies: + at-least-node: 1.0.0 + graceful-fs: 4.2.10 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -4299,6 +5545,18 @@ packages: resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} dev: true + /git-raw-commits@2.0.11: + resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} + engines: {node: '>=10'} + hasBin: true + dependencies: + dargs: 7.0.0 + lodash: 4.17.21 + meow: 8.1.2 + split2: 3.2.2 + through2: 4.0.2 + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -4382,6 +5640,42 @@ packages: dev: true optional: true + /global-dirs@0.1.1: + resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} + engines: {node: '>=4'} + dependencies: + ini: 1.3.8 + dev: true + + /global-modules@1.0.0: + resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} + engines: {node: '>=0.10.0'} + dependencies: + global-prefix: 1.0.2 + is-windows: 1.0.2 + resolve-dir: 1.0.1 + dev: true + + /global-prefix@1.0.2: + resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} + engines: {node: '>=0.10.0'} + dependencies: + expand-tilde: 2.0.2 + homedir-polyfill: 1.0.3 + ini: 1.3.8 + is-windows: 1.0.2 + which: 1.3.1 + dev: true + + /global-prefix@3.0.0: + resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} + engines: {node: '>=6'} + dependencies: + ini: 1.3.8 + kind-of: 6.0.3 + which: 1.3.1 + dev: true + /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -4397,6 +5691,7 @@ packages: /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} + requiresBuild: true dependencies: define-properties: 1.1.4 dev: true @@ -4466,6 +5761,11 @@ packages: resolution: {integrity: sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==} dev: true + /hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + dev: true + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true @@ -4514,7 +5814,7 @@ packages: resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} dependencies: capital-case: 1.0.4 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /hoist-non-react-statics@3.3.2: @@ -4523,6 +5823,24 @@ packages: react-is: 16.13.1 dev: true + /homedir-polyfill@1.0.3: + resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} + engines: {node: '>=0.10.0'} + dependencies: + parse-passwd: 1.0.0 + dev: true + + /hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + dev: true + + /hosted-git-info@4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + dependencies: + lru-cache: 6.0.0 + dev: true + /html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true @@ -4544,6 +5862,12 @@ packages: engines: {node: '>=10.17.0'} dev: true + /husky@8.0.3: + resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} + engines: {node: '>=14'} + hasBin: true + dev: true + /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -4586,6 +5910,11 @@ packages: engines: {node: '>=0.8.19'} dev: true + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -4620,6 +5949,48 @@ packages: through: 2.3.8 dev: true + /inquirer@8.2.5: + resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==} + engines: {node: '>=12.0.0'} + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 7.0.0 + dev: true + + /inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + dev: true + /internal-slot@1.0.3: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} engines: {node: '>= 0.4'} @@ -4677,6 +6048,12 @@ packages: has: 1.0.3 dev: true + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + dependencies: + has: 1.0.3 + dev: true + /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} @@ -4717,6 +6094,11 @@ packages: is-extglob: 2.1.1 dev: true + /is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -4734,6 +6116,11 @@ packages: engines: {node: '>=0.12.0'} dev: true + /is-obj@2.0.0: + resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} + engines: {node: '>=8'} + dev: true + /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} @@ -4787,17 +6174,33 @@ packages: has-symbols: 1.0.3 dev: true + /is-text-path@1.0.1: + resolution: {integrity: sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==} + engines: {node: '>=0.10.0'} + dependencies: + text-extensions: 1.9.0 + dev: true + /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} dev: true + /is-utf8@0.2.1: + resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} + dev: true + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true + /is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + dev: true + /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -4946,6 +6349,34 @@ packages: - ts-node dev: true + /jest-cli@29.5.0(@types/node@20.4.7)(ts-node@10.9.1): + resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 29.5.0(ts-node@10.9.1) + '@jest/test-result': 29.5.0 + '@jest/types': 29.5.0 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.10 + import-local: 3.1.0 + jest-config: 29.5.0(@types/node@20.4.7)(ts-node@10.9.1) + jest-util: 29.5.0 + jest-validate: 29.5.0 + prompts: 2.4.2 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node + dev: true + /jest-config@29.5.0(@types/node@20.2.0)(ts-node@10.9.1): resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4981,19 +6412,49 @@ packages: pretty-format: 29.5.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@swc/core@1.3.58)(@types/node@20.2.0)(typescript@4.9.5) + ts-node: 10.9.1(@swc/core@1.3.68)(@types/node@20.4.7)(typescript@5.1.6) transitivePeerDependencies: - supports-color dev: true - /jest-diff@29.4.3: - resolution: {integrity: sha512-YB+ocenx7FZ3T5O9lMVMeLYV4265socJKtkwgk/6YUz/VsEzYDkiMuMhWzZmxm3wDRQvayJu/PjkjjSkjoHsCA==} + /jest-config@29.5.0(@types/node@20.4.7)(ts-node@10.9.1): + resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true dependencies: + '@babel/core': 7.20.2 + '@jest/test-sequencer': 29.5.0 + '@jest/types': 29.5.0 + '@types/node': 20.4.7 + babel-jest: 29.5.0(@babel/core@7.20.2) chalk: 4.1.2 - diff-sequences: 29.4.3 + ci-info: 3.5.0 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 29.5.0 + jest-environment-node: 29.5.0 jest-get-type: 29.4.3 - pretty-format: 29.4.3 + jest-regex-util: 29.4.3 + jest-resolve: 29.5.0 + jest-runner: 29.5.0 + jest-util: 29.5.0 + jest-validate: 29.5.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.5.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.9.1(@swc/core@1.3.68)(@types/node@20.4.7)(typescript@5.1.6) + transitivePeerDependencies: + - supports-color dev: true /jest-diff@29.5.0: @@ -5065,17 +6526,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.4.3 - pretty-format: 29.5.0 - dev: true - - /jest-matcher-utils@29.4.3: - resolution: {integrity: sha512-TTciiXEONycZ03h6R6pYiZlSkvYgT0l8aa49z/DLSGYjex4orMUcafuLXYyyEDWB1RKglq00jzwY00Ei7yFNVg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.4.3 + pretty-format: 29.5.0 dev: true /jest-matcher-utils@29.5.0: @@ -5088,21 +6539,6 @@ packages: pretty-format: 29.5.0 dev: true - /jest-message-util@29.4.3: - resolution: {integrity: sha512-1Y8Zd4ZCN7o/QnWdMmT76If8LuDv23Z1DRovBj/vcSFNlGCJGoO8D1nJDw1AdyAGUk0myDLFGN5RbNeJyCRGCw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.18.6 - '@jest/types': 29.5.0 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.10 - micromatch: 4.0.5 - pretty-format: 29.4.3 - slash: 3.0.0 - stack-utils: 2.0.6 - dev: true - /jest-message-util@29.5.0: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5259,18 +6695,6 @@ packages: - supports-color dev: true - /jest-util@29.4.3: - resolution: {integrity: sha512-ToSGORAz4SSSoqxDSylWX8JzkOQR7zoBtNRsA7e+1WUX5F8jrOwaNpuh1YfJHJKDHXLHmObv5eOjejUd+/Ws+Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.5.0 - '@types/node': 20.2.0 - chalk: 4.1.2 - ci-info: 3.5.0 - graceful-fs: 4.2.10 - picomatch: 2.3.1 - dev: true - /jest-util@29.5.0: resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5339,6 +6763,26 @@ packages: - ts-node dev: true + /jest@29.5.0(@types/node@20.4.7)(ts-node@10.9.1): + resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 29.5.0(ts-node@10.9.1) + '@jest/types': 29.5.0 + import-local: 3.1.0 + jest-cli: 29.5.0(@types/node@20.4.7)(ts-node@10.9.1) + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node + dev: true + /joi@17.7.0: resolution: {integrity: sha512-1/ugc8djfn93rTE3WRKdCzGGt/EtiYKxITMO4Wiv6q5JL1gl9ePt4kBsl1S499nbosspfctIQTpYIhSmHA3WAg==} dependencies: @@ -5401,12 +6845,17 @@ packages: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: true + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true /json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + requiresBuild: true dev: true optional: true @@ -5414,7 +6863,7 @@ packages: resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} hasBin: true dependencies: - minimist: 1.2.7 + minimist: 1.2.8 dev: true /json5@2.2.3: @@ -5433,6 +6882,19 @@ packages: graceful-fs: 4.2.10 dev: true + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.10 + dev: true + + /jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + dev: true + /jsx-ast-utils@3.3.0: resolution: {integrity: sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q==} engines: {node: '>=4.0'} @@ -5447,6 +6909,11 @@ packages: json-buffer: 3.0.1 dev: true + /kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: true + /kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -5507,10 +6974,30 @@ packages: lodash: 4.17.21 dev: true + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: true + /lodash.clonedeep@4.5.0: resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} dev: true + /lodash.isfunction@3.0.9: + resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} + dev: true + + /lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + dev: true + + /lodash.kebabcase@4.1.1: + resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} + dev: true + + /lodash.map@4.6.0: + resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==} + dev: true + /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} dev: true @@ -5531,6 +7018,22 @@ packages: resolution: {integrity: sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==} dev: true + /lodash.snakecase@4.1.1: + resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + dev: true + + /lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + dev: true + + /lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + dev: true + + /lodash.upperfirst@4.3.1: + resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} + dev: true + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true @@ -5543,6 +7046,11 @@ packages: is-unicode-supported: 0.1.0 dev: true + /longest@2.0.1: + resolution: {integrity: sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==} + engines: {node: '>=0.10.0'} + dev: true + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -5559,7 +7067,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /lowercase-keys@2.0.0: @@ -5603,9 +7111,20 @@ packages: tmpl: 1.0.5 dev: true + /map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + dev: true + + /map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + dev: true + /matcher@3.0.0: resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} engines: {node: '>=10'} + requiresBuild: true dependencies: escape-string-regexp: 4.0.0 dev: true @@ -5619,6 +7138,23 @@ packages: is-buffer: 1.1.6 dev: true + /meow@8.1.2: + resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} + engines: {node: '>=10'} + dependencies: + '@types/minimist': 1.2.2 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 3.0.3 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.18.1 + yargs-parser: 20.2.4 + dev: true + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -5628,6 +7164,10 @@ packages: engines: {node: '>= 8'} dev: true + /merge@2.1.1: + resolution: {integrity: sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==} + dev: true + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -5668,6 +7208,11 @@ packages: engines: {node: '>=10'} dev: true + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -5695,14 +7240,27 @@ packages: brace-expansion: 2.0.1 dev: true + /minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + dev: true + /minimist@1.2.7: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} dev: true + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + /minimisted@2.0.1: resolution: {integrity: sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==} dependencies: - minimist: 1.2.7 + minimist: 1.2.8 dev: true /minipass@6.0.2: @@ -5792,6 +7350,10 @@ packages: resolution: {integrity: sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=} dev: true + /mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + dev: true + /nanoid@3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -5810,7 +7372,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /node-int64@0.4.0: @@ -5829,6 +7391,25 @@ packages: abbrev: 1.1.1 dev: true + /normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.4 + semver: 5.7.1 + validate-npm-package-license: 3.0.4 + dev: true + + /normalize-package-data@3.0.3: + resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} + engines: {node: '>=10'} + dependencies: + hosted-git-info: 4.1.0 + is-core-module: 2.13.0 + semver: 7.3.8 + validate-npm-package-license: 3.0.4 + dev: true + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -5973,6 +7554,21 @@ packages: word-wrap: 1.2.3 dev: true + /ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.0 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + dev: true + /os-filter-obj@2.0.0: resolution: {integrity: sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==} engines: {node: '>=4'} @@ -6036,7 +7632,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /parent-module@1.0.1: @@ -6064,18 +7660,23 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse-passwd@1.0.0: + resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} + engines: {node: '>=0.10.0'} + dev: true + /pascal-case@3.1.2: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /path-case@3.0.4: resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} dependencies: dot-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /path-exists@4.0.0: @@ -6188,15 +7789,6 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /pretty-format@29.4.3: - resolution: {integrity: sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - /pretty-format@29.5.0: resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6267,6 +7859,11 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + dev: true + /quick-lru@5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} @@ -6287,6 +7884,15 @@ packages: react: 16.14.0 dev: true + /react-composer@5.0.3(react@17.0.2): + resolution: {integrity: sha512-1uWd07EME6XZvMfapwZmc7NgCZqDemcvicRi3wMJzXsQLvZ3L7fTHVyPy1bZdnWXM4iPjYuNE+uJ41MLKeTtnA==} + peerDependencies: + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + dependencies: + prop-types: 15.8.1 + react: 17.0.2 + dev: true + /react-dom@16.14.0(react@16.14.0): resolution: {integrity: sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==} peerDependencies: @@ -6299,6 +7905,17 @@ packages: scheduler: 0.19.1 dev: true + /react-dom@17.0.2(react@17.0.2): + resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} + peerDependencies: + react: 17.0.2 + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + dev: true + /react-draggable@4.4.5(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-OMHzJdyJbYTZo4uQE393fHcqqPYsEtkjfMgvCHr6rejT+Ezn4OZbNyGH50vv+SunC1RMvwOTSWkEODQLzw1M9g==} peerDependencies: @@ -6311,6 +7928,18 @@ packages: react-dom: 16.14.0(react@16.14.0) dev: true + /react-draggable@4.4.5(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-OMHzJdyJbYTZo4uQE393fHcqqPYsEtkjfMgvCHr6rejT+Ezn4OZbNyGH50vv+SunC1RMvwOTSWkEODQLzw1M9g==} + peerDependencies: + react: '>= 16.3.0' + react-dom: '>= 16.3.0' + dependencies: + clsx: 1.2.1 + prop-types: 15.8.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + dev: true + /react-fast-compare@3.2.0: resolution: {integrity: sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==} dev: true @@ -6339,6 +7968,42 @@ packages: - react-native dev: true + /react-flow-renderer@9.6.11(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-6bZC5nk/8ezTFyK3YC6ewxiH8BvHlY/UmNlZGpSt84bb0hQyfLFGylmpOA/cmkCfRbW3/zeZh7in6Jkydb4X8Q==} + engines: {node: '>=12'} + deprecated: react-flow-renderer has been renamed to reactflow, please use this package from now on https://reactflow.dev/docs/guides/migrate-to-v11/ + peerDependencies: + react: 16 || 17 + react-dom: 16 || 17 + dependencies: + '@babel/runtime': 7.20.1 + '@types/d3': 7.4.0 + '@types/react-redux': 7.1.24 + classcat: 5.0.4 + d3-selection: 3.0.0 + d3-zoom: 3.0.0 + fast-deep-equal: 3.1.3 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-draggable: 4.4.5(react-dom@17.0.2)(react@17.0.2) + react-redux: 7.2.9(react-dom@17.0.2)(react@17.0.2) + redux: 4.2.0 + transitivePeerDependencies: + - react-native + dev: true + + /react-helmet@6.1.0(react@17.0.2): + resolution: {integrity: sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==} + peerDependencies: + react: '>=16.3.0' + dependencies: + object-assign: 4.1.1 + prop-types: 15.8.1 + react: 17.0.2 + react-fast-compare: 3.2.0 + react-side-effect: 2.1.2(react@17.0.2) + dev: true + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true @@ -6356,7 +8021,7 @@ packages: dependencies: load-script: 1.0.0 prop-types: 15.8.1 - react: 16.14.0 + react: 17.0.2 dev: true /react-merge-refs@1.1.0: @@ -6378,21 +8043,36 @@ packages: warning: 4.0.3 dev: true - /react-popper@2.3.0(@popperjs/core@2.11.6)(react-dom@16.14.0)(react@16.14.0): + /react-popper@1.3.11(react@17.0.2): + resolution: {integrity: sha512-VSA/bS+pSndSF2fiasHK/PTEEAyOpX60+H5EPAjoArr8JGm+oihu4UbrqcEBpQibJxBVCpYyjAX7abJ+7DoYVg==} + peerDependencies: + react: 0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@babel/runtime': 7.20.1 + '@hypnosphi/create-react-context': 0.3.1(prop-types@15.8.1)(react@17.0.2) + deep-equal: 1.1.1 + popper.js: 1.16.1 + prop-types: 15.8.1 + react: 17.0.2 + typed-styles: 0.0.7 + warning: 4.0.3 + dev: true + + /react-popper@2.3.0(@popperjs/core@2.11.7)(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==} peerDependencies: '@popperjs/core': ^2.0.0 react: ^16.8.0 || ^17 || ^18 react-dom: ^16.8.0 || ^17 || ^18 dependencies: - '@popperjs/core': 2.11.6 + '@popperjs/core': 2.11.7 react: 16.14.0 react-dom: 16.14.0(react@16.14.0) react-fast-compare: 3.2.0 warning: 4.0.3 dev: true - /react-popper@2.3.0(@popperjs/core@2.11.7)(react-dom@16.14.0)(react@16.14.0): + /react-popper@2.3.0(@popperjs/core@2.11.7)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==} peerDependencies: '@popperjs/core': ^2.0.0 @@ -6400,8 +8080,8 @@ packages: react-dom: ^16.8.0 || ^17 || ^18 dependencies: '@popperjs/core': 2.11.7 - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) react-fast-compare: 3.2.0 warning: 4.0.3 dev: true @@ -6418,6 +8098,18 @@ packages: scheduler: 0.20.2 dev: true + /react-reconciler@0.26.2(react@17.0.2): + resolution: {integrity: sha512-nK6kgY28HwrMNwDnMui3dvm3rCFjZrcGiuwLc5COUipBK5hWHLOxMJhSnSomirqWwjPBJKV1QcbkI0VJr7Gl1Q==} + engines: {node: '>=0.10.0'} + peerDependencies: + react: ^17.0.2 + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + dev: true + /react-redux@7.2.9(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==} peerDependencies: @@ -6440,6 +8132,36 @@ packages: react-is: 17.0.2 dev: true + /react-redux@7.2.9(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==} + peerDependencies: + react: ^16.8.3 || ^17 || ^18 + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + dependencies: + '@babel/runtime': 7.20.1 + '@types/react-redux': 7.1.24 + hoist-non-react-statics: 3.3.2 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-is: 17.0.2 + dev: true + + /react-side-effect@2.1.2(react@17.0.2): + resolution: {integrity: sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==} + peerDependencies: + react: ^16.3.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 17.0.2 + dev: true + /react-three-fiber@0.0.0-deprecated: resolution: {integrity: sha512-EblIqTAsIpkYeM8bZtC4lcpTE0A2zCEGipFB52RgcQq/q+0oryrk7Sxt+sqhIjUu6xMNEVywV8dr74lz5yWO6A==} dev: true @@ -6458,6 +8180,20 @@ packages: react-dom: 16.14.0(react@16.14.0) dev: true + /react-transition-group@4.4.5(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} + peerDependencies: + react: '>=16.6.0' + react-dom: '>=16.6.0' + dependencies: + '@babel/runtime': 7.20.1 + dom-helpers: 5.2.1 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + dev: true + /react-use-measure@2.1.1(react-dom@16.14.0)(react@16.14.0): resolution: {integrity: sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==} peerDependencies: @@ -6469,6 +8205,17 @@ packages: react-dom: 16.14.0(react@16.14.0) dev: true + /react-use-measure@2.1.1(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==} + peerDependencies: + react: '>=16.13' + react-dom: '>=16.13' + dependencies: + debounce: 1.2.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + dev: true + /react@16.14.0: resolution: {integrity: sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==} engines: {node: '>=0.10.0'} @@ -6478,6 +8225,33 @@ packages: prop-types: 15.8.1 dev: true + /react@17.0.2: + resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: true + + /read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + + /read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.1 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -6501,6 +8275,14 @@ packages: picomatch: 2.3.1 dev: true + /redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + dev: true + /redux@4.2.0: resolution: {integrity: sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==} dependencies: @@ -6569,6 +8351,14 @@ packages: resolve-from: 5.0.0 dev: true + /resolve-dir@1.0.1: + resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} + engines: {node: '>=0.10.0'} + dependencies: + expand-tilde: 2.0.2 + global-modules: 1.0.0 + dev: true + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -6579,6 +8369,13 @@ packages: engines: {node: '>=8'} dev: true + /resolve-global@1.0.0: + resolution: {integrity: sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==} + engines: {node: '>=8'} + dependencies: + global-dirs: 0.1.1 + dev: true + /resolve.exports@2.0.0: resolution: {integrity: sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==} engines: {node: '>=10'} @@ -6593,6 +8390,15 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} + hasBin: true + dependencies: + is-core-module: 2.13.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + /resolve@2.0.0-next.4: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true @@ -6622,6 +8428,14 @@ packages: signal-exit: 3.0.7 dev: true + /restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + dev: true + /retry@0.10.1: resolution: {integrity: sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==} dev: true @@ -6649,6 +8463,7 @@ packages: /roarr@2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} + requiresBuild: true dependencies: boolean: 3.2.0 detect-node: 2.1.0 @@ -6685,7 +8500,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /safe-buffer@5.2.1: @@ -6720,6 +8535,7 @@ packages: /semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + requiresBuild: true dev: true optional: true @@ -6753,17 +8569,26 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 upper-case-first: 2.0.2 dev: true /serialize-error@7.0.1: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} + requiresBuild: true dependencies: type-fest: 0.13.1 dev: true @@ -6862,7 +8687,7 @@ packages: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /sort-keys-length@1.0.1: @@ -6905,6 +8730,34 @@ packages: resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==} dev: true + /spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.13 + dev: true + + /spdx-exceptions@2.3.0: + resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} + dev: true + + /spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + dependencies: + spdx-exceptions: 2.3.0 + spdx-license-ids: 3.0.13 + dev: true + + /spdx-license-ids@3.0.13: + resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} + dev: true + + /split2@3.2.2: + resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} + dependencies: + readable-stream: 3.6.2 + dev: true + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true @@ -7045,6 +8898,13 @@ packages: engines: {node: '>=6'} dev: true + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -7063,8 +8923,8 @@ packages: peek-readable: 5.0.0 dev: true - /stylis@4.1.3: - resolution: {integrity: sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==} + /stylis@4.2.0: + resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} dev: true /sumchecker@3.0.1: @@ -7107,7 +8967,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@pkgr/utils': 2.3.1 - tslib: 2.5.0 + tslib: 2.6.1 dev: true /tapable@2.2.1: @@ -7124,6 +8984,11 @@ packages: minimatch: 3.1.2 dev: true + /text-extensions@1.9.0: + resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} + engines: {node: '>=0.10'} + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -7159,6 +9024,12 @@ packages: resolution: {integrity: sha512-1lvNfLezN6OJ9NaFAhfX4sm5e9YCzHtaRgZ1+B4C+Hv6TibRMsuBAM5/wVKzxjpYIlMymvgsHEFrrigEfXnb2A==} dev: true + /through2@4.0.2: + resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} + dependencies: + readable-stream: 3.6.2 + dev: true + /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true @@ -7210,6 +9081,11 @@ packages: hasBin: true dev: true + /trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + dev: true + /trim-repeated@2.0.0: resolution: {integrity: sha512-QUHBFTJGdOwmp0tbOG505xAgOp/YliZP/6UgafFXYZ26WT1bvQmSMJUvkeVSASuJJHbqsFbynTvkd5W8RBTipg==} engines: {node: '>=12'} @@ -7265,7 +9141,7 @@ packages: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 jest: 29.5.0(@types/node@20.2.0)(ts-node@10.9.1) - jest-util: 29.4.3 + jest-util: 29.5.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 @@ -7274,6 +9150,40 @@ packages: yargs-parser: 21.1.1 dev: true + /ts-jest@29.1.0(@babel/core@7.20.2)(jest@29.5.0)(typescript@5.1.6): + resolution: {integrity: sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + dependencies: + '@babel/core': 7.20.2 + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 29.5.0(@types/node@20.4.7)(ts-node@10.9.1) + jest-util: 29.5.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.3.8 + typescript: 5.1.6 + yargs-parser: 21.1.1 + dev: true + /ts-node@10.9.1(@swc/core@1.3.58)(@types/node@20.2.0)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -7289,7 +9199,39 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.3.58(@swc/helpers@0.5.1) + '@swc/core': 1.3.58 + '@tsconfig/node10': 1.0.8 + '@tsconfig/node12': 1.0.9 + '@tsconfig/node14': 1.0.1 + '@tsconfig/node16': 1.0.2 + '@types/node': 20.2.0 + acorn: 8.8.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /ts-node@10.9.1(@swc/core@1.3.68)(@types/node@20.2.0)(typescript@4.9.5): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@swc/core': 1.3.68(@swc/helpers@0.5.1) '@tsconfig/node10': 1.0.8 '@tsconfig/node12': 1.0.9 '@tsconfig/node14': 1.0.1 @@ -7306,11 +9248,64 @@ packages: yn: 3.1.1 dev: true + /ts-node@10.9.1(@swc/core@1.3.68)(@types/node@20.4.7)(typescript@5.1.6): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@swc/core': 1.3.68(@swc/helpers@0.5.1) + '@tsconfig/node10': 1.0.8 + '@tsconfig/node12': 1.0.9 + '@tsconfig/node14': 1.0.1 + '@tsconfig/node16': 1.0.2 + '@types/node': 20.4.7 + acorn: 8.8.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.1.6 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /ts-patch@3.0.2: + resolution: {integrity: sha512-iTg8euqiNsNM1VDfOsVIsP0bM4kAVXU38n7TGQSkky7YQX/syh6sDPIRkvSS0HjT8ZOr0pq1h+5Le6jdB3hiJQ==} + hasBin: true + dependencies: + chalk: 4.1.2 + global-prefix: 3.0.0 + minimist: 1.2.8 + resolve: 1.22.4 + semver: 7.3.8 + strip-ansi: 6.0.1 + dev: true + /tsconfig-paths@3.14.1: resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==} dependencies: '@types/json5': 0.0.29 json5: 1.0.1 + minimist: 1.2.8 + strip-bom: 3.0.0 + dev: true + + /tsconfig-paths@4.2.0: + resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} + engines: {node: '>=6'} + dependencies: + json5: 2.2.3 minimist: 1.2.7 strip-bom: 3.0.0 dev: true @@ -7323,6 +9318,10 @@ packages: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} dev: true + /tslib@2.6.1: + resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} + dev: true + /tsutils@3.21.0(typescript@4.9.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -7333,6 +9332,16 @@ packages: typescript: 4.9.5 dev: true + /tsutils@3.21.0(typescript@5.1.6): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 5.1.6 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -7348,9 +9357,15 @@ packages: /type-fest@0.13.1: resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} engines: {node: '>=10'} + requiresBuild: true dev: true optional: true + /type-fest@0.18.1: + resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} + engines: {node: '>=10'} + dev: true + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -7361,16 +9376,50 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + + /type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: true + /typed-styles@0.0.7: resolution: {integrity: sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==} dev: true + /typescript-transform-paths@3.4.6(typescript@4.9.5): + resolution: {integrity: sha512-qdgpCk9oRHkIBhznxaHAapCFapJt5e4FbFik7Y4qdqtp6VyC3smAIPoDEIkjZ2eiF7x5+QxUPYNwJAtw0thsTw==} + peerDependencies: + typescript: '>=3.6.5' + dependencies: + minimatch: 3.1.2 + typescript: 4.9.5 + dev: true + + /typescript-transform-paths@3.4.6(typescript@5.1.6): + resolution: {integrity: sha512-qdgpCk9oRHkIBhznxaHAapCFapJt5e4FbFik7Y4qdqtp6VyC3smAIPoDEIkjZ2eiF7x5+QxUPYNwJAtw0thsTw==} + peerDependencies: + typescript: '>=3.6.5' + dependencies: + minimatch: 3.1.2 + typescript: 5.1.6 + dev: true + /typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true dev: true + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -7385,6 +9434,11 @@ packages: engines: {node: '>= 4.0.0'} dev: true + /universalify@2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: true + /update-browserslist-db@1.0.10(browserslist@4.21.4): resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} hasBin: true @@ -7399,13 +9453,13 @@ packages: /upper-case-first@2.0.2: resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /upper-case@2.0.2: resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.1 dev: true /uri-js@4.4.1: @@ -7423,6 +9477,15 @@ packages: react: 16.14.0 dev: true + /use-asset@1.0.4(react@17.0.2): + resolution: {integrity: sha512-7/hqDrWa0iMnCoET9W1T07EmD4Eg/Wmoj/X8TGBc++ECRK4m5yTsjP4O6s0yagbxfqIOuUkIxe2/sA+VR2GxZA==} + peerDependencies: + react: '>=17.0' + dependencies: + fast-deep-equal: 3.1.3 + react: 17.0.2 + dev: true + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true @@ -7450,6 +9513,13 @@ packages: convert-source-map: 1.9.0 dev: true + /validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + dev: true + /walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} dependencies: @@ -7462,6 +9532,12 @@ packages: loose-envify: 1.4.0 dev: true + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + dependencies: + defaults: 1.0.4 + dev: true + /webgl-constants@1.1.1: resolution: {integrity: sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg==} dev: true @@ -7496,10 +9572,24 @@ packages: engines: {node: '>=0.10.0'} dev: true + /word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + dev: true + /workerpool@6.2.1: resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} dev: true + /wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -7634,3 +9724,15 @@ packages: dependencies: react: 16.14.0 dev: true + + /zustand@3.7.2(react@17.0.2): + resolution: {integrity: sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==} + engines: {node: '>=12.7.0'} + peerDependencies: + react: '>=16.8' + peerDependenciesMeta: + react: + optional: true + dependencies: + react: 17.0.2 + dev: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index b18b5bd9..00000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,5 +0,0 @@ -packages: - # include packages in subfolders (e.g. apps/ and packages/) - - 'packages/*' - # if required, exclude some directories - - '!**/test/**' diff --git a/packages/legacy/scripts/mac.command b/scripts/mac.command similarity index 100% rename from packages/legacy/scripts/mac.command rename to scripts/mac.command diff --git a/packages/legacy/scripts/paneron-win.bat b/scripts/paneron-win.bat similarity index 100% rename from packages/legacy/scripts/paneron-win.bat rename to scripts/paneron-win.bat diff --git a/scripts/test-dist b/scripts/test-dist new file mode 100755 index 00000000..1e2e5040 --- /dev/null +++ b/scripts/test-dist @@ -0,0 +1,87 @@ +#!/usr/bin/env bash + +ensure_files_exist() { + # Ensure these files are here: + local missing_files=() + local files_to_check=( + dist/plugin.js + ) + + for file in "${files_to_check[@]}" + do + if ! pnpm publish --no-git-checks --dry-run --json | grep -q 'path.*:.*'"$file" + then + missing_files+=("$file") + fi + done + + if [[ ${#missing_files[@]} -gt 0 ]] + then + + >&2 echo "error: ❌ The following files are missing." + for file in "${missing_files[@]}" + do + >&2 echo " $file" + done + + return 1 + else + >&2 echo "✅ The following files exist:" + for file in "${files_to_check[@]}" + do + >&2 echo " $file" + done + fi +} + +ensure_paths_resolved() { + local bad_files=() + local files_processed=0 + local bad_lines=() + + while read -r file + do + # >&2 echo "-> $file" + ((files_processed++)) + if grep -q '@/' "$file" + then + bad_files+=("$file") + bad_lines+=("$(grep '@/' "$file")") + fi + done < <(find ./dist -type f -name '*.js' -o -name '*.ts') + + if [[ ${#bad_files[@]} -gt 0 ]] + then + + >&2 echo "error: ❌ The following files have unresolved aliases." + for file in "${bad_files[@]}" + do + >&2 echo " $file" + done + + >&2 echo "error: ❌ The following lines contain unresolved aliases." + for line in "${bad_lines[@]}" + do + >&2 echo "$line" + done + + return 1 + else + >&2 echo "✅ All paths are resolved. ($files_processed files processed)" + fi +} + +main() { + if ! ( : \ + && ensure_files_exist \ + && ensure_paths_resolved \ + ) + then + >&2 echo "error: 🛑 Aborting due to above errors." + return 1 + else + >&2 echo "✅ All tests passed." + fi +} + +main "$@" diff --git a/packages/legacy/scripts/windows.bat b/scripts/windows.bat similarity index 100% rename from packages/legacy/scripts/windows.bat rename to scripts/windows.bat diff --git a/packages/legacy/src/Main.test.tsx b/src/Main.test.tsx similarity index 77% rename from packages/legacy/src/Main.test.tsx rename to src/Main.test.tsx index 5696f99b..898b4efc 100644 --- a/packages/legacy/src/Main.test.tsx +++ b/src/Main.test.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MainExtension from './Main'; +import MainExtension from '@/Main'; test('MainExtension is a function', () => { expect(MainExtension).toBeInstanceOf(Function); diff --git a/packages/legacy/src/Main.tsx b/src/Main.tsx similarity index 75% rename from packages/legacy/src/Main.tsx rename to src/Main.tsx index ffd4fb57..5b344f9b 100644 --- a/packages/legacy/src/Main.tsx +++ b/src/Main.tsx @@ -1,11 +1,14 @@ +/** @jsx jsx */ + +import { jsx } from '@emotion/react'; import { FocusStyleManager, HotkeysProvider } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import React from 'react'; import { useContext, useMemo, useState } from 'react'; -import RepositoryView from './smart/ui/app/RepoView'; -import { RepoIndex, repoIndexPath } from './smart/model/repo'; -import { LoadingScreen } from './smart/ui/common/Loading'; -import { createEmptyIndex } from './smart/utils/repo/CommonFunctions'; +import RepositoryView from '@/smart/ui/app/RepoView'; +import type { RepoIndex } from '@/smart/model/repo'; +import { repoIndexPath } from '@/smart/model/repo'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; +import { createEmptyIndex } from '@/smart/utils/repo/CommonFunctions'; const MainExtension: React.FC> = function () { const { useObjectData } = useContext(DatasetContext); diff --git a/packages/legacy/src/css/MGDButton.ts b/src/css/MGDButton.ts similarity index 92% rename from packages/legacy/src/css/MGDButton.ts rename to src/css/MGDButton.ts index 49d5885e..814fac2e 100644 --- a/packages/legacy/src/css/MGDButton.ts +++ b/src/css/MGDButton.ts @@ -3,9 +3,10 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { css, SerializedStyles } from '@emotion/react'; -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdButton: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/MGDButtonGroup.ts b/src/css/MGDButtonGroup.ts similarity index 91% rename from packages/legacy/src/css/MGDButtonGroup.ts rename to src/css/MGDButtonGroup.ts index 11563277..a91bbcdd 100644 --- a/packages/legacy/src/css/MGDButtonGroup.ts +++ b/src/css/MGDButtonGroup.ts @@ -3,7 +3,7 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; export const mgdButtonGroup: CSSProperties = { width : '100%', diff --git a/packages/legacy/src/css/MGDComponentBar.ts b/src/css/MGDComponentBar.ts similarity index 79% rename from packages/legacy/src/css/MGDComponentBar.ts rename to src/css/MGDComponentBar.ts index aff73e67..e7f315d7 100644 --- a/packages/legacy/src/css/MGDComponentBar.ts +++ b/src/css/MGDComponentBar.ts @@ -3,8 +3,8 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdComponentBar: CSSProperties = { backgroundColor : CSSROOTVARIABLES['--colour--bsi-light-teal'], diff --git a/packages/legacy/src/css/MGDContainer.ts b/src/css/MGDContainer.ts similarity index 87% rename from packages/legacy/src/css/MGDContainer.ts rename to src/css/MGDContainer.ts index 9e27ef6b..7c68b91c 100644 --- a/packages/legacy/src/css/MGDContainer.ts +++ b/src/css/MGDContainer.ts @@ -3,7 +3,7 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; export const mgdContainer: CSSProperties = { display : 'flex', diff --git a/packages/legacy/src/css/MGDDisplayPane.ts b/src/css/MGDDisplayPane.ts similarity index 87% rename from packages/legacy/src/css/MGDDisplayPane.ts rename to src/css/MGDDisplayPane.ts index fb14b8ba..56c9cc0b 100644 --- a/packages/legacy/src/css/MGDDisplayPane.ts +++ b/src/css/MGDDisplayPane.ts @@ -4,8 +4,8 @@ */ import { css } from '@emotion/react'; -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgd_display_pane = css` background-color: ${CSSROOTVARIABLES['--colour--bsi-pale-red']}; diff --git a/packages/legacy/src/css/MGDLegend.ts b/src/css/MGDLegend.ts similarity index 88% rename from packages/legacy/src/css/MGDLegend.ts rename to src/css/MGDLegend.ts index 5e67352b..847ad07b 100644 --- a/packages/legacy/src/css/MGDLegend.ts +++ b/src/css/MGDLegend.ts @@ -3,8 +3,8 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdLegend: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/MGDLegendEntry.ts b/src/css/MGDLegendEntry.ts similarity index 90% rename from packages/legacy/src/css/MGDLegendEntry.ts rename to src/css/MGDLegendEntry.ts index 873c4819..38cee08f 100644 --- a/packages/legacy/src/css/MGDLegendEntry.ts +++ b/src/css/MGDLegendEntry.ts @@ -3,8 +3,8 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdLegendEntry: CSSProperties = { display : 'flex', diff --git a/packages/legacy/src/css/MGDProcessBox.ts b/src/css/MGDProcessBox.ts similarity index 92% rename from packages/legacy/src/css/MGDProcessBox.ts rename to src/css/MGDProcessBox.ts index 0d1da6a5..150e06e9 100644 --- a/packages/legacy/src/css/MGDProcessBox.ts +++ b/src/css/MGDProcessBox.ts @@ -7,7 +7,7 @@ /** @jsxFrag React.Fragment */ import { css } from '@emotion/react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgd_process_box = css` font-weight: ${CSSROOTVARIABLES['--font-weight--regular']}; diff --git a/packages/legacy/src/css/MGDSidebar.ts b/src/css/MGDSidebar.ts similarity index 85% rename from packages/legacy/src/css/MGDSidebar.ts rename to src/css/MGDSidebar.ts index c5227bdd..2c1938f1 100644 --- a/packages/legacy/src/css/MGDSidebar.ts +++ b/src/css/MGDSidebar.ts @@ -3,8 +3,8 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdSidebar: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/MGDTabs.ts b/src/css/MGDTabs.ts similarity index 96% rename from packages/legacy/src/css/MGDTabs.ts rename to src/css/MGDTabs.ts index 62d05108..4bdd1309 100644 --- a/packages/legacy/src/css/MGDTabs.ts +++ b/src/css/MGDTabs.ts @@ -4,7 +4,7 @@ */ import { css } from '@emotion/react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/packages/legacy/src/css/components.ts b/src/css/components.ts similarity index 86% rename from packages/legacy/src/css/components.ts rename to src/css/components.ts index 37bac65c..71569ca0 100644 --- a/packages/legacy/src/css/components.ts +++ b/src/css/components.ts @@ -4,7 +4,7 @@ */ import { css } from '@emotion/react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const vertical_line = css` border-left: 2px solid ${CSSROOTVARIABLES['--colour--black']}; diff --git a/packages/legacy/src/css/form.ts b/src/css/form.ts similarity index 95% rename from packages/legacy/src/css/form.ts rename to src/css/form.ts index b319b806..330b6639 100644 --- a/packages/legacy/src/css/form.ts +++ b/src/css/form.ts @@ -4,8 +4,8 @@ */ import { css } from '@emotion/react'; -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; const normal_font_style = css` font-weight: ${CSSROOTVARIABLES['--font-weight--regular']}; diff --git a/packages/legacy/src/css/layout.ts b/src/css/layout.ts similarity index 95% rename from packages/legacy/src/css/layout.ts rename to src/css/layout.ts index 6041b525..af89c2bc 100644 --- a/packages/legacy/src/css/layout.ts +++ b/src/css/layout.ts @@ -4,8 +4,8 @@ */ import { css } from '@emotion/react'; -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const flownode_top_left_button_layout = css` position: fixed; diff --git a/packages/legacy/src/css/root.css.ts b/src/css/root.css.ts similarity index 100% rename from packages/legacy/src/css/root.css.ts rename to src/css/root.css.ts diff --git a/packages/legacy/src/css/shame.ts b/src/css/shame.ts similarity index 93% rename from packages/legacy/src/css/shame.ts rename to src/css/shame.ts index 5628713a..a75e847f 100644 --- a/packages/legacy/src/css/shame.ts +++ b/src/css/shame.ts @@ -8,8 +8,8 @@ */ import { css } from '@emotion/react'; -import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import type { CSSProperties } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const shameLabel: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/utility.ts b/src/css/utility.ts similarity index 100% rename from packages/legacy/src/css/utility.ts rename to src/css/utility.ts diff --git a/packages/legacy/src/css/visual.ts b/src/css/visual.ts similarity index 84% rename from packages/legacy/src/css/visual.ts rename to src/css/visual.ts index 748cde9d..5c467df5 100644 --- a/packages/legacy/src/css/visual.ts +++ b/src/css/visual.ts @@ -3,24 +3,27 @@ * They are migrated to TS codes (either CSSProperties or Styled) */ -import { css, SerializedStyles } from '@emotion/react'; -import { CSSProperties } from 'react'; -import { +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; +import type { CSSProperties } from 'react'; +import type { MapCoverType, - MappingResultStyles, - MappingSourceStyles, - MapSourceType, -} from '../smart/utils/map/MappingCalculator'; + MapSourceType } from '@/smart/utils/map/MappingCalculator'; import { + MappingResultStyles, + MappingSourceStyles +} from '@/smart/utils/map/MappingCalculator'; +import type { MapDiffCoverType, - MapDiffSourceType, + MapDiffSourceType } from '@/smart/utils/map/MappingDiff'; +import { MappingDiffResultStyles, MappingDiffSourceStyles, -} from '../smart/utils/map/MappingDiff'; +} from '@/smart/utils/map/MappingDiff'; import { SearchHighlightType, SearchResultStyles, -} from '../smart/utils/SearchFunctions'; +} from '@/smart/utils/SearchFunctions'; export const handleCSS: CSSProperties = { borderRadius : '5px!important', diff --git a/packages/legacy/src/formValidation.tsx b/src/formValidation.tsx similarity index 96% rename from packages/legacy/src/formValidation.tsx rename to src/formValidation.tsx index 94b7f4f6..d33a8c07 100644 --- a/packages/legacy/src/formValidation.tsx +++ b/src/formValidation.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import { - FormGroup, +import type { FormGroupProps as IFormGroupProps, - Intent, + Intent } from '@blueprintjs/core'; +import { + FormGroup } from '@blueprintjs/core'; export type Validator = (object: T) => ValidationResult; diff --git a/packages/legacy/src/lib/logger.ts b/src/lib/logger.ts similarity index 75% rename from packages/legacy/src/lib/logger.ts rename to src/lib/logger.ts index 0f03a3a6..b29f33bf 100644 --- a/packages/legacy/src/lib/logger.ts +++ b/src/lib/logger.ts @@ -1,3 +1,4 @@ export const log: (...args: unknown[]) => void = console.log; export const error: (...args: unknown[]) => void = console.error; export const debug: (...args: unknown[]) => void = console.debug; +export const warn: (...args: unknown[]) => void = console.warn; diff --git a/packages/legacy/src/lib/typeHelpers.tsx b/src/lib/typeHelpers.tsx similarity index 100% rename from packages/legacy/src/lib/typeHelpers.tsx rename to src/lib/typeHelpers.tsx diff --git a/src/migrations/initial.ts b/src/migrations/initial.ts new file mode 100644 index 00000000..0c0af19b --- /dev/null +++ b/src/migrations/initial.ts @@ -0,0 +1,10 @@ +import type { MigrationInfo } from '@riboseinc/paneron-extension-kit/types/migrations'; + +const initialMigration: MigrationInfo = { + versionAfter : '1.0.0', + migrator : async function* initialHLSMigration () { + yield {}; + }, +} + +export default initialMigration; diff --git a/packages/legacy/src/plugin.ts b/src/plugin.ts similarity index 52% rename from packages/legacy/src/plugin.ts rename to src/plugin.ts index f00e78c2..5374a865 100644 --- a/packages/legacy/src/plugin.ts +++ b/src/plugin.ts @@ -1,9 +1,11 @@ import { makeExtension } from '@riboseinc/paneron-extension-kit'; +import datasetInitializer from '@/migrations/initial' +import mainView from '@/Main'; export default makeExtension({ - mainView : () => import('./Main'), name : 'SMART', - requiredHostAppVersion : '^2.0.5', + requiredHostAppVersion : '^2.1.0', + mainView, + datasetInitializer, datasetMigrations : {}, - datasetInitializer : () => import('./migrations/initial'), }); diff --git a/packages/legacy/src/smart/MGDComponents/MGDButton.tsx b/src/smart/MGDComponents/MGDButton.tsx similarity index 93% rename from packages/legacy/src/smart/MGDComponents/MGDButton.tsx rename to src/smart/MGDComponents/MGDButton.tsx index f94b24e7..55c5bd48 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDButton.tsx +++ b/src/smart/MGDComponents/MGDButton.tsx @@ -7,7 +7,8 @@ import { jsx } from '@emotion/react'; -import { Button, IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Button } from '@blueprintjs/core'; import { mgdButton, MGDButtonSize, @@ -15,8 +16,7 @@ import { MGDButtonType, mgdButtonSize, mgd_button_type, -} from '../../css/MGDButton'; -import React from 'react'; +} from '@/css/MGDButton'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx b/src/smart/MGDComponents/MGDButtonGroup.tsx similarity index 93% rename from packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx rename to src/smart/MGDComponents/MGDButtonGroup.tsx index d3963e12..60878635 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx +++ b/src/smart/MGDComponents/MGDButtonGroup.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdButtonGroup } from '../../css/MGDButtonGroup'; +import { mgdButtonGroup } from '@/css/MGDButtonGroup'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx b/src/smart/MGDComponents/MGDComponentBar.tsx similarity index 92% rename from packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx rename to src/smart/MGDComponents/MGDComponentBar.tsx index 260b5f18..0393167c 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx +++ b/src/smart/MGDComponents/MGDComponentBar.tsx @@ -4,7 +4,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import React from 'react'; -import { mgdComponentBar } from '../../css/MGDComponentBar'; +import { mgdComponentBar } from '@/css/MGDComponentBar'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDContainer.tsx b/src/smart/MGDComponents/MGDContainer.tsx similarity index 92% rename from packages/legacy/src/smart/MGDComponents/MGDContainer.tsx rename to src/smart/MGDComponents/MGDContainer.tsx index b44c5c9c..a4d6f17a 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDContainer.tsx +++ b/src/smart/MGDComponents/MGDContainer.tsx @@ -5,7 +5,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import React from 'react'; -import { mgdContainer } from '../../css/MGDContainer'; +import { mgdContainer } from '@/css/MGDContainer'; interface OwnProps { children: React.ReactNode; diff --git a/packages/legacy/src/smart/MGDComponents/MGDDisplayPane.tsx b/src/smart/MGDComponents/MGDDisplayPane.tsx similarity index 96% rename from packages/legacy/src/smart/MGDComponents/MGDDisplayPane.tsx rename to src/smart/MGDComponents/MGDDisplayPane.tsx index b7bc57b0..d6f234be 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDDisplayPane.tsx +++ b/src/smart/MGDComponents/MGDDisplayPane.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { application2060DisplayPane, mgdDisplayPane, -} from '../../css/MGDDisplayPane'; +} from '@/css/MGDDisplayPane'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDHeading.tsx b/src/smart/MGDComponents/MGDHeading.tsx similarity index 91% rename from packages/legacy/src/smart/MGDComponents/MGDHeading.tsx rename to src/smart/MGDComponents/MGDHeading.tsx index a854d93a..480d514e 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDHeading.tsx +++ b/src/smart/MGDComponents/MGDHeading.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdHeading } from '../../css/form'; +import { mgdHeading } from '@/css/form'; interface OwnProps { children: React.ReactNode; diff --git a/packages/legacy/src/smart/MGDComponents/MGDLabel.tsx b/src/smart/MGDComponents/MGDLabel.tsx similarity index 91% rename from packages/legacy/src/smart/MGDComponents/MGDLabel.tsx rename to src/smart/MGDComponents/MGDLabel.tsx index 43e0039d..80e9a7f2 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDLabel.tsx +++ b/src/smart/MGDComponents/MGDLabel.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdLabel } from '../../css/form'; +import { mgdLabel } from '@/css/form'; interface OwnProps { children: React.ReactNode; diff --git a/packages/legacy/src/smart/MGDComponents/MGDLegend.tsx b/src/smart/MGDComponents/MGDLegend.tsx similarity index 96% rename from packages/legacy/src/smart/MGDComponents/MGDLegend.tsx rename to src/smart/MGDComponents/MGDLegend.tsx index 9df26de4..240ce160 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDLegend.tsx +++ b/src/smart/MGDComponents/MGDLegend.tsx @@ -9,7 +9,7 @@ import { mgdLegendLeft, mgdLegendNormal, mgdLegendRight, -} from '../../css/MGDLegend'; +} from '@/css/MGDLegend'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDLegendEntry.tsx b/src/smart/MGDComponents/MGDLegendEntry.tsx similarity index 96% rename from packages/legacy/src/smart/MGDComponents/MGDLegendEntry.tsx rename to src/smart/MGDComponents/MGDLegendEntry.tsx index 2e47ea60..8598f7b8 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDLegendEntry.tsx +++ b/src/smart/MGDComponents/MGDLegendEntry.tsx @@ -10,7 +10,7 @@ import { mgdLegendEntryDescription, mgdLegendEntrySample, mgdLineLegendSample, -} from '../../css/MGDLegendEntry'; +} from '@/css/MGDLegendEntry'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx b/src/smart/MGDComponents/MGDProcessBox.tsx similarity index 90% rename from packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx rename to src/smart/MGDComponents/MGDProcessBox.tsx index 4c70c1e2..9a0a7e24 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx +++ b/src/smart/MGDComponents/MGDProcessBox.tsx @@ -6,8 +6,9 @@ /** @jsx jsx */ /** @jsxFrag React.Fragment */ -import { jsx, SerializedStyles } from '@emotion/react'; -import { mgd_process_box } from '../../css/MGDProcessBox'; +import type { SerializedStyles } from '@emotion/react'; +import { jsx } from '@emotion/react'; +import { mgd_process_box } from '@/css/MGDProcessBox'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx b/src/smart/MGDComponents/MGDSidebar.tsx similarity index 92% rename from packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx rename to src/smart/MGDComponents/MGDSidebar.tsx index b9de49af..7bbb10e0 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx +++ b/src/smart/MGDComponents/MGDSidebar.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdSidebar } from '../../css/MGDSidebar'; +import { mgdSidebar } from '@/css/MGDSidebar'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx b/src/smart/MGDComponents/MGDTextarea.tsx similarity index 90% rename from packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx rename to src/smart/MGDComponents/MGDTextarea.tsx index 73dcad6d..72476b3c 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx +++ b/src/smart/MGDComponents/MGDTextarea.tsx @@ -5,8 +5,9 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import { TextArea } from '@blueprintjs/core'; -import React, { ChangeEvent } from 'react'; -import { mgdTextarea } from '../../css/form'; +import type { ChangeEvent } from 'react'; +import React from 'react'; +import { mgdTextarea } from '@/css/form'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/model/FlowContainer.ts b/src/smart/model/FlowContainer.ts similarity index 91% rename from packages/legacy/src/smart/model/FlowContainer.ts rename to src/smart/model/FlowContainer.ts index e09323fe..2e81945d 100644 --- a/packages/legacy/src/smart/model/FlowContainer.ts +++ b/src/smart/model/FlowContainer.ts @@ -4,26 +4,27 @@ * This file defines the data structure of this payload */ -import { XYPosition } from 'react-flow-renderer'; -import { MMELEdge } from '../serialize/interface/flowcontrolinterface'; -import { +import type { XYPosition } from 'react-flow-renderer'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { EditorModel, EditorNode, - getEditorRoleById, - isEditorData, - ModelType, -} from './editormodel'; -import { MMELtoFlowEntries } from './States'; + ModelType } from '@/smart/model/editormodel'; import { + getEditorRoleById, + isEditorData +} from '@/smart/model/editormodel'; +import { MMELtoFlowEntries } from '@/smart/model/States'; +import type { MMELComment, MMELFigure, MMELLink, MMELRole, MMELTable, -} from '../serialize/interface/supportinterface'; -import { SerializedStyles } from '@emotion/react'; -import React from 'react'; -import { MMELRepo, RepoIndex } from './repo'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { SerializedStyles } from '@emotion/react'; +import type React from 'react'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; export interface EdgeContainer { id: string; diff --git a/packages/legacy/src/smart/model/Measurement.ts b/src/smart/model/Measurement.ts similarity index 90% rename from packages/legacy/src/smart/model/Measurement.ts rename to src/smart/model/Measurement.ts index ab3eef9b..bc0250a5 100644 --- a/packages/legacy/src/smart/model/Measurement.ts +++ b/src/smart/model/Measurement.ts @@ -2,12 +2,12 @@ * Data structure for measurement and variables */ -import { +import type { MMELVariable, MMELView, VarType, -} from '../serialize/interface/supportinterface'; -import { EditorModel } from './editormodel'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { EditorModel } from '@/smart/model/editormodel'; export interface MTreeNode { action: string; // if data is a value, action = '' diff --git a/packages/legacy/src/smart/model/SemanticTriple.ts b/src/smart/model/SemanticTriple.ts similarity index 94% rename from packages/legacy/src/smart/model/SemanticTriple.ts rename to src/smart/model/SemanticTriple.ts index 6dc48b39..083a48ab 100644 --- a/packages/legacy/src/smart/model/SemanticTriple.ts +++ b/src/smart/model/SemanticTriple.ts @@ -2,7 +2,7 @@ * Data model for the NLP graph */ -import { Node } from 'react-flow-renderer'; +import type { Node } from 'react-flow-renderer'; export interface STNode { data: string; diff --git a/packages/legacy/src/smart/model/States.ts b/src/smart/model/States.ts similarity index 85% rename from packages/legacy/src/smart/model/States.ts rename to src/smart/model/States.ts index 3b3c8997..476cb832 100644 --- a/packages/legacy/src/smart/model/States.ts +++ b/src/smart/model/States.ts @@ -1,9 +1,9 @@ -import React from 'react'; -import { NodeProps } from 'react-flow-renderer'; -import { HistoryItem, PageHistory } from './history'; -import { ModelWrapper } from './modelwrapper'; -import { DataType } from '../serialize/interface/baseinterface'; -import { DataLinkEdge, NormalEdge, SelfLoopEdge } from '../ui/flowui/edgeUI'; +import type React from 'react'; +import type { NodeProps } from 'react-flow-renderer'; +import type { HistoryItem, PageHistory } from '@/smart/model/history'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { DataLinkEdge, NormalEdge, SelfLoopEdge } from '@/smart/ui/flowui/edgeUI'; import { ApprovalComponent, Datacube, @@ -13,9 +13,9 @@ import { SignalCatchComponent, StartComponent, TimerComponent, -} from '../ui/flowui/nodeUI'; -import { EditorModel, ModelType } from './editormodel'; -import { MMELDocument } from './document'; +} from '@/smart/ui/flowui/nodeUI'; +import type { EditorModel, ModelType } from '@/smart/model/editormodel'; +import type { MMELDocument } from '@/smart/model/document'; export interface FunModel { mw: ModelWrapper; diff --git a/packages/legacy/src/smart/model/ViewFunctionModel.ts b/src/smart/model/ViewFunctionModel.ts similarity index 78% rename from packages/legacy/src/smart/model/ViewFunctionModel.ts rename to src/smart/model/ViewFunctionModel.ts index 83ab3507..f1725d02 100644 --- a/packages/legacy/src/smart/model/ViewFunctionModel.ts +++ b/src/smart/model/ViewFunctionModel.ts @@ -1,12 +1,13 @@ -import { SerializedStyles } from '@emotion/react'; -import React from 'react'; -import { MMELDataAttribute } from '../serialize/interface/datainterface'; -import { +import type { SerializedStyles } from '@emotion/react'; +import type React from 'react'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELProvision, MMELReference, -} from '../serialize/interface/supportinterface'; -import { EditorNode } from './editormodel'; -import { LegendInterface } from './States'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { EditorNode } from '@/smart/model/editormodel'; +import type { LegendInterface } from '@/smart/model/States'; + /** * For model viewer. The common interface for different functions. diff --git a/packages/legacy/src/smart/model/changelog.ts b/src/smart/model/changelog.ts similarity index 86% rename from packages/legacy/src/smart/model/changelog.ts rename to src/smart/model/changelog.ts index fb3bff78..1e46c83d 100644 --- a/packages/legacy/src/smart/model/changelog.ts +++ b/src/smart/model/changelog.ts @@ -2,8 +2,8 @@ * The data model for change log and some utility functions for the change log */ -import { ModelAction } from './editor/model'; -import { EditorModel } from './editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; interface CommandEvent { type: 'command'; diff --git a/packages/legacy/src/smart/model/checklist.ts b/src/smart/model/checklist.ts similarity index 84% rename from packages/legacy/src/smart/model/checklist.ts rename to src/smart/model/checklist.ts index d722e812..73fb4b5b 100644 --- a/packages/legacy/src/smart/model/checklist.ts +++ b/src/smart/model/checklist.ts @@ -2,17 +2,18 @@ * The data model for checklist */ -import { MMELProvision } from '../serialize/interface/supportinterface'; -import { MMELDataAttribute } from '../serialize/interface/datainterface'; -import { ModalityType } from '../utils/constants'; -import { +import type { MMELProvision } from '@paneron/libmmel/interface/supportinterface'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { ModalityType } from '@/smart/utils/constants'; +import type { EditorApproval, EditorDataClass, EditorEGate, EditorProcess, - EditorRegistry, + EditorRegistry } from '@/smart/model/editormodel'; +import { isMMELDataAttribute, -} from './editormodel'; +} from '@/smart/model/editormodel'; export type ChecklistSetting = Record; diff --git a/packages/legacy/src/smart/model/document.ts b/src/smart/model/document.ts similarity index 94% rename from packages/legacy/src/smart/model/document.ts rename to src/smart/model/document.ts index fea23796..e555d415 100644 --- a/packages/legacy/src/smart/model/document.ts +++ b/src/smart/model/document.ts @@ -2,7 +2,7 @@ * The model for text document. Can be a document translated from XML or a regulation document */ -import { RefObject } from 'react'; +import type { RefObject } from 'react'; export interface DocStatement { id: string; diff --git a/packages/legacy/src/smart/model/editor/commands/comment.ts b/src/smart/model/editor/commands/comment.ts similarity index 91% rename from packages/legacy/src/smart/model/editor/commands/comment.ts rename to src/smart/model/editor/commands/comment.ts index 33569508..02389d8d 100644 --- a/packages/legacy/src/smart/model/editor/commands/comment.ts +++ b/src/smart/model/editor/commands/comment.ts @@ -2,8 +2,8 @@ * This file centralizes the commands generated related to comment components */ -import { MMELComment } from '../../../serialize/interface/supportinterface'; -import { ModelAction } from '../model'; +import type { MMELComment } from '@paneron/libmmel/interface/supportinterface'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Add a new comment to the model diff --git a/packages/legacy/src/smart/model/editor/commands/data.ts b/src/smart/model/editor/commands/data.ts similarity index 91% rename from packages/legacy/src/smart/model/editor/commands/data.ts rename to src/smart/model/editor/commands/data.ts index ed00e6f6..50387106 100644 --- a/packages/legacy/src/smart/model/editor/commands/data.ts +++ b/src/smart/model/editor/commands/data.ts @@ -2,10 +2,10 @@ * This file centralizes the commands generated related to registry and data class */ -import { MMELReference } from '../../../serialize/interface/supportinterface'; -import { EditorDataClass } from '../../editormodel'; -import { RegistryCombined } from '../components/element/registry'; -import { ModelAction } from '../model'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import type { EditorDataClass } from '@/smart/model/editormodel'; +import type { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Delete the registries from the model diff --git a/packages/legacy/src/smart/model/editor/commands/elements.ts b/src/smart/model/editor/commands/elements.ts similarity index 92% rename from packages/legacy/src/smart/model/editor/commands/elements.ts rename to src/smart/model/editor/commands/elements.ts index 8d612789..51211fe5 100644 --- a/packages/legacy/src/smart/model/editor/commands/elements.ts +++ b/src/smart/model/editor/commands/elements.ts @@ -2,21 +2,22 @@ * This file centralizes the commands related to node elements */ -import { MMELEdge } from '../../../serialize/interface/flowcontrolinterface'; -import { +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELLink, MMELNote, MMELProvision, MMELReference, -} from '../../../serialize/interface/supportinterface'; -import { +} from '@paneron/libmmel/interface/supportinterface'; +import type { EditorEGate, EditorModel, EditorNode, - EditorProcess, + EditorProcess } from '@/smart/model/editormodel'; +import { isEditorProcess, -} from '../../editormodel'; -import { ModelAction } from '../model'; +} from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Edit the node elements. It can include gateway, approval, process, timer / signal events. diff --git a/packages/legacy/src/smart/model/editor/commands/history.ts b/src/smart/model/editor/commands/history.ts similarity index 89% rename from packages/legacy/src/smart/model/editor/commands/history.ts rename to src/smart/model/editor/commands/history.ts index 5e374c06..95c1d05c 100644 --- a/packages/legacy/src/smart/model/editor/commands/history.ts +++ b/src/smart/model/editor/commands/history.ts @@ -2,8 +2,8 @@ * This file centralizes the commands related to page change */ -import { HistoryItem } from '../../history'; -import { HistoryAction } from '../history'; +import type { HistoryItem } from '@/smart/model/history'; +import type { HistoryAction } from '@/smart/model/editor/history'; /** * Go to a new page (subprocess) of a process on the current page diff --git a/packages/legacy/src/smart/model/editor/commands/import.ts b/src/smart/model/editor/commands/import.ts similarity index 84% rename from packages/legacy/src/smart/model/editor/commands/import.ts rename to src/smart/model/editor/commands/import.ts index 5afafdf9..d2a20c80 100644 --- a/packages/legacy/src/smart/model/editor/commands/import.ts +++ b/src/smart/model/editor/commands/import.ts @@ -2,8 +2,8 @@ * This file centralizes the commands related to import */ -import { EditorModel } from '../../editormodel'; -import { ModelAction } from '../model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Import an element from another model diff --git a/packages/legacy/src/smart/model/editor/commands/page.ts b/src/smart/model/editor/commands/page.ts similarity index 82% rename from packages/legacy/src/smart/model/editor/commands/page.ts rename to src/smart/model/editor/commands/page.ts index 693a3d24..44d359d2 100644 --- a/packages/legacy/src/smart/model/editor/commands/page.ts +++ b/src/smart/model/editor/commands/page.ts @@ -2,11 +2,12 @@ * This file centralizes the commands related to page (subprocess) */ -import { Node } from 'react-flow-renderer'; -import { createEdge } from '../../../utils/EditorFactory'; -import { findUniqueID } from '../../../utils/ModelFunctions'; -import { EditorModel, EditorSubprocess, isEditorData } from '../../editormodel'; -import { ModelAction } from '../model'; +import type { Node } from 'react-flow-renderer'; +import { createEdge } from '@/smart/utils/EditorFactory'; +import { findUniqueID } from '@/smart/utils/ModelFunctions'; +import type { EditorModel, EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorData } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Remove an edge of a subprocess (page) diff --git a/packages/legacy/src/smart/model/editor/commands/reference.ts b/src/smart/model/editor/commands/reference.ts similarity index 86% rename from packages/legacy/src/smart/model/editor/commands/reference.ts rename to src/smart/model/editor/commands/reference.ts index 7c2658de..481b6738 100644 --- a/packages/legacy/src/smart/model/editor/commands/reference.ts +++ b/src/smart/model/editor/commands/reference.ts @@ -2,8 +2,8 @@ * This file centralizes the commands related to reference */ -import { MMELReference } from '../../../serialize/interface/supportinterface'; -import { ModelAction } from '../model'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Delete references diff --git a/packages/legacy/src/smart/model/editor/commands/role.ts b/src/smart/model/editor/commands/role.ts similarity index 86% rename from packages/legacy/src/smart/model/editor/commands/role.ts rename to src/smart/model/editor/commands/role.ts index 3d58e416..5bb3583e 100644 --- a/packages/legacy/src/smart/model/editor/commands/role.ts +++ b/src/smart/model/editor/commands/role.ts @@ -2,8 +2,8 @@ * This file centralizes the commands related to roles */ -import { MMELRole } from '../../../serialize/interface/supportinterface'; -import { ModelAction } from '../model'; +import type { MMELRole } from '@paneron/libmmel/interface/supportinterface'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * Add role diff --git a/packages/legacy/src/smart/model/editor/components/comment.ts b/src/smart/model/editor/components/comment.ts similarity index 91% rename from packages/legacy/src/smart/model/editor/components/comment.ts rename to src/smart/model/editor/components/comment.ts index b45c04c7..61ae8d9a 100644 --- a/packages/legacy/src/smart/model/editor/components/comment.ts +++ b/src/smart/model/editor/components/comment.ts @@ -1,8 +1,9 @@ -import { MMELComment } from '../../../serialize/interface/supportinterface'; -import { EditorNode, EditorProcess } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import type { MMELComment } from '@paneron/libmmel/interface/supportinterface'; +import type { EditorNode, EditorProcess } from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'comment'; type ownType = MMELComment; diff --git a/packages/legacy/src/smart/model/editor/components/element/common.ts b/src/smart/model/editor/components/element/common.ts similarity index 91% rename from packages/legacy/src/smart/model/editor/components/element/common.ts rename to src/smart/model/editor/components/element/common.ts index 3381ccea..2016b01e 100644 --- a/packages/legacy/src/smart/model/editor/components/element/common.ts +++ b/src/smart/model/editor/components/element/common.ts @@ -1,6 +1,6 @@ -import { EditorNode } from '../../../editormodel'; -import { ModelAction } from '../../model'; -import { ElmAction } from '../elements'; +import type { EditorNode } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ElmAction } from '@/smart/model/editor/components/elements'; /** * Handle the command to delete elements in the model diff --git a/packages/legacy/src/smart/model/editor/components/element/dc.ts b/src/smart/model/editor/components/element/dc.ts similarity index 93% rename from packages/legacy/src/smart/model/editor/components/element/dc.ts rename to src/smart/model/editor/components/element/dc.ts index 8f50b07e..c8a4a63b 100644 --- a/packages/legacy/src/smart/model/editor/components/element/dc.ts +++ b/src/smart/model/editor/components/element/dc.ts @@ -1,12 +1,13 @@ -import { MMELSubprocess } from '../../../../serialize/interface/flowcontrolinterface'; -import { fillRDCS } from '../../../../utils/ModelFunctions'; -import { +import type { MMELSubprocess } from '@paneron/libmmel/interface/flowcontrolinterface'; +import { fillRDCS } from '@/smart/utils/ModelFunctions'; +import type { EditorDataClass, - EditorNode, + EditorNode } from '@/smart/model/editormodel'; +import { isEditorDataClass, -} from '../../../editormodel'; -import { ModelAction } from '../../model'; -import { ElmAction, DataCascadeDCID } from '../elements'; +} from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ElmAction, DataCascadeDCID } from '@/smart/model/editor/components/elements'; /** * Add a new data class diff --git a/packages/legacy/src/smart/model/editor/components/element/registry.ts b/src/smart/model/editor/components/element/registry.ts similarity index 94% rename from packages/legacy/src/smart/model/editor/components/element/registry.ts rename to src/smart/model/editor/components/element/registry.ts index c73affb5..f883ac77 100644 --- a/packages/legacy/src/smart/model/editor/components/element/registry.ts +++ b/src/smart/model/editor/components/element/registry.ts @@ -1,23 +1,24 @@ -import { DataType } from '../../../../serialize/interface/baseinterface'; -import { MMELSubprocess } from '../../../../serialize/interface/flowcontrolinterface'; -import { isRegistry } from '../../../../serialize/util/validation'; -import { createRegistry } from '../../../../utils/EditorFactory'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELSubprocess } from '@paneron/libmmel/interface/flowcontrolinterface'; +import { isRegistry } from '@paneron/libmmel/util/validation'; +import { createRegistry } from '@/smart/utils/EditorFactory'; import { fillRDCS, genDCIdByRegId, getReferenceDCTypeName, setReplace, -} from '../../../../utils/ModelFunctions'; -import { +} from '@/smart/utils/ModelFunctions'; +import type { EditorDataClass, - EditorNode, + EditorNode } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorDataClass, isEditorProcess, isEditorRegistry, -} from '../../../editormodel'; -import { ModelAction } from '../../model'; -import { ElmAction, DataCascadeIDs } from '../elements'; +} from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ElmAction, DataCascadeIDs } from '@/smart/model/editor/components/elements'; export type RegistryCombined = EditorDataClass & { title: string; diff --git a/packages/legacy/src/smart/model/editor/components/elements.ts b/src/smart/model/editor/components/elements.ts similarity index 88% rename from packages/legacy/src/smart/model/editor/components/elements.ts rename to src/smart/model/editor/components/elements.ts index 5cfa3c50..1de37bee 100644 --- a/packages/legacy/src/smart/model/editor/components/elements.ts +++ b/src/smart/model/editor/components/elements.ts @@ -1,31 +1,34 @@ import { useReducer } from 'react'; +import type { + RoleAttribute } from '@/smart/utils/handler/cascadeModelHandler'; import { refDCReplace, regElmReplace, dcElmReplace, - RoleAttribute, roleReplace, typeEnumReplace, tableReplace, figReplace, -} from '../../../utils/handler/cascadeModelHandler'; -import * as Logger from '../../../../lib/logger'; +} from '@/smart/utils/handler/cascadeModelHandler'; +import * as Logger from '@/lib/logger'; +import type { + EditorNode } from '@/smart/model/editormodel'; import { - EditorNode, isEditorDataClass, isEditorRegistry, -} from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { addCommonElms, delCommonElms, editCommonElms } from './element/common'; -import { addDC, editDC } from './element/dc'; +} from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import { addCommonElms, delCommonElms, editCommonElms } from '@/smart/model/editor/components/element/common'; +import { addDC, editDC } from '@/smart/model/editor/components/element/dc'; +import type { + RegistryCombined } from '@/smart/model/editor/components/element/registry'; import { addRegistry, delRegistry, - editRegistry, - RegistryCombined, -} from './element/registry'; -import { ItemAction } from './itemTemplate'; + editRegistry +} from '@/smart/model/editor/components/element/registry'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; interface RoleCascadeAction { subtask: 'process-role'; diff --git a/packages/legacy/src/smart/model/editor/components/enums.ts b/src/smart/model/editor/components/enums.ts similarity index 81% rename from packages/legacy/src/smart/model/editor/components/enums.ts rename to src/smart/model/editor/components/enums.ts index ba1da7c3..46d027d6 100644 --- a/packages/legacy/src/smart/model/editor/components/enums.ts +++ b/src/smart/model/editor/components/enums.ts @@ -1,8 +1,10 @@ -import { MMELEnum } from '../../../serialize/interface/datainterface'; -import { EditorNode, isEditorDataClass } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import type { MMELEnum } from '@paneron/libmmel/interface/datainterface'; +import type { EditorNode } from '@/smart/model/editormodel'; +import { isEditorDataClass } from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'enums'; type ownType = MMELEnum; diff --git a/packages/legacy/src/smart/model/editor/components/figure.ts b/src/smart/model/editor/components/figure.ts similarity index 80% rename from packages/legacy/src/smart/model/editor/components/figure.ts rename to src/smart/model/editor/components/figure.ts index ab8323be..f4c46f57 100644 --- a/packages/legacy/src/smart/model/editor/components/figure.ts +++ b/src/smart/model/editor/components/figure.ts @@ -1,8 +1,10 @@ -import { MMELFigure } from '../../../serialize/interface/supportinterface'; -import { EditorNode, isEditorProcess } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import type { MMELFigure } from '@paneron/libmmel/interface/supportinterface'; +import type { EditorNode } from '@/smart/model/editormodel'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'figure'; type ownType = MMELFigure; diff --git a/packages/legacy/src/smart/model/editor/components/itemTemplate.ts b/src/smart/model/editor/components/itemTemplate.ts similarity index 97% rename from packages/legacy/src/smart/model/editor/components/itemTemplate.ts rename to src/smart/model/editor/components/itemTemplate.ts index 36074e71..e8cf05fc 100644 --- a/packages/legacy/src/smart/model/editor/components/itemTemplate.ts +++ b/src/smart/model/editor/components/itemTemplate.ts @@ -1,5 +1,5 @@ import { useReducer } from 'react'; -import { UndoReducerInterface } from '../interface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; export interface EditAction { task: 'edit'; diff --git a/packages/legacy/src/smart/model/editor/components/links.ts b/src/smart/model/editor/components/links.ts similarity index 92% rename from packages/legacy/src/smart/model/editor/components/links.ts rename to src/smart/model/editor/components/links.ts index 021e6525..9eada814 100644 --- a/packages/legacy/src/smart/model/editor/components/links.ts +++ b/src/smart/model/editor/components/links.ts @@ -1,6 +1,6 @@ import { useReducer } from 'react'; -import { MMELLink } from '../../../serialize/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; +import type { MMELLink } from '@paneron/libmmel/interface/supportinterface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; interface RefCascadeAction { subtask: 'process-ref'; diff --git a/packages/legacy/src/smart/model/editor/components/meta.ts b/src/smart/model/editor/components/meta.ts similarity index 87% rename from packages/legacy/src/smart/model/editor/components/meta.ts rename to src/smart/model/editor/components/meta.ts index a16a415b..f4030d04 100644 --- a/packages/legacy/src/smart/model/editor/components/meta.ts +++ b/src/smart/model/editor/components/meta.ts @@ -1,6 +1,6 @@ import { useReducer } from 'react'; -import { MMELMetadata } from '../../../serialize/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; +import type { MMELMetadata } from '@paneron/libmmel/interface/supportinterface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; interface EditAction { property: keyof MMELMetadata; diff --git a/packages/legacy/src/smart/model/editor/components/notes.ts b/src/smart/model/editor/components/notes.ts similarity index 89% rename from packages/legacy/src/smart/model/editor/components/notes.ts rename to src/smart/model/editor/components/notes.ts index eb8113e8..4e48e0a1 100644 --- a/packages/legacy/src/smart/model/editor/components/notes.ts +++ b/src/smart/model/editor/components/notes.ts @@ -1,7 +1,7 @@ import { useReducer } from 'react'; -import { MMELNote } from '../../../serialize/interface/supportinterface'; -import { refNotesReplace } from '../../../utils/handler/cascadeModelHandler'; -import { UndoReducerInterface } from '../interface'; +import type { MMELNote } from '@paneron/libmmel/interface/supportinterface'; +import { refNotesReplace } from '@/smart/utils/handler/cascadeModelHandler'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; interface RefCascadeAction { subtask: 'process-ref'; diff --git a/packages/legacy/src/smart/model/editor/components/pages.ts b/src/smart/model/editor/components/pages.ts similarity index 96% rename from packages/legacy/src/smart/model/editor/components/pages.ts rename to src/smart/model/editor/components/pages.ts index 8560afd7..01bb690a 100644 --- a/packages/legacy/src/smart/model/editor/components/pages.ts +++ b/src/smart/model/editor/components/pages.ts @@ -1,25 +1,26 @@ import { useReducer } from 'react'; -import { +import type { MMELEdge, MMELSubprocess, -} from '../../../serialize/interface/flowcontrolinterface'; -import { createSubprocessComponent } from '../../../utils/EditorFactory'; +} from '@paneron/libmmel/interface/flowcontrolinterface'; +import { createSubprocessComponent } from '@/smart/utils/EditorFactory'; import { dataPageReplace, elmPageReplace, -} from '../../../utils/handler/cascadeModelHandler'; -import { updatePageElement } from '../../../utils/ModelFunctions'; -import * as Logger from '../../../../lib/logger'; -import { +} from '@/smart/utils/handler/cascadeModelHandler'; +import { updatePageElement } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import type { EditorNode, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorDataClass, isEditorProcess, isEditorRegistry, -} from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; +} from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; interface RegCascadeAction { subtask: 'data'; diff --git a/packages/legacy/src/smart/model/editor/components/provision.ts b/src/smart/model/editor/components/provision.ts similarity index 90% rename from packages/legacy/src/smart/model/editor/components/provision.ts rename to src/smart/model/editor/components/provision.ts index 3db3f2bb..644408bc 100644 --- a/packages/legacy/src/smart/model/editor/components/provision.ts +++ b/src/smart/model/editor/components/provision.ts @@ -1,7 +1,7 @@ import { useReducer } from 'react'; -import { MMELProvision } from '../../../serialize/interface/supportinterface'; -import { refProvisionReplace } from '../../../utils/handler/cascadeModelHandler'; -import { UndoReducerInterface } from '../interface'; +import type { MMELProvision } from '@paneron/libmmel/interface/supportinterface'; +import { refProvisionReplace } from '@/smart/utils/handler/cascadeModelHandler'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; interface RefCascadeAction { subtask: 'process-ref'; diff --git a/packages/legacy/src/smart/model/editor/components/ref.ts b/src/smart/model/editor/components/ref.ts similarity index 90% rename from packages/legacy/src/smart/model/editor/components/ref.ts rename to src/smart/model/editor/components/ref.ts index 010b9599..73fb88b3 100644 --- a/packages/legacy/src/smart/model/editor/components/ref.ts +++ b/src/smart/model/editor/components/ref.ts @@ -1,12 +1,14 @@ -import { +import type { MMELNote, MMELProvision, MMELReference, -} from '../../../serialize/interface/supportinterface'; -import { EditorNode, isEditorDataClass } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { EditorNode } from '@/smart/model/editormodel'; +import { isEditorDataClass } from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'refs'; type ownType = MMELReference; diff --git a/packages/legacy/src/smart/model/editor/components/roles.ts b/src/smart/model/editor/components/roles.ts similarity index 81% rename from packages/legacy/src/smart/model/editor/components/roles.ts rename to src/smart/model/editor/components/roles.ts index 317ed4d7..43c69cb4 100644 --- a/packages/legacy/src/smart/model/editor/components/roles.ts +++ b/src/smart/model/editor/components/roles.ts @@ -1,13 +1,15 @@ -import { MMELRole } from '../../../serialize/interface/supportinterface'; -import { RoleAttribute } from '../../../utils/handler/cascadeModelHandler'; +import type { MMELRole } from '@paneron/libmmel/interface/supportinterface'; +import type { RoleAttribute } from '@/smart/utils/handler/cascadeModelHandler'; +import type { + EditorNode } from '@/smart/model/editormodel'; import { - EditorNode, isEditorApproval, isEditorProcess, -} from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +} from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'roles'; type ownType = MMELRole; diff --git a/packages/legacy/src/smart/model/editor/components/sections.ts b/src/smart/model/editor/components/sections.ts similarity index 50% rename from packages/legacy/src/smart/model/editor/components/sections.ts rename to src/smart/model/editor/components/sections.ts index 6d60220c..232756c6 100644 --- a/packages/legacy/src/smart/model/editor/components/sections.ts +++ b/src/smart/model/editor/components/sections.ts @@ -1,6 +1,7 @@ -import { MMELTextSection } from '../../../serialize/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ItemAction, useItems } from './itemTemplate'; +import type { MMELTextSection } from '@paneron/libmmel/interface/supportinterface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'section'; const value = 'section'; diff --git a/packages/legacy/src/smart/model/editor/components/table.ts b/src/smart/model/editor/components/table.ts similarity index 80% rename from packages/legacy/src/smart/model/editor/components/table.ts rename to src/smart/model/editor/components/table.ts index 5ebd4b93..6326d9a1 100644 --- a/packages/legacy/src/smart/model/editor/components/table.ts +++ b/src/smart/model/editor/components/table.ts @@ -1,8 +1,10 @@ -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { EditorNode, isEditorProcess } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import type { EditorNode } from '@/smart/model/editormodel'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'table'; type ownType = MMELTable; diff --git a/src/smart/model/editor/components/terms.ts b/src/smart/model/editor/components/terms.ts new file mode 100644 index 00000000..d7b1dff3 --- /dev/null +++ b/src/smart/model/editor/components/terms.ts @@ -0,0 +1,16 @@ +import type { MMELTerm } from '@paneron/libmmel/interface/supportinterface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; + +type command = 'terms'; +type ownType = MMELTerm; +const value = 'terms'; + +export type TermsAction = ItemAction; + +export function useTerms( + x: Record +): UndoReducerInterface, TermsAction> { + return useItems(x, value); +} diff --git a/src/smart/model/editor/components/vars.ts b/src/smart/model/editor/components/vars.ts new file mode 100644 index 00000000..356daa84 --- /dev/null +++ b/src/smart/model/editor/components/vars.ts @@ -0,0 +1,19 @@ +import type { MMELVariable } from '@paneron/libmmel/interface/supportinterface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; + +type command = 'vars'; +type ownType = MMELVariable; +const value = 'vars'; + +export type VarAction = ItemAction & { + cascade?: ModelAction[]; +}; + +export function useVars( + x: Record +): UndoReducerInterface, VarAction> { + return useItems(x, value); +} diff --git a/src/smart/model/editor/components/view.ts b/src/smart/model/editor/components/view.ts new file mode 100644 index 00000000..e1cfda8d --- /dev/null +++ b/src/smart/model/editor/components/view.ts @@ -0,0 +1,19 @@ +import type { MMELView } from '@paneron/libmmel/interface/supportinterface'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { ItemAction } from '@/smart/model/editor/components/itemTemplate'; +import { useItems } from '@/smart/model/editor/components/itemTemplate'; + +type command = 'view'; +type ownType = MMELView; +const value = 'view'; + +export type ViewAction = ItemAction & { + cascade?: ModelAction[]; +}; + +export function useView( + x: Record +): UndoReducerInterface, ViewAction> { + return useItems(x, value); +} diff --git a/packages/legacy/src/smart/model/editor/history.ts b/src/smart/model/editor/history.ts similarity index 94% rename from packages/legacy/src/smart/model/editor/history.ts rename to src/smart/model/editor/history.ts index 18639832..be6ad808 100644 --- a/packages/legacy/src/smart/model/editor/history.ts +++ b/src/smart/model/editor/history.ts @@ -3,8 +3,8 @@ */ import { useReducer } from 'react'; -import { HistoryItem } from '../history'; -import { UndoReducerInterface } from './interface'; +import type { HistoryItem } from '@/smart/model/history'; +import type { UndoReducerInterface } from '@/smart/model/editor/interface'; /** * Drill down more levels diff --git a/packages/legacy/src/smart/model/editor/hybird/data.ts b/src/smart/model/editor/hybird/data.ts similarity index 92% rename from packages/legacy/src/smart/model/editor/hybird/data.ts rename to src/smart/model/editor/hybird/data.ts index 2fc29ac7..330d0ac4 100644 --- a/packages/legacy/src/smart/model/editor/hybird/data.ts +++ b/src/smart/model/editor/hybird/data.ts @@ -1,13 +1,14 @@ -import { +import type { EditorDataClass, EditorModel, - EditorRegistry, + EditorRegistry } from '@/smart/model/editormodel'; +import { isEditorDataClass, isEditorRegistry, -} from '../../editormodel'; -import { RegistryCombined } from '../components/element/registry'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +} from '@/smart/model/editormodel'; +import type { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type RegistryImportRefHybird = HyEditAction & { task: 'registry-import-ref' }; type DCImportRefHybird = HyEditAction & { task: 'dc-import-ref' }; diff --git a/packages/legacy/src/smart/model/editor/hybird/distributor.ts b/src/smart/model/editor/hybird/distributor.ts similarity index 85% rename from packages/legacy/src/smart/model/editor/hybird/distributor.ts rename to src/smart/model/editor/hybird/distributor.ts index d97bb9ab..7d1ad3fb 100644 --- a/packages/legacy/src/smart/model/editor/hybird/distributor.ts +++ b/src/smart/model/editor/hybird/distributor.ts @@ -7,24 +7,24 @@ * A3. If an undo is needed, execute the 'compiled' actions appended to the undo action */ -import { MMELEdge } from '../../../serialize/interface/flowcontrolinterface'; -import { +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELLink, MMELNote, MMELProvision, MMELReference, -} from '../../../serialize/interface/supportinterface'; -import { +} from '@paneron/libmmel/interface/supportinterface'; +import type { EditorDataClass, EditorEGate, EditorModel, EditorProcess, -} from '../../editormodel'; -import { RegistryCombined } from '../components/element/registry'; -import { ModelAction } from '../model'; -import { compileDCRefImport, compileRegistryRefImport } from './data'; -import { compileEGateEdit } from './egateedit'; -import { compileProcessImport } from './import'; +} from '@/smart/model/editormodel'; +import type { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import type { ModelAction } from '@/smart/model/editor/model'; +import { compileDCRefImport, compileRegistryRefImport } from '@/smart/model/editor/hybird/data'; +import { compileEGateEdit } from '@/smart/model/editor/hybird/egateedit'; +import { compileProcessImport } from '@/smart/model/editor/hybird/import'; import { compileProcessAddPage, compileProcessBringin, @@ -33,7 +33,7 @@ import { compileProcessDeleteReverse, compileProcessEdit, compileProcessRemovePage, -} from './process'; +} from '@/smart/model/editor/hybird/process'; export interface EGateEditAction { task: 'egate-edit'; diff --git a/packages/legacy/src/smart/model/editor/hybird/egateedit.ts b/src/smart/model/editor/hybird/egateedit.ts similarity index 86% rename from packages/legacy/src/smart/model/editor/hybird/egateedit.ts rename to src/smart/model/editor/hybird/egateedit.ts index 3ff4af9c..35564871 100644 --- a/packages/legacy/src/smart/model/editor/hybird/egateedit.ts +++ b/src/smart/model/editor/hybird/egateedit.ts @@ -1,7 +1,8 @@ -import { MMELEdge } from '../../../serialize/interface/flowcontrolinterface'; -import { EditorModel, isEditorEgate } from '../../editormodel'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { isEditorEgate } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type EgateHybird = HyEditAction & { task: 'egate-edit' }; diff --git a/packages/legacy/src/smart/model/editor/hybird/import.ts b/src/smart/model/editor/hybird/import.ts similarity index 93% rename from packages/legacy/src/smart/model/editor/hybird/import.ts rename to src/smart/model/editor/hybird/import.ts index e1cc897f..9dbd2078 100644 --- a/packages/legacy/src/smart/model/editor/hybird/import.ts +++ b/src/smart/model/editor/hybird/import.ts @@ -1,11 +1,13 @@ +import type { + NewImportItems } from '@/smart/utils/ModelImport'; import { addComponentIfNotFound, - addProcessIfNotFound, - NewImportItems, -} from '../../../utils/ModelImport'; -import { EditorModel, isEditorProcess } from '../../editormodel'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; + addProcessIfNotFound +} from '@/smart/utils/ModelImport'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type ProcessImportHybird = HyEditAction & { task: 'elm-import' }; diff --git a/packages/legacy/src/smart/model/editor/hybird/process.ts b/src/smart/model/editor/hybird/process.ts similarity index 98% rename from packages/legacy/src/smart/model/editor/hybird/process.ts rename to src/smart/model/editor/hybird/process.ts index 64b2cc54..5a787d45 100644 --- a/packages/legacy/src/smart/model/editor/hybird/process.ts +++ b/src/smart/model/editor/hybird/process.ts @@ -1,7 +1,8 @@ -import { createNewPage } from '../../../utils/ModelAddComponentHandler'; -import { EditorModel, EditorProcess, isEditorProcess } from '../../editormodel'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +import { createNewPage } from '@/smart/utils/ModelAddComponentHandler'; +import type { EditorModel, EditorProcess } from '@/smart/model/editormodel'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type ProcessAddPageHybird = HyEditAction & { task: 'process-add-page' }; type ProcessRemovePageHybird = HyEditAction & { task: 'process-remove-page' }; diff --git a/packages/legacy/src/smart/model/editor/interface.ts b/src/smart/model/editor/interface.ts similarity index 80% rename from packages/legacy/src/smart/model/editor/interface.ts rename to src/smart/model/editor/interface.ts index d68e14cd..14d630e0 100644 --- a/packages/legacy/src/smart/model/editor/interface.ts +++ b/src/smart/model/editor/interface.ts @@ -1,6 +1,6 @@ -import { ChangeLog } from '../changelog'; -import { EditorModel } from '../editormodel'; -import { ModelAction } from './model'; +import type { ChangeLog } from '@/smart/model/changelog'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { ModelAction } from '@/smart/model/editor/model'; /** * For undo / redo, that return the opposite action diff --git a/packages/legacy/src/smart/model/editor/model.ts b/src/smart/model/editor/model.ts similarity index 77% rename from packages/legacy/src/smart/model/editor/model.ts rename to src/smart/model/editor/model.ts index 0bb16d2e..c4cab085 100644 --- a/packages/legacy/src/smart/model/editor/model.ts +++ b/src/smart/model/editor/model.ts @@ -1,37 +1,54 @@ -import * as Logger from '../../../lib/logger'; -import { EditorModel } from '../editormodel'; -import { cascadeCheckDCs } from './components/element/dc'; -import { cascadeCheckRegs } from './components/element/registry'; -import { ElmAction, useElements } from './components/elements'; -import { cascadeCheckEnum, EnumAction, useEnums } from './components/enums'; -import { MetaAction, useMeta } from './components/meta'; +import * as Logger from '@/lib/logger'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { cascadeCheckDCs } from '@/smart/model/editor/components/element/dc'; +import { cascadeCheckRegs } from '@/smart/model/editor/components/element/registry'; +import type { ElmAction } from '@/smart/model/editor/components/elements'; +import { useElements } from '@/smart/model/editor/components/elements'; +import type { EnumAction } from '@/smart/model/editor/components/enums'; +import { cascadeCheckEnum, useEnums } from '@/smart/model/editor/components/enums'; +import type { MetaAction } from '@/smart/model/editor/components/meta'; +import { useMeta } from '@/smart/model/editor/components/meta'; +import type { + PageAction } from '@/smart/model/editor/components/pages'; import { cascadeCheckPages, explorePageDataNodes, - PageAction, usePages, -} from './components/pages'; -import { useView, ViewAction } from './components/view'; -import { ProvisionAction, useProvisions } from './components/provision'; -import { cascadeCheckRefs, RefAction, useRefs } from './components/ref'; -import { RoleAction, useRoles, cascadeCheckRole } from './components/roles'; -import { SectionAction, useSections } from './components/sections'; -import { TermsAction, useTerms } from './components/terms'; -import { useVars, VarAction } from './components/vars'; -import { cascadeCheckTable, TableAction, useTable } from './components/table'; -import { cascadeCheckFigure, FigAction, useFigure } from './components/figure'; -import { UndoReducerModelInterface } from './interface'; +} from '@/smart/model/editor/components/pages'; +import type { ViewAction } from '@/smart/model/editor/components/view'; +import { useView } from '@/smart/model/editor/components/view'; +import type { ProvisionAction } from '@/smart/model/editor/components/provision'; +import { useProvisions } from '@/smart/model/editor/components/provision'; +import type { RefAction } from '@/smart/model/editor/components/ref'; +import { cascadeCheckRefs, useRefs } from '@/smart/model/editor/components/ref'; +import type { RoleAction } from '@/smart/model/editor/components/roles'; +import { useRoles, cascadeCheckRole } from '@/smart/model/editor/components/roles'; +import type { SectionAction } from '@/smart/model/editor/components/sections'; +import { useSections } from '@/smart/model/editor/components/sections'; +import type { TermsAction } from '@/smart/model/editor/components/terms'; +import { useTerms } from '@/smart/model/editor/components/terms'; +import type { VarAction } from '@/smart/model/editor/components/vars'; +import { useVars } from '@/smart/model/editor/components/vars'; +import type { TableAction } from '@/smart/model/editor/components/table'; +import { cascadeCheckTable, useTable } from '@/smart/model/editor/components/table'; +import type { FigAction } from '@/smart/model/editor/components/figure'; +import { cascadeCheckFigure, useFigure } from '@/smart/model/editor/components/figure'; +import type { UndoReducerModelInterface } from '@/smart/model/editor/interface'; +import type { + CommentAction } from '@/smart/model/editor/components/comment'; import { cascadeCheckComment, - CommentAction, useComment, -} from './components/comment'; +} from '@/smart/model/editor/components/comment'; import { useMemo } from 'react'; -import { cascadeCheckElm } from './components/element/common'; -import { compileHybird, HyEditAction } from './hybird/distributor'; -import { NotesAction, useNotes } from './components/notes'; -import { MODELVERSION } from '../../utils/constants'; -import { LinkAction, useLinks } from './components/links'; +import { cascadeCheckElm } from '@/smart/model/editor/components/element/common'; +import type { HyEditAction } from '@/smart/model/editor/hybird/distributor'; +import { compileHybird } from '@/smart/model/editor/hybird/distributor'; +import type { NotesAction } from '@/smart/model/editor/components/notes'; +import { useNotes } from '@/smart/model/editor/components/notes'; +import { MODELVERSION } from '@/smart/utils/constants'; +import type { LinkAction } from '@/smart/model/editor/components/links'; +import { useLinks } from '@/smart/model/editor/components/links'; interface InitModelAction { act: 'initModel'; diff --git a/packages/legacy/src/smart/model/editor/state.ts b/src/smart/model/editor/state.ts similarity index 92% rename from packages/legacy/src/smart/model/editor/state.ts rename to src/smart/model/editor/state.ts index 60f17c05..c506a7d1 100644 --- a/packages/legacy/src/smart/model/editor/state.ts +++ b/src/smart/model/editor/state.ts @@ -1,10 +1,13 @@ import { useReducer, useState } from 'react'; -import * as Logger from '../../../lib/logger'; -import { addToLog, ChangeLog } from '../changelog'; -import { EditorState } from '../States'; -import { HistoryAction, useHistory } from './history'; -import { UndoManagerInterface } from './interface'; -import { ModelAction, useModel } from './model'; +import * as Logger from '@/lib/logger'; +import type { ChangeLog } from '@/smart/model/changelog'; +import { addToLog } from '@/smart/model/changelog'; +import type { EditorState } from '@/smart/model/States'; +import type { HistoryAction } from '@/smart/model/editor/history'; +import { useHistory } from '@/smart/model/editor/history'; +import type { UndoManagerInterface } from '@/smart/model/editor/interface'; +import type { ModelAction } from '@/smart/model/editor/model'; +import { useModel } from '@/smart/model/editor/model'; export type EditorAction = ModelAction | HistoryAction; diff --git a/packages/legacy/src/smart/model/editormodel.ts b/src/smart/model/editormodel.ts similarity index 91% rename from packages/legacy/src/smart/model/editormodel.ts rename to src/smart/model/editormodel.ts index 18c2c8c4..8e5f9b7c 100644 --- a/packages/legacy/src/smart/model/editormodel.ts +++ b/src/smart/model/editormodel.ts @@ -2,33 +2,34 @@ * The internal data strcuture for the model */ -import { RefObject } from 'react'; -import { - DataType, +import type { RefObject } from 'react'; +import type { MMELNode, - MMELObject, -} from '../serialize/interface/baseinterface'; + MMELObject } from '@paneron/libmmel/interface/baseinterface'; import { + DataType +} from '@paneron/libmmel/interface/baseinterface'; +import type { MMELDataAttribute, MMELDataClass, MMELEnum, MMELRegistry, -} from '../serialize/interface/datainterface'; -import { +} from '@paneron/libmmel/interface/datainterface'; +import type { MMELEndEvent, MMELSignalCatchEvent, MMELStartEvent, MMELTimerEvent, -} from '../serialize/interface/eventinterface'; -import { +} from '@paneron/libmmel/interface/eventinterface'; +import type { MMELEGate, MMELSubprocess, -} from '../serialize/interface/flowcontrolinterface'; -import { +} from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELApproval, MMELProcess, -} from '../serialize/interface/processinterface'; -import { +} from '@paneron/libmmel/interface/processinterface'; +import type { MMELComment, MMELFigure, MMELLink, @@ -42,7 +43,7 @@ import { MMELTextSection, MMELVariable, MMELView, -} from '../serialize/interface/supportinterface'; +} from '@paneron/libmmel/interface/supportinterface'; import { isApproval, isDataClass, @@ -54,7 +55,7 @@ import { isSignalEvent, isStartEvent, isTimerEvent, -} from '../serialize/util/validation'; +} from '@paneron/libmmel/util/validation'; export enum ModelType { EDIT = 'edit', diff --git a/packages/legacy/src/smart/model/history.tsx b/src/smart/model/history.tsx similarity index 88% rename from packages/legacy/src/smart/model/history.tsx rename to src/smart/model/history.tsx index 9e6700d7..b7ffc179 100644 --- a/packages/legacy/src/smart/model/history.tsx +++ b/src/smart/model/history.tsx @@ -5,11 +5,11 @@ */ import React from 'react'; -import { getRootName } from '../utils/ModelFunctions'; -import { HistoryAction } from './editor/history'; -import { EditorModel } from './editormodel'; -import { ModelWrapper } from './modelwrapper'; -import { MMELRepo } from './repo'; +import { getRootName } from '@/smart/utils/ModelFunctions'; +import type { HistoryAction } from '@/smart/model/editor/history'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo } from '@/smart/model/repo'; interface Breadcrumb { label: JSX.Element; diff --git a/packages/legacy/src/smart/model/json.ts b/src/smart/model/json.ts similarity index 87% rename from packages/legacy/src/smart/model/json.ts rename to src/smart/model/json.ts index caf9d386..f911a03c 100644 --- a/packages/legacy/src/smart/model/json.ts +++ b/src/smart/model/json.ts @@ -6,10 +6,11 @@ * So, there is a need to convert the JSON model to MMEL model (and vice versa) */ -import { DataType, MMELNode } from '../serialize/interface/baseinterface'; -import { MMELEnum } from '../serialize/interface/datainterface'; -import { MMELSubprocess } from '../serialize/interface/flowcontrolinterface'; -import { +import type { MMELNode } from '@paneron/libmmel/interface/baseinterface'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELEnum } from '@paneron/libmmel/interface/datainterface'; +import type { MMELSubprocess } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELFigure, MMELLink, MMELMetadata, @@ -21,8 +22,8 @@ import { MMELVariable, MMELView, NOTE_TYPE, -} from '../serialize/interface/supportinterface'; -import { JSONContextType } from '../utils/repo/io'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { JSONContextType } from '@/smart/utils/repo/io'; export interface MMELJSON { '@context': JSONContextType; diff --git a/packages/legacy/src/smart/model/mapmodel.ts b/src/smart/model/mapmodel.ts similarity index 84% rename from packages/legacy/src/smart/model/mapmodel.ts rename to src/smart/model/mapmodel.ts index 64a8ebb7..401bfdd4 100644 --- a/packages/legacy/src/smart/model/mapmodel.ts +++ b/src/smart/model/mapmodel.ts @@ -3,24 +3,27 @@ */ import React from 'react'; -import { MAPVERSION } from '../utils/constants'; -import { buildModelLinks } from '../utils/ModelFunctions'; -import { JSONContext, JSONContextType } from '../utils/repo/io'; -import { +import { MAPVERSION } from '@/smart/utils/constants'; +import { buildModelLinks } from '@/smart/utils/ModelFunctions'; +import type { JSONContextType } from '@/smart/utils/repo/io'; +import { JSONContext } from '@/smart/utils/repo/io'; +import type { EditorModel, EditorNode, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorProcess, ModelType, -} from './editormodel'; +} from '@/smart/model/editormodel'; +import type { + PageHistory } from '@/smart/model/history'; import { addToHistory, cloneHistory, - createPageHistory, - PageHistory, -} from './history'; -import { ModelWrapper } from './modelwrapper'; + createPageHistory +} from '@/smart/model/history'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; export interface MappingDoc { id: string; diff --git a/packages/legacy/src/smart/model/modelwrapper.ts b/src/smart/model/modelwrapper.ts similarity index 91% rename from packages/legacy/src/smart/model/modelwrapper.ts rename to src/smart/model/modelwrapper.ts index 138939d3..f3e6c17f 100644 --- a/packages/legacy/src/smart/model/modelwrapper.ts +++ b/src/smart/model/modelwrapper.ts @@ -7,52 +7,55 @@ * This legacy design is still used in many places of the codes */ -import { Elements } from 'react-flow-renderer'; -import { MMELNode } from '../serialize/interface/baseinterface'; -import { MMELModel } from '../serialize/interface/model'; -import { +import type { Elements } from 'react-flow-renderer'; +import type { MMELNode } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELModel } from '@paneron/libmmel/interface/model'; +import type { EditorDataClass, EditorModel, EditorNode, EditorProcess, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorDataClass, isEditorProcess, isEditorRegistry, ModelType, -} from './editormodel'; -import { +} from '@/smart/model/editormodel'; +import type { MMELEdge, MMELSubprocess, MMELSubprocessComponent, -} from '../serialize/interface/flowcontrolinterface'; +} from '@paneron/libmmel/interface/flowcontrolinterface'; import { isDataClass, isProcess, isStartEvent, -} from '../serialize/util/validation'; +} from '@paneron/libmmel/util/validation'; +import type { + EdgeContainer, + NodeCallBack } from '@/smart/model/FlowContainer'; import { createDataLinkContainer, createEdgeContainer, createNodeContainer, - EdgeContainer, - getEditorNodeCallBack, - NodeCallBack, -} from './FlowContainer'; -import { fillRDCS } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; + getEditorNodeCallBack +} from '@/smart/model/FlowContainer'; +import { fillRDCS } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import type { + MapResultType } from '@/smart/utils/map/MappingCalculator'; import { getMappedList, getRefNodeStyle, - getSourceStyleById, - MapResultType, -} from '../utils/map/MappingCalculator'; -import { MapSet } from './mapmodel'; -import React from 'react'; -import { SerializedStyles } from '@emotion/react'; -import { MMELRepo, RepoIndex } from './repo'; -import { EditorViewOption } from './States'; + getSourceStyleById +} from '@/smart/utils/map/MappingCalculator'; +import type { MapSet } from '@/smart/model/mapmodel'; +import type React from 'react'; +import type { SerializedStyles } from '@emotion/react'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { EditorViewOption } from '@/smart/model/States'; /** * The wrapper contains the model and which page it is viewing diff --git a/packages/legacy/src/smart/model/module/appModule.ts b/src/smart/model/module/appModule.ts similarity index 81% rename from packages/legacy/src/smart/model/module/appModule.ts rename to src/smart/model/module/appModule.ts index 7315a712..d3ee0679 100644 --- a/packages/legacy/src/smart/model/module/appModule.ts +++ b/src/smart/model/module/appModule.ts @@ -2,23 +2,23 @@ * Modules are the high-level functions provided by the app. */ -import { IconName } from '@blueprintjs/core'; -import React from 'react'; -import DocumentViewer from '../../ui/docviewer'; -import EditWrapper from '../../ui/editFunctions/EditWrapper'; -import LinkAnalysis from '../../ui/LinkAnalysis'; -import DocumentEdit from '../../ui/maindocedit'; -import ModelMapper from '../../ui/mainmapper'; -import ModelViewer from '../../ui/mainviewer'; -import ModelWorkspace from '../../ui/modelWorkspace'; -import NLPMain from '../../ui/nlp/NLPMain'; -import RepoViewer from '../../ui/repo/RepoViewer'; -import { ChangeLog } from '../changelog'; -import { EditorModel } from '../editormodel'; -import { RepoHistory } from '../history'; -import { MapProfile } from '../mapmodel'; -import { MMELRepo, RepoIndex, RepoItemType } from '../repo'; -import { SMARTWorkspace } from '../workspace'; +import type { IconName } from '@blueprintjs/core'; +import type React from 'react'; +import DocumentViewer from '@/smart/ui/docviewer'; +import EditWrapper from '@/smart/ui/editFunctions/EditWrapper'; +import LinkAnalysis from '@/smart/ui/LinkAnalysis'; +import DocumentEdit from '@/smart/ui/maindocedit'; +import ModelMapper from '@/smart/ui/mainmapper'; +import ModelViewer from '@/smart/ui/mainviewer'; +import ModelWorkspace from '@/smart/ui/modelWorkspace'; +import NLPMain from '@/smart/ui/nlp/NLPMain'; +import RepoViewer from '@/smart/ui/repo/RepoViewer'; +import type { ChangeLog } from '@/smart/model/changelog'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { RepoHistory } from '@/smart/model/history'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import type { SMARTWorkspace } from '@/smart/model/workspace'; export type ModelModuleConfig = BaseConfig & { type: 'model'; diff --git a/packages/legacy/src/smart/model/repo.ts b/src/smart/model/repo.ts similarity index 100% rename from packages/legacy/src/smart/model/repo.ts rename to src/smart/model/repo.ts diff --git a/packages/legacy/src/smart/model/selectionImport.ts b/src/smart/model/selectionImport.ts similarity index 100% rename from packages/legacy/src/smart/model/selectionImport.ts rename to src/smart/model/selectionImport.ts diff --git a/packages/legacy/src/smart/model/simulation.ts b/src/smart/model/simulation.ts similarity index 100% rename from packages/legacy/src/smart/model/simulation.ts rename to src/smart/model/simulation.ts diff --git a/packages/legacy/src/smart/model/versioncompare.ts b/src/smart/model/versioncompare.ts similarity index 95% rename from packages/legacy/src/smart/model/versioncompare.ts rename to src/smart/model/versioncompare.ts index 5d6ef422..94f62de4 100644 --- a/packages/legacy/src/smart/model/versioncompare.ts +++ b/src/smart/model/versioncompare.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; export type VersionStatus = 'same' | 'add' | 'delete' | 'change'; diff --git a/packages/legacy/src/smart/model/workspace.ts b/src/smart/model/workspace.ts similarity index 79% rename from packages/legacy/src/smart/model/workspace.ts rename to src/smart/model/workspace.ts index cc5bfc67..23e77ab1 100644 --- a/packages/legacy/src/smart/model/workspace.ts +++ b/src/smart/model/workspace.ts @@ -2,9 +2,10 @@ * It is the data model of how data instances are stored and associated to the model */ -import { IObject } from '../ui/common/listmanagement/listPopoverItem'; -import { WSVERSION } from '../utils/constants'; -import { JSONContext, JSONContextType } from '../utils/repo/io'; +import type { IObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; +import { WSVERSION } from '@/smart/utils/constants'; +import type { JSONContextType } from '@/smart/utils/repo/io'; +import { JSONContext } from '@/smart/utils/repo/io'; export interface SMARTDocument extends IObject { name: string; diff --git a/packages/legacy/src/smart/model/xmlelement.ts b/src/smart/model/xmlelement.ts similarity index 100% rename from packages/legacy/src/smart/model/xmlelement.ts rename to src/smart/model/xmlelement.ts diff --git a/packages/legacy/src/smart/ui/LinkAnalysis.tsx b/src/smart/ui/LinkAnalysis.tsx similarity index 77% rename from packages/legacy/src/smart/ui/LinkAnalysis.tsx rename to src/smart/ui/LinkAnalysis.tsx index 8a39de29..6e0004a9 100644 --- a/packages/legacy/src/smart/ui/LinkAnalysis.tsx +++ b/src/smart/ui/LinkAnalysis.tsx @@ -1,6 +1,6 @@ -import { MMELRepo, RepoIndex } from '../model/repo'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; -import RepoIndexMainView from './mapper/repo/RepoIndexMainView'; +import RepoIndexMainView from '@/smart/ui/mapper/repo/RepoIndexMainView'; import React from 'react'; const LinkAnalysis: React.FC<{ diff --git a/packages/legacy/src/smart/ui/app/AppControlBar.tsx b/src/smart/ui/app/AppControlBar.tsx similarity index 100% rename from packages/legacy/src/smart/ui/app/AppControlBar.tsx rename to src/smart/ui/app/AppControlBar.tsx diff --git a/packages/legacy/src/smart/ui/app/AppUI.tsx b/src/smart/ui/app/AppUI.tsx similarity index 100% rename from packages/legacy/src/smart/ui/app/AppUI.tsx rename to src/smart/ui/app/AppUI.tsx diff --git a/packages/legacy/src/smart/ui/app/ModuleButton.tsx b/src/smart/ui/app/ModuleButton.tsx similarity index 81% rename from packages/legacy/src/smart/ui/app/ModuleButton.tsx rename to src/smart/ui/app/ModuleButton.tsx index 17b9df5b..94c99da2 100644 --- a/packages/legacy/src/smart/ui/app/ModuleButton.tsx +++ b/src/smart/ui/app/ModuleButton.tsx @@ -1,7 +1,8 @@ import { Button } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { ModuleName, MODULE_CONFIGURATION } from '../../model/module/appModule'; +import type { ModuleName } from '@/smart/model/module/appModule'; +import { MODULE_CONFIGURATION } from '@/smart/model/module/appModule'; /** * The buttons on the leftmost button bar diff --git a/packages/legacy/src/smart/ui/app/NeutralView.tsx b/src/smart/ui/app/NeutralView.tsx similarity index 86% rename from packages/legacy/src/smart/ui/app/NeutralView.tsx rename to src/smart/ui/app/NeutralView.tsx index 10156c70..77ff65fc 100644 --- a/packages/legacy/src/smart/ui/app/NeutralView.tsx +++ b/src/smart/ui/app/NeutralView.tsx @@ -5,12 +5,13 @@ import { jsx } from '@emotion/react'; import { css } from '@emotion/react'; import React from 'react'; +import type { + ModuleName } from '@/smart/model/module/appModule'; import { ModuleList, - ModuleName, MODULE_CONFIGURATION, -} from '../../model/module/appModule'; -import { MMELRepo, RepoIndex } from '../../model/repo'; +} from '@/smart/model/module/appModule'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; /** * The displayed UI when nothing is open. diff --git a/packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx b/src/smart/ui/app/RepoItemLoadingView.tsx similarity index 83% rename from packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx rename to src/smart/ui/app/RepoItemLoadingView.tsx index dabd121b..7d927698 100644 --- a/packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx +++ b/src/smart/ui/app/RepoItemLoadingView.tsx @@ -6,29 +6,33 @@ import { jsx } from '@emotion/react'; import { css } from '@emotion/react'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo, useState } from 'react'; -import { ChangeLog, createChangeLog } from '../../model/changelog'; -import { EditorModel } from '../../model/editormodel'; -import { RepoHistory } from '../../model/history'; -import { MMELJSON } from '../../model/json'; -import { indexModel, MapProfile } from '../../model/mapmodel'; -import { MMELToEditorModel } from '../../model/modelwrapper'; +import type { ChangeLog } from '@/smart/model/changelog'; +import { createChangeLog } from '@/smart/model/changelog'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { RepoHistory } from '@/smart/model/history'; +import type { MMELJSON } from '@/smart/model/json'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import { indexModel } from '@/smart/model/mapmodel'; +import { MMELToEditorModel } from '@/smart/model/modelwrapper'; +import type { + ModuleName } from '@/smart/model/module/appModule'; import { ModuleList, - ModuleName, MODULE_CONFIGURATION, -} from '../../model/module/appModule'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createNewSMARTWorkspace, SMARTWorkspace } from '../../model/workspace'; -import { MAPVERSION } from '../../utils/constants'; -import { getNamespace } from '../../utils/ModelFunctions'; -import * as Logger from '../../../lib/logger'; +} from '@/smart/model/module/appModule'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { SMARTWorkspace } from '@/smart/model/workspace'; +import { createNewSMARTWorkspace } from '@/smart/model/workspace'; +import { MAPVERSION } from '@/smart/utils/constants'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { getPathByNS, JSONContext, JSONToMMEL, RepoFileType, -} from '../../utils/repo/io'; -import { LoadingScreen } from '../common/Loading'; +} from '@/smart/utils/repo/io'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; /** * When an item (model / document) is open, its contents are loaded first here. diff --git a/packages/legacy/src/smart/ui/app/RepoView.tsx b/src/smart/ui/app/RepoView.tsx similarity index 77% rename from packages/legacy/src/smart/ui/app/RepoView.tsx rename to src/smart/ui/app/RepoView.tsx index 13f1b251..287a4c4f 100644 --- a/packages/legacy/src/smart/ui/app/RepoView.tsx +++ b/src/smart/ui/app/RepoView.tsx @@ -1,13 +1,14 @@ import React from 'react'; import { useState } from 'react'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { RepoHistory } from '../../model/history'; -import AppControlBar from './AppControlBar'; -import AppUILayout from './AppUI'; -import ModuleButton from './ModuleButton'; -import { ModuleList, ModuleName } from '../../model/module/appModule'; -import RepoItemLoadingView from './RepoItemLoadingView'; -import NeutralView from './NeutralView'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { RepoHistory } from '@/smart/model/history'; +import AppControlBar from '@/smart/ui/app/AppControlBar'; +import AppUILayout from '@/smart/ui/app/AppUI'; +import ModuleButton from '@/smart/ui/app/ModuleButton'; +import type { ModuleName } from '@/smart/model/module/appModule'; +import { ModuleList } from '@/smart/model/module/appModule'; +import RepoItemLoadingView from '@/smart/ui/app/RepoItemLoadingView'; +import NeutralView from '@/smart/ui/app/NeutralView'; const RepositoryView: React.FC<{ index: RepoIndex; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx b/src/smart/ui/application/ISO27001/Chart.tsx similarity index 92% rename from packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx rename to src/smart/ui/application/ISO27001/Chart.tsx index aa5ab23d..06e86226 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx +++ b/src/smart/ui/application/ISO27001/Chart.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; -import { Log27001Record, SettingRange } from './model'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import type { Log27001Record, SettingRange } from '@/smart/ui/application/ISO27001/model'; const path = 'M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831'; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx b/src/smart/ui/application/ISO27001/ConfigurePage.tsx similarity index 84% rename from packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx rename to src/smart/ui/application/ISO27001/ConfigurePage.tsx index 92b7e20b..14b39c24 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx +++ b/src/smart/ui/application/ISO27001/ConfigurePage.tsx @@ -1,18 +1,20 @@ +import type { + NumberRange } from '@blueprintjs/core'; import { Button, ControlGroup, FormGroup, InputGroup, RangeSlider, - NumberRange, NumericInput, Text, } from '@blueprintjs/core'; import React from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { obtainData } from './DataFeeder'; -import { Application27001Setting, fixedlocalhost } from './model'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { obtainData } from '@/smart/ui/application/ISO27001/DataFeeder'; +import type { Application27001Setting } from '@/smart/ui/application/ISO27001/model'; +import { fixedlocalhost } from '@/smart/ui/application/ISO27001/model'; const Application27001ConfigurePage: React.FC<{ onClose: () => void; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts b/src/smart/ui/application/ISO27001/DataFeeder.ts similarity index 91% rename from packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts rename to src/smart/ui/application/ISO27001/DataFeeder.ts index 56365a0a..5c0bba6b 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts +++ b/src/smart/ui/application/ISO27001/DataFeeder.ts @@ -1,4 +1,5 @@ -import { fixedlocalhost, SettingRange, StreamReading } from './model'; +import type { SettingRange, StreamReading } from '@/smart/ui/application/ISO27001/model'; +import { fixedlocalhost } from '@/smart/ui/application/ISO27001/model'; export function obtainData(url: string, time = 0): StreamReading { if (url === fixedlocalhost && time !== undefined) { diff --git a/packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx b/src/smart/ui/application/ISO27001/LineChart.tsx similarity index 98% rename from packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx rename to src/smart/ui/application/ISO27001/LineChart.tsx index 846f1c94..4de36b86 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx +++ b/src/smart/ui/application/ISO27001/LineChart.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; const LineChart27001: React.FC<{ values: number[]; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx b/src/smart/ui/application/ISO27001/LogPage.tsx similarity index 85% rename from packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx rename to src/smart/ui/application/ISO27001/LogPage.tsx index a27df9db..87f37f8a 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx +++ b/src/smart/ui/application/ISO27001/LogPage.tsx @@ -2,14 +2,15 @@ import { Button, ButtonGroup, HTMLTable } from '@blueprintjs/core'; import { Classes } from '@blueprintjs/popover2'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; -import { CSSProperties, useContext, useState } from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; -import { FILE_TYPE, saveToFileSystem } from '../../../utils/IOFunctions'; -import { NormalComboBox } from '../../common/fields'; -import updateMeasurementView from '../../measurement/MeasurementResultFormatter'; -import { Log27001, Log27001Record } from './model'; +import type { CSSProperties } from 'react'; +import { useContext, useState } from 'react'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import { NormalComboBox } from '@/smart/ui/common/fields'; +import updateMeasurementView from '@/smart/ui/measurement/MeasurementResultFormatter'; +import type { Log27001, Log27001Record } from '@/smart/ui/application/ISO27001/model'; const options = ['No filter', 'Pass', 'Fail'] as const; type ResultType = typeof options[number]; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/Main.tsx b/src/smart/ui/application/ISO27001/Main.tsx similarity index 81% rename from packages/legacy/src/smart/ui/application/ISO27001/Main.tsx rename to src/smart/ui/application/ISO27001/Main.tsx index 45c1f5a4..29dc2d38 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/Main.tsx +++ b/src/smart/ui/application/ISO27001/Main.tsx @@ -1,35 +1,37 @@ +import type { + IToastProps } from '@blueprintjs/core'; import { Text, Button, ButtonGroup, - Dialog, - IToastProps, + Dialog } from '@blueprintjs/core'; import { useEffect, useMemo, useState } from 'react'; import { applicationDialogLayout, dialogLayout, dialogLayoutFull, -} from '../../../../css/layout'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDHeading from '../../../MGDComponents/MGDHeading'; -import MGDSidebar from '../../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../../model/editormodel'; -import Chart27001 from './Chart'; -import Application27001ConfigurePage from './ConfigurePage'; -import Application27001LogPage from './LogPage'; +} from '@/css/layout'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { EditorModel } from '@/smart/model/editormodel'; +import Chart27001 from '@/smart/ui/application/ISO27001/Chart'; +import Application27001ConfigurePage from '@/smart/ui/application/ISO27001/ConfigurePage'; +import Application27001LogPage from '@/smart/ui/application/ISO27001/LogPage'; import { setInterval, clearInterval } from 'timers'; -import { obtainData } from './DataFeeder'; -import { testMeasurement27001 } from './ReadingCalculator'; +import { obtainData } from '@/smart/ui/application/ISO27001/DataFeeder'; +import { testMeasurement27001 } from '@/smart/ui/application/ISO27001/ReadingCalculator'; import { Popover2 } from '@blueprintjs/popover2'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; -import { +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import type { Application27001Setting, Dialog27001Interface, - fixedlocalhost, - Log27001, -} from './model'; -import LineChart27001 from './LineChart'; + Log27001 } from '@/smart/ui/application/ISO27001/model'; +import { + fixedlocalhost +} from '@/smart/ui/application/ISO27001/model'; +import LineChart27001 from '@/smart/ui/application/ISO27001/LineChart'; import React from 'react'; const Application27001: React.FC<{ diff --git a/packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts b/src/smart/ui/application/ISO27001/ReadingCalculator.ts similarity index 59% rename from packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts rename to src/smart/ui/application/ISO27001/ReadingCalculator.ts index 63f60e6c..ddd30022 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts +++ b/src/smart/ui/application/ISO27001/ReadingCalculator.ts @@ -1,7 +1,7 @@ -import { EditorModel } from '../../../model/editormodel'; -import { EnviromentValues } from '../../../model/Measurement'; -import { checkModelMeasurement } from '../../../utils/measurement/Checker'; -import { Log27001Record, StreamReading } from './model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { EnviromentValues } from '@/smart/model/Measurement'; +import { checkModelMeasurement } from '@/smart/utils/measurement/Checker'; +import type { Log27001Record, StreamReading } from '@/smart/ui/application/ISO27001/model'; export function testMeasurement27001( model: EditorModel, diff --git a/packages/legacy/src/smart/ui/application/ISO27001/model.tsx b/src/smart/ui/application/ISO27001/model.tsx similarity index 92% rename from packages/legacy/src/smart/ui/application/ISO27001/model.tsx rename to src/smart/ui/application/ISO27001/model.tsx index 93b50eef..665b7170 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/model.tsx +++ b/src/smart/ui/application/ISO27001/model.tsx @@ -1,4 +1,4 @@ -import { MeasureResult } from '../../../model/Measurement'; +import type { MeasureResult } from '@/smart/model/Measurement'; export interface Application27001Setting { source: string; diff --git a/packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx b/src/smart/ui/application/pas2060/BuildingMap.tsx similarity index 86% rename from packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx rename to src/smart/ui/application/pas2060/BuildingMap.tsx index 8dfc0d71..b113844d 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx +++ b/src/smart/ui/application/pas2060/BuildingMap.tsx @@ -1,8 +1,10 @@ -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React from 'react'; import { Text } from '@blueprintjs/core'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import { Application2060Setting, colors2060, EmissionSource } from './model'; -import MyMapBackground from './MyMapBackground'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import type { Application2060Setting, EmissionSource } from '@/smart/ui/application/pas2060/model'; +import { colors2060 } from '@/smart/ui/application/pas2060/model'; +import MyMapBackground from '@/smart/ui/application/pas2060/MyMapBackground'; type NumberedEmissionSource = EmissionSource & { pos: number; diff --git a/packages/legacy/src/smart/ui/application/pas2060/Chart.tsx b/src/smart/ui/application/pas2060/Chart.tsx similarity index 96% rename from packages/legacy/src/smart/ui/application/pas2060/Chart.tsx rename to src/smart/ui/application/pas2060/Chart.tsx index 647de7c9..656cfa6f 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/Chart.tsx +++ b/src/smart/ui/application/pas2060/Chart.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; const path = 'M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831'; diff --git a/packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx b/src/smart/ui/application/pas2060/ConfigurePage.tsx similarity index 92% rename from packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx rename to src/smart/ui/application/pas2060/ConfigurePage.tsx index 50c9d47a..e181d86e 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx +++ b/src/smart/ui/application/pas2060/ConfigurePage.tsx @@ -9,16 +9,17 @@ import { Tooltip2 } from '@blueprintjs/popover2'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext } from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import BuildingMap from './BuildingMap'; -import { obtainData } from './DataFeeder'; -import { +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import BuildingMap from '@/smart/ui/application/pas2060/BuildingMap'; +import { obtainData } from '@/smart/ui/application/pas2060/DataFeeder'; +import type { Application2060Setting, - EmissionSource, + EmissionSource } from '@/smart/ui/application/pas2060/model'; +import { fixedlocalhost, -} from './model'; -import { propagateReadings } from './ReadingCalculator'; +} from '@/smart/ui/application/pas2060/model'; +import { propagateReadings } from '@/smart/ui/application/pas2060/ReadingCalculator'; const ApplicationConfigurePage: React.FC<{ onClose: () => void; diff --git a/packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts b/src/smart/ui/application/pas2060/DataFeeder.ts similarity index 94% rename from packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts rename to src/smart/ui/application/pas2060/DataFeeder.ts index 6250d152..eb1a117b 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts +++ b/src/smart/ui/application/pas2060/DataFeeder.ts @@ -1,4 +1,5 @@ -import { fixedlocalhost, SensorReading } from './model'; +import type { SensorReading } from '@/smart/ui/application/pas2060/model'; +import { fixedlocalhost } from '@/smart/ui/application/pas2060/model'; export function obtainData(url: string): SensorReading[] { if (url === fixedlocalhost) { diff --git a/packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx b/src/smart/ui/application/pas2060/LogPage.tsx similarity index 87% rename from packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx rename to src/smart/ui/application/pas2060/LogPage.tsx index 71a86a59..4e90a3b6 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx +++ b/src/smart/ui/application/pas2060/LogPage.tsx @@ -2,14 +2,15 @@ import { Button, ButtonGroup, HTMLTable, InputGroup } from '@blueprintjs/core'; import { Classes } from '@blueprintjs/popover2'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; -import { CSSProperties, useContext, useState } from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; -import { FILE_TYPE, saveToFileSystem } from '../../../utils/IOFunctions'; -import { NormalComboBox } from '../../common/fields'; -import updateMeasurementView from '../../measurement/MeasurementResultFormatter'; -import { Log2060, LogRecord } from './model'; +import type { CSSProperties } from 'react'; +import { useContext, useState } from 'react'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import { NormalComboBox } from '@/smart/ui/common/fields'; +import updateMeasurementView from '@/smart/ui/measurement/MeasurementResultFormatter'; +import type { Log2060, LogRecord } from '@/smart/ui/application/pas2060/model'; const options = ['No filter', 'Pass', 'Fail'] as const; type ResultType = typeof options[number]; diff --git a/packages/legacy/src/smart/ui/application/pas2060/Main.tsx b/src/smart/ui/application/pas2060/Main.tsx similarity index 84% rename from packages/legacy/src/smart/ui/application/pas2060/Main.tsx rename to src/smart/ui/application/pas2060/Main.tsx index b6e85a5d..ec453f09 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/Main.tsx +++ b/src/smart/ui/application/pas2060/Main.tsx @@ -1,42 +1,44 @@ +import type { + IToastProps } from '@blueprintjs/core'; import { Text, Button, ButtonGroup, - Dialog, - IToastProps, + Dialog } from '@blueprintjs/core'; import { useEffect, useMemo, useState } from 'react'; import { applicationDialogLayout, dialogLayout, dialogLayoutFull, -} from '../../../../css/layout'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDHeading from '../../../MGDComponents/MGDHeading'; -import MGDSidebar from '../../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../../model/editormodel'; -import Chart from './Chart'; -import ApplicationConfigurePage from './ConfigurePage'; -import ApplicationLogPage from './LogPage'; -import { +} from '@/css/layout'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { EditorModel } from '@/smart/model/editormodel'; +import Chart from '@/smart/ui/application/pas2060/Chart'; +import ApplicationConfigurePage from '@/smart/ui/application/pas2060/ConfigurePage'; +import ApplicationLogPage from '@/smart/ui/application/pas2060/LogPage'; +import type { Application2060Setting, - colors2060, Dialog2060Interface, - fixedlocalhost, Log2060, - ReadingRecord, -} from './model'; + ReadingRecord } from '@/smart/ui/application/pas2060/model'; +import { + colors2060, + fixedlocalhost +} from '@/smart/ui/application/pas2060/model'; import { setInterval, clearInterval } from 'timers'; -import { obtainData } from './DataFeeder'; +import { obtainData } from '@/smart/ui/application/pas2060/DataFeeder'; import { makeRecord, propagateReadings, testMeasurement2060, -} from './ReadingCalculator'; +} from '@/smart/ui/application/pas2060/ReadingCalculator'; import { Popover2 } from '@blueprintjs/popover2'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; import React from 'react'; -import * as Logger from '../../../../lib/logger'; +import * as Logger from '@/lib/logger'; const Application2060: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/application/pas2060/MyMapBackground.tsx b/src/smart/ui/application/pas2060/MyMapBackground.tsx similarity index 100% rename from packages/legacy/src/smart/ui/application/pas2060/MyMapBackground.tsx rename to src/smart/ui/application/pas2060/MyMapBackground.tsx diff --git a/packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts b/src/smart/ui/application/pas2060/ReadingCalculator.ts similarity index 84% rename from packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts rename to src/smart/ui/application/pas2060/ReadingCalculator.ts index 3d0fb1b7..d3e00fad 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts +++ b/src/smart/ui/application/pas2060/ReadingCalculator.ts @@ -1,7 +1,7 @@ -import { EditorModel } from '../../../model/editormodel'; -import { EnviromentValues } from '../../../model/Measurement'; -import { checkModelMeasurement } from '../../../utils/measurement/Checker'; -import { EmissionSource, ReadingRecord, SensorReading } from './model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { EnviromentValues } from '@/smart/model/Measurement'; +import { checkModelMeasurement } from '@/smart/utils/measurement/Checker'; +import type { EmissionSource, ReadingRecord, SensorReading } from '@/smart/ui/application/pas2060/model'; export function propagateReadings( readings: SensorReading[], diff --git a/packages/legacy/src/smart/ui/application/pas2060/model.tsx b/src/smart/ui/application/pas2060/model.tsx similarity index 95% rename from packages/legacy/src/smart/ui/application/pas2060/model.tsx rename to src/smart/ui/application/pas2060/model.tsx index 64b8fa26..baba8472 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/model.tsx +++ b/src/smart/ui/application/pas2060/model.tsx @@ -1,4 +1,4 @@ -import { MeasureResult } from '../../../model/Measurement'; +import type { MeasureResult } from '@/smart/model/Measurement'; export interface Application2060Setting { source: string; diff --git a/packages/legacy/src/smart/ui/application/plugin.ts b/src/smart/ui/application/plugin.ts similarity index 74% rename from packages/legacy/src/smart/ui/application/plugin.ts rename to src/smart/ui/application/plugin.ts index 5da88b95..aec8a26f 100644 --- a/packages/legacy/src/smart/ui/application/plugin.ts +++ b/src/smart/ui/application/plugin.ts @@ -1,8 +1,8 @@ -import { IToastProps } from '@blueprintjs/core'; -import { EditorModel } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import Application27001 from './ISO27001/Main'; -import Application2060 from './pas2060/Main'; +import type { IToastProps } from '@blueprintjs/core'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import Application27001 from '@/smart/ui/application/ISO27001/Main'; +import Application2060 from '@/smart/ui/application/pas2060/Main'; export interface PluginInterface { model: EditorModel; diff --git a/packages/legacy/src/smart/ui/application/readme.md b/src/smart/ui/application/readme.md similarity index 100% rename from packages/legacy/src/smart/ui/application/readme.md rename to src/smart/ui/application/readme.md diff --git a/packages/legacy/src/smart/ui/checklist/AttributeField.tsx b/src/smart/ui/checklist/AttributeField.tsx similarity index 72% rename from packages/legacy/src/smart/ui/checklist/AttributeField.tsx rename to src/smart/ui/checklist/AttributeField.tsx index 3bcdfd7a..6ca1841c 100644 --- a/packages/legacy/src/smart/ui/checklist/AttributeField.tsx +++ b/src/smart/ui/checklist/AttributeField.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; -import { MMELReference } from '../../serialize/interface/supportinterface'; -import { ReferenceList } from '../common/description/ComponentList'; -import { NonEmptyFieldDescription } from '../common/description/fields'; -import { CLDescriptionItem } from './CustomFields'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import { ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; +import { CLDescriptionItem } from '@/smart/ui/checklist/CustomFields'; const ChecklistAttribute: React.FC<{ att: MMELDataAttribute; diff --git a/packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx b/src/smart/ui/checklist/CheckListAddon.tsx similarity index 90% rename from packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx rename to src/smart/ui/checklist/CheckListAddon.tsx index a8659653..86b6b7d0 100644 --- a/packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx +++ b/src/smart/ui/checklist/CheckListAddon.tsx @@ -5,14 +5,15 @@ import { flowProgressLabelWithButton, flowPercentageLabel, flowProgressLabel, -} from '../../../css/visual'; -import { ChecklistPackage } from '../../model/checklist'; +} from '@/css/visual'; +import type { ChecklistPackage } from '@/smart/model/checklist'; +import type { + EditorNode } from '@/smart/model/editormodel'; import { - EditorNode, isEditorEgate, isEditorProcess, isEditorRegistry, -} from '../../model/editormodel'; +} from '@/smart/model/editormodel'; const CheckListAddon: React.FC<{ element: EditorNode; diff --git a/packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx b/src/smart/ui/checklist/CheckListConfigPane.tsx similarity index 82% rename from packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx rename to src/smart/ui/checklist/CheckListConfigPane.tsx index be51b24b..2a039216 100644 --- a/packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx +++ b/src/smart/ui/checklist/CheckListConfigPane.tsx @@ -1,29 +1,30 @@ import { Button, Checkbox, Text } from '@blueprintjs/core'; import React from 'react'; import { useEffect, useState } from 'react'; -import MGDLabel from '../../MGDComponents/MGDLabel'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { ChecklistCallback, ChecklistPackage, ChecklistResult, ChecklistSetting, -} from '../../model/checklist'; -import { EditorModel } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { updateResult } from '../../utils/checklist/ChecklistCalculator'; +} from '@/smart/model/checklist'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { updateResult } from '@/smart/utils/checklist/ChecklistCalculator'; import { calEdgeAnimated, calEdgeColor, getCheckListView, -} from '../../utils/checklist/ChecklistViewer'; +} from '@/smart/utils/checklist/ChecklistViewer'; import { calculateTaskList, initResult, -} from '../../utils/checklist/CheckllistInitializer'; -import { MODAILITYOPTIONS, ModalityType } from '../../utils/constants'; -import CircleGraph from '../dashboard/CircleGraph'; -import { CustomCLAttribute, CustomCLProvision } from './CustomFields'; +} from '@/smart/utils/checklist/CheckllistInitializer'; +import type { ModalityType } from '@/smart/utils/constants'; +import { MODAILITYOPTIONS } from '@/smart/utils/constants'; +import CircleGraph from '@/smart/ui/dashboard/CircleGraph'; +import { CustomCLAttribute, CustomCLProvision } from '@/smart/ui/checklist/CustomFields'; const ModalityText: Record = { '' : 'Not specified (empty)', diff --git a/packages/legacy/src/smart/ui/checklist/CustomFields.tsx b/src/smart/ui/checklist/CustomFields.tsx similarity index 76% rename from packages/legacy/src/smart/ui/checklist/CustomFields.tsx rename to src/smart/ui/checklist/CustomFields.tsx index 6ff21927..72eb78dc 100644 --- a/packages/legacy/src/smart/ui/checklist/CustomFields.tsx +++ b/src/smart/ui/checklist/CustomFields.tsx @@ -1,16 +1,17 @@ import { Checkbox } from '@blueprintjs/core'; import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import { ChecklistPackage, getCheckListId } from '../../model/checklist'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; -import { +import { mgdLabel } from '@/css/form'; +import type { ChecklistPackage } from '@/smart/model/checklist'; +import { getCheckListId } from '@/smart/model/checklist'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELProvision, MMELReference, -} from '../../serialize/interface/supportinterface'; -import { DescribeProvision } from '../common/description/ComponentDescription'; -import { DescribeAttribute } from '../common/description/data'; -import ChecklistAttribute from './AttributeField'; -import ChecklistProvision from './ProvisionField'; +} from '@paneron/libmmel/interface/supportinterface'; +import { DescribeProvision } from '@/smart/ui/common/description/ComponentDescription'; +import { DescribeAttribute } from '@/smart/ui/common/description/data'; +import ChecklistAttribute from '@/smart/ui/checklist/AttributeField'; +import ChecklistProvision from '@/smart/ui/checklist/ProvisionField'; export const CustomCLAttribute: React.FC<{ att: MMELDataAttribute; diff --git a/packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx b/src/smart/ui/checklist/ProgressSetter.tsx similarity index 92% rename from packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx rename to src/smart/ui/checklist/ProgressSetter.tsx index ecd0e88a..72c0a074 100644 --- a/packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx +++ b/src/smart/ui/checklist/ProgressSetter.tsx @@ -1,7 +1,7 @@ import { Button, ControlGroup, NumericInput } from '@blueprintjs/core'; import React from 'react'; import { useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; const ProgressSetter: React.FC<{ initial: number; diff --git a/packages/legacy/src/smart/ui/checklist/ProvisionField.tsx b/src/smart/ui/checklist/ProvisionField.tsx similarity index 77% rename from packages/legacy/src/smart/ui/checklist/ProvisionField.tsx rename to src/smart/ui/checklist/ProvisionField.tsx index df41c99d..ce8449bb 100644 --- a/packages/legacy/src/smart/ui/checklist/ProvisionField.tsx +++ b/src/smart/ui/checklist/ProvisionField.tsx @@ -1,14 +1,14 @@ import { Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; -import { +import type { MMELProvision, MMELReference, -} from '../../serialize/interface/supportinterface'; -import { ReferenceList } from '../common/description/ComponentList'; -import { NonEmptyFieldDescription } from '../common/description/fields'; -import { CLDescriptionItem } from './CustomFields'; -import ProgressSetter from './ProgressSetter'; +} from '@paneron/libmmel/interface/supportinterface'; +import { ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; +import { CLDescriptionItem } from '@/smart/ui/checklist/CustomFields'; +import ProgressSetter from '@/smart/ui/checklist/ProgressSetter'; const ChecklistProvision: React.FC<{ provision: MMELProvision; diff --git a/packages/legacy/src/smart/ui/comment/AskForComment.tsx b/src/smart/ui/comment/AskForComment.tsx similarity index 84% rename from packages/legacy/src/smart/ui/comment/AskForComment.tsx rename to src/smart/ui/comment/AskForComment.tsx index 038e9ac1..32c78e9b 100644 --- a/packages/legacy/src/smart/ui/comment/AskForComment.tsx +++ b/src/smart/ui/comment/AskForComment.tsx @@ -1,7 +1,7 @@ import { Button, ButtonGroup } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { NormalTextField } from '../common/fields'; +import { popoverPanelContainer } from '@/css/layout'; +import { NormalTextField } from '@/smart/ui/common/fields'; const AskForComment: React.FC<{ onSubmit: (msg: string) => void; diff --git a/packages/legacy/src/smart/ui/comment/CommentContainer.tsx b/src/smart/ui/comment/CommentContainer.tsx similarity index 77% rename from packages/legacy/src/smart/ui/comment/CommentContainer.tsx rename to src/smart/ui/comment/CommentContainer.tsx index 0ee0ce43..1d4fd466 100644 --- a/packages/legacy/src/smart/ui/comment/CommentContainer.tsx +++ b/src/smart/ui/comment/CommentContainer.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { CommentInstance } from '../../utils/Comments'; -import CommentEntry from './CommentEntry'; -import CommentField from './CommentField'; +import { popoverPanelContainer } from '@/css/layout'; +import type { CommentInstance } from '@/smart/utils/Comments'; +import CommentEntry from '@/smart/ui/comment/CommentEntry'; +import CommentField from '@/smart/ui/comment/CommentField'; const CommentContainer: React.FC<{ comments: CommentInstance[]; diff --git a/packages/legacy/src/smart/ui/comment/CommentEntry.tsx b/src/smart/ui/comment/CommentEntry.tsx similarity index 93% rename from packages/legacy/src/smart/ui/comment/CommentEntry.tsx rename to src/smart/ui/comment/CommentEntry.tsx index 6d88b8c5..e6e03f98 100644 --- a/packages/legacy/src/smart/ui/comment/CommentEntry.tsx +++ b/src/smart/ui/comment/CommentEntry.tsx @@ -1,7 +1,7 @@ import { Button, ButtonGroup, Switch } from '@blueprintjs/core'; import React from 'react'; -import { CommentInstance } from '../../utils/Comments'; -import CommentField from './CommentField'; +import type { CommentInstance } from '@/smart/utils/Comments'; +import CommentField from '@/smart/ui/comment/CommentField'; const CommentEntry: React.FC<{ comment: CommentInstance; diff --git a/packages/legacy/src/smart/ui/comment/CommentField.tsx b/src/smart/ui/comment/CommentField.tsx similarity index 92% rename from packages/legacy/src/smart/ui/comment/CommentField.tsx rename to src/smart/ui/comment/CommentField.tsx index 9a1f1d25..1163c3ad 100644 --- a/packages/legacy/src/smart/ui/comment/CommentField.tsx +++ b/src/smart/ui/comment/CommentField.tsx @@ -2,7 +2,7 @@ import { Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import AskForComment from './AskForComment'; +import AskForComment from '@/smart/ui/comment/AskForComment'; const CommentField: React.FC<{ title: string; diff --git a/packages/legacy/src/smart/ui/comment/NodeComment.tsx b/src/smart/ui/comment/NodeComment.tsx similarity index 86% rename from packages/legacy/src/smart/ui/comment/NodeComment.tsx rename to src/smart/ui/comment/NodeComment.tsx index aeac3eee..cb92273b 100644 --- a/packages/legacy/src/smart/ui/comment/NodeComment.tsx +++ b/src/smart/ui/comment/NodeComment.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { MMELComment } from '../../serialize/interface/supportinterface'; -import { CommentInstance, materialComments } from '../../utils/Comments'; -import CommentContainer from './CommentContainer'; +import type { MMELComment } from '@paneron/libmmel/interface/supportinterface'; +import { CommentInstance, materialComments } from '@/smart/utils/Comments'; +import CommentContainer from '@/smart/ui/comment/CommentContainer'; const NodeComment: React.FC<{ cids: Set; diff --git a/packages/legacy/src/smart/ui/common/Loading.tsx b/src/smart/ui/common/Loading.tsx similarity index 100% rename from packages/legacy/src/smart/ui/common/Loading.tsx rename to src/smart/ui/common/Loading.tsx diff --git a/packages/legacy/src/smart/ui/common/buttons.tsx b/src/smart/ui/common/buttons.tsx similarity index 95% rename from packages/legacy/src/smart/ui/common/buttons.tsx rename to src/smart/ui/common/buttons.tsx index 2a406ed6..fa46f8ba 100644 --- a/packages/legacy/src/smart/ui/common/buttons.tsx +++ b/src/smart/ui/common/buttons.tsx @@ -1,4 +1,5 @@ -import { Button, IconName, Intent, PopoverPosition } from '@blueprintjs/core'; +import type { IconName, Intent, PopoverPosition } from '@blueprintjs/core'; +import { Button } from '@blueprintjs/core'; import { Classes, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; diff --git a/packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx b/src/smart/ui/common/description/ComponentDescription.tsx similarity index 86% rename from packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx rename to src/smart/ui/common/description/ComponentDescription.tsx index 72161664..27755cf4 100644 --- a/packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx +++ b/src/smart/ui/common/description/ComponentDescription.tsx @@ -1,18 +1,18 @@ import React from 'react'; -import { +import type { EditorEGate, EditorSignalEvent, EditorTimerEvent, -} from '../../../model/editormodel'; -import { +} from '@/smart/model/editormodel'; +import type { MMELNote, MMELProvision, MMELReference, -} from '../../../serialize/interface/supportinterface'; -import { EdgeList, ReferenceList } from './ComponentList'; -import { DescriptionItem, NonEmptyFieldDescription } from './fields'; -import { MMELEdge } from '../../../serialize/interface/flowcontrolinterface'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +} from '@paneron/libmmel/interface/supportinterface'; +import { EdgeList, ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { DescriptionItem, NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; export const DescribeStart: React.FC = function () { return Start event ; diff --git a/packages/legacy/src/smart/ui/common/description/ComponentList.tsx b/src/smart/ui/common/description/ComponentList.tsx similarity index 91% rename from packages/legacy/src/smart/ui/common/description/ComponentList.tsx rename to src/smart/ui/common/description/ComponentList.tsx index bab8ce1e..0c3360aa 100644 --- a/packages/legacy/src/smart/ui/common/description/ComponentList.tsx +++ b/src/smart/ui/common/description/ComponentList.tsx @@ -1,19 +1,19 @@ import React from 'react'; -import { EditorRegistry } from '../../../model/editormodel'; -import { MMELDataAttribute } from '../../../serialize/interface/datainterface'; -import { MMELEdge } from '../../../serialize/interface/flowcontrolinterface'; -import { +import type { EditorRegistry } from '@/smart/model/editormodel'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELNote, MMELProvision, MMELReference, -} from '../../../serialize/interface/supportinterface'; -import { toRefSummary } from '../../../utils/ModelFunctions'; +} from '@paneron/libmmel/interface/supportinterface'; +import { toRefSummary } from '@/smart/utils/ModelFunctions'; import { DescribeEdge, DescribeNote, DescribeProvision, -} from './ComponentDescription'; -import { DescribeAttribute } from './data'; +} from '@/smart/ui/common/description/ComponentDescription'; +import { DescribeAttribute } from '@/smart/ui/common/description/data'; export const ApprovalRecordList: React.FC<{ regs: EditorRegistry[]; diff --git a/packages/legacy/src/smart/ui/common/description/FigureViewer.tsx b/src/smart/ui/common/description/FigureViewer.tsx similarity index 60% rename from packages/legacy/src/smart/ui/common/description/FigureViewer.tsx rename to src/smart/ui/common/description/FigureViewer.tsx index 823f8854..be290afa 100644 --- a/packages/legacy/src/smart/ui/common/description/FigureViewer.tsx +++ b/src/smart/ui/common/description/FigureViewer.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { MMELFigure } from '../../../serialize/interface/supportinterface'; -import { DescriptionItem } from './fields'; -import MultimediaView from './Multimedia'; +import type { MMELFigure } from '@paneron/libmmel/interface/supportinterface'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import MultimediaView from '@/smart/ui/common/description/Multimedia'; const FigureViewer: React.FC<{ fig: MMELFigure; diff --git a/packages/legacy/src/smart/ui/common/description/LegendPane.tsx b/src/smart/ui/common/description/LegendPane.tsx similarity index 76% rename from packages/legacy/src/smart/ui/common/description/LegendPane.tsx rename to src/smart/ui/common/description/LegendPane.tsx index f6eab16e..6062146a 100644 --- a/packages/legacy/src/smart/ui/common/description/LegendPane.tsx +++ b/src/smart/ui/common/description/LegendPane.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import MGDLegend from '../../../MGDComponents/MGDLegend'; -import MGDLegendEntry from '../../../MGDComponents/MGDLegendEntry'; -import { LegendInterface } from '../../../model/States'; +import MGDLegend from '@/smart/MGDComponents/MGDLegend'; +import MGDLegendEntry from '@/smart/MGDComponents/MGDLegendEntry'; +import type { LegendInterface } from '@/smart/model/States'; const LegendPane: React.FC<{ list: Record; diff --git a/packages/legacy/src/smart/ui/common/description/Multimedia.tsx b/src/smart/ui/common/description/Multimedia.tsx similarity index 73% rename from packages/legacy/src/smart/ui/common/description/Multimedia.tsx rename to src/smart/ui/common/description/Multimedia.tsx index f45d65f0..937365ef 100644 --- a/packages/legacy/src/smart/ui/common/description/Multimedia.tsx +++ b/src/smart/ui/common/description/Multimedia.tsx @@ -1,7 +1,8 @@ import { Text } from '@blueprintjs/core'; -import React, { CSSProperties } from 'react'; -import { BINARY_TYPE } from '../../../serialize/interface/supportinterface'; -// import ThreeD from '../../edit/figure/ThreeD'; +import type { CSSProperties } from 'react'; +import React from 'react'; +import type { BINARY_TYPE } from '@paneron/libmmel/interface/supportinterface'; +// import ThreeD from '@/smart/ui/edit/figure/ThreeD'; const MultimediaView: React.FC<{ type: BINARY_TYPE; diff --git a/packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx b/src/smart/ui/common/description/RepoBreadcrumb.tsx similarity index 81% rename from packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx rename to src/smart/ui/common/description/RepoBreadcrumb.tsx index 807f8035..96374643 100644 --- a/packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx +++ b/src/smart/ui/common/description/RepoBreadcrumb.tsx @@ -1,6 +1,7 @@ -import { BreadcrumbProps, Breadcrumbs } from '@blueprintjs/core'; +import type { BreadcrumbProps } from '@blueprintjs/core'; +import { Breadcrumbs } from '@blueprintjs/core'; import React from 'react'; -import { RepoHistory } from '../../../model/history'; +import type { RepoHistory } from '@/smart/model/history'; const RepoBreadcrumb: React.FC<{ repoHis: RepoHistory; diff --git a/packages/legacy/src/smart/ui/common/description/TableViewer.tsx b/src/smart/ui/common/description/TableViewer.tsx similarity index 89% rename from packages/legacy/src/smart/ui/common/description/TableViewer.tsx rename to src/smart/ui/common/description/TableViewer.tsx index 6b3b7d33..c4c0c05f 100644 --- a/packages/legacy/src/smart/ui/common/description/TableViewer.tsx +++ b/src/smart/ui/common/description/TableViewer.tsx @@ -1,7 +1,7 @@ import { HTMLTable, Text } from '@blueprintjs/core'; import React from 'react'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { DescriptionItem } from './fields'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const TableViewer: React.FC<{ table: MMELTable; diff --git a/packages/legacy/src/smart/ui/common/description/approval.tsx b/src/smart/ui/common/description/approval.tsx similarity index 79% rename from packages/legacy/src/smart/ui/common/description/approval.tsx rename to src/smart/ui/common/description/approval.tsx index 5a838730..62890e0c 100644 --- a/packages/legacy/src/smart/ui/common/description/approval.tsx +++ b/src/smart/ui/common/description/approval.tsx @@ -1,15 +1,15 @@ import React from 'react'; -import { EditorApproval, EditorRegistry } from '../../../model/editormodel'; -import { +import type { EditorApproval, EditorRegistry } from '@/smart/model/editormodel'; +import type { MMELReference, MMELRole, -} from '../../../serialize/interface/supportinterface'; -import { ApprovalRecordList, ReferenceList } from './ComponentList'; +} from '@paneron/libmmel/interface/supportinterface'; +import { ApprovalRecordList, ReferenceList } from '@/smart/ui/common/description/ComponentList'; import { ActorDescription, DescriptionItem, NonEmptyFieldDescription, -} from './fields'; +} from '@/smart/ui/common/description/fields'; export const DescribeApproval: React.FC<{ app: EditorApproval; diff --git a/packages/legacy/src/smart/ui/common/description/data.tsx b/src/smart/ui/common/description/data.tsx similarity index 82% rename from packages/legacy/src/smart/ui/common/description/data.tsx rename to src/smart/ui/common/description/data.tsx index 784138b3..9511afe3 100644 --- a/packages/legacy/src/smart/ui/common/description/data.tsx +++ b/src/smart/ui/common/description/data.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { EditorDataClass, EditorRegistry } from '../../../model/editormodel'; -import { MMELDataAttribute } from '../../../serialize/interface/datainterface'; -import { MMELReference } from '../../../serialize/interface/supportinterface'; -import { AttributeList, ReferenceList } from './ComponentList'; -import { DescriptionItem, NonEmptyFieldDescription } from './fields'; +import type { EditorDataClass, EditorRegistry } from '@/smart/model/editormodel'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import { AttributeList, ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { DescriptionItem, NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; export const DescribeRegistry: React.FC<{ reg: EditorRegistry; diff --git a/packages/legacy/src/smart/ui/common/description/fields.tsx b/src/smart/ui/common/description/fields.tsx similarity index 85% rename from packages/legacy/src/smart/ui/common/description/fields.tsx rename to src/smart/ui/common/description/fields.tsx index 664c3013..2f996701 100644 --- a/packages/legacy/src/smart/ui/common/description/fields.tsx +++ b/src/smart/ui/common/description/fields.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { mgdLabel } from '../../../../css/form'; -import { HistoryAction } from '../../../model/editor/history'; -import { HistoryItem } from '../../../model/history'; -import { MMELRole } from '../../../serialize/interface/supportinterface'; +import { mgdLabel } from '@/css/form'; +import type { HistoryAction } from '@/smart/model/editor/history'; +import type { HistoryItem } from '@/smart/model/history'; +import type { MMELRole } from '@paneron/libmmel/interface/supportinterface'; interface Breadcrumb { label: JSX.Element; diff --git a/packages/legacy/src/smart/ui/common/description/process.tsx b/src/smart/ui/common/description/process.tsx similarity index 78% rename from packages/legacy/src/smart/ui/common/description/process.tsx rename to src/smart/ui/common/description/process.tsx index f0ba3da2..3bfa6fea 100644 --- a/packages/legacy/src/smart/ui/common/description/process.tsx +++ b/src/smart/ui/common/description/process.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { EditorProcess } from '../../../model/editormodel'; -import { +import type { EditorProcess } from '@/smart/model/editormodel'; +import type { MMELNote, MMELProvision, MMELReference, MMELRole, -} from '../../../serialize/interface/supportinterface'; -import { ActorDescription, DescriptionItem } from './fields'; -import { MeasurementList, NotesList, ProvisionList } from './ComponentList'; +} from '@paneron/libmmel/interface/supportinterface'; +import { ActorDescription, DescriptionItem } from '@/smart/ui/common/description/fields'; +import { MeasurementList, NotesList, ProvisionList } from '@/smart/ui/common/description/ComponentList'; export const DescribeProcess: React.FC<{ process: EditorProcess; diff --git a/packages/legacy/src/smart/ui/common/fields.tsx b/src/smart/ui/common/fields.tsx similarity index 96% rename from packages/legacy/src/smart/ui/common/fields.tsx rename to src/smart/ui/common/fields.tsx index 70e42545..dbaf34bc 100644 --- a/packages/legacy/src/smart/ui/common/fields.tsx +++ b/src/smart/ui/common/fields.tsx @@ -1,27 +1,29 @@ /** @jsx jsx */ import { jsx } from '@emotion/react'; +import type { + IconName } from '@blueprintjs/core'; import { Button, FormGroup, HTMLSelect, - IconName, NumericInput, } from '@blueprintjs/core'; -import React, { RefObject, useState } from 'react'; -import { EditorModel } from '../../model/editormodel'; -import MGDTextarea from '../../MGDComponents/MGDTextarea'; +import type { RefObject } from 'react'; +import React, { useState } from 'react'; +import type { EditorModel } from '@/smart/model/editormodel'; +import MGDTextarea from '@/smart/MGDComponents/MGDTextarea'; import { mgd_input, mgd_label, mgd_select, mgd_select__constrained, -} from '../../../css/form'; +} from '@/css/form'; import { shame__mystery_container, shame__mystery_container__column, -} from '../../../css/shame'; -import { MMELTable } from '../../serialize/interface/supportinterface'; +} from '@/css/shame'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; export interface IAdditionalListButton { text: string; diff --git a/packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx b/src/smart/ui/common/listmanagement/itemupdate.tsx similarity index 78% rename from packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx rename to src/smart/ui/common/listmanagement/itemupdate.tsx index 3f888940..5245caab 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx +++ b/src/smart/ui/common/listmanagement/itemupdate.tsx @@ -1,9 +1,9 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDButtonGroup from '../../../MGDComponents/MGDButtonGroup'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { IUpdateInterface } from '../fields'; -import { IObject } from '../../common/listmanagement/listPopoverItem'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { IUpdateInterface } from '@/smart/ui/common/fields'; +import type { IObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; const ItemUpdatePane = (props: IUpdateInterface) => { const { diff --git a/packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx b/src/smart/ui/common/listmanagement/listPopoverItem.tsx similarity index 89% rename from packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx rename to src/smart/ui/common/listmanagement/listPopoverItem.tsx index d9994097..eb4706f6 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx +++ b/src/smart/ui/common/listmanagement/listPopoverItem.tsx @@ -1,19 +1,19 @@ import { Dialog } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { dialogLayout } from '../../../../css/layout'; -import { EditorModel } from '../../../model/editormodel'; -import { MMELObject } from '../../../serialize/interface/baseinterface'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; +import { dialogLayout } from '@/css/layout'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELObject } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; import { checkId, defaultItemSorter, defaultItemSorterAsNum, findUniqueID, itemSorterByText, -} from '../../../utils/ModelFunctions'; -import { IListItem, IUpdateInterface, IViewListInterface } from '../fields'; -import ItemUpdatePane from './itemupdate'; -import ListViewPane from './listview'; +} from '@/smart/utils/ModelFunctions'; +import type { IListItem, IUpdateInterface, IViewListInterface } from '@/smart/ui/common/fields'; +import ItemUpdatePane from '@/smart/ui/common/listmanagement/itemupdate'; +import ListViewPane from '@/smart/ui/common/listmanagement/listview'; export interface IObject { id: string; diff --git a/packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx b/src/smart/ui/common/listmanagement/listmanagement.tsx similarity index 89% rename from packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx rename to src/smart/ui/common/listmanagement/listmanagement.tsx index d2a8bc61..aa4f6aaa 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx +++ b/src/smart/ui/common/listmanagement/listmanagement.tsx @@ -1,12 +1,12 @@ import React, { useState } from 'react'; -import { +import type { IManageHandler, IUpdateInterface, IViewListInterface, -} from '../fields'; -import ItemUpdatePane from './itemupdate'; -import ListViewPane from './listview'; -import { IObject } from '../../common/listmanagement/listPopoverItem'; +} from '@/smart/ui/common/fields'; +import ItemUpdatePane from '@/smart/ui/common/listmanagement/itemupdate'; +import ListViewPane from '@/smart/ui/common/listmanagement/listview'; +import type { IObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export enum ListManagePageType { VIEW = 'view', diff --git a/packages/legacy/src/smart/ui/common/listmanagement/listview.tsx b/src/smart/ui/common/listmanagement/listview.tsx similarity index 93% rename from packages/legacy/src/smart/ui/common/listmanagement/listview.tsx rename to src/smart/ui/common/listmanagement/listview.tsx index fbcb3702..22a0922e 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/listview.tsx +++ b/src/smart/ui/common/listmanagement/listview.tsx @@ -4,16 +4,17 @@ import { Button } from '@blueprintjs/core'; import { jsx } from '@emotion/react'; import React from 'react'; -import { RefObject, useState } from 'react'; +import type { RefObject } from 'react'; +import { useState } from 'react'; import { mgd_input, mgd_label, mgd_select, mgd_select__restrained, -} from '../../../../css/form'; -import { u__display__block, u__display__none } from '../../../../css/utility'; -import MGDButtonGroup from '../../../MGDComponents/MGDButtonGroup'; -import { IViewListInterface } from '../fields'; +} from '@/css/form'; +import { u__display__block, u__display__none } from '@/css/utility'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import type { IViewListInterface } from '@/smart/ui/common/fields'; const ListViewPane: React.FC = ({ filterName, diff --git a/packages/legacy/src/smart/ui/common/readme.md b/src/smart/ui/common/readme.md similarity index 100% rename from packages/legacy/src/smart/ui/common/readme.md rename to src/smart/ui/common/readme.md diff --git a/packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx b/src/smart/ui/control/ChangeLogViewer.tsx similarity index 90% rename from packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx rename to src/smart/ui/control/ChangeLogViewer.tsx index 7907e474..20052c85 100644 --- a/packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx +++ b/src/smart/ui/control/ChangeLogViewer.tsx @@ -4,15 +4,14 @@ import { jsx } from '@emotion/react'; import { Button, Dialog, TextArea } from '@blueprintjs/core'; -import React from 'react'; -import { dialog_layout, dialog_layout__full } from '../../../css/layout'; -import { ChangeLog, ChangeLogEvent } from '../../model/changelog'; -import { ModelAction } from '../../model/editor/model'; -import { CommentAction } from '../../model/editor/components/comment'; +import { dialog_layout, dialog_layout__full } from '@/css/layout'; +import type { ChangeLog, ChangeLogEvent } from '@/smart/model/changelog'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { CommentAction } from '@/smart/model/editor/components/comment'; import { Popover2 } from '@blueprintjs/popover2'; -import { ElmAction } from '../../model/editor/components/elements'; -import { HyEditAction } from '../../model/editor/hybird/distributor'; -import { PageAction } from '../../model/editor/components/pages'; +import type { ElmAction } from '@/smart/model/editor/components/elements'; +import type { HyEditAction } from '@/smart/model/editor/hybird/distributor'; +import type { PageAction } from '@/smart/model/editor/components/pages'; const ChangeLogDialog: React.FC<{ log: ChangeLog; diff --git a/packages/legacy/src/smart/ui/control/buttons.tsx b/src/smart/ui/control/buttons.tsx similarity index 91% rename from packages/legacy/src/smart/ui/control/buttons.tsx rename to src/smart/ui/control/buttons.tsx index 222e57e8..f99239b1 100644 --- a/packages/legacy/src/smart/ui/control/buttons.tsx +++ b/src/smart/ui/control/buttons.tsx @@ -2,7 +2,8 @@ * Contains some buttons that are reused on multiple UIs */ -import { Icon, IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Icon } from '@blueprintjs/core'; import React from 'react'; import { ControlButton } from 'react-flow-renderer'; diff --git a/packages/legacy/src/smart/ui/control/newComponentPane.tsx b/src/smart/ui/control/newComponentPane.tsx similarity index 80% rename from packages/legacy/src/smart/ui/control/newComponentPane.tsx rename to src/smart/ui/control/newComponentPane.tsx index 2de1d022..48033390 100644 --- a/packages/legacy/src/smart/ui/control/newComponentPane.tsx +++ b/src/smart/ui/control/newComponentPane.tsx @@ -1,19 +1,20 @@ import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import MGDComponentBar from '../../MGDComponents/MGDComponentBar'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDProcessBox from '../../MGDComponents/MGDProcessBox'; -import { DataType } from '../../serialize/interface/baseinterface'; +import { mgdLabel } from '@/css/form'; +import MGDComponentBar from '@/smart/MGDComponents/MGDComponentBar'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDProcessBox from '@/smart/MGDComponents/MGDProcessBox'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { + NewComponentTypes } from '@/smart/utils/constants'; import { - DragAndDropNewFormatType, - NewComponentTypes, -} from '../../utils/constants'; + DragAndDropNewFormatType +} from '@/smart/utils/constants'; import { EgateShape, EndShape, SignalCatchShape, TimerShape, -} from '../flowui/shapes'; +} from '@/smart/ui/flowui/shapes'; /** * It is the UI shown on the sidebar for adding new elements to the diagram diff --git a/packages/legacy/src/smart/ui/control/settings.tsx b/src/smart/ui/control/settings.tsx similarity index 79% rename from packages/legacy/src/smart/ui/control/settings.tsx rename to src/smart/ui/control/settings.tsx index af7bef92..ad45cafd 100644 --- a/packages/legacy/src/smart/ui/control/settings.tsx +++ b/src/smart/ui/control/settings.tsx @@ -8,27 +8,27 @@ import { jsx } from '@emotion/react'; import { Tab, Tabs } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { mgd_label } from '../../../css/form'; +import { mgd_label } from '@/css/form'; import { mgd_tabs__item, mgd_tabs__item__selected, mgd_tabs__item__unselected, -} from '../../../css/MGDTabs'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; -import DataClassEditPage from '../edit/dataclassedit'; -import EnumEditPage from '../edit/enumedit'; -import FigureEditPage from '../edit/figure/FigureEdit'; -import MeasurementEditPage from '../edit/measurementedit'; -import MetaEditPage from '../edit/metaedit'; -import ReferenceEditPage from '../edit/refedit'; -import RegistryEditPage from '../edit/registryedit'; -import RoleEditPage from '../edit/roleedit'; -import SectionEditPage from '../edit/SectionEditPage'; -import TableEditPage from '../edit/table/TableEdit'; -import TermsEditPage from '../edit/TermEdit'; -import ViewProfileEditPage from '../edit/ViewProfileEdit'; -import { EditorAction } from '../../model/editor/state'; +} from '@/css/MGDTabs'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorModel } from '@/smart/model/editormodel'; +import DataClassEditPage from '@/smart/ui/edit/dataclassedit'; +import EnumEditPage from '@/smart/ui/edit/enumedit'; +import FigureEditPage from '@/smart/ui/edit/figure/FigureEdit'; +import MeasurementEditPage from '@/smart/ui/edit/measurementedit'; +import MetaEditPage from '@/smart/ui/edit/metaedit'; +import ReferenceEditPage from '@/smart/ui/edit/refedit'; +import RegistryEditPage from '@/smart/ui/edit/registryedit'; +import RoleEditPage from '@/smart/ui/edit/roleedit'; +import SectionEditPage from '@/smart/ui/edit/SectionEditPage'; +import TableEditPage from '@/smart/ui/edit/table/TableEdit'; +import TermsEditPage from '@/smart/ui/edit/TermEdit'; +import ViewProfileEditPage from '@/smart/ui/edit/ViewProfileEdit'; +import type { EditorAction } from '@/smart/model/editor/state'; export enum SETTINGPAGE { METAPAGE = 'meta', diff --git a/packages/legacy/src/smart/ui/dashboard/CircleGraph.tsx b/src/smart/ui/dashboard/CircleGraph.tsx similarity index 100% rename from packages/legacy/src/smart/ui/dashboard/CircleGraph.tsx rename to src/smart/ui/dashboard/CircleGraph.tsx diff --git a/packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx b/src/smart/ui/dialog/EditorDialogs.tsx similarity index 85% rename from packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx rename to src/smart/ui/dialog/EditorDialogs.tsx index 9e2d1ddf..14348d30 100644 --- a/packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx +++ b/src/smart/ui/dialog/EditorDialogs.tsx @@ -1,25 +1,25 @@ import React from 'react'; -import { +import type { EditorApproval, EditorEGate, EditorModel, EditorProcess, EditorSignalEvent, EditorTimerEvent, -} from '../../model/editormodel'; -import { +} from '@/smart/model/editormodel'; +import type { DeletableNodeTypes, EditableNodeTypes, EditAction, -} from '../../utils/constants'; -import { DataType } from '../../serialize/interface/baseinterface'; -import EditProcessPage from '../edit/processedit'; -import EditApprovalPage from '../edit/approvaledit'; -import EditEGatePage from '../edit/egateedit'; -import EditTimerPage from '../edit/timeredit'; -import EditSignalEventPage from '../edit/signaleventedit'; -import { EditorAction } from '../../model/editor/state'; -import { ConfirmDialog } from './confirmdialog'; +} from '@/smart/utils/constants'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import EditProcessPage from '@/smart/ui/edit/processedit'; +import EditApprovalPage from '@/smart/ui/edit/approvaledit'; +import EditEGatePage from '@/smart/ui/edit/egateedit'; +import EditTimerPage from '@/smart/ui/edit/timeredit'; +import EditSignalEventPage from '@/smart/ui/edit/signaleventedit'; +import type { EditorAction } from '@/smart/model/editor/state'; +import { ConfirmDialog } from '@/smart/ui/dialog/confirmdialog'; export type DialogSetterInterface = ( nodeType: EditableNodeTypes | DeletableNodeTypes, diff --git a/packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx b/src/smart/ui/dialog/WorkspaceDiag.tsx similarity index 77% rename from packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx rename to src/smart/ui/dialog/WorkspaceDiag.tsx index a84e54dd..c833fec5 100644 --- a/packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx +++ b/src/smart/ui/dialog/WorkspaceDiag.tsx @@ -1,11 +1,11 @@ import { Dialog } from '@blueprintjs/core'; import React from 'react'; -import { dialogLayout } from '../../../css/layout'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; -import { SMARTDocumentStore, SMARTModelStore } from '../../model/workspace'; -import RegistryDocManagement from '../workspace/RegistryDocManagement'; -import WorkspaceRegistryList from '../workspace/RegistryList'; +import { dialogLayout } from '@/css/layout'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { SMARTDocumentStore, SMARTModelStore } from '@/smart/model/workspace'; +import RegistryDocManagement from '@/smart/ui/workspace/RegistryDocManagement'; +import WorkspaceRegistryList from '@/smart/ui/workspace/RegistryList'; export interface WorkspaceDiagPackage { regid: string; diff --git a/packages/legacy/src/smart/ui/dialog/confirmdialog.tsx b/src/smart/ui/dialog/confirmdialog.tsx similarity index 91% rename from packages/legacy/src/smart/ui/dialog/confirmdialog.tsx rename to src/smart/ui/dialog/confirmdialog.tsx index df651990..cdc4156b 100644 --- a/packages/legacy/src/smart/ui/dialog/confirmdialog.tsx +++ b/src/smart/ui/dialog/confirmdialog.tsx @@ -1,6 +1,6 @@ import { Button } from '@blueprintjs/core'; import React from 'react'; -import MGDButtonGroup from '../../MGDComponents/MGDButtonGroup'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; /** * A confirmation dialog. diff --git a/packages/legacy/src/smart/ui/dialog/dialogs.tsx b/src/smart/ui/dialog/dialogs.tsx similarity index 100% rename from packages/legacy/src/smart/ui/dialog/dialogs.tsx rename to src/smart/ui/dialog/dialogs.tsx diff --git a/packages/legacy/src/smart/ui/doc/DocImport.tsx b/src/smart/ui/doc/DocImport.tsx similarity index 76% rename from packages/legacy/src/smart/ui/doc/DocImport.tsx rename to src/smart/ui/doc/DocImport.tsx index 0918b6eb..524de123 100644 --- a/packages/legacy/src/smart/ui/doc/DocImport.tsx +++ b/src/smart/ui/doc/DocImport.tsx @@ -1,9 +1,9 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React, { useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { MMELDocument } from '../../model/document'; -import { plainToDoc } from '../../utils/DocumentFunctions'; -import { NormalTextField } from '../common/fields'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { MMELDocument } from '@/smart/model/document'; +import { plainToDoc } from '@/smart/utils/DocumentFunctions'; +import { NormalTextField } from '@/smart/ui/common/fields'; const DocImport: React.FC<{ setDoc: (x: MMELDocument) => void; diff --git a/packages/legacy/src/smart/ui/doc/DocSettings.tsx b/src/smart/ui/doc/DocSettings.tsx similarity index 78% rename from packages/legacy/src/smart/ui/doc/DocSettings.tsx rename to src/smart/ui/doc/DocSettings.tsx index aa66e823..62918d14 100644 --- a/packages/legacy/src/smart/ui/doc/DocSettings.tsx +++ b/src/smart/ui/doc/DocSettings.tsx @@ -1,8 +1,8 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { MMELDocument } from '../../model/document'; -import { NormalTextField } from '../common/fields'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { MMELDocument } from '@/smart/model/document'; +import { NormalTextField } from '@/smart/ui/common/fields'; const DocSettings: React.FC<{ doc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx b/src/smart/ui/doc/ParagraphEdit.tsx similarity index 81% rename from packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx rename to src/smart/ui/doc/ParagraphEdit.tsx index 497d869b..0f4bdcb3 100644 --- a/packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx +++ b/src/smart/ui/doc/ParagraphEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DocParagraph, DocStatement } from '../../model/document'; -import StatementEdit from './StatementEdit'; +import type { DocParagraph, DocStatement } from '@/smart/model/document'; +import StatementEdit from '@/smart/ui/doc/StatementEdit'; const ParagraphEdit: React.FC<{ para: DocParagraph; diff --git a/packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx b/src/smart/ui/doc/SMARTDocumentEdit.tsx similarity index 86% rename from packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx rename to src/smart/ui/doc/SMARTDocumentEdit.tsx index fd55a487..6514b91e 100644 --- a/packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx +++ b/src/smart/ui/doc/SMARTDocumentEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { MMELDocument } from '../../model/document'; -import SectionEdit from './SectionEdit'; +import type { MMELDocument } from '@/smart/model/document'; +import SectionEdit from '@/smart/ui/doc/SectionEdit'; const SMARTDocumentEdit: React.FC<{ doc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/doc/SectionEdit.tsx b/src/smart/ui/doc/SectionEdit.tsx similarity index 82% rename from packages/legacy/src/smart/ui/doc/SectionEdit.tsx rename to src/smart/ui/doc/SectionEdit.tsx index df968edb..6942fcf6 100644 --- a/packages/legacy/src/smart/ui/doc/SectionEdit.tsx +++ b/src/smart/ui/doc/SectionEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DocSection, DocStatement } from '../../model/document'; -import ParagraphEdit from './ParagraphEdit'; +import type { DocSection, DocStatement } from '@/smart/model/document'; +import ParagraphEdit from '@/smart/ui/doc/ParagraphEdit'; const SectionEdit: React.FC<{ sec: DocSection; diff --git a/packages/legacy/src/smart/ui/doc/StatementEdit.tsx b/src/smart/ui/doc/StatementEdit.tsx similarity index 91% rename from packages/legacy/src/smart/ui/doc/StatementEdit.tsx rename to src/smart/ui/doc/StatementEdit.tsx index d3e94250..8997de7d 100644 --- a/packages/legacy/src/smart/ui/doc/StatementEdit.tsx +++ b/src/smart/ui/doc/StatementEdit.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { DocStatement } from '../../model/document'; +import type { DocStatement } from '@/smart/model/document'; const StatementEdit: React.FC<{ statement: DocStatement; diff --git a/packages/legacy/src/smart/ui/docviewer.tsx b/src/smart/ui/docviewer.tsx similarity index 74% rename from packages/legacy/src/smart/ui/docviewer.tsx rename to src/smart/ui/docviewer.tsx index 6b819100..138d0c92 100644 --- a/packages/legacy/src/smart/ui/docviewer.tsx +++ b/src/smart/ui/docviewer.tsx @@ -1,14 +1,14 @@ -import { MMELRepo } from '../model/repo'; +import type { MMELRepo } from '@/smart/model/repo'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; -import SMARTDocumentView from './mapper/document/DocumentView'; +import SMARTDocumentView from '@/smart/ui/mapper/document/DocumentView'; import { useContext } from 'react'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { getPathByNS, RepoFileType } from '../utils/repo/io'; -import { MMELDocument } from '../model/document'; -import { LoadingScreen } from './common/Loading'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import type { MMELDocument } from '@/smart/model/document'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; import React from 'react'; -import { DOCVERSION } from '../utils/constants'; -import * as Logger from '../../lib/logger'; +import { DOCVERSION } from '@/smart/utils/constants'; +import * as Logger from '@/lib/logger'; const DocumentViewer: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/edit/LinkEdit.tsx b/src/smart/ui/edit/LinkEdit.tsx similarity index 77% rename from packages/legacy/src/smart/ui/edit/LinkEdit.tsx rename to src/smart/ui/edit/LinkEdit.tsx index 942e6e5e..8a2e4f52 100644 --- a/packages/legacy/src/smart/ui/edit/LinkEdit.tsx +++ b/src/smart/ui/edit/LinkEdit.tsx @@ -1,12 +1,13 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { +import type { LINK_TYPE, - LINK_TYPES, - MMELLink, -} from '../../serialize/interface/supportinterface'; -import { NormalComboBox, NormalTextField } from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; + MMELLink } from '@paneron/libmmel/interface/supportinterface'; +import { + LINK_TYPES +} from '@paneron/libmmel/interface/supportinterface'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import type { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export function matchLinkFilter(x: IMMELObject, filter: string): boolean { const link = x as MMELLink; diff --git a/packages/legacy/src/smart/ui/edit/NoteEdit.tsx b/src/smart/ui/edit/NoteEdit.tsx similarity index 77% rename from packages/legacy/src/smart/ui/edit/NoteEdit.tsx rename to src/smart/ui/edit/NoteEdit.tsx index b43206dc..47cdb215 100644 --- a/packages/legacy/src/smart/ui/edit/NoteEdit.tsx +++ b/src/smart/ui/edit/NoteEdit.tsx @@ -1,18 +1,19 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELNote, - NOTE_TYPE, + NOTE_TYPE } from '@paneron/libmmel/interface/supportinterface'; +import { NOTE_TYPES, -} from '../../serialize/interface/supportinterface'; -import { getModelAllRefs } from '../../utils/ModelFunctions'; +} from '@paneron/libmmel/interface/supportinterface'; +import { getModelAllRefs } from '@/smart/utils/ModelFunctions'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, -} from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +} from '@/smart/ui/common/fields'; +import type { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export function matchNoteFilter(x: IMMELObject, filter: string): boolean { const note = x as MMELNote; diff --git a/packages/legacy/src/smart/ui/edit/SectionEditPage.tsx b/src/smart/ui/edit/SectionEditPage.tsx similarity index 81% rename from packages/legacy/src/smart/ui/edit/SectionEditPage.tsx rename to src/smart/ui/edit/SectionEditPage.tsx index 9a55e192..33734204 100644 --- a/packages/legacy/src/smart/ui/edit/SectionEditPage.tsx +++ b/src/smart/ui/edit/SectionEditPage.tsx @@ -1,13 +1,14 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELTextSection } from '../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createTextSection } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { EditorAction } from '../../model/editor/state'; -import { ModelAction } from '../../model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELTextSection } from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createTextSection } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import type { EditorAction } from '@/smart/model/editor/state'; +import type { ModelAction } from '@/smart/model/editor/model'; const SectionEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/TermEdit.tsx b/src/smart/ui/edit/TermEdit.tsx similarity index 85% rename from packages/legacy/src/smart/ui/edit/TermEdit.tsx rename to src/smart/ui/edit/TermEdit.tsx index f0dd8867..be191425 100644 --- a/packages/legacy/src/smart/ui/edit/TermEdit.tsx +++ b/src/smart/ui/edit/TermEdit.tsx @@ -1,14 +1,15 @@ import { FormGroup } from '@blueprintjs/core'; // import { LocalizedConceptForm } from '@riboseinc/paneron-extension-glossarist/classes/localizedConcept/LocalizedConceptForm'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELTerm } from '../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createTerm } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import StringListQuickEdit from './components/StringListQuickEdit'; -import { ModelAction } from '../../model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELTerm } from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createTerm } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import StringListQuickEdit from '@/smart/ui/edit/components/StringListQuickEdit'; +import type { ModelAction } from '@/smart/model/editor/model'; const TermsEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx b/src/smart/ui/edit/ViewProfileEdit.tsx similarity index 90% rename from packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx rename to src/smart/ui/edit/ViewProfileEdit.tsx index 72bd5e08..179ac79b 100644 --- a/packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx +++ b/src/smart/ui/edit/ViewProfileEdit.tsx @@ -7,19 +7,21 @@ import { Switch, } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELView, VarType } from '../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createView } from '../../utils/EditorFactory'; -import { +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELView } from '@paneron/libmmel/interface/supportinterface'; +import { VarType } from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createView } from '@/smart/utils/EditorFactory'; +import type { IListItem, - IManageHandler, + IManageHandler } from '@/smart/ui/common/fields'; +import { NormalComboBox, NormalTextField, -} from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { InputableVarType } from '../../model/Measurement'; -import { ModelAction } from '../../model/editor/model'; +} from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import type { InputableVarType } from '@/smart/model/Measurement'; +import type { ModelAction } from '@/smart/model/editor/model'; const ViewProfileEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/approvaledit.tsx b/src/smart/ui/edit/approvaledit.tsx similarity index 91% rename from packages/legacy/src/smart/ui/edit/approvaledit.tsx rename to src/smart/ui/edit/approvaledit.tsx index ef72345b..5c12bcb5 100644 --- a/packages/legacy/src/smart/ui/edit/approvaledit.tsx +++ b/src/smart/ui/edit/approvaledit.tsx @@ -1,37 +1,37 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useMemo, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorApproval, EditorModel, EditorRegistry, -} from '../../model/editormodel'; +} from '@/smart/model/editormodel'; import { checkId, getModelAllRefs, getModelAllRegs, getModelAllRoles, removeSpace, -} from '../../utils/ModelFunctions'; -import { MODAILITYOPTIONS } from '../../utils/constants'; +} from '@/smart/utils/ModelFunctions'; +import { MODAILITYOPTIONS } from '@/smart/utils/constants'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, ReferenceSelector, -} from '../common/fields'; -import { EditPageButtons } from './commons'; -import { +} from '@/smart/ui/common/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import type { MMELReference, MMELRole, -} from '../../serialize/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import RoleSelector from './components/RoleSelector'; -import RegistrySelector from './components/RegistrySelector'; -import SimpleReferenceSelector from './components/ReferenceSelector'; -import { ModelAction } from '../../model/editor/model'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { editElmCommand } from '../../model/editor/commands/elements'; +} from '@paneron/libmmel/interface/supportinterface'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import RoleSelector from '@/smart/ui/edit/components/RoleSelector'; +import RegistrySelector from '@/smart/ui/edit/components/RegistrySelector'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; +import type { ModelAction } from '@/smart/model/editor/model'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { editElmCommand } from '@/smart/model/editor/commands/elements'; interface CommonApprovalEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/edit/attributeedit.tsx b/src/smart/ui/edit/attributeedit.tsx similarity index 85% rename from packages/legacy/src/smart/ui/edit/attributeedit.tsx rename to src/smart/ui/edit/attributeedit.tsx index f698e9d1..2b0ef92d 100644 --- a/packages/legacy/src/smart/ui/edit/attributeedit.tsx +++ b/src/smart/ui/edit/attributeedit.tsx @@ -1,26 +1,27 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { + EditorModel } from '@/smart/model/editormodel'; import { - EditorModel, isEditorDataClass, isEditorRegistry, -} from '../../model/editormodel'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; +} from '@/smart/model/editormodel'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { getReferenceDCTypeName, referenceSorter, -} from '../../utils/ModelFunctions'; -import { DATATYPE, MODAILITYOPTIONS } from '../../utils/constants'; -import { createDataAttribute } from '../../utils/EditorFactory'; +} from '@/smart/utils/ModelFunctions'; +import { DATATYPE, MODAILITYOPTIONS } from '@/smart/utils/constants'; +import { createDataAttribute } from '@/smart/utils/EditorFactory'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, ReferenceSelector, -} from '../common/fields'; -import ListWithPopoverItem from '../common/listmanagement/listPopoverItem'; -import { CardinalityField } from './components/CardinalityEdit'; +} from '@/smart/ui/common/fields'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; +import { CardinalityField } from '@/smart/ui/edit/components/CardinalityEdit'; const AttributeEditPage: React.FC<{ attributes: Record; diff --git a/packages/legacy/src/smart/ui/edit/commons.tsx b/src/smart/ui/edit/commons.tsx similarity index 92% rename from packages/legacy/src/smart/ui/edit/commons.tsx rename to src/smart/ui/edit/commons.tsx index b9727b24..194569e8 100644 --- a/packages/legacy/src/smart/ui/edit/commons.tsx +++ b/src/smart/ui/edit/commons.tsx @@ -1,13 +1,13 @@ import { Button } from '@blueprintjs/core'; import React from 'react'; -import MGDButtonGroup from '../../MGDComponents/MGDButtonGroup'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; import { AddSubprocessButton, BringOutButton, EditButton, RemoveButton, RemoveSubprocessButton, -} from '../common/buttons'; +} from '@/smart/ui/common/buttons'; export const EditPageButtons: React.FC<{ onUpdateClick?: () => void; diff --git a/packages/legacy/src/smart/ui/edit/components/AttributeList.tsx b/src/smart/ui/edit/components/AttributeList.tsx similarity index 86% rename from packages/legacy/src/smart/ui/edit/components/AttributeList.tsx rename to src/smart/ui/edit/components/AttributeList.tsx index 7a94dd01..ed0513f9 100644 --- a/packages/legacy/src/smart/ui/edit/components/AttributeList.tsx +++ b/src/smart/ui/edit/components/AttributeList.tsx @@ -1,27 +1,28 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; import { useMemo } from 'react'; +import type { + EditorModel } from '@/smart/model/editormodel'; import { - EditorModel, isEditorDataClass, isEditorRegistry, -} from '../../../model/editormodel'; -import { RefTextSelection } from '../../../model/selectionImport'; -import { DataType } from '../../../serialize/interface/baseinterface'; -import { MMELDataAttribute } from '../../../serialize/interface/datainterface'; -import { MMELReference } from '../../../serialize/interface/supportinterface'; -import { DATATYPE, MODAILITYOPTIONS } from '../../../utils/constants'; -import { createDataAttribute } from '../../../utils/EditorFactory'; +} from '@/smart/model/editormodel'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import { DATATYPE, MODAILITYOPTIONS } from '@/smart/utils/constants'; +import { createDataAttribute } from '@/smart/utils/EditorFactory'; import { findUniqueID, getModelAllRefs, getReferenceDCTypeName, trydefaultID, -} from '../../../utils/ModelFunctions'; -import { findExistingRef } from '../../../utils/ModelImport'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; -import DataTypeSelector from './DataTypeSelector'; -import SimpleReferenceSelector from './ReferenceSelector'; +} from '@/smart/utils/ModelFunctions'; +import { findExistingRef } from '@/smart/utils/ModelImport'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import DataTypeSelector from '@/smart/ui/edit/components/DataTypeSelector'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; export interface AttributeType { id: string; diff --git a/packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx b/src/smart/ui/edit/components/CardinalityEdit.tsx similarity index 85% rename from packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx rename to src/smart/ui/edit/components/CardinalityEdit.tsx index 3a51aa37..ee514004 100644 --- a/packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx +++ b/src/smart/ui/edit/components/CardinalityEdit.tsx @@ -1,11 +1,11 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; import { cardinalityToString, parseCardinality, -} from '../../../utils/ModelFunctions'; -import { NormalComboBox } from '../../common/fields'; +} from '@/smart/utils/ModelFunctions'; +import { NormalComboBox } from '@/smart/ui/common/fields'; export const CardinalityField: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx b/src/smart/ui/edit/components/DataTypeSelector.tsx similarity index 94% rename from packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx rename to src/smart/ui/edit/components/DataTypeSelector.tsx index d4f3cde7..b02506bf 100644 --- a/packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx +++ b/src/smart/ui/edit/components/DataTypeSelector.tsx @@ -1,12 +1,13 @@ import { Button, ButtonGroup, FormGroup, Menu } from '@blueprintjs/core'; -import { +import type { ItemListRenderer, ItemPredicate, - ItemRenderer, + ItemRenderer } from '@blueprintjs/select'; +import { Select, } from '@blueprintjs/select'; import React from 'react'; -import { AttributeType } from './AttributeList'; +import type { AttributeType } from '@/smart/ui/edit/components/AttributeList'; const DataTypeSelect = Select.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx b/src/smart/ui/edit/components/EdgeListEdit.tsx similarity index 76% rename from packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx rename to src/smart/ui/edit/components/EdgeListEdit.tsx index 967ab9d5..056474aa 100644 --- a/packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx +++ b/src/smart/ui/edit/components/EdgeListEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { MMELEdge } from '../../../serialize/interface/flowcontrolinterface'; -import { NormalTextField } from '../../common/fields'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import { NormalTextField } from '@/smart/ui/common/fields'; const EdgeQuickEdit: React.FC<{ edge: MMELEdge; diff --git a/packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx b/src/smart/ui/edit/components/MeasurementListEdit.tsx similarity index 96% rename from packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx rename to src/smart/ui/edit/components/MeasurementListEdit.tsx index ffe42dd5..65908475 100644 --- a/packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx +++ b/src/smart/ui/edit/components/MeasurementListEdit.tsx @@ -1,6 +1,6 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const MeasureListQuickEdit: React.FC<{ measurements: string[]; diff --git a/packages/legacy/src/smart/ui/edit/components/NoteList.tsx b/src/smart/ui/edit/components/NoteList.tsx similarity index 86% rename from packages/legacy/src/smart/ui/edit/components/NoteList.tsx rename to src/smart/ui/edit/components/NoteList.tsx index e428792b..305dbf9d 100644 --- a/packages/legacy/src/smart/ui/edit/components/NoteList.tsx +++ b/src/smart/ui/edit/components/NoteList.tsx @@ -1,24 +1,25 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; import { useMemo } from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { RefTextSelection } from '../../../model/selectionImport'; -import { DataType } from '../../../serialize/interface/baseinterface'; -import { +import type { EditorModel } from '@/smart/model/editormodel'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELNote, MMELReference, - NOTE_TYPE, + NOTE_TYPE } from '@paneron/libmmel/interface/supportinterface'; +import { NOTE_TYPES, -} from '../../../serialize/interface/supportinterface'; -import { createNote } from '../../../utils/EditorFactory'; +} from '@paneron/libmmel/interface/supportinterface'; +import { createNote } from '@/smart/utils/EditorFactory'; import { findUniqueID, getModelAllRefs, trydefaultID, -} from '../../../utils/ModelFunctions'; -import { findExistingRef } from '../../../utils/ModelImport'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; -import SimpleReferenceSelector from './ReferenceSelector'; +} from '@/smart/utils/ModelFunctions'; +import { findExistingRef } from '@/smart/utils/ModelImport'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; const NoteListQuickEdit: React.FC<{ notes: Record; diff --git a/packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx b/src/smart/ui/edit/components/ProvisionList.tsx similarity index 86% rename from packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx rename to src/smart/ui/edit/components/ProvisionList.tsx index 76fdc9b6..2c03e9b4 100644 --- a/packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx +++ b/src/smart/ui/edit/components/ProvisionList.tsx @@ -1,23 +1,24 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; import { useMemo } from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { RefTextSelection } from '../../../model/selectionImport'; -import { DataType } from '../../../serialize/interface/baseinterface'; -import { +import type { EditorModel } from '@/smart/model/editormodel'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELProvision, MMELReference, -} from '../../../serialize/interface/supportinterface'; -import { MODAILITYOPTIONS, ModalityType } from '../../../utils/constants'; -import { createProvision } from '../../../utils/EditorFactory'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { ModalityType } from '@/smart/utils/constants'; +import { MODAILITYOPTIONS } from '@/smart/utils/constants'; +import { createProvision } from '@/smart/utils/EditorFactory'; import { findUniqueID, getModelAllRefs, trydefaultID, -} from '../../../utils/ModelFunctions'; -import { findExistingRef } from '../../../utils/ModelImport'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; -import SimpleReferenceSelector from './ReferenceSelector'; +} from '@/smart/utils/ModelFunctions'; +import { findExistingRef } from '@/smart/utils/ModelImport'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; const ProvisionListQuickEdit: React.FC<{ provisions: Record; diff --git a/packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx b/src/smart/ui/edit/components/ReferenceSelector.tsx similarity index 93% rename from packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx rename to src/smart/ui/edit/components/ReferenceSelector.tsx index 3f031164..770fd5c8 100644 --- a/packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx +++ b/src/smart/ui/edit/components/ReferenceSelector.tsx @@ -1,13 +1,14 @@ import { Button, FormGroup, Menu } from '@blueprintjs/core'; -import { +import type { IItemRendererProps, ItemListRenderer, - ItemPredicate, + ItemPredicate } from '@blueprintjs/select'; +import { MultiSelect, } from '@blueprintjs/select'; import React from 'react'; -import { MMELReference } from '../../../serialize/interface/supportinterface'; -import { toRefSummary } from '../../../utils/ModelFunctions'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import { toRefSummary } from '@/smart/utils/ModelFunctions'; const ReferenceMultiSelect = MultiSelect.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx b/src/smart/ui/edit/components/RegistrySelector.tsx similarity index 95% rename from packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx rename to src/smart/ui/edit/components/RegistrySelector.tsx index 53a6a540..c786a42d 100644 --- a/packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx +++ b/src/smart/ui/edit/components/RegistrySelector.tsx @@ -1,12 +1,13 @@ import { Button, FormGroup, Menu } from '@blueprintjs/core'; -import { +import type { IItemRendererProps, ItemListRenderer, - ItemPredicate, + ItemPredicate } from '@blueprintjs/select'; +import { MultiSelect, } from '@blueprintjs/select'; import React from 'react'; -import { EditorRegistry } from '../../../model/editormodel'; +import type { EditorRegistry } from '@/smart/model/editormodel'; const RegistryMultiSelect = MultiSelect.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/RoleSelector.tsx b/src/smart/ui/edit/components/RoleSelector.tsx similarity index 94% rename from packages/legacy/src/smart/ui/edit/components/RoleSelector.tsx rename to src/smart/ui/edit/components/RoleSelector.tsx index 3c9ff097..e027af9b 100644 --- a/packages/legacy/src/smart/ui/edit/components/RoleSelector.tsx +++ b/src/smart/ui/edit/components/RoleSelector.tsx @@ -1,11 +1,12 @@ import { Button, ButtonGroup, FormGroup, Menu } from '@blueprintjs/core'; -import { +import type { ItemListRenderer, ItemPredicate, - ItemRenderer, + ItemRenderer } from '@blueprintjs/select'; +import { Select, } from '@blueprintjs/select'; -import { MMELRole } from '../../../serialize/interface/supportinterface'; +import type { MMELRole } from '@paneron/libmmel/interface/supportinterface'; import React from 'react'; const RoleSelect = Select.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx b/src/smart/ui/edit/components/StringListQuickEdit.tsx similarity index 96% rename from packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx rename to src/smart/ui/edit/components/StringListQuickEdit.tsx index 88ca02b7..50164c8f 100644 --- a/packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx +++ b/src/smart/ui/edit/components/StringListQuickEdit.tsx @@ -1,6 +1,6 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const StringListQuickEdit: React.FC<{ data: string[]; diff --git a/packages/legacy/src/smart/ui/edit/dataclassedit.tsx b/src/smart/ui/edit/dataclassedit.tsx similarity index 80% rename from packages/legacy/src/smart/ui/edit/dataclassedit.tsx rename to src/smart/ui/edit/dataclassedit.tsx index 925d732e..dff5f50b 100644 --- a/packages/legacy/src/smart/ui/edit/dataclassedit.tsx +++ b/src/smart/ui/edit/dataclassedit.tsx @@ -1,21 +1,23 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { +import type { EditorDataClass, - EditorModel, + EditorModel } from '@/smart/model/editormodel'; +import { isEditorDataClass, -} from '../../model/editormodel'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createDataClass } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import AttributeEditPage from './attributeedit'; -import { ModelAction } from '../../model/editor/model'; +} from '@/smart/model/editormodel'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createDataClass } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import AttributeEditPage from '@/smart/ui/edit/attributeedit'; +import type { ModelAction } from '@/smart/model/editor/model'; import { addDCCommand, delDCCommand, editDCCommand, -} from '../../model/editor/commands/data'; +} from '@/smart/model/editor/commands/data'; const initObj = createDataClass(''); diff --git a/packages/legacy/src/smart/ui/edit/egateedit.tsx b/src/smart/ui/edit/egateedit.tsx similarity index 91% rename from packages/legacy/src/smart/ui/edit/egateedit.tsx rename to src/smart/ui/edit/egateedit.tsx index 85973326..ccf42cce 100644 --- a/packages/legacy/src/smart/ui/edit/egateedit.tsx +++ b/src/smart/ui/edit/egateedit.tsx @@ -1,24 +1,24 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { editEGateCommand } from '../../model/editor/commands/elements'; -import { ModelAction } from '../../model/editor/model'; -import { +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { editEGateCommand } from '@/smart/model/editor/commands/elements'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorEGate, EditorModel, EditorSubprocess, -} from '../../model/editormodel'; -import { MMELEdge } from '../../serialize/interface/flowcontrolinterface'; +} from '@/smart/model/editormodel'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; import { checkId, getModelAllMeasures, removeSpace, -} from '../../utils/ModelFunctions'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField, ReferenceSelector } from '../common/fields'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { EditPageButtons } from './commons'; -import EdgeQuickEdit from './components/EdgeListEdit'; +} from '@/smart/utils/ModelFunctions'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField, ReferenceSelector } from '@/smart/ui/common/fields'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import EdgeQuickEdit from '@/smart/ui/edit/components/EdgeListEdit'; interface CommonEGateEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/edit/enumedit.tsx b/src/smart/ui/edit/enumedit.tsx similarity index 80% rename from packages/legacy/src/smart/ui/edit/enumedit.tsx rename to src/smart/ui/edit/enumedit.tsx index 0d8bf394..b76c1d8e 100644 --- a/packages/legacy/src/smart/ui/edit/enumedit.tsx +++ b/src/smart/ui/edit/enumedit.tsx @@ -1,13 +1,14 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELEnum } from '../../serialize/interface/datainterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createEnum } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import EnumValueEditPage from './enumvalueedit'; -import { ModelAction } from '../../model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELEnum } from '@paneron/libmmel/interface/datainterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createEnum } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import EnumValueEditPage from '@/smart/ui/edit/enumvalueedit'; +import type { ModelAction } from '@/smart/model/editor/model'; const initObj = createEnum(''); diff --git a/packages/legacy/src/smart/ui/edit/enumvalueedit.tsx b/src/smart/ui/edit/enumvalueedit.tsx similarity index 75% rename from packages/legacy/src/smart/ui/edit/enumvalueedit.tsx rename to src/smart/ui/edit/enumvalueedit.tsx index 86cbc409..4cc3aeb7 100644 --- a/packages/legacy/src/smart/ui/edit/enumvalueedit.tsx +++ b/src/smart/ui/edit/enumvalueedit.tsx @@ -1,13 +1,14 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; -import { MMELEnumValue } from '../../serialize/interface/datainterface'; -import { createEnumValue } from '../../utils/EditorFactory'; -import { NormalTextField } from '../common/fields'; -import ListWithPopoverItem, { +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELEnumValue } from '@paneron/libmmel/interface/datainterface'; +import { createEnumValue } from '@/smart/utils/EditorFactory'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import type { IMMELObject, -} from '../common/listmanagement/listPopoverItem'; +} from '@/smart/ui/common/listmanagement/listPopoverItem'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; const EnumValueEditPage: React.FC<{ values: Record; diff --git a/packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx b/src/smart/ui/edit/figure/FigureEdit.tsx similarity index 78% rename from packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx rename to src/smart/ui/edit/figure/FigureEdit.tsx index 2bb573ee..1702132d 100644 --- a/packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx +++ b/src/smart/ui/edit/figure/FigureEdit.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { MMELFigure } from '../../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../../utils/ModelFunctions'; -import { createFig } from '../../../utils/EditorFactory'; -import { IListItem, IManageHandler } from '../../common/fields'; -import ListManagePage from '../../common/listmanagement/listmanagement'; -import FigItemEditPage from './FigureItemEdit'; -import { ModelAction } from '../../../model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELFigure } from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createFig } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import FigItemEditPage from '@/smart/ui/edit/figure/FigureItemEdit'; +import type { ModelAction } from '@/smart/model/editor/model'; const FigureEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx b/src/smart/ui/edit/figure/FigureItemEdit.tsx similarity index 86% rename from packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx rename to src/smart/ui/edit/figure/FigureItemEdit.tsx index aaadc88b..0102128f 100644 --- a/packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx +++ b/src/smart/ui/edit/figure/FigureItemEdit.tsx @@ -1,15 +1,16 @@ import { Button, FormGroup, Text } from '@blueprintjs/core'; -import { +import type { BINARY_TYPE, - BINARY_TYPES, - MMELFigure, -} from '../../../serialize/interface/supportinterface'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; + MMELFigure } from '@paneron/libmmel/interface/supportinterface'; +import { + BINARY_TYPES +} from '@paneron/libmmel/interface/supportinterface'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; import { useContext } from 'react'; -import { FILE_TYPE, handleFileOpen } from '../../../utils/IOFunctions'; +import { FILE_TYPE, handleFileOpen } from '@/smart/utils/IOFunctions'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; -import MultimediaView from '../../common/description/Multimedia'; +import MultimediaView from '@/smart/ui/common/description/Multimedia'; const FigItemEditPage: React.FC<{ object: MMELFigure; diff --git a/packages/legacy/src/smart/ui/edit/figure/ThreeD.tsx b/src/smart/ui/edit/figure/ThreeD.tsx similarity index 100% rename from packages/legacy/src/smart/ui/edit/figure/ThreeD.tsx rename to src/smart/ui/edit/figure/ThreeD.tsx diff --git a/packages/legacy/src/smart/ui/edit/mappingedit.tsx b/src/smart/ui/edit/mappingedit.tsx similarity index 80% rename from packages/legacy/src/smart/ui/edit/mappingedit.tsx rename to src/smart/ui/edit/mappingedit.tsx index f080698c..8787a825 100644 --- a/packages/legacy/src/smart/ui/edit/mappingedit.tsx +++ b/src/smart/ui/edit/mappingedit.tsx @@ -1,11 +1,11 @@ import React, { useState } from 'react'; -import { NormalTextField } from '../common/fields'; -import { MappingMeta } from '../../model/mapmodel'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import type { MappingMeta } from '@/smart/model/mapmodel'; import { Button, FormGroup } from '@blueprintjs/core'; -import { EditPageButtons } from './commons'; -import { mgdLabel } from '../../../css/form'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { wrapperContainer } from '../../../css/layout'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import { mgdLabel } from '@/css/form'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { wrapperContainer } from '@/css/layout'; export interface EditElmInfo { id: string; diff --git a/packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx b/src/smart/ui/edit/measurementExpressionEdit.tsx similarity index 80% rename from packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx rename to src/smart/ui/edit/measurementExpressionEdit.tsx index 38a09f28..0b229c3b 100644 --- a/packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx +++ b/src/smart/ui/edit/measurementExpressionEdit.tsx @@ -1,9 +1,9 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { measurementValidCheck } from '../../utils/measurement/BasicFunctions'; -import { ReferenceSelector } from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { measurementValidCheck } from '@/smart/utils/measurement/BasicFunctions'; +import { ReferenceSelector } from '@/smart/ui/common/fields'; +import type { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export type IMeasure = IMMELObject & { measure: string; diff --git a/packages/legacy/src/smart/ui/edit/measurementedit.tsx b/src/smart/ui/edit/measurementedit.tsx similarity index 88% rename from packages/legacy/src/smart/ui/edit/measurementedit.tsx rename to src/smart/ui/edit/measurementedit.tsx index 8d121e43..d6a659e2 100644 --- a/packages/legacy/src/smart/ui/edit/measurementedit.tsx +++ b/src/smart/ui/edit/measurementedit.tsx @@ -1,24 +1,26 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import { EditorModel } from '../../model/editormodel'; +import { mgdLabel } from '@/css/form'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { + MMELVariable } from '@paneron/libmmel/interface/supportinterface'; import { - MMELVariable, VarType, -} from '../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { MEASUREMENTTYPES } from '../../utils/constants'; -import { createVariable } from '../../utils/EditorFactory'; -import { +} from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { MEASUREMENTTYPES } from '@/smart/utils/constants'; +import { createVariable } from '@/smart/utils/EditorFactory'; +import type { IListItem, - IManageHandler, + IManageHandler } from '@/smart/ui/common/fields'; +import { NormalComboBox, NormalTextField, ReferenceSelector, -} from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { measurementValidCheck } from '../../utils/measurement/BasicFunctions'; -import { ModelAction } from '../../model/editor/model'; +} from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { measurementValidCheck } from '@/smart/utils/measurement/BasicFunctions'; +import type { ModelAction } from '@/smart/model/editor/model'; const MeasurementEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/metaedit.tsx b/src/smart/ui/edit/metaedit.tsx similarity index 80% rename from packages/legacy/src/smart/ui/edit/metaedit.tsx rename to src/smart/ui/edit/metaedit.tsx index 43ff9913..717f5b45 100644 --- a/packages/legacy/src/smart/ui/edit/metaedit.tsx +++ b/src/smart/ui/edit/metaedit.tsx @@ -1,9 +1,9 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorAction } from '../../model/editor/state'; -import { MMELMetadata } from '../../serialize/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField } from '../common/fields'; +import type { EditorAction } from '@/smart/model/editor/state'; +import type { MMELMetadata } from '@paneron/libmmel/interface/supportinterface'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const MetaEditPage: React.FC<{ meta: MMELMetadata; diff --git a/packages/legacy/src/smart/ui/edit/processedit.tsx b/src/smart/ui/edit/processedit.tsx similarity index 90% rename from packages/legacy/src/smart/ui/edit/processedit.tsx rename to src/smart/ui/edit/processedit.tsx index 20da9184..3ccec4f5 100644 --- a/packages/legacy/src/smart/ui/edit/processedit.tsx +++ b/src/smart/ui/edit/processedit.tsx @@ -1,51 +1,52 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useMemo, useRef, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorModel, EditorProcess, EditorRegistry, -} from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { +} from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELLink, MMELNote, MMELProvision, MMELReference, MMELRole, -} from '../../serialize/interface/supportinterface'; +} from '@paneron/libmmel/interface/supportinterface'; import { checkId, getModelAllRegs, getModelAllRoles, removeSpace, -} from '../../utils/ModelFunctions'; -import { createNote, createProvision } from '../../utils/EditorFactory'; +} from '@/smart/utils/ModelFunctions'; +import { createNote, createProvision } from '@/smart/utils/EditorFactory'; import { MultiReferenceSelector, NormalTextField, ReferenceSelector, -} from '../common/fields'; -import ListWithPopoverItem from '../common/listmanagement/listPopoverItem'; -import { EditPageButtons } from './commons'; +} from '@/smart/ui/common/fields'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import type { + IMeasure } from '@/smart/ui/edit/measurementExpressionEdit'; import { - IMeasure, matchMeasurementFilter, MeasurementItem, -} from './measurementExpressionEdit'; -import { matchProvisionFilter, ProvisonItem } from './provisionedit'; -import RoleSelector from './components/RoleSelector'; -import { DescriptionItem } from '../common/description/fields'; -import RegistrySelector from './components/RegistrySelector'; -import ProvisionListQuickEdit from './components/ProvisionList'; -import MeasureListQuickEdit from './components/MeasurementListEdit'; -import { RefTextSelection } from '../../model/selectionImport'; -import { matchNoteFilter, NoteItem } from './NoteEdit'; -import NoteListQuickEdit from './components/NoteList'; -import { LinkItem, matchLinkFilter } from './LinkEdit'; -import { ModelAction } from '../../model/editor/model'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { editProcessCommand } from '../../model/editor/commands/elements'; +} from '@/smart/ui/edit/measurementExpressionEdit'; +import { matchProvisionFilter, ProvisonItem } from '@/smart/ui/edit/provisionedit'; +import RoleSelector from '@/smart/ui/edit/components/RoleSelector'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import RegistrySelector from '@/smart/ui/edit/components/RegistrySelector'; +import ProvisionListQuickEdit from '@/smart/ui/edit/components/ProvisionList'; +import MeasureListQuickEdit from '@/smart/ui/edit/components/MeasurementListEdit'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import { matchNoteFilter, NoteItem } from '@/smart/ui/edit/NoteEdit'; +import NoteListQuickEdit from '@/smart/ui/edit/components/NoteList'; +import { LinkItem, matchLinkFilter } from '@/smart/ui/edit/LinkEdit'; +import type { ModelAction } from '@/smart/model/editor/model'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { editProcessCommand } from '@/smart/model/editor/commands/elements'; function getInitProvisions( model: EditorModel, diff --git a/packages/legacy/src/smart/ui/edit/provisionedit.tsx b/src/smart/ui/edit/provisionedit.tsx similarity index 79% rename from packages/legacy/src/smart/ui/edit/provisionedit.tsx rename to src/smart/ui/edit/provisionedit.tsx index 392887b9..bbe41c7b 100644 --- a/packages/legacy/src/smart/ui/edit/provisionedit.tsx +++ b/src/smart/ui/edit/provisionedit.tsx @@ -1,15 +1,15 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELProvision } from '../../serialize/interface/supportinterface'; -import { getModelAllRefs } from '../../utils/ModelFunctions'; -import { MODAILITYOPTIONS } from '../../utils/constants'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELProvision } from '@paneron/libmmel/interface/supportinterface'; +import { getModelAllRefs } from '@/smart/utils/ModelFunctions'; +import { MODAILITYOPTIONS } from '@/smart/utils/constants'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, -} from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +} from '@/smart/ui/common/fields'; +import type { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export function matchProvisionFilter(x: IMMELObject, filter: string): boolean { const provision = x as MMELProvision; diff --git a/packages/legacy/src/smart/ui/edit/refedit.tsx b/src/smart/ui/edit/refedit.tsx similarity index 87% rename from packages/legacy/src/smart/ui/edit/refedit.tsx rename to src/smart/ui/edit/refedit.tsx index 62719490..becd8f07 100644 --- a/packages/legacy/src/smart/ui/edit/refedit.tsx +++ b/src/smart/ui/edit/refedit.tsx @@ -1,21 +1,22 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELReference } from '../../serialize/interface/supportinterface'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; import { checkId, referenceSorter, toRefSummary, -} from '../../utils/ModelFunctions'; -import { createReference } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { ModelAction } from '../../model/editor/model'; +} from '@/smart/utils/ModelFunctions'; +import { createReference } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import type { ModelAction } from '@/smart/model/editor/model'; import { addRefCommand, delRefCommand, editRefCommand, -} from '../../model/editor/commands/reference'; +} from '@/smart/model/editor/commands/reference'; const ReferenceEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/registryedit.tsx b/src/smart/ui/edit/registryedit.tsx similarity index 82% rename from packages/legacy/src/smart/ui/edit/registryedit.tsx rename to src/smart/ui/edit/registryedit.tsx index eb39cfe0..a92f53d3 100644 --- a/packages/legacy/src/smart/ui/edit/registryedit.tsx +++ b/src/smart/ui/edit/registryedit.tsx @@ -1,27 +1,29 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { +import type { EditorModel, - EditorRegistry, + EditorRegistry } from '@/smart/model/editormodel'; +import { isEditorDataClass, isEditorRegistry, -} from '../../model/editormodel'; +} from '@/smart/model/editormodel'; import { checkId, defaultItemSorter, genDCIdByRegId, -} from '../../utils/ModelFunctions'; -import { createDataClass } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import AttributeEditPage from './attributeedit'; -import { ModelAction } from '../../model/editor/model'; -import { RegistryCombined } from '../../model/editor/components/element/registry'; +} from '@/smart/utils/ModelFunctions'; +import { createDataClass } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import AttributeEditPage from '@/smart/ui/edit/attributeedit'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { RegistryCombined } from '@/smart/model/editor/components/element/registry'; import { addRegistryCommand, delRegistryCommand, editRegistryCommand, -} from '../../model/editor/commands/data'; +} from '@/smart/model/editor/commands/data'; const initObj: RegistryCombined = { ...createDataClass(''), title : '' }; diff --git a/packages/legacy/src/smart/ui/edit/roleedit.tsx b/src/smart/ui/edit/roleedit.tsx similarity index 79% rename from packages/legacy/src/smart/ui/edit/roleedit.tsx rename to src/smart/ui/edit/roleedit.tsx index 3c203c58..a6c25199 100644 --- a/packages/legacy/src/smart/ui/edit/roleedit.tsx +++ b/src/smart/ui/edit/roleedit.tsx @@ -1,17 +1,18 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { MMELRole } from '../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createRole } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { ModelAction } from '../../model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELRole } from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createRole } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import type { ModelAction } from '@/smart/model/editor/model'; import { addRoleCommand, deleteRoleCommand, editRoleCommand, -} from '../../model/editor/commands/role'; +} from '@/smart/model/editor/commands/role'; const RoleEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/signaleventedit.tsx b/src/smart/ui/edit/signaleventedit.tsx similarity index 89% rename from packages/legacy/src/smart/ui/edit/signaleventedit.tsx rename to src/smart/ui/edit/signaleventedit.tsx index 890da93c..2f8a09f2 100644 --- a/packages/legacy/src/smart/ui/edit/signaleventedit.tsx +++ b/src/smart/ui/edit/signaleventedit.tsx @@ -1,18 +1,18 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { editElmCommand } from '../../model/editor/commands/elements'; -import { ModelAction } from '../../model/editor/model'; -import { EditorModel, EditorSignalEvent } from '../../model/editormodel'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { editElmCommand } from '@/smart/model/editor/commands/elements'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorModel, EditorSignalEvent } from '@/smart/model/editormodel'; import { checkId, getModelAllSignals, removeSpace, -} from '../../utils/ModelFunctions'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField, ReferenceSelector } from '../common/fields'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { EditPageButtons } from './commons'; +} from '@/smart/utils/ModelFunctions'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField, ReferenceSelector } from '@/smart/ui/common/fields'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; interface CommonSignalEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx b/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx similarity index 81% rename from packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx rename to src/smart/ui/edit/table/ClassItemDisplayEdit.tsx index 6eaa9117..d8663dea 100644 --- a/packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx +++ b/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import React, { useState } from 'react'; -import MGDButtonGroup from '../../../MGDComponents/MGDButtonGroup'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { ReferenceSelector } from '../../common/fields'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import { ReferenceSelector } from '@/smart/ui/common/fields'; const ClassItemDisplayEdit: React.FC<{ table: MMELTable; diff --git a/packages/legacy/src/smart/ui/edit/table/EditClassView.tsx b/src/smart/ui/edit/table/EditClassView.tsx similarity index 82% rename from packages/legacy/src/smart/ui/edit/table/EditClassView.tsx rename to src/smart/ui/edit/table/EditClassView.tsx index 8039ce18..dcc84ec9 100644 --- a/packages/legacy/src/smart/ui/edit/table/EditClassView.tsx +++ b/src/smart/ui/edit/table/EditClassView.tsx @@ -1,14 +1,15 @@ import { Button, ButtonGroup, Dialog } from '@blueprintjs/core'; import React, { useState } from 'react'; import { useMemo } from 'react'; -import { dialogLayout } from '../../../../css/layout'; -import { DataType } from '../../../serialize/interface/baseinterface'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { IListItem } from '../../common/fields'; -import ListWithPopoverItem from '../../common/listmanagement/listPopoverItem'; -import ClassItemDisplayEdit from './ClassItemDisplayEdit'; -import TableClassDefinitionEdit from './TableClassDefinitionEdit'; -import TableClassItemEdit, { TableRowClass } from './TableClassItem'; +import { dialogLayout } from '@/css/layout'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import type { IListItem } from '@/smart/ui/common/fields'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; +import ClassItemDisplayEdit from '@/smart/ui/edit/table/ClassItemDisplayEdit'; +import TableClassDefinitionEdit from '@/smart/ui/edit/table/TableClassDefinitionEdit'; +import type { TableRowClass } from '@/smart/ui/edit/table/TableClassItem'; +import TableClassItemEdit from '@/smart/ui/edit/table/TableClassItem'; type DialogType = 'class' | 'display'; diff --git a/packages/legacy/src/smart/ui/edit/table/EditTableView.tsx b/src/smart/ui/edit/table/EditTableView.tsx similarity index 94% rename from packages/legacy/src/smart/ui/edit/table/EditTableView.tsx rename to src/smart/ui/edit/table/EditTableView.tsx index 1c5bf62e..8c3cb63b 100644 --- a/packages/legacy/src/smart/ui/edit/table/EditTableView.tsx +++ b/src/smart/ui/edit/table/EditTableView.tsx @@ -2,8 +2,8 @@ import { Button } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { useMemo } from 'react'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import MMELTableRow from './TableRow'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import MMELTableRow from '@/smart/ui/edit/table/TableRow'; const EditTableView: React.FC<{ table: MMELTable; diff --git a/packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx b/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx similarity index 94% rename from packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx rename to src/smart/ui/edit/table/TableClassDefinitionEdit.tsx index 39cbf2c2..1801e93a 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx +++ b/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx @@ -1,13 +1,14 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import type { IListItem, - IManageHandler, + IManageHandler } from '@/smart/ui/common/fields'; +import { NormalTextField, -} from '../../common/fields'; -import ListManagePage from '../../common/listmanagement/listmanagement'; +} from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; export interface TableClassAttribute { id: string; diff --git a/packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx b/src/smart/ui/edit/table/TableClassItem.tsx similarity index 86% rename from packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx rename to src/smart/ui/edit/table/TableClassItem.tsx index d21cce27..f4afdb88 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx +++ b/src/smart/ui/edit/table/TableClassItem.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { DataType } from '../../../serialize/interface/baseinterface'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; +import type { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; export interface TableRowClass { id: string; diff --git a/packages/legacy/src/smart/ui/edit/table/TableEdit.tsx b/src/smart/ui/edit/table/TableEdit.tsx similarity index 78% rename from packages/legacy/src/smart/ui/edit/table/TableEdit.tsx rename to src/smart/ui/edit/table/TableEdit.tsx index f0823651..000e2353 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableEdit.tsx +++ b/src/smart/ui/edit/table/TableEdit.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../../utils/ModelFunctions'; -import { createTable } from '../../../utils/EditorFactory'; -import { IListItem, IManageHandler } from '../../common/fields'; -import ListManagePage from '../../common/listmanagement/listmanagement'; -import TableItemEditPage from './TableItemEdit'; -import { ModelAction } from '../../../model/editor/model'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createTable } from '@/smart/utils/EditorFactory'; +import type { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import TableItemEditPage from '@/smart/ui/edit/table/TableItemEdit'; +import type { ModelAction } from '@/smart/model/editor/model'; const TableEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx b/src/smart/ui/edit/table/TableItemEdit.tsx similarity index 89% rename from packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx rename to src/smart/ui/edit/table/TableItemEdit.tsx index cb83b7c8..5405cee4 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx +++ b/src/smart/ui/edit/table/TableItemEdit.tsx @@ -1,15 +1,15 @@ import { Button, ButtonGroup, FormGroup, Tab, Tabs } from '@blueprintjs/core'; -import { MMELTable } from '../../../serialize/interface/supportinterface'; -import { NormalTextField } from '../../common/fields'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import { NormalTextField } from '@/smart/ui/common/fields'; import { useContext, useState } from 'react'; import { FILE_TYPE, handleFileOpen, saveToFileSystem, -} from '../../../utils/IOFunctions'; +} from '@/smart/utils/IOFunctions'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import EditTableView from './EditTableView'; -import EditClassView from './EditClassView'; +import EditTableView from '@/smart/ui/edit/table/EditTableView'; +import EditClassView from '@/smart/ui/edit/table/EditClassView'; import React from 'react'; type TabType = 'table' | 'class'; diff --git a/packages/legacy/src/smart/ui/edit/table/TableRow.tsx b/src/smart/ui/edit/table/TableRow.tsx similarity index 94% rename from packages/legacy/src/smart/ui/edit/table/TableRow.tsx rename to src/smart/ui/edit/table/TableRow.tsx index 6cbe099a..5e8c2ef8 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableRow.tsx +++ b/src/smart/ui/edit/table/TableRow.tsx @@ -1,7 +1,7 @@ import { Button, Text } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const MMELTableRow: React.FC<{ row: string[]; diff --git a/packages/legacy/src/smart/ui/edit/timeredit.tsx b/src/smart/ui/edit/timeredit.tsx similarity index 88% rename from packages/legacy/src/smart/ui/edit/timeredit.tsx rename to src/smart/ui/edit/timeredit.tsx index a95db47c..fe160905 100644 --- a/packages/legacy/src/smart/ui/edit/timeredit.tsx +++ b/src/smart/ui/edit/timeredit.tsx @@ -1,15 +1,15 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel, EditorTimerEvent } from '../../model/editormodel'; -import { checkId, removeSpace } from '../../utils/ModelFunctions'; -import { TimerType } from '../../utils/constants'; -import { NormalComboBox, NormalTextField } from '../common/fields'; -import { EditPageButtons } from './commons'; -import { DescriptionItem } from '../common/description/fields'; -import { ModelAction } from '../../model/editor/model'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { editElmCommand } from '../../model/editor/commands/elements'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorModel, EditorTimerEvent } from '@/smart/model/editormodel'; +import { checkId, removeSpace } from '@/smart/utils/ModelFunctions'; +import { TimerType } from '@/smart/utils/constants'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import type { ModelAction } from '@/smart/model/editor/model'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { editElmCommand } from '@/smart/model/editor/commands/elements'; interface CommonTimerEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx b/src/smart/ui/editFunctions/EditWrapper.tsx similarity index 84% rename from packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx rename to src/smart/ui/editFunctions/EditWrapper.tsx index c5bcc05f..24d382c9 100644 --- a/packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx +++ b/src/smart/ui/editFunctions/EditWrapper.tsx @@ -1,20 +1,24 @@ -import { +import type { HotkeyConfig, + IToaster } from '@blueprintjs/core'; +import { HotkeysTarget2, - IToaster, Toaster, } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext } from 'react'; import { useState } from 'react'; -import { addToLog, ChangeLog } from '../../model/changelog'; -import { EditorAction, useEditorState } from '../../model/editor/state'; -import { EditorModel, isEditorProcess } from '../../model/editormodel'; -import { createModelHistory } from '../../model/history'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { EditorState } from '../../model/States'; -import { addExisingProcessToPage } from '../../utils/ModelAddComponentHandler'; -import ModelEditor from '../maineditor'; +import type { ChangeLog } from '@/smart/model/changelog'; +import { addToLog } from '@/smart/model/changelog'; +import type { EditorAction } from '@/smart/model/editor/state'; +import { useEditorState } from '@/smart/model/editor/state'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import { createModelHistory } from '@/smart/model/history'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { EditorState } from '@/smart/model/States'; +import { addExisingProcessToPage } from '@/smart/utils/ModelAddComponentHandler'; +import ModelEditor from '@/smart/ui/maineditor'; const EditWrapper: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx b/src/smart/ui/editreference/DocumentReferenceView.tsx similarity index 90% rename from packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx rename to src/smart/ui/editreference/DocumentReferenceView.tsx index fbe94c1c..3a6f3ee5 100644 --- a/packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx +++ b/src/smart/ui/editreference/DocumentReferenceView.tsx @@ -1,9 +1,9 @@ import { ControlGroup } from '@blueprintjs/core'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useEffect } from 'react'; -import { MMELDocument } from '../../model/document'; -import { RefTextSelection } from '../../model/selectionImport'; -import SMARTDocumentView from '../mapper/document/DocumentView'; +import type { MMELDocument } from '@/smart/model/document'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import SMARTDocumentView from '@/smart/ui/mapper/document/DocumentView'; const DocumentReferenceView: React.FC<{ className?: string; diff --git a/packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx b/src/smart/ui/editreference/ModelReferenceView.tsx similarity index 85% rename from packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx rename to src/smart/ui/editreference/ModelReferenceView.tsx index 0e7f49ee..54dc244a 100644 --- a/packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx +++ b/src/smart/ui/editreference/ModelReferenceView.tsx @@ -11,35 +11,37 @@ import ReactFlow, { Controls, ReactFlowProvider } from 'react-flow-renderer'; import { react_flow_container_layout, sidebar_layout, -} from '../../../css/layout'; -import { MGDButtonType } from '../../../css/MGDButton'; -import MGDButton from '../../MGDComponents/MGDButton'; +} from '@/css/layout'; +import { MGDButtonType } from '@/css/MGDButton'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import type { + HistoryItem, + PageHistory, + RepoHistory } from '@/smart/model/history'; import { addToHistory, createPageHistory, getBreadcrumbs, - HistoryItem, - PageHistory, - popPage, - RepoHistory, -} from '../../model/history'; + popPage +} from '@/smart/model/history'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - getEditorReferenceFlowElementsFrom, - ModelWrapper, -} from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { EdgeTypes, NodeTypes } from '../../model/States'; + getEditorReferenceFlowElementsFrom +} from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { EdgeTypes, NodeTypes } from '@/smart/model/States'; import { getHighlightedStyleById, getHighlightedSVGColorById, SearchResultStyles, -} from '../../utils/SearchFunctions'; -import LegendPane from '../common/description/LegendPane'; -import { DataVisibilityButton, IdVisibleButton } from '../control/buttons'; -import RepoBreadcrumb from '../common/description/RepoBreadcrumb'; -import { SelectedNodeDescription } from '../sidebar/selected'; -import { EditorModel } from '../../model/editormodel'; -import SearchComponentPane from '../sidebar/search'; +} from '@/smart/utils/SearchFunctions'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import { DataVisibilityButton, IdVisibleButton } from '@/smart/ui/control/buttons'; +import RepoBreadcrumb from '@/smart/ui/common/description/RepoBreadcrumb'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import type { EditorModel } from '@/smart/model/editormodel'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; const ModelReferenceView: React.FC<{ className?: string; diff --git a/packages/legacy/src/smart/ui/flowui/NodeIDField.tsx b/src/smart/ui/flowui/NodeIDField.tsx similarity index 93% rename from packages/legacy/src/smart/ui/flowui/NodeIDField.tsx rename to src/smart/ui/flowui/NodeIDField.tsx index 9387c9eb..3ec38c4e 100644 --- a/packages/legacy/src/smart/ui/flowui/NodeIDField.tsx +++ b/src/smart/ui/flowui/NodeIDField.tsx @@ -1,6 +1,6 @@ import { Text } from '@blueprintjs/core'; import React from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; const NodeIDField: React.FC<{ nodeid: string; wide?: boolean }> = function ({ nodeid, diff --git a/packages/legacy/src/smart/ui/flowui/RepoEdge.tsx b/src/smart/ui/flowui/RepoEdge.tsx similarity index 94% rename from packages/legacy/src/smart/ui/flowui/RepoEdge.tsx rename to src/smart/ui/flowui/RepoEdge.tsx index f9635ba1..b4da9235 100644 --- a/packages/legacy/src/smart/ui/flowui/RepoEdge.tsx +++ b/src/smart/ui/flowui/RepoEdge.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { CSSProperties } from 'react'; -import { EdgeProps, getSmoothStepPath, Position } from 'react-flow-renderer'; +import type { CSSProperties } from 'react'; +import type { EdgeProps } from 'react-flow-renderer'; +import { getSmoothStepPath, Position } from 'react-flow-renderer'; const MARKERWIDTH = 4; const MARKERHALFHEIGHT = 3; diff --git a/packages/legacy/src/smart/ui/flowui/edgeUI.tsx b/src/smart/ui/flowui/edgeUI.tsx similarity index 96% rename from packages/legacy/src/smart/ui/flowui/edgeUI.tsx rename to src/smart/ui/flowui/edgeUI.tsx index b733a1a3..6185f4f1 100644 --- a/packages/legacy/src/smart/ui/flowui/edgeUI.tsx +++ b/src/smart/ui/flowui/edgeUI.tsx @@ -1,15 +1,17 @@ -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React from 'react'; +import type { + EdgeProps } from 'react-flow-renderer'; import { - EdgeProps, EdgeText, getEdgeCenter, getSmoothStepPath, getBezierPath, Position, } from 'react-flow-renderer'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { DataLinkNodeData, EdgePackage } from '../../model/FlowContainer'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import type { DataLinkNodeData, EdgePackage } from '@/smart/model/FlowContainer'; const SandyBrown = CSSROOTVARIABLES['--colour--sandy-brown']; const Black = CSSROOTVARIABLES['--colour--black']; diff --git a/packages/legacy/src/smart/ui/flowui/nodeUI.tsx b/src/smart/ui/flowui/nodeUI.tsx similarity index 91% rename from packages/legacy/src/smart/ui/flowui/nodeUI.tsx rename to src/smart/ui/flowui/nodeUI.tsx index 8f2da8b0..19c91008 100644 --- a/packages/legacy/src/smart/ui/flowui/nodeUI.tsx +++ b/src/smart/ui/flowui/nodeUI.tsx @@ -1,15 +1,18 @@ -import { Handle, NodeProps, Position } from 'react-flow-renderer'; -import { FC, useState } from 'react'; -import { +import type { NodeProps } from 'react-flow-renderer'; +import { Handle, Position } from 'react-flow-renderer'; +import type { FC } from 'react'; +import { useState } from 'react'; +import type { EditorApproval, EditorEGate, EditorNode, EditorProcess, - EditorSignalEvent, + EditorSignalEvent } from '@/smart/model/editormodel'; +import { isEditorRegistry, isMMELTable, -} from '../../model/editormodel'; -import { NodeCallBack } from '../../model/FlowContainer'; +} from '@/smart/model/editormodel'; +import type { NodeCallBack } from '@/smart/model/FlowContainer'; import { DatacubeShape, EgateShape, @@ -18,7 +21,7 @@ import { SignalCatchShape, StartShape, TimerShape, -} from './shapes'; +} from '@/smart/ui/flowui/shapes'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; @@ -29,23 +32,23 @@ import { shameLabelNudge, shameLabelShort, tooltipLabel, -} from '../../../css/shame'; -import { flownodeTopLeftButtonLayout } from '../../../css/layout'; -import PopoverWrapper from '../popover/PopoverWrapper'; -import ViewMappingbutton from '../mapper/viewmapbutton'; -import ViewWorkspaceButton from '../workspace/ViewDataWorkspaceButton'; +} from '@/css/shame'; +import { flownodeTopLeftButtonLayout } from '@/css/layout'; +import PopoverWrapper from '@/smart/ui/popover/PopoverWrapper'; +import ViewMappingbutton from '@/smart/ui/mapper/viewmapbutton'; +import ViewWorkspaceButton from '@/smart/ui/workspace/ViewDataWorkspaceButton'; import { Button, Classes, Dialog, Icon } from '@blueprintjs/core'; -import NodeIDField from './NodeIDField'; -import { +import NodeIDField from '@/smart/ui/flowui/NodeIDField'; +import type { MMELFigure, MMELTable, -} from '../../serialize/interface/supportinterface'; -import NonTextReferenceList from '../popover/NonTextReferenceList'; -import TableViewer from '../common/description/TableViewer'; -import FigureViewer from '../common/description/FigureViewer'; -import LinksList from '../popover/LinksList'; -import { handleCSS } from '../../../css/visual'; -import NodeComment from '../comment/NodeComment'; +} from '@paneron/libmmel/interface/supportinterface'; +import NonTextReferenceList from '@/smart/ui/popover/NonTextReferenceList'; +import TableViewer from '@/smart/ui/common/description/TableViewer'; +import FigureViewer from '@/smart/ui/common/description/FigureViewer'; +import LinksList from '@/smart/ui/popover/LinksList'; +import { handleCSS } from '@/css/visual'; +import NodeComment from '@/smart/ui/comment/NodeComment'; export const Datacube: FC = function ({ data }) { const node = data as EditorNode; diff --git a/packages/legacy/src/smart/ui/flowui/shapes.tsx b/src/smart/ui/flowui/shapes.tsx similarity index 93% rename from packages/legacy/src/smart/ui/flowui/shapes.tsx rename to src/smart/ui/flowui/shapes.tsx index 536a1edb..683c9de2 100644 --- a/packages/legacy/src/smart/ui/flowui/shapes.tsx +++ b/src/smart/ui/flowui/shapes.tsx @@ -1,13 +1,13 @@ -import { SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; import React from 'react'; -import { RefObject } from 'react'; -import { mgdLabel } from '../../../css/form'; -import MGDProcessBox from '../../MGDComponents/MGDProcessBox'; -import { ModelType } from '../../model/editormodel'; +import type { RefObject } from 'react'; +import { mgdLabel } from '@/css/form'; +import MGDProcessBox from '@/smart/MGDComponents/MGDProcessBox'; +import { ModelType } from '@/smart/model/editormodel'; import { DragAndDropImportRefType, DragAndDropMappingType, -} from '../../utils/constants'; +} from '@/smart/utils/constants'; export const DatacubeShape: React.FC<{ color?: string }> = function ({ color = 'none', diff --git a/packages/legacy/src/smart/ui/maindocedit.tsx b/src/smart/ui/maindocedit.tsx similarity index 71% rename from packages/legacy/src/smart/ui/maindocedit.tsx rename to src/smart/ui/maindocedit.tsx index 52a0aba1..015e1859 100644 --- a/packages/legacy/src/smart/ui/maindocedit.tsx +++ b/src/smart/ui/maindocedit.tsx @@ -1,9 +1,9 @@ import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useState } from 'react'; -import { MMELDocument } from '../model/document'; -import { createNewMMELDocument } from '../utils/EditorFactory'; -import SMARTDocumentEdit from './doc/SMARTDocumentEdit'; -import DocEditToolbar from './menu/DocEditToolbar'; +import type { MMELDocument } from '@/smart/model/document'; +import { createNewMMELDocument } from '@/smart/utils/EditorFactory'; +import SMARTDocumentEdit from '@/smart/ui/doc/SMARTDocumentEdit'; +import DocEditToolbar from '@/smart/ui/menu/DocEditToolbar'; const DocumentEdit: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/maineditor.tsx b/src/smart/ui/maineditor.tsx similarity index 84% rename from packages/legacy/src/smart/ui/maineditor.tsx rename to src/smart/ui/maineditor.tsx index e5bac8df..bdaa3eb3 100644 --- a/packages/legacy/src/smart/ui/maineditor.tsx +++ b/src/smart/ui/maineditor.tsx @@ -2,30 +2,33 @@ /** @jsxFrag React.Fragment */ import { jsx } from '@emotion/react'; +import type { + RefObject } from 'react'; import React, { - RefObject, useContext, useEffect, useMemo, useState, } from 'react'; +import type { + OnLoadParams, + Connection, + Edge } from 'react-flow-renderer'; import ReactFlow, { Controls, - OnLoadParams, ReactFlowProvider, - isNode, - Connection, - Edge, + isNode } from 'react-flow-renderer'; +import type { + HotkeyConfig, + IToaster } from '@blueprintjs/core'; import { Button, ControlGroup, Dialog, - HotkeyConfig, HotkeysTarget2, - IToaster, Toaster, } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; @@ -37,101 +40,105 @@ import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import { createEditorModelWrapper, getEditorReactFlowElementsFrom, -} from '../model/modelwrapper'; -import { - getBreadcrumbsActions, +} from '@/smart/model/modelwrapper'; +import type { HistoryItem, - RepoHistory, -} from '../model/history'; + RepoHistory } from '@/smart/model/history'; import { - EdgeTypes, + getBreadcrumbsActions +} from '@/smart/model/history'; +import type { EditorState, EditorViewOption, + ReferenceContent } from '@/smart/model/States'; +import { + EdgeTypes, isModelWrapper, - NodeTypes, - ReferenceContent, -} from '../model/States'; -import { EditorDataClass } from '../model/editormodel'; -import EditorFileMenu from './menu/EditorFileMenu'; + NodeTypes +} from '@/smart/model/States'; +import type { EditorDataClass } from '@/smart/model/editormodel'; +import EditorFileMenu from '@/smart/ui/menu/EditorFileMenu'; import { DataVisibilityButton, EdgeEditButton, IdVisibleButton, -} from './control/buttons'; -import NewComponentPane from './control/newComponentPane'; +} from '@/smart/ui/control/buttons'; +import NewComponentPane from '@/smart/ui/control/newComponentPane'; +import type { + NewComponentTypes } from '@/smart/utils/constants'; import { DOCVERSION, DragAndDropImportRefType, - DragAndDropNewFormatType, - NewComponentTypes, -} from '../utils/constants'; -import { getAddComponentAction } from '../utils/ModelAddComponentHandler'; -import { EdgePackage } from '../model/FlowContainer'; -import MGDButton from '../MGDComponents/MGDButton'; -import { MGDButtonType } from '../../css/MGDButton'; + DragAndDropNewFormatType +} from '@/smart/utils/constants'; +import { getAddComponentAction } from '@/smart/utils/ModelAddComponentHandler'; +import type { EdgePackage } from '@/smart/model/FlowContainer'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; import { dialog_layout, dialog_layout__full, multi_model_container, react_flow_container_layout, sidebar_layout, -} from '../../css/layout'; -import { checkId, genDCIdByRegId } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; -import LegendPane from './common/description/LegendPane'; +} from '@/css/layout'; +import { checkId, genDCIdByRegId } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; import { getHighlightedStyleById, getHighlightedSVGColorById, SearchResultStyles, -} from '../utils/SearchFunctions'; -import { MMELRole } from '../serialize/interface/supportinterface'; -import ModelReferenceView from './editreference/ModelReferenceView'; -import DocumentReferenceView from './editreference/DocumentReferenceView'; -import { RefTextSelection } from '../model/selectionImport'; -import ImportFromSelectionButton from './popover/ImportFromSelectionButton'; -import { DataType } from '../serialize/interface/baseinterface'; -import EditorEditMenu from './menu/EditorEditMenu'; +} from '@/smart/utils/SearchFunctions'; +import type { MMELRole } from '@paneron/libmmel/interface/supportinterface'; +import ModelReferenceView from '@/smart/ui/editreference/ModelReferenceView'; +import DocumentReferenceView from '@/smart/ui/editreference/DocumentReferenceView'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import ImportFromSelectionButton from '@/smart/ui/popover/ImportFromSelectionButton'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import EditorEditMenu from '@/smart/ui/menu/EditorEditMenu'; import { COMMITMSG, getPathByNS, JSONToMMEL, MMELToSerializable, RepoFileType, -} from '../utils/repo/io'; -import { MMELJSON } from '../model/json'; -import { MMELRepo, RepoIndex, repoIndexPath } from '../model/repo'; -import { setValueToIndex } from '../utils/repo/CommonFunctions'; -import EditorReferenceMenuButton from './menu/EditorReferenceMenuButton'; -import { indexModel } from '../model/mapmodel'; -import { MMELDocument } from '../model/document'; -import { LoadingContainer } from './common/Loading'; -import { createNewComment } from '../utils/Comments'; -import EditorViewMenu from './menu/EditorViewMenu'; -import { EditorAction } from '../model/editor/state'; +} from '@/smart/utils/repo/io'; +import type { MMELJSON } from '@/smart/model/json'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { repoIndexPath } from '@/smart/model/repo'; +import { setValueToIndex } from '@/smart/utils/repo/CommonFunctions'; +import EditorReferenceMenuButton from '@/smart/ui/menu/EditorReferenceMenuButton'; +import { indexModel } from '@/smart/model/mapmodel'; +import type { MMELDocument } from '@/smart/model/document'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; +import { createNewComment } from '@/smart/utils/Comments'; +import EditorViewMenu from '@/smart/ui/menu/EditorViewMenu'; +import type { EditorAction } from '@/smart/model/editor/state'; import { addCommentCommand, deleteCommentCommand, resolveCommentCommand, -} from '../model/editor/commands/comment'; +} from '@/smart/model/editor/commands/comment'; import { drillUpCommand, pageChangeCommand, replaceHisCommand, -} from '../model/editor/commands/history'; +} from '@/smart/model/editor/commands/history'; import { dragCommand, newEdgeCommand, removeEdgeCommand, -} from '../model/editor/commands/page'; -import SearchComponentPane from './sidebar/search'; -import { SelectedNodeDescription } from './sidebar/selected'; -import BasicSettingPane from './control/settings'; -import { addRoleCommand } from '../model/editor/commands/role'; -import { addRegistryCommand } from '../model/editor/commands/data'; -import { RegistryCombined } from '../model/editor/components/element/registry'; -import { importElmCommand } from '../model/editor/commands/import'; -import { ChangeLog } from '../model/changelog'; -import ChangeLogDialog from './control/ChangeLogViewer'; +} from '@/smart/model/editor/commands/page'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import BasicSettingPane from '@/smart/ui/control/settings'; +import { addRoleCommand } from '@/smart/model/editor/commands/role'; +import { addRegistryCommand } from '@/smart/model/editor/commands/data'; +import type { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import { importElmCommand } from '@/smart/model/editor/commands/import'; +import type { ChangeLog } from '@/smart/model/changelog'; +import ChangeLogDialog from '@/smart/ui/control/ChangeLogViewer'; const ModelEditor: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/mainmapper.tsx b/src/smart/ui/mainmapper.tsx similarity index 86% rename from packages/legacy/src/smart/ui/mainmapper.tsx rename to src/smart/ui/mainmapper.tsx index cec0d97a..49770884 100644 --- a/packages/legacy/src/smart/ui/mainmapper.tsx +++ b/src/smart/ui/mainmapper.tsx @@ -2,82 +2,90 @@ /** @jsxFrag React.Fragment */ import { jsx } from '@emotion/react'; +import type { + RefObject } from 'react'; import React, { - RefObject, useContext, useEffect, useMemo, useState, } from 'react'; -import ModelDiagram from './mapper/ModelDiagram'; -import { +import ModelDiagram from '@/smart/ui/mapper/ModelDiagram'; +import type { EditorModel, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { getEditorNodeInfoById, ModelType, -} from '../model/editormodel'; +} from '@/smart/model/editormodel'; +import type { + MapProfile, + MapSet } from '@/smart/model/mapmodel'; import { buildHistoryMap, createNewMapSet, getMappings, - indexModel, - MapProfile, - MapSet, -} from '../model/mapmodel'; + indexModel +} from '@/smart/model/mapmodel'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; +import type { + IToaster, + IToastProps } from '@blueprintjs/core'; import { Button, ControlGroup, HotkeysTarget2, - IToaster, - IToastProps, Toaster, } from '@blueprintjs/core'; -import MapperFileMenu from './menu/MapperFileMenu'; -import { createPageHistory, PageHistory } from '../model/history'; -import { - isModelWrapper, +import MapperFileMenu from '@/smart/ui/menu/MapperFileMenu'; +import type { PageHistory } from '@/smart/model/history'; +import { createPageHistory } from '@/smart/model/history'; +import type { MapperSelectedInterface, MapperState, - MapperViewOption, -} from '../model/States'; -import { createNewEditorModel } from '../utils/EditorFactory'; -import { createEditorModelWrapper, ModelWrapper } from '../model/modelwrapper'; + MapperViewOption } from '@/smart/model/States'; +import { + isModelWrapper +} from '@/smart/model/States'; +import { createNewEditorModel } from '@/smart/utils/EditorFactory'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import { createEditorModelWrapper } from '@/smart/model/modelwrapper'; +import type { + MapDiffEdgeResult } from '@/smart/utils/map/MappingCalculator'; import { calculateMapping, filterMappings, filterMappingsForDocument, - MapDiffEdgeResult, mergeMapProfiles, -} from '../utils/map/MappingCalculator'; -import MappingCanvus from './mapper/MappingsCanvus'; -import MapperOptionMenu from './menu/mapperOptionMenu'; -import { EditMPropsInterface } from './dialog/dialogs'; -import { multi_model_container } from '../../css/layout'; -import { vertical_line } from '../../css/components'; -import { findPageContainingElement } from '../utils/SearchFunctions'; -import { getDocumentMetaById } from '../utils/DocumentFunctions'; -import { getNamespace } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; +} from '@/smart/utils/map/MappingCalculator'; +import MappingCanvus from '@/smart/ui/mapper/MappingsCanvus'; +import MapperOptionMenu from '@/smart/ui/menu/mapperOptionMenu'; +import type { EditMPropsInterface } from '@/smart/ui/dialog/dialogs'; +import { multi_model_container } from '@/css/layout'; +import { vertical_line } from '@/css/components'; +import { findPageContainingElement } from '@/smart/utils/SearchFunctions'; +import { getDocumentMetaById } from '@/smart/utils/DocumentFunctions'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { COMMITMSG, getPathByNS, JSONContext, JSONToMMEL, RepoFileType, -} from '../utils/repo/io'; +} from '@/smart/utils/repo/io'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { MMELJSON } from '../model/json'; -import { MMELRepo, RepoIndex } from '../model/repo'; -import RepoMapMainView from './mapper/repo/RepoMapMainView'; -import { LoadingContainer } from './common/Loading'; -import { MMELDocument } from '../model/document'; -import MapperCompareMenu from './menu/MapperCompareMenu'; -import MapperDialog from './popover/MapperDialog'; -import { calEdgeDiff } from '../utils/map/MappingDiff'; -import { DOCVERSION, MAPVERSION } from '../utils/constants'; -import MenuButton from './menu/MenuButton'; +import type { MMELJSON } from '@/smart/model/json'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import RepoMapMainView from '@/smart/ui/mapper/repo/RepoMapMainView'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; +import type { MMELDocument } from '@/smart/model/document'; +import MapperCompareMenu from '@/smart/ui/menu/MapperCompareMenu'; +import MapperDialog from '@/smart/ui/popover/MapperDialog'; +import { calEdgeDiff } from '@/smart/utils/map/MappingDiff'; +import { DOCVERSION, MAPVERSION } from '@/smart/utils/constants'; +import MenuButton from '@/smart/ui/menu/MenuButton'; const initModel = createNewEditorModel(); const initModelWrapper = createEditorModelWrapper(initModel); diff --git a/packages/legacy/src/smart/ui/mainviewer.tsx b/src/smart/ui/mainviewer.tsx similarity index 87% rename from packages/legacy/src/smart/ui/mainviewer.tsx rename to src/smart/ui/mainviewer.tsx index 226d6479..c91217f6 100644 --- a/packages/legacy/src/smart/ui/mainviewer.tsx +++ b/src/smart/ui/mainviewer.tsx @@ -5,65 +5,70 @@ import { jsx } from '@emotion/react'; import React, { useContext, useMemo, useState } from 'react'; import ReactFlow, { Controls, ReactFlowProvider } from 'react-flow-renderer'; +import type { + IToaster, + IToastProps } from '@blueprintjs/core'; import { ControlGroup, - IToaster, - IToastProps, Toaster, } from '@blueprintjs/core'; import makeSidebar from '@riboseinc/paneron-extension-kit/widgets/Sidebar'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - getViewerReactFlowElementsFrom, - ModelWrapper, -} from '../model/modelwrapper'; + getViewerReactFlowElementsFrom +} from '@/smart/model/modelwrapper'; +import type { + HistoryItem, + PageHistory, + RepoHistory } from '@/smart/model/history'; import { addToHistory, createModelHistory, - HistoryItem, - PageHistory, - popPage, - RepoHistory, -} from '../model/history'; -import { EdgeTypes, FunModel, NodeTypes, ViewerOption } from '../model/States'; -import MGDButton from '../MGDComponents/MGDButton'; -import { MGDButtonType } from '../../css/MGDButton'; -import { react_flow_container_layout, sidebar_layout } from '../../css/layout'; -import { DataVisibilityButton, IdVisibleButton } from './control/buttons'; + popPage +} from '@/smart/model/history'; +import type { FunModel, ViewerOption } from '@/smart/model/States'; +import { EdgeTypes, NodeTypes } from '@/smart/model/States'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; +import { react_flow_container_layout, sidebar_layout } from '@/css/layout'; +import { DataVisibilityButton, IdVisibleButton } from '@/smart/ui/control/buttons'; import { getHighlightedStyleById, getHighlightedSVGColorById, -} from '../utils/SearchFunctions'; -import { SidebarBlockConfig } from '@riboseinc/paneron-extension-kit/widgets/Sidebar/Block'; -import ViewToolMenu from './menu/ViewToolMenu'; -import MeasureCheckPane from './measurement/MeasurementValidationPane'; -import { ViewFunctionInterface } from '../model/ViewFunctionModel'; -import LegendPane from './common/description/LegendPane'; -import { loadPlugin } from './application/plugin'; -import { getNamespace } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; -import ChecklistConfigPane from './checklist/CheckListConfigPane'; -import { +} from '@/smart/utils/SearchFunctions'; +import type { SidebarBlockConfig } from '@riboseinc/paneron-extension-kit/widgets/Sidebar/Block'; +import ViewToolMenu from '@/smart/ui/menu/ViewToolMenu'; +import MeasureCheckPane from '@/smart/ui/measurement/MeasurementValidationPane'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import { loadPlugin } from '@/smart/ui/application/plugin'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import ChecklistConfigPane from '@/smart/ui/checklist/CheckListConfigPane'; +import type { MMELProvision, MMELReference, -} from '../serialize/interface/supportinterface'; -import { MMELDataAttribute } from '../serialize/interface/datainterface'; -import SimulationPane from './sidebar/SimulationPane'; -import RegistrySummary from './summary/RegistrySummary'; -import ProvisionSettings from './summary/ProvisionSettings'; -import VersionTrackerSettingPane from './version/VersionTrackerSetting'; -import { MMELRepo, RepoIndex } from '../model/repo'; -import RepoBreadcrumb from './common/description/RepoBreadcrumb'; -import ViewOptionMenu from './menu/ViewOptionMenu'; -import MenuButton from './menu/MenuButton'; -import { EditorModel } from '../model/editormodel'; -import { HistoryAction, useHistory } from '../model/editor/history'; -import { getBreadcrumbs } from './common/description/fields'; -import { SelectedNodeDescription } from './sidebar/selected'; -import SearchComponentPane from './sidebar/search'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import SimulationPane from '@/smart/ui/sidebar/SimulationPane'; +import RegistrySummary from '@/smart/ui/summary/RegistrySummary'; +import ProvisionSettings from '@/smart/ui/summary/ProvisionSettings'; +import VersionTrackerSettingPane from '@/smart/ui/version/VersionTrackerSetting'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import RepoBreadcrumb from '@/smart/ui/common/description/RepoBreadcrumb'; +import ViewOptionMenu from '@/smart/ui/menu/ViewOptionMenu'; +import MenuButton from '@/smart/ui/menu/MenuButton'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { HistoryAction } from '@/smart/model/editor/history'; +import { useHistory } from '@/smart/model/editor/history'; +import { getBreadcrumbs } from '@/smart/ui/common/description/fields'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; export enum FunctionPage { Simulation = 'simulation', diff --git a/packages/legacy/src/smart/ui/mapper/AutoMapper.tsx b/src/smart/ui/mapper/AutoMapper.tsx similarity index 80% rename from packages/legacy/src/smart/ui/mapper/AutoMapper.tsx rename to src/smart/ui/mapper/AutoMapper.tsx index a93b6552..e6b29ae2 100644 --- a/packages/legacy/src/smart/ui/mapper/AutoMapper.tsx +++ b/src/smart/ui/mapper/AutoMapper.tsx @@ -1,14 +1,16 @@ -import { Button, IToastProps, Text } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; +import { Button, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; -import { CSSProperties, useContext, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import MGDHeading from '../../MGDComponents/MGDHeading'; -import { MapProfile } from '../../model/mapmodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { handleMappingOpen, handleModelOpen } from '../../utils/IOFunctions'; -import { mapAI } from '../../utils/map/MappingCalculator'; -import { getNamespace } from '../../utils/ModelFunctions'; +import type { CSSProperties } from 'react'; +import { useContext, useState } from 'react'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import { handleMappingOpen, handleModelOpen } from '@/smart/utils/IOFunctions'; +import { mapAI } from '@/smart/utils/map/MappingCalculator'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; const centeredLayout: CSSProperties = { display : 'flex', diff --git a/packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx b/src/smart/ui/mapper/MappingsCanvus.tsx similarity index 90% rename from packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx rename to src/smart/ui/mapper/MappingsCanvus.tsx index 5f8322e9..1698237a 100644 --- a/packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx +++ b/src/smart/ui/mapper/MappingsCanvus.tsx @@ -1,11 +1,13 @@ -import React, { RefObject } from 'react'; -import { +import type { RefObject } from 'react'; +import React from 'react'; +import type { MapDiffEdgeResult, - MapDiffType, + MapDiffType } from '@/smart/utils/map/MappingCalculator'; +import { MapDiffValues, -} from '../../utils/map/MappingCalculator'; -import { mgdCanvas } from '../../../css/layout'; -import { LegendInterface } from '../../model/States'; +} from '@/smart/utils/map/MappingCalculator'; +import { mgdCanvas } from '@/css/layout'; +import type { LegendInterface } from '@/smart/model/States'; export const MapDiffStyles: Record = { 'new' : { label : 'New mapping', color : 'green' }, diff --git a/packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx b/src/smart/ui/mapper/ModelDiagram.tsx similarity index 84% rename from packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx rename to src/smart/ui/mapper/ModelDiagram.tsx index ee63a4e8..e877af74 100644 --- a/packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx +++ b/src/smart/ui/mapper/ModelDiagram.tsx @@ -2,62 +2,69 @@ import { Button, ControlGroup } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useContext } from 'react'; +import type { + OnLoadParams } from 'react-flow-renderer'; import ReactFlow, { Controls, - OnLoadParams, ReactFlowProvider, } from 'react-flow-renderer'; -import { reactFlowContainerLayout } from '../../../css/layout'; -import { MGDButtonType } from '../../../css/MGDButton'; -import MGDButton from '../../MGDComponents/MGDButton'; -import { EditorModel, ModelType } from '../../model/editormodel'; +import { reactFlowContainerLayout } from '@/css/layout'; +import { MGDButtonType } from '@/css/MGDButton'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { ModelType } from '@/smart/model/editormodel'; +import type { + PageHistory } from '@/smart/model/history'; import { addToHistory, createPageHistory, getBreadcrumbs, - PageHistory, popPage, -} from '../../model/history'; +} from '@/smart/model/history'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - getMapperReactFlowElementsFrom, - ModelWrapper, -} from '../../model/modelwrapper'; + getMapperReactFlowElementsFrom +} from '@/smart/model/modelwrapper'; +import type { + MapperSelectedInterface, + MapperState, + MapperViewOption } from '@/smart/model/States'; import { EdgeTypes, isModelWrapper, - MapperSelectedInterface, - MapperState, - MapperViewOption, NodeTypes, -} from '../../model/States'; -import ComponentSummary from '../popover/ComponentSummary'; +} from '@/smart/model/States'; +import ComponentSummary from '@/smart/ui/popover/ComponentSummary'; +import type { + MapperModelType, + MapSet } from '@/smart/model/mapmodel'; import { buildHistoryMap, indexModel, - MapperModelLabel, - MapperModelType, - MapSet, -} from '../../model/mapmodel'; + MapperModelLabel +} from '@/smart/model/mapmodel'; +import type { + MapResultType } from '@/smart/utils/map/MappingCalculator'; import { isParentMapFullCovered, MappingResultStyles, - MappingSourceStyles, - MapResultType, -} from '../../utils/map/MappingCalculator'; -import LegendPane from '../common/description/LegendPane'; -import MappingPartyList from './mappartylist'; -import { handleModelOpen } from '../../utils/IOFunctions'; -import { MMELDocument } from '../../model/document'; -import SMARTDocumentView from './document/DocumentView'; + MappingSourceStyles +} from '@/smart/utils/map/MappingCalculator'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import MappingPartyList from '@/smart/ui/mapper/mappartylist'; +import { handleModelOpen } from '@/smart/utils/IOFunctions'; +import type { MMELDocument } from '@/smart/model/document'; +import SMARTDocumentView from '@/smart/ui/mapper/document/DocumentView'; import { Popover2 } from '@blueprintjs/popover2'; -import MapperDocumentMenu from '../menu/MapperDocumentMenu'; -import RepoMapRefMenus from './repo/RepoMapRefMenu'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { MapDiffStyles } from './MappingsCanvus'; +import MapperDocumentMenu from '@/smart/ui/menu/MapperDocumentMenu'; +import RepoMapRefMenus from '@/smart/ui/mapper/repo/RepoMapRefMenu'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { MapDiffStyles } from '@/smart/ui/mapper/MappingsCanvus'; import { MappingDiffResultStyles, MappingDiffSourceStyles, -} from '../../utils/map/MappingDiff'; +} from '@/smart/utils/map/MappingDiff'; const ModelDiagram: React.FC<{ className?: string; diff --git a/packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx b/src/smart/ui/mapper/document/DocumentView.tsx similarity index 86% rename from packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx rename to src/smart/ui/mapper/document/DocumentView.tsx index cd2744c6..1d125046 100644 --- a/packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx +++ b/src/smart/ui/mapper/document/DocumentView.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useMemo } from 'react'; -import { MMELDocument } from '../../../model/document'; -import { MapSet } from '../../../model/mapmodel'; -import { calculateDocumentMapping } from '../../../utils/DocumentFunctions'; -import SectionView from './SectionView'; +import type { MMELDocument } from '@/smart/model/document'; +import type { MapSet } from '@/smart/model/mapmodel'; +import { calculateDocumentMapping } from '@/smart/utils/DocumentFunctions'; +import SectionView from '@/smart/ui/mapper/document/SectionView'; const SMARTDocumentView: React.FC<{ mmelDoc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx b/src/smart/ui/mapper/document/ParagraphView.tsx similarity index 89% rename from packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx rename to src/smart/ui/mapper/document/ParagraphView.tsx index 7a53d314..37f1aed6 100644 --- a/packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx +++ b/src/smart/ui/mapper/document/ParagraphView.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { +import type { DocMapIndex, DocParagraph, DocStatement, -} from '../../../model/document'; -import StatementView from './StatementView'; +} from '@/smart/model/document'; +import StatementView from '@/smart/ui/mapper/document/StatementView'; const ParagraphView: React.FC<{ para: DocParagraph; diff --git a/packages/legacy/src/smart/ui/mapper/document/SectionView.tsx b/src/smart/ui/mapper/document/SectionView.tsx similarity index 84% rename from packages/legacy/src/smart/ui/mapper/document/SectionView.tsx rename to src/smart/ui/mapper/document/SectionView.tsx index 1c66c11d..9fa4cc62 100644 --- a/packages/legacy/src/smart/ui/mapper/document/SectionView.tsx +++ b/src/smart/ui/mapper/document/SectionView.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DocMapIndex, DocSection, DocStatement } from '../../../model/document'; -import ParagraphView from './ParagraphView'; +import type { DocMapIndex, DocSection, DocStatement } from '@/smart/model/document'; +import ParagraphView from '@/smart/ui/mapper/document/ParagraphView'; const SectionView: React.FC<{ sec: DocSection; diff --git a/packages/legacy/src/smart/ui/mapper/document/StatementView.tsx b/src/smart/ui/mapper/document/StatementView.tsx similarity index 95% rename from packages/legacy/src/smart/ui/mapper/document/StatementView.tsx rename to src/smart/ui/mapper/document/StatementView.tsx index bc7a16f9..4b81ef58 100644 --- a/packages/legacy/src/smart/ui/mapper/document/StatementView.tsx +++ b/src/smart/ui/mapper/document/StatementView.tsx @@ -2,8 +2,8 @@ import { Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import { DocStatement } from '../../../model/document'; -import { DragAndDropMappingType } from '../../../utils/constants'; +import type { DocStatement } from '@/smart/model/document'; +import { DragAndDropMappingType } from '@/smart/utils/constants'; const StatementView: React.FC<{ statement: DocStatement; diff --git a/packages/legacy/src/smart/ui/mapper/mappartylist.tsx b/src/smart/ui/mapper/mappartylist.tsx similarity index 82% rename from packages/legacy/src/smart/ui/mapper/mappartylist.tsx rename to src/smart/ui/mapper/mappartylist.tsx index 7c39aaac..5466ac71 100644 --- a/packages/legacy/src/smart/ui/mapper/mappartylist.tsx +++ b/src/smart/ui/mapper/mappartylist.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import { popoverPanelContainer } from '../../../css/layout'; -import { ModelType } from '../../model/editormodel'; -import { MappingType } from '../../model/mapmodel'; +import { mgdLabel } from '@/css/form'; +import { popoverPanelContainer } from '@/css/layout'; +import { ModelType } from '@/smart/model/editormodel'; +import type { MappingType } from '@/smart/model/mapmodel'; import { findImpMapPartners, findRefMapPartners, -} from '../../utils/map/MappingCalculator'; -import { EditMappingButton, MapPartnerNavigateButton } from '../common/buttons'; +} from '@/smart/utils/map/MappingCalculator'; +import { EditMappingButton, MapPartnerNavigateButton } from '@/smart/ui/common/buttons'; const MappingPartyList: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx b/src/smart/ui/mapper/repo/RepoAutoMapper.tsx similarity index 89% rename from packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx rename to src/smart/ui/mapper/repo/RepoAutoMapper.tsx index 8ce2ad23..65cbbe0b 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx +++ b/src/smart/ui/mapper/repo/RepoAutoMapper.tsx @@ -1,27 +1,28 @@ import { Button, ButtonGroup } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo, useState } from 'react'; -import { Edge, Elements, Node } from 'react-flow-renderer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { MMELJSON } from '../../../model/json'; -import { MapProfile } from '../../../model/mapmodel'; +import type { Edge, Elements, Node } from 'react-flow-renderer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { MMELJSON } from '@/smart/model/json'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - createEditorModelWrapper, - ModelWrapper, -} from '../../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { repoAutoMapExplore, repoMapAI } from '../../../utils/map/AutoMap'; -import * as Logger from '../../../../lib/logger'; + createEditorModelWrapper +} from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { repoAutoMapExplore, repoMapAI } from '@/smart/utils/map/AutoMap'; +import * as Logger from '@/lib/logger'; import { getAllRepoMaps, getAllRepoModels, getRepoItemDesc, -} from '../../../utils/repo/CommonFunctions'; -import { JSONToMMEL } from '../../../utils/repo/io'; -import { createAutoMapNode } from './automapper/AutoMapNode'; -import AutoMapLoading from './automapper/calculating'; -import RepoLoading from './automapper/loading'; -import RepoAutoMapView from './automapper/mapview'; +} from '@/smart/utils/repo/CommonFunctions'; +import { JSONToMMEL } from '@/smart/utils/repo/io'; +import { createAutoMapNode } from '@/smart/ui/mapper/repo/automapper/AutoMapNode'; +import AutoMapLoading from '@/smart/ui/mapper/repo/automapper/calculating'; +import RepoLoading from '@/smart/ui/mapper/repo/automapper/loading'; +import RepoAutoMapView from '@/smart/ui/mapper/repo/automapper/mapview'; type Status = 'initial' | 'run' | 'done'; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx b/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx similarity index 85% rename from packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx rename to src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx index 34f12ec8..f25aa698 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx +++ b/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx @@ -2,14 +2,14 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext } from 'react'; -import { MMELDocument } from '../../../model/document'; -import { indexModel } from '../../../model/mapmodel'; -import { ModelWrapper } from '../../../model/modelwrapper'; +import type { MMELDocument } from '@/smart/model/document'; +import { indexModel } from '@/smart/model/mapmodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; import { FILE_TYPE, handleDocumentOpen, handleModelOpen, -} from '../../../utils/IOFunctions'; +} from '@/smart/utils/IOFunctions'; const RepoExternalFileMenu: React.FC<{ setDocument: (x: MMELDocument) => void; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx b/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx similarity index 65% rename from packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx rename to src/smart/ui/mapper/repo/RepoIndexDiagram.tsx index bc31ff7c..858740dd 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx +++ b/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { useMemo } from 'react'; import ReactFlow from 'react-flow-renderer'; -import { ModelWrapper } from '../../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { RepoLegend } from '../../../utils/repo/CommonFunctions'; -import { repoLinkExploreNode } from '../../../utils/repo/LinkAnalysis'; -import LegendPane from '../../common/description/LegendPane'; -import RepoEdge from '../../flowui/RepoEdge'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { RepoLegend } from '@/smart/utils/repo/CommonFunctions'; +import { repoLinkExploreNode } from '@/smart/utils/repo/LinkAnalysis'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import RepoEdge from '@/smart/ui/flowui/RepoEdge'; const RepoIndexDiagram: React.FC<{ index: RepoIndex; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx b/src/smart/ui/mapper/repo/RepoIndexMainView.tsx similarity index 70% rename from packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx rename to src/smart/ui/mapper/repo/RepoIndexMainView.tsx index 305d4463..d64c2ebf 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx +++ b/src/smart/ui/mapper/repo/RepoIndexMainView.tsx @@ -1,15 +1,16 @@ import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo } from 'react'; -import { MMELJSON } from '../../../model/json'; +import type { MMELJSON } from '@/smart/model/json'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - createEditorModelWrapper, - ModelWrapper, -} from '../../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { getAllRepoModels } from '../../../utils/repo/CommonFunctions'; -import { JSONToMMEL } from '../../../utils/repo/io'; -import { LoadingScreen } from '../../common/Loading'; -import RepoIndexDiagram from './RepoIndexDiagram'; + createEditorModelWrapper +} from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { getAllRepoModels } from '@/smart/utils/repo/CommonFunctions'; +import { JSONToMMEL } from '@/smart/utils/repo/io'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; +import RepoIndexDiagram from '@/smart/ui/mapper/repo/RepoIndexDiagram'; const RepoIndexMainView: React.FC<{ repo?: MMELRepo; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx b/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx similarity index 90% rename from packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx rename to src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx index 37da76db..e9367310 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx +++ b/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx @@ -1,6 +1,6 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import { RepoItemType } from '../../../model/repo'; +import type { RepoItemType } from '@/smart/model/repo'; const RepoInternalFileMenu: React.FC<{ setType: (x: RepoItemType) => void; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx b/src/smart/ui/mapper/repo/RepoMapDiagram.tsx similarity index 71% rename from packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx rename to src/smart/ui/mapper/repo/RepoMapDiagram.tsx index ec46ca6b..3d3b5198 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx +++ b/src/smart/ui/mapper/repo/RepoMapDiagram.tsx @@ -1,17 +1,17 @@ import React from 'react'; import { useMemo } from 'react'; import ReactFlow, { ReactFlowProvider } from 'react-flow-renderer'; -import { MapProfile } from '../../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { MapperViewOption } from '../../../model/States'; -import { repoMapDiffNode } from '../../../utils/map/MappingDiff'; -import { repoMapExploreNode } from '../../../utils/map/RepoMap'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { MapperViewOption } from '@/smart/model/States'; +import { repoMapDiffNode } from '@/smart/utils/map/MappingDiff'; +import { repoMapExploreNode } from '@/smart/utils/map/RepoMap'; import { RepoDiffLegend, RepoLegend, -} from '../../../utils/repo/CommonFunctions'; -import LegendPane from '../../common/description/LegendPane'; -import RepoEdge from '../../flowui/RepoEdge'; +} from '@/smart/utils/repo/CommonFunctions'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import RepoEdge from '@/smart/ui/flowui/RepoEdge'; const RepoMapDiagram: React.FC<{ index: RepoIndex; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx b/src/smart/ui/mapper/repo/RepoMapMainView.tsx similarity index 87% rename from packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx rename to src/smart/ui/mapper/repo/RepoMapMainView.tsx index 94302f09..57fd03b0 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx +++ b/src/smart/ui/mapper/repo/RepoMapMainView.tsx @@ -1,12 +1,12 @@ import { Button } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo } from 'react'; -import { MapProfile } from '../../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { MapperViewOption } from '../../../model/States'; -import { getAllRepoMaps } from '../../../utils/repo/CommonFunctions'; -import { LoadingIcon } from '../../common/Loading'; -import RepoMapDiagram from './RepoMapDiagram'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { MapperViewOption } from '@/smart/model/States'; +import { getAllRepoMaps } from '@/smart/utils/repo/CommonFunctions'; +import { LoadingIcon } from '@/smart/ui/common/Loading'; +import RepoMapDiagram from '@/smart/ui/mapper/repo/RepoMapDiagram'; const RepoMapMainView: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx b/src/smart/ui/mapper/repo/RepoMapNode.tsx similarity index 95% rename from packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx rename to src/smart/ui/mapper/repo/RepoMapNode.tsx index 774aa528..dc8ac3d5 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx +++ b/src/smart/ui/mapper/repo/RepoMapNode.tsx @@ -1,5 +1,5 @@ import { Button, Text } from '@blueprintjs/core'; -import { RepoItems } from '../../../model/repo'; +import type { RepoItems } from '@/smart/model/repo'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx b/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx similarity index 74% rename from packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx rename to src/smart/ui/mapper/repo/RepoMapRefMenu.tsx index 10f9300b..dccc31bb 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx +++ b/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx @@ -1,12 +1,12 @@ import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; import { Button, Dialog } from '@blueprintjs/core'; -import RepoExternalFileMenu from './RepoExternalFileMenu'; -import { MMELDocument } from '../../../model/document'; -import { ModelWrapper } from '../../../model/modelwrapper'; -import RepoInternalFileMenu from './RepoInternalFileMenu'; -import { MMELRepo, RepoIndex, RepoItemType } from '../../../model/repo'; -import RepoItemSelector from '../../repo/RepoItemSelector'; +import RepoExternalFileMenu from '@/smart/ui/mapper/repo/RepoExternalFileMenu'; +import type { MMELDocument } from '@/smart/model/document'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import RepoInternalFileMenu from '@/smart/ui/mapper/repo/RepoInternalFileMenu'; +import type { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import RepoItemSelector from '@/smart/ui/repo/RepoItemSelector'; const RepoMapRefMenus: React.FC<{ setModelWrapper: (x: ModelWrapper) => void; diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx b/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx similarity index 95% rename from packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx rename to src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx index 85b994a4..6ec34c32 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx +++ b/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx @@ -1,7 +1,7 @@ import { Checkbox, Text } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { RepoItems } from '../../../../model/repo'; +import type { RepoItems } from '@/smart/model/repo'; export function createAutoMapNode( label: string, diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx b/src/smart/ui/mapper/repo/automapper/calculating.tsx similarity index 89% rename from packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx rename to src/smart/ui/mapper/repo/automapper/calculating.tsx index 82361d74..4b1403a2 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx +++ b/src/smart/ui/mapper/repo/automapper/calculating.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { LoadingContainer } from '../../../common/Loading'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; const AutoMapLoading: React.FC<{ isLoading: boolean; diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx b/src/smart/ui/mapper/repo/automapper/loading.tsx similarity index 91% rename from packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx rename to src/smart/ui/mapper/repo/automapper/loading.tsx index 7e5b1131..ee0a1aa0 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx +++ b/src/smart/ui/mapper/repo/automapper/loading.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { LoadingContainer } from '../../../common/Loading'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; const RepoLoading: React.FC<{ isLoading: boolean; diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx b/src/smart/ui/mapper/repo/automapper/mapview.tsx similarity index 62% rename from packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx rename to src/smart/ui/mapper/repo/automapper/mapview.tsx index 6924a431..f5ca2204 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx +++ b/src/smart/ui/mapper/repo/automapper/mapview.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import ReactFlow, { Elements, ReactFlowProvider } from 'react-flow-renderer'; -import { RepoLegend } from '../../../../utils/repo/CommonFunctions'; -import LegendPane from '../../../common/description/LegendPane'; -import RepoEdge from '../../../flowui/RepoEdge'; +import type { Elements } from 'react-flow-renderer'; +import ReactFlow, { ReactFlowProvider } from 'react-flow-renderer'; +import { RepoLegend } from '@/smart/utils/repo/CommonFunctions'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import RepoEdge from '@/smart/ui/flowui/RepoEdge'; const RepoAutoMapView: React.FC<{ fnodes: Elements; diff --git a/packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx b/src/smart/ui/mapper/viewmapbutton.tsx similarity index 88% rename from packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx rename to src/smart/ui/mapper/viewmapbutton.tsx index 314f8eea..d7c5f30f 100644 --- a/packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx +++ b/src/smart/ui/mapper/viewmapbutton.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; -import { flownodeTopRightButtonLayout } from '../../../css/layout'; -import { ModelType } from '../../model/editormodel'; -import { MapViewButtonToolTip } from '../../utils/map/MappingCalculator'; +import { flownodeTopRightButtonLayout } from '@/css/layout'; +import { ModelType } from '@/smart/model/editormodel'; +import { MapViewButtonToolTip } from '@/smart/utils/map/MappingCalculator'; interface MouseState { isHover: boolean; diff --git a/packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts b/src/smart/ui/measurement/MeasurementResultFormatter.ts similarity index 72% rename from packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts rename to src/smart/ui/measurement/MeasurementResultFormatter.ts index a95303c2..d33a7010 100644 --- a/packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts +++ b/src/smart/ui/measurement/MeasurementResultFormatter.ts @@ -1,8 +1,8 @@ -import { flow_node__highlighed, no_highlight } from '../../../css/visual'; -import { MeasureResult } from '../../model/Measurement'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { MeasureResultStyles } from '../../utils/measurement/Checker'; -import MeasurementTooltip from './MeasurementTooltip'; +import { flow_node__highlighed, no_highlight } from '@/css/visual'; +import type { MeasureResult } from '@/smart/model/Measurement'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { MeasureResultStyles } from '@/smart/utils/measurement/Checker'; +import MeasurementTooltip from '@/smart/ui/measurement/MeasurementTooltip'; export default function updateMeasurementView( result: MeasureResult, diff --git a/packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx b/src/smart/ui/measurement/MeasurementTooltip.tsx similarity index 83% rename from packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx rename to src/smart/ui/measurement/MeasurementTooltip.tsx index f52f8689..edc53292 100644 --- a/packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx +++ b/src/smart/ui/measurement/MeasurementTooltip.tsx @@ -1,14 +1,15 @@ import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import MGDHeading from '../../MGDComponents/MGDHeading'; -import MGDLabel from '../../MGDComponents/MGDLabel'; -import { +import { popoverPanelContainer } from '@/css/layout'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import type { MeasureResult, - MeasureRType, MTestItem, - MTestReport, -} from '../../model/Measurement'; -import { DescriptionItem } from '../common/description/fields'; + MTestReport } from '@/smart/model/Measurement'; +import { + MeasureRType +} from '@/smart/model/Measurement'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const MeasurementTooltip: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx b/src/smart/ui/measurement/MeasurementValidationPane.tsx similarity index 76% rename from packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx rename to src/smart/ui/measurement/MeasurementValidationPane.tsx index 9120287b..7f47747b 100644 --- a/packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx +++ b/src/smart/ui/measurement/MeasurementValidationPane.tsx @@ -1,20 +1,22 @@ -import { Text, FormGroup, IToastProps, Button } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; +import { Text, FormGroup, Button } from '@blueprintjs/core'; import React from 'react'; import { useEffect, useMemo, useState } from 'react'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../model/editormodel'; -import { MeasureResult } from '../../model/Measurement'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MeasureResult } from '@/smart/model/Measurement'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import type { MMELVariable, - MMELView, + MMELView } from '@paneron/libmmel/interface/supportinterface'; +import { VarType, -} from '../../serialize/interface/supportinterface'; -import { measureTest } from '../../utils/measurement/Checker'; -import updateMeasurementView from './MeasurementResultFormatter'; -import updateParaView from './ParameterizedViewFormatter'; -import VariableSettingItem from './VariableSettingItem'; -import ProfileControl from './ViewProfileControl'; +} from '@paneron/libmmel/interface/supportinterface'; +import { measureTest } from '@/smart/utils/measurement/Checker'; +import updateMeasurementView from '@/smart/ui/measurement/MeasurementResultFormatter'; +import updateParaView from '@/smart/ui/measurement/ParameterizedViewFormatter'; +import VariableSettingItem from '@/smart/ui/measurement/VariableSettingItem'; +import ProfileControl from '@/smart/ui/measurement/ViewProfileControl'; function simpleFilter(v: MMELVariable): boolean { return ( diff --git a/packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts b/src/smart/ui/measurement/ParameterizedViewFormatter.ts similarity index 75% rename from packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts rename to src/smart/ui/measurement/ParameterizedViewFormatter.ts index 8234f1a7..d86f62ce 100644 --- a/packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts +++ b/src/smart/ui/measurement/ParameterizedViewFormatter.ts @@ -1,7 +1,7 @@ -import { flow_node__highlighed } from '../../../css/visual'; -import { MeasureResult } from '../../model/Measurement'; -import { LegendInterface } from '../../model/States'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import { flow_node__highlighed } from '@/css/visual'; +import type { MeasureResult } from '@/smart/model/Measurement'; +import type { LegendInterface } from '@/smart/model/States'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; export default function updateParaView( result: MeasureResult, diff --git a/packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx b/src/smart/ui/measurement/VariableSettingItem.tsx similarity index 77% rename from packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx rename to src/smart/ui/measurement/VariableSettingItem.tsx index cae4757c..bbbe06ad 100644 --- a/packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx +++ b/src/smart/ui/measurement/VariableSettingItem.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { InputableVarType, VarInputInterface } from '../../model/Measurement'; -import { VarType } from '../../serialize/interface/supportinterface'; -import BooleanMeasureEdit from './fields/boolean'; -import TableComboBox from './fields/TableComboBox'; -import TextMeasureEdit from './fields/text'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import type { InputableVarType, VarInputInterface } from '@/smart/model/Measurement'; +import { VarType } from '@paneron/libmmel/interface/supportinterface'; +import BooleanMeasureEdit from '@/smart/ui/measurement/fields/boolean'; +import TableComboBox from '@/smart/ui/measurement/fields/TableComboBox'; +import TextMeasureEdit from '@/smart/ui/measurement/fields/text'; const VarInputs: Record> = { [VarType.BOOLEAN] : BooleanMeasureEdit, diff --git a/packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx b/src/smart/ui/measurement/ViewProfileControl.tsx similarity index 90% rename from packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx rename to src/smart/ui/measurement/ViewProfileControl.tsx index 9470d000..4b5f2ba7 100644 --- a/packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx +++ b/src/smart/ui/measurement/ViewProfileControl.tsx @@ -1,9 +1,9 @@ import { Text, Button, ControlGroup, Icon } from '@blueprintjs/core'; import { Classes, Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { MMELView } from '../../serialize/interface/supportinterface'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { MMELView } from '@paneron/libmmel/interface/supportinterface'; const ProfileControl: React.FC<{ values: Record; diff --git a/packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx b/src/smart/ui/measurement/fields/TableComboBox.tsx similarity index 83% rename from packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx rename to src/smart/ui/measurement/fields/TableComboBox.tsx index 3aa2ad9b..89a7856a 100644 --- a/packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx +++ b/src/smart/ui/measurement/fields/TableComboBox.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useMemo } from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { VarInputInterface } from '../../../model/Measurement'; -import { MMELVariable } from '../../../serialize/interface/supportinterface'; -import { NormalTextField, NormalComboBox } from '../../common/fields'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { VarInputInterface } from '@/smart/model/Measurement'; +import type { MMELVariable } from '@paneron/libmmel/interface/supportinterface'; +import { NormalTextField, NormalComboBox } from '@/smart/ui/common/fields'; function calOptions( model: EditorModel, diff --git a/packages/legacy/src/smart/ui/measurement/fields/boolean.tsx b/src/smart/ui/measurement/fields/boolean.tsx similarity index 89% rename from packages/legacy/src/smart/ui/measurement/fields/boolean.tsx rename to src/smart/ui/measurement/fields/boolean.tsx index ee596726..6e6edc9b 100644 --- a/packages/legacy/src/smart/ui/measurement/fields/boolean.tsx +++ b/src/smart/ui/measurement/fields/boolean.tsx @@ -1,6 +1,6 @@ import { Switch } from '@blueprintjs/core'; import React from 'react'; -import { VarInputInterface } from '../../../model/Measurement'; +import type { VarInputInterface } from '@/smart/model/Measurement'; const BooleanMeasureEdit: React.FC = function ({ variable, diff --git a/packages/legacy/src/smart/ui/measurement/fields/text.tsx b/src/smart/ui/measurement/fields/text.tsx similarity index 70% rename from packages/legacy/src/smart/ui/measurement/fields/text.tsx rename to src/smart/ui/measurement/fields/text.tsx index 28ef0363..686bc963 100644 --- a/packages/legacy/src/smart/ui/measurement/fields/text.tsx +++ b/src/smart/ui/measurement/fields/text.tsx @@ -1,10 +1,11 @@ import React from 'react'; -import { VarInputInterface } from '../../../model/Measurement'; +import type { VarInputInterface } from '@/smart/model/Measurement'; +import type { + MMELVariable } from '@paneron/libmmel/interface/supportinterface'; import { - MMELVariable, VarType, -} from '../../../serialize/interface/supportinterface'; -import { NormalTextField } from '../../common/fields'; +} from '@paneron/libmmel/interface/supportinterface'; +import { NormalTextField } from '@/smart/ui/common/fields'; function getDesc(v: MMELVariable) { return ( diff --git a/packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx b/src/smart/ui/menu/DocEditFileMenu.tsx similarity index 84% rename from packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx rename to src/smart/ui/menu/DocEditFileMenu.tsx index 7a3db26e..243ac84c 100644 --- a/packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx +++ b/src/smart/ui/menu/DocEditFileMenu.tsx @@ -1,15 +1,15 @@ import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext } from 'react'; -import { MMELDocument } from '../../model/document'; -import { docToText } from '../../utils/DocumentFunctions'; -import { createNewMMELDocument } from '../../utils/EditorFactory'; +import type { MMELDocument } from '@/smart/model/document'; +import { docToText } from '@/smart/utils/DocumentFunctions'; +import { createNewMMELDocument } from '@/smart/utils/EditorFactory'; import { FILE_TYPE, handleDocumentOpen, saveToFileSystem, -} from '../../utils/IOFunctions'; -import MenuButton from './MenuButton'; +} from '@/smart/utils/IOFunctions'; +import MenuButton from '@/smart/ui/menu/MenuButton'; const DocEditFileMenu: React.FC<{ doc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx b/src/smart/ui/menu/DocEditImportMenu.tsx similarity index 89% rename from packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx rename to src/smart/ui/menu/DocEditImportMenu.tsx index 60545815..5368abe5 100644 --- a/packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx +++ b/src/smart/ui/menu/DocEditImportMenu.tsx @@ -1,6 +1,6 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import MenuButton from './MenuButton'; +import MenuButton from '@/smart/ui/menu/MenuButton'; const DocEditImportMenu: React.FC<{ open: () => void; diff --git a/packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx b/src/smart/ui/menu/DocEditToolbar.tsx similarity index 80% rename from packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx rename to src/smart/ui/menu/DocEditToolbar.tsx index a5a0cbd6..3729737a 100644 --- a/packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx +++ b/src/smart/ui/menu/DocEditToolbar.tsx @@ -1,11 +1,11 @@ import { ControlGroup, Dialog } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { dialogLayout } from '../../../css/layout'; -import { MMELDocument } from '../../model/document'; -import DocImport from '../doc/DocImport'; -import DocSettings from '../doc/DocSettings'; -import DocEditFileMenu from './DocEditFileMenu'; -import DocEditImportMenu from './DocEditImportMenu'; +import { dialogLayout } from '@/css/layout'; +import type { MMELDocument } from '@/smart/model/document'; +import DocImport from '@/smart/ui/doc/DocImport'; +import DocSettings from '@/smart/ui/doc/DocSettings'; +import DocEditFileMenu from '@/smart/ui/menu/DocEditFileMenu'; +import DocEditImportMenu from '@/smart/ui/menu/DocEditImportMenu'; type DiagMode = 'setting' | 'import'; diff --git a/packages/legacy/src/smart/ui/menu/EditorEditMenu.tsx b/src/smart/ui/menu/EditorEditMenu.tsx similarity index 100% rename from packages/legacy/src/smart/ui/menu/EditorEditMenu.tsx rename to src/smart/ui/menu/EditorEditMenu.tsx diff --git a/packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx b/src/smart/ui/menu/EditorFileMenu.tsx similarity index 79% rename from packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx rename to src/smart/ui/menu/EditorFileMenu.tsx index 9409385d..b78372e1 100644 --- a/packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx +++ b/src/smart/ui/menu/EditorFileMenu.tsx @@ -1,9 +1,9 @@ import React, { useContext } from 'react'; import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { MMELToText } from '../../serialize/MMEL'; -import { FILE_TYPE, saveToFileSystem } from '../../utils/IOFunctions'; -import { EditorModel } from '../../model/editormodel'; +import { mmelFile } from '@riboseinc/paneron-extension-kit/object-specs/ser-des'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import type { EditorModel } from '@/smart/model/editormodel'; const EditorFileMenu: React.FC<{ model: EditorModel; @@ -17,7 +17,8 @@ const EditorFileMenu: React.FC<{ // Export async function handleSave() { - const fileData = MMELToText(model); + const placeHolderPath = '/'; + const fileData = mmelFile.serialize(model, {})[placeHolderPath]; await saveToFileSystem({ getBlob, diff --git a/packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx b/src/smart/ui/menu/EditorReferenceMenu.tsx similarity index 92% rename from packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx rename to src/smart/ui/menu/EditorReferenceMenu.tsx index 1b377623..1eb07276 100644 --- a/packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx +++ b/src/smart/ui/menu/EditorReferenceMenu.tsx @@ -5,10 +5,10 @@ import { FILE_TYPE, handleDocumentOpen, handleModelOpen, -} from '../../utils/IOFunctions'; -import { ReferenceContent } from '../../model/States'; -import { indexModel } from '../../model/mapmodel'; -import { RepoItemType } from '../../model/repo'; +} from '@/smart/utils/IOFunctions'; +import type { ReferenceContent } from '@/smart/model/States'; +import { indexModel } from '@/smart/model/mapmodel'; +import type { RepoItemType } from '@/smart/model/repo'; const EditorReferenceMenu: React.FC<{ setReference: (x: ReferenceContent | undefined) => void; diff --git a/packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx b/src/smart/ui/menu/EditorReferenceMenuButton.tsx similarity index 82% rename from packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx rename to src/smart/ui/menu/EditorReferenceMenuButton.tsx index d0d8f99d..7ecc3b8a 100644 --- a/packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx +++ b/src/smart/ui/menu/EditorReferenceMenuButton.tsx @@ -1,10 +1,10 @@ import { Button, Dialog } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; -import { MMELRepo, RepoIndex, RepoItemType } from '../../model/repo'; -import { ReferenceContent } from '../../model/States'; -import RepoItemSelector from '../repo/RepoItemSelector'; -import EditorReferenceMenu from './EditorReferenceMenu'; +import type { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import type { ReferenceContent } from '@/smart/model/States'; +import RepoItemSelector from '@/smart/ui/repo/RepoItemSelector'; +import EditorReferenceMenu from '@/smart/ui/menu/EditorReferenceMenu'; const EditorReferenceMenuButton: React.FC<{ setReference: (x: ReferenceContent | undefined) => void; diff --git a/packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx b/src/smart/ui/menu/EditorViewMenu.tsx similarity index 86% rename from packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx rename to src/smart/ui/menu/EditorViewMenu.tsx index 54cd1944..dc718ab5 100644 --- a/packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx +++ b/src/smart/ui/menu/EditorViewMenu.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { IconName, Menu, MenuItem } from '@blueprintjs/core'; -import { EditorViewOption } from '../../model/States'; +import type { IconName } from '@blueprintjs/core'; +import { Menu, MenuItem } from '@blueprintjs/core'; +import type { EditorViewOption } from '@/smart/model/States'; const items: (keyof EditorViewOption)[] = [ 'dvisible', diff --git a/packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx b/src/smart/ui/menu/MapperCompareMenu.tsx similarity index 86% rename from packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx rename to src/smart/ui/menu/MapperCompareMenu.tsx index 02dc488d..455305d7 100644 --- a/packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx +++ b/src/smart/ui/menu/MapperCompareMenu.tsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react'; import { Menu, MenuItem } from '@blueprintjs/core'; -import { FILE_TYPE, handleMappingOpen } from '../../utils/IOFunctions'; +import { FILE_TYPE, handleMappingOpen } from '@/smart/utils/IOFunctions'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { MapProfile } from '../../model/mapmodel'; +import type { MapProfile } from '@/smart/model/mapmodel'; const MapperCompareMenu: React.FC<{ opponent: MapProfile | undefined; diff --git a/packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx b/src/smart/ui/menu/MapperDocumentMenu.tsx similarity index 87% rename from packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx rename to src/smart/ui/menu/MapperDocumentMenu.tsx index f37acefb..5ff63e3b 100644 --- a/packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx +++ b/src/smart/ui/menu/MapperDocumentMenu.tsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react'; import { Menu, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { FILE_TYPE, handleDocumentOpen } from '../../utils/IOFunctions'; -import { MMELDocument } from '../../model/document'; +import { FILE_TYPE, handleDocumentOpen } from '@/smart/utils/IOFunctions'; +import type { MMELDocument } from '@/smart/model/document'; const MapperDocumentMenu: React.FC<{ setDocument: (x: MMELDocument) => void; diff --git a/packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx b/src/smart/ui/menu/MapperFileMenu.tsx similarity index 94% rename from packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx rename to src/smart/ui/menu/MapperFileMenu.tsx index 0292d39a..8205ed88 100644 --- a/packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx +++ b/src/smart/ui/menu/MapperFileMenu.tsx @@ -1,13 +1,14 @@ import React, { useContext } from 'react'; import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { createMapProfile, MapProfile } from '../../model/mapmodel'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import { createMapProfile } from '@/smart/model/mapmodel'; import { FILE_TYPE, handleMappingOpen, saveToFileSystem, -} from '../../utils/IOFunctions'; -import { MMELRepo } from '../../model/repo'; +} from '@/smart/utils/IOFunctions'; +import type { MMELRepo } from '@/smart/model/repo'; const MapperFileMenu: React.FC<{ mapProfile: MapProfile; diff --git a/packages/legacy/src/smart/ui/menu/MenuButton.tsx b/src/smart/ui/menu/MenuButton.tsx similarity index 100% rename from packages/legacy/src/smart/ui/menu/MenuButton.tsx rename to src/smart/ui/menu/MenuButton.tsx diff --git a/packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx b/src/smart/ui/menu/ViewOptionMenu.tsx similarity index 85% rename from packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx rename to src/smart/ui/menu/ViewOptionMenu.tsx index 014e8744..e9c405ea 100644 --- a/packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx +++ b/src/smart/ui/menu/ViewOptionMenu.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { IconName, Menu, MenuItem } from '@blueprintjs/core'; -import { ViewerOption } from '../../model/States'; +import type { IconName } from '@blueprintjs/core'; +import { Menu, MenuItem } from '@blueprintjs/core'; +import type { ViewerOption } from '@/smart/model/States'; const items: (keyof ViewerOption)[] = [ 'dvisible', diff --git a/packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx b/src/smart/ui/menu/ViewToolMenu.tsx similarity index 77% rename from packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx rename to src/smart/ui/menu/ViewToolMenu.tsx index bf7e2868..b8c0d7c3 100644 --- a/packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx +++ b/src/smart/ui/menu/ViewToolMenu.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { IconName, Menu, MenuItem } from '@blueprintjs/core'; -import { FunctionPage, FuntionNames } from '../mainviewer'; +import type { IconName } from '@blueprintjs/core'; +import { Menu, MenuItem } from '@blueprintjs/core'; +import { FunctionPage, FuntionNames } from '@/smart/ui/mainviewer'; const ViewToolMenu: React.FC<{ funPage: FunctionPage; diff --git a/packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx b/src/smart/ui/menu/WorkspaceFileMenu.tsx similarity index 86% rename from packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx rename to src/smart/ui/menu/WorkspaceFileMenu.tsx index 3be8c3c8..7cba1695 100644 --- a/packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx +++ b/src/smart/ui/menu/WorkspaceFileMenu.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Button, ControlGroup, Menu, MenuItem } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; -import MGDButton from '../../MGDComponents/MGDButton'; -import { MGDButtonType } from '../../../css/MGDButton'; -import { WorkspaceDiagPackage } from '../dialog/WorkspaceDiag'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; +import type { WorkspaceDiagPackage } from '@/smart/ui/dialog/WorkspaceDiag'; const WorkspaceFileMenu: React.FC<{ onRepoSave: () => void; diff --git a/packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx b/src/smart/ui/menu/mapperOptionMenu.tsx similarity index 90% rename from packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx rename to src/smart/ui/menu/mapperOptionMenu.tsx index c7eeeff2..52be73b1 100644 --- a/packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx +++ b/src/smart/ui/menu/mapperOptionMenu.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { IconName, Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; -import { MapperViewOption } from '../../model/States'; +import type { IconName } from '@blueprintjs/core'; +import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; +import type { MapperViewOption } from '@/smart/model/States'; const MapperOptionMenu: React.FC<{ viewOption: MapperViewOption; diff --git a/packages/legacy/src/smart/ui/modelWorkspace.tsx b/src/smart/ui/modelWorkspace.tsx similarity index 81% rename from packages/legacy/src/smart/ui/modelWorkspace.tsx rename to src/smart/ui/modelWorkspace.tsx index 8d4826f6..81f96efe 100644 --- a/packages/legacy/src/smart/ui/modelWorkspace.tsx +++ b/src/smart/ui/modelWorkspace.tsx @@ -6,37 +6,42 @@ import React, { useContext, useMemo, useState } from 'react'; import ReactFlow, { Controls, ReactFlowProvider } from 'react-flow-renderer'; -import { HotkeysTarget2, IToaster, Toaster } from '@blueprintjs/core'; +import type { IToaster } from '@blueprintjs/core'; +import { HotkeysTarget2, Toaster } from '@blueprintjs/core'; import makeSidebar from '@riboseinc/paneron-extension-kit/widgets/Sidebar'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - getActionReactFlowElementsFrom, - ModelWrapper, -} from '../model/modelwrapper'; -import { createModelHistory, HistoryItem } from '../model/history'; -import { EdgeTypes, NodeTypes } from '../model/States'; -import { DataVisibilityButton, IdVisibleButton } from './control/buttons'; -import { react_flow_container_layout, sidebar_layout } from '../../css/layout'; -import LegendPane from './common/description/LegendPane'; + getActionReactFlowElementsFrom +} from '@/smart/model/modelwrapper'; +import type { HistoryItem } from '@/smart/model/history'; +import { createModelHistory } from '@/smart/model/history'; +import { EdgeTypes, NodeTypes } from '@/smart/model/States'; +import { DataVisibilityButton, IdVisibleButton } from '@/smart/ui/control/buttons'; +import { react_flow_container_layout, sidebar_layout } from '@/css/layout'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; import { getHighlightedStyleById, getHighlightedSVGColorById, SearchResultStyles, -} from '../utils/SearchFunctions'; -import { SMARTModelStore, SMARTWorkspace } from '../model/workspace'; -import WorkspaceFileMenu from './menu/WorkspaceFileMenu'; -import { WorkspaceDiagPackage, WorkspaceDialog } from './dialog/WorkspaceDiag'; -import { getNamespace } from '../utils/ModelFunctions'; -import { COMMITMSG, getPathByNS, RepoFileType } from '../utils/repo/io'; -import { MMELRepo, RepoIndex } from '../model/repo'; -import { EditorModel } from '../model/editormodel'; -import { HistoryAction, useHistory } from '../model/editor/history'; -import { getBreadcrumbs } from './common/description/fields'; -import { SelectedNodeDescription } from './sidebar/selected'; -import SearchComponentPane from './sidebar/search'; +} from '@/smart/utils/SearchFunctions'; +import type { SMARTModelStore, SMARTWorkspace } from '@/smart/model/workspace'; +import WorkspaceFileMenu from '@/smart/ui/menu/WorkspaceFileMenu'; +import type { WorkspaceDiagPackage } from '@/smart/ui/dialog/WorkspaceDiag'; +import { WorkspaceDialog } from '@/smart/ui/dialog/WorkspaceDiag'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import { COMMITMSG, getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { HistoryAction } from '@/smart/model/editor/history'; +import { useHistory } from '@/smart/model/editor/history'; +import { getBreadcrumbs } from '@/smart/ui/common/description/fields'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; const ModelWorkspace: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/nlp/NLPMain.tsx b/src/smart/ui/nlp/NLPMain.tsx similarity index 78% rename from packages/legacy/src/smart/ui/nlp/NLPMain.tsx rename to src/smart/ui/nlp/NLPMain.tsx index c75f89f7..bf6c2c35 100644 --- a/packages/legacy/src/smart/ui/nlp/NLPMain.tsx +++ b/src/smart/ui/nlp/NLPMain.tsx @@ -7,20 +7,22 @@ import makeSidebar from '@riboseinc/paneron-extension-kit/widgets/Sidebar'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import { ReactFlowProvider } from 'react-flow-renderer'; -import { sidebar_layout } from '../../../css/layout'; -import { MMELJSON } from '../../model/json'; +import { sidebar_layout } from '@/css/layout'; +import type { MMELJSON } from '@/smart/model/json'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - createEditorModelWrapper, - ModelWrapper, -} from '../../model/modelwrapper'; -import { MMELRepo } from '../../model/repo'; -import { ProvisionRDF, RDFVersion } from '../../model/SemanticTriple'; -import { buildModelLinks } from '../../utils/ModelFunctions'; -import { getPathByNS, JSONToMMEL, RepoFileType } from '../../utils/repo/io'; -import { LoadingScreen } from '../common/Loading'; -import RDFControlPane from './RDFControlPane'; -import RDFDiagram from './RDFDiagram'; -import RDFQueryPane from './RDFQueryPane'; + createEditorModelWrapper +} from '@/smart/model/modelwrapper'; +import type { MMELRepo } from '@/smart/model/repo'; +import type { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { RDFVersion } from '@/smart/model/SemanticTriple'; +import { buildModelLinks } from '@/smart/utils/ModelFunctions'; +import { getPathByNS, JSONToMMEL, RepoFileType } from '@/smart/utils/repo/io'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; +import RDFControlPane from '@/smart/ui/nlp/RDFControlPane'; +import RDFDiagram from '@/smart/ui/nlp/RDFDiagram'; +import RDFQueryPane from '@/smart/ui/nlp/RDFQueryPane'; const NLPMain: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx b/src/smart/ui/nlp/NLPQuestionGraphView.tsx similarity index 91% rename from packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx rename to src/smart/ui/nlp/NLPQuestionGraphView.tsx index c177f92c..3200b24b 100644 --- a/packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx +++ b/src/smart/ui/nlp/NLPQuestionGraphView.tsx @@ -1,7 +1,7 @@ import { Button } from '@blueprintjs/core'; import React from 'react'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import RDFDiagram from './RDFDiagram'; +import type { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import RDFDiagram from '@/smart/ui/nlp/RDFDiagram'; const NLPQuestionGraphView: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx b/src/smart/ui/nlp/RDFControlPane.tsx similarity index 77% rename from packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx rename to src/smart/ui/nlp/RDFControlPane.tsx index 05f9c1fc..d31bb87b 100644 --- a/packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx +++ b/src/smart/ui/nlp/RDFControlPane.tsx @@ -1,14 +1,14 @@ import { Button, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useState } from 'react'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo } from '../../model/repo'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import { computeRDF } from '../../utils/nlp/nlp'; -import { COMMITMSG, getPathByNS, RepoFileType } from '../../utils/repo/io'; -import { DescriptionItem } from '../common/description/fields'; -import { LoadingScreen } from '../common/Loading'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo } from '@/smart/model/repo'; +import type { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { computeRDF } from '@/smart/utils/nlp/nlp'; +import { COMMITMSG, getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; const RDFControlPane: React.FC<{ repo: MMELRepo; diff --git a/packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx b/src/smart/ui/nlp/RDFDiagram.tsx similarity index 75% rename from packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx rename to src/smart/ui/nlp/RDFDiagram.tsx index ef1c3860..00e73dd7 100644 --- a/packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx +++ b/src/smart/ui/nlp/RDFDiagram.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; import ReactFlow from 'react-flow-renderer'; -import { reactFlowContainerLayout } from '../../../css/layout'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import { getElementsFromRDF } from '../../utils/nlp/nlp'; +import { reactFlowContainerLayout } from '@/css/layout'; +import type { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { getElementsFromRDF } from '@/smart/utils/nlp/nlp'; const RDFDiagram: React.FC<{ diagram: ProvisionRDF | undefined | null; diff --git a/packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx b/src/smart/ui/nlp/RDFQueryPane.tsx similarity index 86% rename from packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx rename to src/smart/ui/nlp/RDFQueryPane.tsx index 99aaea53..d4275788 100644 --- a/packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx +++ b/src/smart/ui/nlp/RDFQueryPane.tsx @@ -1,12 +1,12 @@ import { Button, FormGroup, Text } from '@blueprintjs/core'; import React, { useState } from 'react'; import { ReactFlowProvider } from 'react-flow-renderer'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import { askRDF } from '../../utils/nlp/query'; -import { NormalTextField } from '../common/fields'; -import { LoadingContainer } from '../common/Loading'; -import RDFDiagram from './RDFDiagram'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { askRDF } from '@/smart/utils/nlp/query'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; +import RDFDiagram from '@/smart/ui/nlp/RDFDiagram'; const RDFQueryPane: React.FC<{ rdf?: ProvisionRDF; diff --git a/packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx b/src/smart/ui/popover/AskIDForSaveMenu.tsx similarity index 86% rename from packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx rename to src/smart/ui/popover/AskIDForSaveMenu.tsx index 485ede90..4270dc86 100644 --- a/packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx +++ b/src/smart/ui/popover/AskIDForSaveMenu.tsx @@ -1,8 +1,8 @@ import { Button } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { removeSpace } from '../../utils/ModelFunctions'; -import { NormalTextField } from '../common/fields'; +import { popoverPanelContainer } from '@/css/layout'; +import { removeSpace } from '@/smart/utils/ModelFunctions'; +import { NormalTextField } from '@/smart/ui/common/fields'; const AskIDForSaveMenu: React.FC<{ title: string; diff --git a/packages/legacy/src/smart/ui/popover/ComponentSummary.tsx b/src/smart/ui/popover/ComponentSummary.tsx similarity index 70% rename from packages/legacy/src/smart/ui/popover/ComponentSummary.tsx rename to src/smart/ui/popover/ComponentSummary.tsx index e84ee6fb..705a9edf 100644 --- a/packages/legacy/src/smart/ui/popover/ComponentSummary.tsx +++ b/src/smart/ui/popover/ComponentSummary.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; +import { popoverPanelContainer } from '@/css/layout'; -import { +import type { EditorApproval, EditorDataClass, EditorEGate, @@ -10,16 +10,17 @@ import { EditorProcess, EditorRegistry, EditorSignalEvent, - EditorTimerEvent, + EditorTimerEvent } from '@/smart/model/editormodel'; +import { getEditorDataClassById, -} from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { DescribableNodeTypes } from '../../utils/constants'; -import { DescribeDC, DescribeRegistry } from '../common/description/data'; -import ApprovalSummary from './components/ApprovalSummary'; -import EGateSummary from './components/EGateSummary'; -import { SignalSummary, TimerSummary } from './components/EventSummary'; -import ProcessSummary from './components/ProcessSummary'; +} from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { DescribableNodeTypes } from '@/smart/utils/constants'; +import { DescribeDC, DescribeRegistry } from '@/smart/ui/common/description/data'; +import ApprovalSummary from '@/smart/ui/popover/components/ApprovalSummary'; +import EGateSummary from '@/smart/ui/popover/components/EGateSummary'; +import { SignalSummary, TimerSummary } from '@/smart/ui/popover/components/EventSummary'; +import ProcessSummary from '@/smart/ui/popover/components/ProcessSummary'; const ComponentSummary: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx b/src/smart/ui/popover/ImportFromSelectionButton.tsx similarity index 84% rename from packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx rename to src/smart/ui/popover/ImportFromSelectionButton.tsx index 4dc36478..76d7a5df 100644 --- a/packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx +++ b/src/smart/ui/popover/ImportFromSelectionButton.tsx @@ -1,7 +1,8 @@ -import { Button, IconName } from '@blueprintjs/core'; +import type { IconName } from '@blueprintjs/core'; +import { Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; -import AskIDForSaveMenu from './AskIDForSaveMenu'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; const ImportFromSelectionButton: React.FC<{ title: string; diff --git a/packages/legacy/src/smart/ui/popover/LinksList.tsx b/src/smart/ui/popover/LinksList.tsx similarity index 89% rename from packages/legacy/src/smart/ui/popover/LinksList.tsx rename to src/smart/ui/popover/LinksList.tsx index 9730c46b..a27e5686 100644 --- a/packages/legacy/src/smart/ui/popover/LinksList.tsx +++ b/src/smart/ui/popover/LinksList.tsx @@ -1,7 +1,8 @@ -import { Intent, Menu, MenuItem } from '@blueprintjs/core'; +import type { Intent } from '@blueprintjs/core'; +import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { MMELLink } from '../../serialize/interface/supportinterface'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { MMELLink } from '@paneron/libmmel/interface/supportinterface'; const LinksList: React.FC<{ links: Set; diff --git a/packages/legacy/src/smart/ui/popover/MapperDialog.tsx b/src/smart/ui/popover/MapperDialog.tsx similarity index 82% rename from packages/legacy/src/smart/ui/popover/MapperDialog.tsx rename to src/smart/ui/popover/MapperDialog.tsx index 842f8315..da69356c 100644 --- a/packages/legacy/src/smart/ui/popover/MapperDialog.tsx +++ b/src/smart/ui/popover/MapperDialog.tsx @@ -1,22 +1,24 @@ -import { Dialog, IToastProps } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; +import { Dialog } from '@blueprintjs/core'; import React from 'react'; -import { dialogLayout } from '../../../css/layout'; -import { EditorApproval, EditorProcess } from '../../model/editormodel'; -import { MappingMeta, MapProfile } from '../../model/mapmodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { - isModelWrapper, +import { dialogLayout } from '@/css/layout'; +import type { EditorApproval, EditorProcess } from '@/smart/model/editormodel'; +import type { MappingMeta, MapProfile } from '@/smart/model/mapmodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { MapperViewOption, - ReferenceContent, -} from '../../model/States'; -import { getDocumentMetaById } from '../../utils/DocumentFunctions'; -import { getNamespace } from '../../utils/ModelFunctions'; -import { EditMPropsInterface } from '../dialog/dialogs'; -import MappingEditPage from '../edit/mappingedit'; -import AutoMapper from '../mapper/AutoMapper'; -import RepoAutoMapper from '../mapper/repo/RepoAutoMapper'; -import DocTemplatePane from '../reporttemplate/doctemplatepane'; + ReferenceContent } from '@/smart/model/States'; +import { + isModelWrapper +} from '@/smart/model/States'; +import { getDocumentMetaById } from '@/smart/utils/DocumentFunctions'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import type { EditMPropsInterface } from '@/smart/ui/dialog/dialogs'; +import MappingEditPage from '@/smart/ui/edit/mappingedit'; +import AutoMapper from '@/smart/ui/mapper/AutoMapper'; +import RepoAutoMapper from '@/smart/ui/mapper/repo/RepoAutoMapper'; +import DocTemplatePane from '@/smart/ui/reporttemplate/doctemplatepane'; type MapperDialogMode = 'mapping' | 'report' | 'automap' | 'repomap'; diff --git a/packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx b/src/smart/ui/popover/NonTextReferenceList.tsx similarity index 87% rename from packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx rename to src/smart/ui/popover/NonTextReferenceList.tsx index 7052cb84..d101bd5a 100644 --- a/packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx +++ b/src/smart/ui/popover/NonTextReferenceList.tsx @@ -1,11 +1,11 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import { +import type { BINARY_TYPE, MMELFigure, MMELTable, -} from '../../serialize/interface/supportinterface'; -import { isMMELTable } from '../../model/editormodel'; +} from '@paneron/libmmel/interface/supportinterface'; +import { isMMELTable } from '@/smart/model/editormodel'; const titles: Record = { 'fig' : 'Figure', diff --git a/packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx b/src/smart/ui/popover/PopoverChangeIDButton.tsx similarity index 93% rename from packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx rename to src/smart/ui/popover/PopoverChangeIDButton.tsx index fbc90160..5904e79c 100644 --- a/packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx +++ b/src/smart/ui/popover/PopoverChangeIDButton.tsx @@ -2,7 +2,7 @@ import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import AskIDForSaveMenu from './AskIDForSaveMenu'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; const PopoverChangeIDButton: React.FC<{ initValue: string; diff --git a/packages/legacy/src/smart/ui/popover/PopoverWrapper.tsx b/src/smart/ui/popover/PopoverWrapper.tsx similarity index 100% rename from packages/legacy/src/smart/ui/popover/PopoverWrapper.tsx rename to src/smart/ui/popover/PopoverWrapper.tsx diff --git a/packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx b/src/smart/ui/popover/components/ApprovalSummary.tsx similarity index 69% rename from packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx rename to src/smart/ui/popover/components/ApprovalSummary.tsx index fc55db1a..2d32ac5e 100644 --- a/packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx +++ b/src/smart/ui/popover/components/ApprovalSummary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { EditorApproval } from '../../../model/editormodel'; -import { DescriptionItem } from '../../common/description/fields'; +import type { EditorApproval } from '@/smart/model/editormodel'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const ApprovalSummary: React.FC<{ approval: EditorApproval; diff --git a/packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx b/src/smart/ui/popover/components/EGateSummary.tsx similarity index 68% rename from packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx rename to src/smart/ui/popover/components/EGateSummary.tsx index f9bb20cf..e60191b2 100644 --- a/packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx +++ b/src/smart/ui/popover/components/EGateSummary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { EditorEGate } from '../../../model/editormodel'; -import { DescriptionItem } from '../../common/description/fields'; +import type { EditorEGate } from '@/smart/model/editormodel'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const EGateSummary: React.FC<{ egate: EditorEGate; diff --git a/packages/legacy/src/smart/ui/popover/components/EventSummary.tsx b/src/smart/ui/popover/components/EventSummary.tsx similarity index 83% rename from packages/legacy/src/smart/ui/popover/components/EventSummary.tsx rename to src/smart/ui/popover/components/EventSummary.tsx index d25af452..0f0c32e6 100644 --- a/packages/legacy/src/smart/ui/popover/components/EventSummary.tsx +++ b/src/smart/ui/popover/components/EventSummary.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { +import type { EditorSignalEvent, EditorTimerEvent, -} from '../../../model/editormodel'; -import { DescriptionItem } from '../../common/description/fields'; +} from '@/smart/model/editormodel'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; export const TimerSummary: React.FC<{ timer: EditorTimerEvent; diff --git a/packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx b/src/smart/ui/popover/components/ProcessSummary.tsx similarity index 66% rename from packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx rename to src/smart/ui/popover/components/ProcessSummary.tsx index cae0a2a5..ad646f0f 100644 --- a/packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx +++ b/src/smart/ui/popover/components/ProcessSummary.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { EditorModel, EditorProcess } from '../../../model/editormodel'; -import { ProvisionList } from '../../common/description/ComponentList'; -import { DescriptionItem } from '../../common/description/fields'; +import type { EditorModel, EditorProcess } from '@/smart/model/editormodel'; +import { ProvisionList } from '@/smart/ui/common/description/ComponentList'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const ProcessSummary: React.FC<{ process: EditorProcess; diff --git a/packages/legacy/src/smart/ui/quickedit/approval.tsx b/src/smart/ui/quickedit/approval.tsx similarity index 64% rename from packages/legacy/src/smart/ui/quickedit/approval.tsx rename to src/smart/ui/quickedit/approval.tsx index ee6ded72..eadc3ea1 100644 --- a/packages/legacy/src/smart/ui/quickedit/approval.tsx +++ b/src/smart/ui/quickedit/approval.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { EditorApproval, EditorModel } from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditApprovalPage from '../edit/approvaledit'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorApproval, EditorModel } from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { EditAction } from '@/smart/utils/constants'; +import type { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditApprovalPage from '@/smart/ui/edit/approvaledit'; const QuickEditApproval: React.FC<{ approval: EditorApproval; diff --git a/packages/legacy/src/smart/ui/quickedit/dataclass.tsx b/src/smart/ui/quickedit/dataclass.tsx similarity index 80% rename from packages/legacy/src/smart/ui/quickedit/dataclass.tsx rename to src/smart/ui/quickedit/dataclass.tsx index 72af9714..36916a6e 100644 --- a/packages/legacy/src/smart/ui/quickedit/dataclass.tsx +++ b/src/smart/ui/quickedit/dataclass.tsx @@ -3,17 +3,17 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { editDCCommand, editImportDCCommand, -} from '../../model/editor/commands/data'; -import { ModelAction } from '../../model/editor/model'; -import { EditorDataClass, EditorModel } from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; -import { MMELReference } from '../../serialize/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import { EditPageButtons } from '../edit/commons'; +} from '@/smart/model/editor/commands/data'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorDataClass, EditorModel } from '@/smart/model/editormodel'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; import AttributeListQuickEdit, { findAllAttributeTypes, -} from '../edit/components/AttributeList'; +} from '@/smart/ui/edit/components/AttributeList'; const QuickEditDataClass: React.FC<{ dataclass: EditorDataClass; diff --git a/packages/legacy/src/smart/ui/quickedit/egate.tsx b/src/smart/ui/quickedit/egate.tsx similarity index 68% rename from packages/legacy/src/smart/ui/quickedit/egate.tsx rename to src/smart/ui/quickedit/egate.tsx index 75e8025f..16709b6a 100644 --- a/packages/legacy/src/smart/ui/quickedit/egate.tsx +++ b/src/smart/ui/quickedit/egate.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorEGate, EditorModel, EditorSubprocess, -} from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditEGatePage from '../edit/egateedit'; +} from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { EditAction } from '@/smart/utils/constants'; +import type { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditEGatePage from '@/smart/ui/edit/egateedit'; const QuickEditEGate: React.FC<{ egate: EditorEGate; diff --git a/packages/legacy/src/smart/ui/quickedit/end.tsx b/src/smart/ui/quickedit/end.tsx similarity index 53% rename from packages/legacy/src/smart/ui/quickedit/end.tsx rename to src/smart/ui/quickedit/end.tsx index 99aac580..8ef944b5 100644 --- a/packages/legacy/src/smart/ui/quickedit/end.tsx +++ b/src/smart/ui/quickedit/end.tsx @@ -1,11 +1,11 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorEndEvent } from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DescribeEnd } from '../common/description/ComponentDescription'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import { EditPageButtons } from '../edit/commons'; +import type { EditorEndEvent } from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { EditAction } from '@/smart/utils/constants'; +import { DescribeEnd } from '@/smart/ui/common/description/ComponentDescription'; +import type { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; const QuickEditEnd: React.FC<{ end: EditorEndEvent; diff --git a/packages/legacy/src/smart/ui/quickedit/process.tsx b/src/smart/ui/quickedit/process.tsx similarity index 75% rename from packages/legacy/src/smart/ui/quickedit/process.tsx rename to src/smart/ui/quickedit/process.tsx index a6f2bb8c..78255b48 100644 --- a/packages/legacy/src/smart/ui/quickedit/process.tsx +++ b/src/smart/ui/quickedit/process.tsx @@ -3,18 +3,18 @@ import { bringoutProcessCommand, createSubprocessCommand, deleteSubprocessCommand, -} from '../../model/editor/commands/elements'; -import { ModelAction } from '../../model/editor/model'; -import { +} from '@/smart/model/editor/commands/elements'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorModel, EditorProcess, EditorSubprocess, -} from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditProcessPage from '../edit/processedit'; +} from '@/smart/model/editormodel'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { EditAction } from '@/smart/utils/constants'; +import type { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditProcessPage from '@/smart/ui/edit/processedit'; const QuickEditProcess: React.FC<{ process: EditorProcess; diff --git a/packages/legacy/src/smart/ui/quickedit/registry.tsx b/src/smart/ui/quickedit/registry.tsx similarity index 80% rename from packages/legacy/src/smart/ui/quickedit/registry.tsx rename to src/smart/ui/quickedit/registry.tsx index 66182d97..dbc59bbb 100644 --- a/packages/legacy/src/smart/ui/quickedit/registry.tsx +++ b/src/smart/ui/quickedit/registry.tsx @@ -3,23 +3,23 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { editImportRegistryCommand, editRegistryCommand, -} from '../../model/editor/commands/data'; -import { RegistryCombined } from '../../model/editor/components/element/registry'; -import { ModelAction } from '../../model/editor/model'; -import { +} from '@/smart/model/editor/commands/data'; +import type { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorDataClass, EditorModel, EditorRegistry, -} from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; -import { MMELReference } from '../../serialize/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField } from '../common/fields'; -import { EditPageButtons } from '../edit/commons'; +} from '@/smart/model/editormodel'; +import type { RefTextSelection } from '@/smart/model/selectionImport'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELReference } from '@paneron/libmmel/interface/supportinterface'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; import AttributeListQuickEdit, { findAllAttributeTypes, -} from '../edit/components/AttributeList'; +} from '@/smart/ui/edit/components/AttributeList'; const QuickEditRegistry: React.FC<{ registry: EditorRegistry; diff --git a/packages/legacy/src/smart/ui/quickedit/signalevent.tsx b/src/smart/ui/quickedit/signalevent.tsx similarity index 64% rename from packages/legacy/src/smart/ui/quickedit/signalevent.tsx rename to src/smart/ui/quickedit/signalevent.tsx index 3af92783..83d102dd 100644 --- a/packages/legacy/src/smart/ui/quickedit/signalevent.tsx +++ b/src/smart/ui/quickedit/signalevent.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { EditorModel, EditorSignalEvent } from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditSignalEventPage from '../edit/signaleventedit'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorModel, EditorSignalEvent } from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { EditAction } from '@/smart/utils/constants'; +import type { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditSignalEventPage from '@/smart/ui/edit/signaleventedit'; const QuickEditSignalEvent: React.FC<{ event: EditorSignalEvent; diff --git a/packages/legacy/src/smart/ui/quickedit/timer.tsx b/src/smart/ui/quickedit/timer.tsx similarity index 64% rename from packages/legacy/src/smart/ui/quickedit/timer.tsx rename to src/smart/ui/quickedit/timer.tsx index 74a826b7..f3a037a0 100644 --- a/packages/legacy/src/smart/ui/quickedit/timer.tsx +++ b/src/smart/ui/quickedit/timer.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { EditorModel, EditorTimerEvent } from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditTimerPage from '../edit/timeredit'; +import type { ModelAction } from '@/smart/model/editor/model'; +import type { EditorModel, EditorTimerEvent } from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { EditAction } from '@/smart/utils/constants'; +import type { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditTimerPage from '@/smart/ui/edit/timeredit'; const QuickEditTimer: React.FC<{ timer: EditorTimerEvent; diff --git a/packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx b/src/smart/ui/repo/AITranslateLoading.tsx similarity index 72% rename from packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx rename to src/smart/ui/repo/AITranslateLoading.tsx index b144fd22..43ef7ded 100644 --- a/packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx +++ b/src/smart/ui/repo/AITranslateLoading.tsx @@ -1,13 +1,13 @@ -import { IToastProps } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext, useMemo } from 'react'; -import { MMELDocument } from '../../model/document'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo } from '../../model/repo'; -import { aiTranslate } from '../../utils/ai/aiagent'; -import { getPathByNS, RepoFileType } from '../../utils/repo/io'; -import { LoadingIcon } from '../common/Loading'; +import type { MMELDocument } from '@/smart/model/document'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo } from '@/smart/model/repo'; +import { aiTranslate } from '@/smart/utils/ai/aiagent'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { LoadingIcon } from '@/smart/ui/common/Loading'; const AITranslateLoading: React.FC<{ source: MMELRepo; diff --git a/packages/legacy/src/smart/ui/repo/RepoAIMenu.tsx b/src/smart/ui/repo/RepoAIMenu.tsx similarity index 100% rename from packages/legacy/src/smart/ui/repo/RepoAIMenu.tsx rename to src/smart/ui/repo/RepoAIMenu.tsx diff --git a/packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx b/src/smart/ui/repo/RepoChangeNSButton.tsx similarity index 86% rename from packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx rename to src/smart/ui/repo/RepoChangeNSButton.tsx index 985e1170..40b6dcb6 100644 --- a/packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx +++ b/src/smart/ui/repo/RepoChangeNSButton.tsx @@ -1,9 +1,10 @@ -import { Button, IToastProps } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; +import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import { RepoIndex } from '../../model/repo'; -import AskIDForSaveMenu from '../popover/AskIDForSaveMenu'; +import type { RepoIndex } from '@/smart/model/repo'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; const RepoChangeNSButton: React.FC<{ initValue: string; diff --git a/packages/legacy/src/smart/ui/repo/RepoCloseButton.tsx b/src/smart/ui/repo/RepoCloseButton.tsx similarity index 100% rename from packages/legacy/src/smart/ui/repo/RepoCloseButton.tsx rename to src/smart/ui/repo/RepoCloseButton.tsx diff --git a/packages/legacy/src/smart/ui/repo/RepoGroup.tsx b/src/smart/ui/repo/RepoGroup.tsx similarity index 86% rename from packages/legacy/src/smart/ui/repo/RepoGroup.tsx rename to src/smart/ui/repo/RepoGroup.tsx index df14d943..9414541c 100644 --- a/packages/legacy/src/smart/ui/repo/RepoGroup.tsx +++ b/src/smart/ui/repo/RepoGroup.tsx @@ -1,9 +1,9 @@ -import { IToastProps } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; import React from 'react'; -import { reactFlowContainerLayout } from '../../../css/layout'; -import { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '../../model/repo'; -import RepoChangeNSButton from './RepoChangeNSButton'; -import RepoModelFile from './RepoItem'; +import { reactFlowContainerLayout } from '@/css/layout'; +import type { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '@/smart/model/repo'; +import RepoChangeNSButton from '@/smart/ui/repo/RepoChangeNSButton'; +import RepoModelFile from '@/smart/ui/repo/RepoItem'; const RepoGroup: React.FC<{ legend: string; diff --git a/packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx b/src/smart/ui/repo/RepoImportMenu.tsx similarity index 91% rename from packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx rename to src/smart/ui/repo/RepoImportMenu.tsx index 5e99c5f3..99c278af 100644 --- a/packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx +++ b/src/smart/ui/repo/RepoImportMenu.tsx @@ -1,13 +1,13 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import { useContext } from 'react'; -import { ModelWrapper } from '../../model/modelwrapper'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; import { FILE_TYPE, handleDocumentOpen, handleModelOpen, -} from '../../utils/IOFunctions'; -import { MMELDocument } from '../../model/document'; +} from '@/smart/utils/IOFunctions'; +import type { MMELDocument } from '@/smart/model/document'; import React from 'react'; const RepoImportMenu: React.FC<{ diff --git a/packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx b/src/smart/ui/repo/RepoInfoPane.tsx similarity index 70% rename from packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx rename to src/smart/ui/repo/RepoInfoPane.tsx index 9b51de4a..db99c05c 100644 --- a/packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx +++ b/src/smart/ui/repo/RepoInfoPane.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { getRepoItemDesc } from '../../utils/repo/CommonFunctions'; -import { DescriptionItem } from '../common/description/fields'; -import RepoCloseButton from './RepoCloseButton'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { getRepoItemDesc } from '@/smart/utils/repo/CommonFunctions'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import RepoCloseButton from '@/smart/ui/repo/RepoCloseButton'; const RepoInfoPane: React.FC<{ repo?: MMELRepo; diff --git a/packages/legacy/src/smart/ui/repo/RepoItem.tsx b/src/smart/ui/repo/RepoItem.tsx similarity index 97% rename from packages/legacy/src/smart/ui/repo/RepoItem.tsx rename to src/smart/ui/repo/RepoItem.tsx index b66315da..c6af66ca 100644 --- a/packages/legacy/src/smart/ui/repo/RepoItem.tsx +++ b/src/smart/ui/repo/RepoItem.tsx @@ -1,7 +1,7 @@ import { Card, Icon, Menu, MenuItem, Text } from '@blueprintjs/core'; import { ContextMenu2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { RepoItems } from '../../model/repo'; +import type { RepoItems } from '@/smart/model/repo'; type VF = () => void; diff --git a/packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx b/src/smart/ui/repo/RepoItemSelector.tsx similarity index 94% rename from packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx rename to src/smart/ui/repo/RepoItemSelector.tsx index d46d8c38..e137a24a 100644 --- a/packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx +++ b/src/smart/ui/repo/RepoItemSelector.tsx @@ -1,9 +1,10 @@ import { Button, Card, Icon, InputGroup, Text } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { CSSProperties, useState } from 'react'; -import { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '../../model/repo'; -import { LoadingContainer } from '../common/Loading'; +import type { CSSProperties } from 'react'; +import { useState } from 'react'; +import type { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '@/smart/model/repo'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; function matchFilter(item: RepoItems, filter: string) { return ( diff --git a/packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx b/src/smart/ui/repo/RepoRenameLoading.tsx similarity index 82% rename from packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx rename to src/smart/ui/repo/RepoRenameLoading.tsx index 628e3700..714f393b 100644 --- a/packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx +++ b/src/smart/ui/repo/RepoRenameLoading.tsx @@ -1,13 +1,14 @@ -import { IToastProps } from '@blueprintjs/core'; +import type { IToastProps } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { ObjectChangeset } from '@riboseinc/paneron-extension-kit/types/objects'; +import type { ObjectChangeset } from '@riboseinc/paneron-extension-kit/types/objects'; import React from 'react'; import { useContext, useMemo } from 'react'; -import { MMELJSON } from '../../model/json'; -import { RepoIndex, repoIndexPath } from '../../model/repo'; -import { getAllObjectPaths } from '../../utils/repo/CommonFunctions'; -import { COMMITMSG, getPathByNS, RepoFileType } from '../../utils/repo/io'; -import { LoadingIcon } from '../common/Loading'; +import type { MMELJSON } from '@/smart/model/json'; +import type { RepoIndex } from '@/smart/model/repo'; +import { repoIndexPath } from '@/smart/model/repo'; +import { getAllObjectPaths } from '@/smart/utils/repo/CommonFunctions'; +import { COMMITMSG, getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { LoadingIcon } from '@/smart/ui/common/Loading'; export interface RepoRenameAction { old: string; diff --git a/packages/legacy/src/smart/ui/repo/RepoToolbar.tsx b/src/smart/ui/repo/RepoToolbar.tsx similarity index 75% rename from packages/legacy/src/smart/ui/repo/RepoToolbar.tsx rename to src/smart/ui/repo/RepoToolbar.tsx index a9635864..7521df79 100644 --- a/packages/legacy/src/smart/ui/repo/RepoToolbar.tsx +++ b/src/smart/ui/repo/RepoToolbar.tsx @@ -1,22 +1,18 @@ import { Button, ControlGroup, Dialog } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; -import { MMELDocument } from '../../model/document'; +import type { MMELDocument } from '@/smart/model/document'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { - createEditorModelWrapper, - ModelWrapper, -} from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex, RepoItemType } from '../../model/repo'; -import { - EXTENSIONVERSION, - MODELVERSION, - PANERONVERSION, -} from '../../utils/constants'; -import { createNewEditorModel } from '../../utils/EditorFactory'; -import AskIDForSaveMenu from '../popover/AskIDForSaveMenu'; -import RepoAIMenu from './RepoAIMenu'; -import RepoImportMenu from './RepoImportMenu'; -import RepoItemSelector from './RepoItemSelector'; + createEditorModelWrapper +} from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import { createNewEditorModel } from '@/smart/utils/EditorFactory'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; +import RepoAIMenu from '@/smart/ui/repo/RepoAIMenu'; +import RepoImportMenu from '@/smart/ui/repo/RepoImportMenu'; +import RepoItemSelector from '@/smart/ui/repo/RepoItemSelector'; const RepoToolbar: React.FC<{ addMW: (m: ModelWrapper, type: RepoItemType) => void; @@ -48,12 +44,6 @@ const RepoToolbar: React.FC<{ setIsOpen(false); } - function showVersion() { - alert( - `Extension version:\n${EXTENSIONVERSION}\nModel version\n${MODELVERSION}\nTested on Paneron version:\n${PANERONVERSION}` - ); - } - return ( - {/* */} >; diff --git a/packages/legacy/src/smart/ui/summary/RegistrySummary.tsx b/src/smart/ui/summary/RegistrySummary.tsx similarity index 83% rename from packages/legacy/src/smart/ui/summary/RegistrySummary.tsx rename to src/smart/ui/summary/RegistrySummary.tsx index 678d0226..76228c8a 100644 --- a/packages/legacy/src/smart/ui/summary/RegistrySummary.tsx +++ b/src/smart/ui/summary/RegistrySummary.tsx @@ -1,17 +1,19 @@ import { Button, Text } from '@blueprintjs/core'; import React from 'react'; import { useMemo, useState } from 'react'; -import { searchResultEntryRow } from '../../../css/shame'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDLabel from '../../MGDComponents/MGDLabel'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { EditorModel, isEditorRegistry } from '../../model/editormodel'; -import { PageHistory } from '../../model/history'; +import { searchResultEntryRow } from '@/css/shame'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { isEditorRegistry } from '@/smart/model/editormodel'; +import type { PageHistory } from '@/smart/model/history'; +import type { + RegSummarySearchRecord } from '@/smart/utils/summary/RegistrySummary'; import { - computeRegistrySummary, - RegSummarySearchRecord, -} from '../../utils/summary/RegistrySummary'; -import { NormalComboBox, NumericComboBox } from '../common/fields'; + computeRegistrySummary +} from '@/smart/utils/summary/RegistrySummary'; +import { NormalComboBox, NumericComboBox } from '@/smart/ui/common/fields'; const RECORD_PER_PAGE = 10; diff --git a/packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx b/src/smart/ui/version/VersionDiffLogView.tsx similarity index 84% rename from packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx rename to src/smart/ui/version/VersionDiffLogView.tsx index 72c1660c..a599516a 100644 --- a/packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx +++ b/src/smart/ui/version/VersionDiffLogView.tsx @@ -1,7 +1,7 @@ import { Text } from '@blueprintjs/core'; import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { VersionState } from '../../model/versioncompare'; +import { popoverPanelContainer } from '@/css/layout'; +import type { VersionState } from '@/smart/model/versioncompare'; const VersionDiffLogView: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx b/src/smart/ui/version/VersionTrackerSetting.tsx similarity index 84% rename from packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx rename to src/smart/ui/version/VersionTrackerSetting.tsx index 4894cdd8..70755795 100644 --- a/packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx +++ b/src/smart/ui/version/VersionTrackerSetting.tsx @@ -1,20 +1,20 @@ import { Button, Switch, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useEffect, useRef, useState } from 'react'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { PageHistory } from '../../model/history'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { FunModel } from '../../model/States'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { handleModelOpen } from '../../utils/IOFunctions'; -import { buildModelLinks } from '../../utils/ModelFunctions'; -import * as Logger from '../../../lib/logger'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import type { PageHistory } from '@/smart/model/history'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { FunModel } from '@/smart/model/States'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { handleModelOpen } from '@/smart/utils/IOFunctions'; +import { buildModelLinks } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { computeDiff, getDiffViewProps, getHistroyFromRefModel, -} from '../../utils/VersionTracker'; -import { DescriptionItem } from '../common/description/fields'; +} from '@/smart/utils/VersionTracker'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const VersionTrackerSettingPane: React.FC<{ mw: ModelWrapper; diff --git a/packages/legacy/src/smart/ui/workspace/BasicTypeAttribute.tsx b/src/smart/ui/workspace/BasicTypeAttribute.tsx similarity index 94% rename from packages/legacy/src/smart/ui/workspace/BasicTypeAttribute.tsx rename to src/smart/ui/workspace/BasicTypeAttribute.tsx index 28bce80c..1db4f59a 100644 --- a/packages/legacy/src/smart/ui/workspace/BasicTypeAttribute.tsx +++ b/src/smart/ui/workspace/BasicTypeAttribute.tsx @@ -1,19 +1,20 @@ import React from 'react'; +import type { + BASICTYPES } from '@/smart/utils/constants'; import { - BASICTYPES, BooleanOptions, BOOLEANTYPE, DATETIMETYPE, EMPTYTYPE, ROLETYPE, STRINGTYPE, -} from '../../utils/constants'; +} from '@/smart/utils/constants'; import { DataTimeTextField, NormalComboBox, NormalTextField, ReferenceSelector, -} from '../common/fields'; +} from '@/smart/ui/common/fields'; const StringFieldEdit: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx b/src/smart/ui/workspace/DCDocumentAttributes.tsx similarity index 81% rename from packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx rename to src/smart/ui/workspace/DCDocumentAttributes.tsx index 73f3471d..df0bebf1 100644 --- a/packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx +++ b/src/smart/ui/workspace/DCDocumentAttributes.tsx @@ -1,17 +1,17 @@ import React from 'react'; -import { EditorDataClass, EditorModel } from '../../model/editormodel'; -import { SMARTDocumentStore } from '../../model/workspace'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; +import type { EditorDataClass, EditorModel } from '@/smart/model/editormodel'; +import type { SMARTDocumentStore } from '@/smart/model/workspace'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { getModelAllRolesWithEmpty, getRegistryReference, -} from '../../utils/ModelFunctions'; -import { isBasicType, isDCClass, isEnum } from '../../utils/typecheckings'; -import { NormalTextField } from '../common/fields'; -import BasicTypeAttribute from './BasicTypeAttribute'; -import { DocumentEditInterface } from './DocumentEditor'; -import EnumAttribute from './EnumAttribute'; -import ReferenceAttributes from './ReferenceAttributes'; +} from '@/smart/utils/ModelFunctions'; +import { isBasicType, isDCClass, isEnum } from '@/smart/utils/typecheckings'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import BasicTypeAttribute from '@/smart/ui/workspace/BasicTypeAttribute'; +import type { DocumentEditInterface } from '@/smart/ui/workspace/DocumentEditor'; +import EnumAttribute from '@/smart/ui/workspace/EnumAttribute'; +import ReferenceAttributes from '@/smart/ui/workspace/ReferenceAttributes'; interface DCDocumentAttributesProps { dc: EditorDataClass; diff --git a/packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx b/src/smart/ui/workspace/DocumentEditor.tsx similarity index 75% rename from packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx rename to src/smart/ui/workspace/DocumentEditor.tsx index aa6e1d3d..801e0ccf 100644 --- a/packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx +++ b/src/smart/ui/workspace/DocumentEditor.tsx @@ -1,13 +1,14 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import type { EditorDataClass, - EditorModel, + EditorModel } from '@/smart/model/editormodel'; +import { isEditorRegistry, -} from '../../model/editormodel'; -import { SMARTDocument, SMARTDocumentStore } from '../../model/workspace'; -import DCDocumentAttributes from './DCDocumentAttributes'; +} from '@/smart/model/editormodel'; +import type { SMARTDocument, SMARTDocumentStore } from '@/smart/model/workspace'; +import DCDocumentAttributes from '@/smart/ui/workspace/DCDocumentAttributes'; export type DocumentEditInterface = SMARTDocument & { regid: string }; diff --git a/packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx b/src/smart/ui/workspace/EnumAttribute.tsx similarity index 76% rename from packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx rename to src/smart/ui/workspace/EnumAttribute.tsx index 2485eb86..168efc63 100644 --- a/packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx +++ b/src/smart/ui/workspace/EnumAttribute.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { MMELEnum } from '../../serialize/interface/datainterface'; -import { NormalComboBox } from '../common/fields'; +import type { MMELEnum } from '@paneron/libmmel/interface/datainterface'; +import { NormalComboBox } from '@/smart/ui/common/fields'; const EnumAttribute: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx b/src/smart/ui/workspace/ReferenceAttributes.tsx similarity index 77% rename from packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx rename to src/smart/ui/workspace/ReferenceAttributes.tsx index d9fec57d..705c75fb 100644 --- a/packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx +++ b/src/smart/ui/workspace/ReferenceAttributes.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { SMARTDocumentStore } from '../../model/workspace'; -import { ReferenceSelector } from '../common/fields'; +import type { SMARTDocumentStore } from '@/smart/model/workspace'; +import { ReferenceSelector } from '@/smart/ui/common/fields'; -import { isNotUndefined } from '../../../lib/typeHelpers'; +import { isNotUndefined } from '@/lib/typeHelpers'; const ReferenceAttributes: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx b/src/smart/ui/workspace/RegistryDocManagement.tsx similarity index 86% rename from packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx rename to src/smart/ui/workspace/RegistryDocManagement.tsx index 831864f1..84b82f30 100644 --- a/packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx +++ b/src/smart/ui/workspace/RegistryDocManagement.tsx @@ -1,16 +1,17 @@ import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { itemSorterByText } from '../../utils/ModelFunctions'; -import { +import type { EditorModel } from '@/smart/model/editormodel'; +import { itemSorterByText } from '@/smart/utils/ModelFunctions'; +import type { IAdditionalListButton, IListItem, IManageHandler, -} from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { SMARTDocument, SMARTDocumentStore } from '../../model/workspace'; -import DocumentEdit, { DocumentEditInterface } from './DocumentEditor'; +} from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import type { SMARTDocument, SMARTDocumentStore } from '@/smart/model/workspace'; +import type { DocumentEditInterface } from '@/smart/ui/workspace/DocumentEditor'; +import DocumentEdit from '@/smart/ui/workspace/DocumentEditor'; -import { isNotUndefined } from '../../../lib/typeHelpers'; +import { isNotUndefined } from '@/lib/typeHelpers'; const RegistryDocManagement: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/workspace/RegistryList.tsx b/src/smart/ui/workspace/RegistryList.tsx similarity index 80% rename from packages/legacy/src/smart/ui/workspace/RegistryList.tsx rename to src/smart/ui/workspace/RegistryList.tsx index 74c23e1a..597812f7 100644 --- a/packages/legacy/src/smart/ui/workspace/RegistryList.tsx +++ b/src/smart/ui/workspace/RegistryList.tsx @@ -1,16 +1,17 @@ import React from 'react'; -import { +import type { EditorModel, - EditorRegistry, - isEditorRegistry, -} from '../../model/editormodel'; -import { defaultItemSorter } from '../../utils/ModelFunctions'; + EditorRegistry } from '@/smart/model/editormodel'; import { + isEditorRegistry, +} from '@/smart/model/editormodel'; +import { defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import type { IAdditionalListButton, IListItem, IViewListInterface, -} from '../common/fields'; -import ListViewPane from '../common/listmanagement/listview'; +} from '@/smart/ui/common/fields'; +import ListViewPane from '@/smart/ui/common/listmanagement/listview'; const WorkspaceRegistryList: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx b/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx similarity index 87% rename from packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx rename to src/smart/ui/workspace/ViewDataWorkspaceButton.tsx index 510f540a..f09da280 100644 --- a/packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx +++ b/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx @@ -1,7 +1,7 @@ import { Button } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { flownodeTopRightButtonLayout } from '../../../css/layout'; +import { flownodeTopRightButtonLayout } from '@/css/layout'; const ViewWorkspaceButton: React.FC<{ onClick: () => void; diff --git a/packages/legacy/src/smart/utils/Comments.ts b/src/smart/utils/Comments.ts similarity index 84% rename from packages/legacy/src/smart/utils/Comments.ts rename to src/smart/utils/Comments.ts index 39258506..d7a9b87b 100644 --- a/packages/legacy/src/smart/utils/Comments.ts +++ b/src/smart/utils/Comments.ts @@ -1,6 +1,6 @@ -import { DataType } from '../serialize/interface/baseinterface'; -import { MMELComment } from '../serialize/interface/supportinterface'; -import { findUniqueID } from './ModelFunctions'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELComment } from '@paneron/libmmel/interface/supportinterface'; +import { findUniqueID } from '@/smart/utils/ModelFunctions'; export interface CommentInstance { id: string; diff --git a/packages/legacy/src/smart/utils/DocumentFunctions.ts b/src/smart/utils/DocumentFunctions.ts similarity index 94% rename from packages/legacy/src/smart/utils/DocumentFunctions.ts rename to src/smart/utils/DocumentFunctions.ts index 3fbc8139..225a17d5 100644 --- a/packages/legacy/src/smart/utils/DocumentFunctions.ts +++ b/src/smart/utils/DocumentFunctions.ts @@ -1,9 +1,9 @@ import React from 'react'; -import { DocMapIndex, MMELDocument } from '../model/document'; -import { MappingType } from '../model/mapmodel'; -import { DOCVERSION } from './constants'; -import { createNewMMELDocument } from './EditorFactory'; -import * as Logger from '../../lib/logger'; +import type { DocMapIndex, MMELDocument } from '@/smart/model/document'; +import type { MappingType } from '@/smart/model/mapmodel'; +import { DOCVERSION } from '@/smart/utils/constants'; +import { createNewMMELDocument } from '@/smart/utils/EditorFactory'; +import * as Logger from '@/lib/logger'; function addMetaField(doc: MMELDocument, id: string, value: string) { if (id === 'namespace') { diff --git a/packages/legacy/src/smart/utils/EditorFactory.ts b/src/smart/utils/EditorFactory.ts similarity index 93% rename from packages/legacy/src/smart/utils/EditorFactory.ts rename to src/smart/utils/EditorFactory.ts index fbe7d43b..630f59e1 100644 --- a/packages/legacy/src/smart/utils/EditorFactory.ts +++ b/src/smart/utils/EditorFactory.ts @@ -1,14 +1,14 @@ -import { DataType } from '../serialize/interface/baseinterface'; -import { +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELDataAttribute, MMELEnum, MMELEnumValue, -} from '../serialize/interface/datainterface'; -import { +} from '@paneron/libmmel/interface/datainterface'; +import type { MMELEdge, MMELSubprocessComponent, -} from '../serialize/interface/flowcontrolinterface'; -import { +} from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELFigure, MMELMetadata, MMELNote, @@ -19,10 +19,11 @@ import { MMELTerm, MMELTextSection, MMELVariable, - MMELView, - VarType, -} from '../serialize/interface/supportinterface'; + MMELView } from '@paneron/libmmel/interface/supportinterface'; import { + VarType, +} from '@paneron/libmmel/interface/supportinterface'; +import type { EditorApproval, EditorDataClass, EditorEGate, @@ -34,9 +35,9 @@ import { EditorStartEvent, EditorSubprocess, EditorTimerEvent, -} from '../model/editormodel'; -import { DOCVERSION, MODELVERSION } from './constants'; -import { MMELDocument } from '../model/document'; +} from '@/smart/model/editormodel'; +import { DOCVERSION, MODELVERSION } from '@/smart/utils/constants'; +import type { MMELDocument } from '@/smart/model/document'; export function createNewEditorModel(): EditorModel { const start = createStartEvent('Start1'); diff --git a/packages/legacy/src/smart/utils/IOFunctions.ts b/src/smart/utils/IOFunctions.ts similarity index 86% rename from packages/legacy/src/smart/utils/IOFunctions.ts rename to src/smart/utils/IOFunctions.ts index cd7e42fa..efbecd95 100644 --- a/packages/legacy/src/smart/utils/IOFunctions.ts +++ b/src/smart/utils/IOFunctions.ts @@ -1,21 +1,26 @@ -import { SaveFileDialogProps } from '@riboseinc/paneron-extension-kit/types/dialogs'; -import { MMELDocument } from '../model/document'; -import { EditorModel } from '../model/editormodel'; -import { MapProfile } from '../model/mapmodel'; -import { createEditorModelWrapper, ModelWrapper } from '../model/modelwrapper'; -import { SMARTWorkspace } from '../model/workspace'; -import { textToMMEL } from '../serialize/MMEL'; -import { +import type { SaveFileDialogProps } from '@riboseinc/paneron-extension-kit/types/dialogs'; +import type { MMELDocument } from '@/smart/model/document'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import { mmelFile } from '@riboseinc/paneron-extension-kit/object-specs/ser-des'; +import { encoder as string2uint8ArrayEncoder } from '@riboseinc/paneron-extension-kit/util'; +import type { MMELModel } from '@paneron/libmmel/interface/model'; + +import { createEditorModelWrapper } from '@/smart/model/modelwrapper'; +import type { SMARTWorkspace } from '@/smart/model/workspace'; +import type { LoggerInterface, + OpenFileInterface } from '@/smart/utils/constants'; +import { MAPVERSION, MODELVERSION, - OpenFileInterface, WSVERSION, -} from './constants'; -import { textToDoc } from './DocumentFunctions'; -import * as Logger from '../../lib/logger'; -import { bsiToDocument } from './xml/BSIXML'; -import { xmlToDocument } from './xml/XMLDocumentFunctions'; +} from '@/smart/utils/constants'; +import { textToDoc } from '@/smart/utils/DocumentFunctions'; +import * as Logger from '@/lib/logger'; +import { bsiToDocument } from '@/smart/utils/xml/BSIXML'; +import { xmlToDocument } from '@/smart/utils/xml/XMLDocumentFunctions'; export interface FileTypeDescriptionInterface { filtername: string; @@ -107,7 +112,8 @@ function parseModel(props: { const { data, setModelWrapper, logger, indexModel } = props; logger?.log('Importing model'); try { - const model = textToMMEL(data); + const placeholderPath = '/'; + const model = mmelFile.deserialize({ placeholderPath : string2uint8ArrayEncoder.encode(data) }, {}) as MMELModel; if (model.version !== MODELVERSION) { Logger.error( `Warning: Model versions do not match.\nModel version of file: ${model.version}.\nExpected: ${MODELVERSION}.` @@ -299,13 +305,15 @@ export async function saveToFileSystem(props: { success: true; savedToFileAtPath: string; }>; - fileData: string; + fileData: string | Uint8Array; type: FILE_TYPE; }): Promise { const { getBlob, writeFileToFilesystem, fileData, type } = props; if (getBlob && writeFileToFilesystem) { const desc = FileTypeDescription[type]; - const blob = await getBlob(fileData); + const blob = (typeof fileData === 'string') ? + await getBlob(fileData) : + fileData; const { savedToFileAtPath } = await writeFileToFilesystem({ dialogOpts : { prompt : 'Choose location to save', diff --git a/packages/legacy/src/smart/utils/ModelAddComponentHandler.ts b/src/smart/utils/ModelAddComponentHandler.ts similarity index 87% rename from packages/legacy/src/smart/utils/ModelAddComponentHandler.ts rename to src/smart/utils/ModelAddComponentHandler.ts index ca3fe33e..5b0307a1 100644 --- a/packages/legacy/src/smart/utils/ModelAddComponentHandler.ts +++ b/src/smart/utils/ModelAddComponentHandler.ts @@ -1,5 +1,5 @@ -import { XYPosition } from 'react-flow-renderer'; -import { +import type { XYPosition } from 'react-flow-renderer'; +import type { EditorApproval, EditorEGate, EditorEndEvent, @@ -10,10 +10,10 @@ import { EditorStartEvent, EditorSubprocess, EditorTimerEvent, -} from '../model/editormodel'; -import { DataType } from '../serialize/interface/baseinterface'; -import { capitalizeString, findUniqueID, trydefaultID } from './ModelFunctions'; -import { NewComponentTypes } from './constants'; +} from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { capitalizeString, findUniqueID, trydefaultID } from '@/smart/utils/ModelFunctions'; +import type { NewComponentTypes } from '@/smart/utils/constants'; import { createApproval, createEGate, @@ -24,9 +24,9 @@ import { createSubprocess, createSubprocessComponent, createTimerEvent, -} from './EditorFactory'; -import { HistoryItem } from '../model/history'; -import { ModelAction } from '../model/editor/model'; +} from '@/smart/utils/EditorFactory'; +import type { HistoryItem } from '@/smart/model/history'; +import type { ModelAction } from '@/smart/model/editor/model'; type Elements = Record; diff --git a/packages/legacy/src/smart/utils/ModelFunctions.ts b/src/smart/utils/ModelFunctions.ts similarity index 95% rename from packages/legacy/src/smart/utils/ModelFunctions.ts rename to src/smart/utils/ModelFunctions.ts index 63756740..9782dd59 100644 --- a/packages/legacy/src/smart/utils/ModelFunctions.ts +++ b/src/smart/utils/ModelFunctions.ts @@ -1,23 +1,25 @@ -import { +import type { EditorDataClass, EditorModel, EditorNode, EditorRegistry, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorDataClass, isEditorRegistry, -} from '../model/editormodel'; -import { MMELObject } from '../serialize/interface/baseinterface'; -import { +} from '@/smart/model/editormodel'; + +import type { MMELObject } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELEdge, MMELSubprocess, -} from '../serialize/interface/flowcontrolinterface'; -import { +} from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELMetadata, MMELReference, MMELRole, -} from '../serialize/interface/supportinterface'; -import { IListItem } from '../ui/common/fields'; +} from '@paneron/libmmel/interface/supportinterface'; +import type { IListItem } from '@/smart/ui/common/fields'; const TypeReferenceHead = 'reference('; const TypeReferenceTail = ')'; diff --git a/packages/legacy/src/smart/utils/ModelImport.ts b/src/smart/utils/ModelImport.ts similarity index 96% rename from packages/legacy/src/smart/utils/ModelImport.ts rename to src/smart/utils/ModelImport.ts index 3e687c64..94225e34 100644 --- a/packages/legacy/src/smart/utils/ModelImport.ts +++ b/src/smart/utils/ModelImport.ts @@ -1,21 +1,22 @@ -import { +import type { EditorDataClass, EditorModel, EditorNode, EditorProcess, EditorRegistry, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorDataClass, isEditorProcess, isEditorRegistry, -} from '../model/editormodel'; -import { DataType } from '../serialize/interface/baseinterface'; -import { MMELDataAttribute } from '../serialize/interface/datainterface'; -import { +} from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELEdge, MMELSubprocessComponent, -} from '../serialize/interface/flowcontrolinterface'; -import { +} from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELFigure, MMELLink, MMELNote, @@ -24,14 +25,14 @@ import { MMELRole, MMELTable, MMELVariable, -} from '../serialize/interface/supportinterface'; +} from '@paneron/libmmel/interface/supportinterface'; import { trydefaultID, getRegistryReference, getReferenceDCTypeName, findUniqueID, -} from './ModelFunctions'; -import * as Logger from '../../lib/logger'; +} from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; export interface NewImportItems { elements: Record; diff --git a/packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts b/src/smart/utils/ModelRemoveComponentHandler.ts similarity index 78% rename from packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts rename to src/smart/utils/ModelRemoveComponentHandler.ts index 8c0822ac..e05e1499 100644 --- a/packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts +++ b/src/smart/utils/ModelRemoveComponentHandler.ts @@ -1,5 +1,5 @@ -import { DataType } from '../serialize/interface/baseinterface'; -import { DeletableNodeTypes } from './constants'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { DeletableNodeTypes } from '@/smart/utils/constants'; export const DeleteConfirmMessgae: Record = { [DataType.PROCESS] : 'Confirm deleting the process?', diff --git a/packages/legacy/src/smart/utils/SearchFunctions.ts b/src/smart/utils/SearchFunctions.ts similarity index 92% rename from packages/legacy/src/smart/utils/SearchFunctions.ts rename to src/smart/utils/SearchFunctions.ts index 356793f8..0e2d322b 100644 --- a/packages/legacy/src/smart/utils/SearchFunctions.ts +++ b/src/smart/utils/SearchFunctions.ts @@ -1,6 +1,6 @@ -import { SerializedStyles } from '@emotion/react'; -import { search_style__highlight } from '../../css/visual'; -import { +import type { SerializedStyles } from '@emotion/react'; +import { search_style__highlight } from '@/css/visual'; +import type { EditorApproval, EditorDataClass, EditorEGate, @@ -10,18 +10,20 @@ import { EditorRegistry, EditorSignalEvent, EditorSubprocess, - EditorTimerEvent, + EditorTimerEvent } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorDataClass, isEditorProcess, isEditorRegistry, -} from '../model/editormodel'; -import { createModelHistory, HistoryItem } from '../model/history'; -import { LegendInterface } from '../model/States'; -import { DataType } from '../serialize/interface/baseinterface'; -import { isRegistry } from '../serialize/util/validation'; -import { SearchableNodeTypes } from './constants'; -import { isSearchableNodeTypes } from './typecheckings'; +} from '@/smart/model/editormodel'; +import type { HistoryItem } from '@/smart/model/history'; +import { createModelHistory } from '@/smart/model/history'; +import type { LegendInterface } from '@/smart/model/States'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { isRegistry } from '@paneron/libmmel/util/validation'; +import type { SearchableNodeTypes } from '@/smart/utils/constants'; +import { isSearchableNodeTypes } from '@/smart/utils/typecheckings'; type SearchResultType = 'Process' | 'Approval' | 'Data' | 'Event' | 'Gateway'; diff --git a/packages/legacy/src/smart/utils/VersionTracker.ts b/src/smart/utils/VersionTracker.ts similarity index 96% rename from packages/legacy/src/smart/utils/VersionTracker.ts rename to src/smart/utils/VersionTracker.ts index 24c4a8e5..5ae3140b 100644 --- a/packages/legacy/src/smart/utils/VersionTracker.ts +++ b/src/smart/utils/VersionTracker.ts @@ -1,6 +1,6 @@ -import React from 'react'; -import { flow_node__highlighed, no_highlight } from '../../css/visual'; -import { +import type React from 'react'; +import { flow_node__highlighed, no_highlight } from '@/css/visual'; +import type { EditorApproval, EditorDataClass, EditorEGate, @@ -9,7 +9,8 @@ import { EditorRegistry, EditorSignalEvent, EditorSubprocess, - EditorTimerEvent, + EditorTimerEvent } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorDataClass, isEditorEgate, @@ -17,14 +18,14 @@ import { isEditorRegistry, isEditorSignalEvent, isEditorTimerEvent, -} from '../model/editormodel'; -import { HistoryItem, PageHistory } from '../model/history'; -import { ModelWrapper } from '../model/modelwrapper'; -import { LegendInterface } from '../model/States'; -import { VersionState, VersionStatus } from '../model/versioncompare'; -import { ViewFunctionInterface } from '../model/ViewFunctionModel'; -import VersionDiffLogView from '../ui/version/VersionDiffLogView'; -import { getRootName } from './ModelFunctions'; +} from '@/smart/model/editormodel'; +import type { HistoryItem, PageHistory } from '@/smart/model/history'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { LegendInterface } from '@/smart/model/States'; +import type { VersionState, VersionStatus } from '@/smart/model/versioncompare'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import VersionDiffLogView from '@/smart/ui/version/VersionDiffLogView'; +import { getRootName } from '@/smart/utils/ModelFunctions'; const ComparisonResultStyles: Record = { 'same' : { label : 'Identical', color : 'lightblue' }, diff --git a/packages/legacy/src/smart/utils/ai/aiagent.ts b/src/smart/utils/ai/aiagent.ts similarity index 94% rename from packages/legacy/src/smart/utils/ai/aiagent.ts rename to src/smart/utils/ai/aiagent.ts index 3f58e241..99371c90 100644 --- a/packages/legacy/src/smart/utils/ai/aiagent.ts +++ b/src/smart/utils/ai/aiagent.ts @@ -1,21 +1,23 @@ -import { MMELDocument } from '../../model/document'; -import { +import type { MMELDocument } from '@/smart/model/document'; +import type { EditorModel, EditorProcess, - EditorSubprocess, - isEditorProcess, -} from '../../model/editormodel'; + EditorSubprocess } from '@/smart/model/editormodel'; import { - createEditorModelWrapper, - ModelWrapper, -} from '../../model/modelwrapper'; -import { DataType } from '../../serialize/interface/baseinterface'; + isEditorProcess, +} from '@/smart/model/editormodel'; +import type { + ModelWrapper } from '@/smart/model/modelwrapper'; import { + createEditorModelWrapper +} from '@/smart/model/modelwrapper'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELLink, MMELNote, MMELTextSection, -} from '../../serialize/interface/supportinterface'; -import { detectModality } from '../../ui/edit/components/ProvisionList'; +} from '@paneron/libmmel/interface/supportinterface'; +import { detectModality } from '@/smart/ui/edit/components/ProvisionList'; import { createEdge, createNewEditorModel, @@ -26,9 +28,9 @@ import { createRole, createSubprocessComponent, createTerm, -} from '../EditorFactory'; -import { createNewPage } from '../ModelAddComponentHandler'; -import * as Logger from '../../../lib/logger'; +} from '@/smart/utils/EditorFactory'; +import { createNewPage } from '@/smart/utils/ModelAddComponentHandler'; +import * as Logger from '@/lib/logger'; type Sections = Record; type NoteType = MMELNote['type']; diff --git a/packages/legacy/src/smart/utils/checklist/ChecklistCalculator.ts b/src/smart/utils/checklist/ChecklistCalculator.ts similarity index 97% rename from packages/legacy/src/smart/utils/checklist/ChecklistCalculator.ts rename to src/smart/utils/checklist/ChecklistCalculator.ts index 94cde290..893cb588 100644 --- a/packages/legacy/src/smart/utils/checklist/ChecklistCalculator.ts +++ b/src/smart/utils/checklist/ChecklistCalculator.ts @@ -1,15 +1,16 @@ -import { +import type { ChecklistResult, ChecklistTaskList, EGatePathTaskList, -} from '../../model/checklist'; -import { +} from '@/smart/model/checklist'; +import type { EditorModel, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorEgate, isEditorProcess, -} from '../../model/editormodel'; +} from '@/smart/model/editormodel'; export function updateResult( result: ChecklistResult, diff --git a/packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts b/src/smart/utils/checklist/ChecklistViewer.ts similarity index 80% rename from packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts rename to src/smart/utils/checklist/ChecklistViewer.ts index f21d0da0..345724b1 100644 --- a/packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts +++ b/src/smart/utils/checklist/ChecklistViewer.ts @@ -1,15 +1,15 @@ -import React from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { flow_node__highlighed } from '../../../css/visual'; -import { ChecklistPackage } from '../../model/checklist'; -import { EditorModel } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { MMELDataAttribute } from '../../serialize/interface/datainterface'; -import { +import type React from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import { flow_node__highlighed } from '@/css/visual'; +import type { ChecklistPackage } from '@/smart/model/checklist'; +import type { EditorModel } from '@/smart/model/editormodel'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import type { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; +import type { MMELProvision, MMELReference, -} from '../../serialize/interface/supportinterface'; -import CheckListAddon from '../../ui/checklist/CheckListAddon'; +} from '@paneron/libmmel/interface/supportinterface'; +import CheckListAddon from '@/smart/ui/checklist/CheckListAddon'; const okcolor = 'lightgreen'; const normalcolor = CSSROOTVARIABLES['--plain-node-color']; diff --git a/packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts b/src/smart/utils/checklist/CheckllistInitializer.ts similarity index 94% rename from packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts rename to src/smart/utils/checklist/CheckllistInitializer.ts index c2b7da7d..99a76df6 100644 --- a/packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts +++ b/src/smart/utils/checklist/CheckllistInitializer.ts @@ -1,30 +1,32 @@ -import { - addInvertedItem, +import type { ChecklistResult, ChecklistSetting, ChecklistTaskList, ChecklistUpdateList, - createCLItem, EGatePath, - EGatePathTaskList, - getCheckListId, -} from '../../model/checklist'; + EGatePathTaskList } from '@/smart/model/checklist'; import { + addInvertedItem, + createCLItem, + getCheckListId, +} from '@/smart/model/checklist'; +import type { EditorApproval, EditorEGate, EditorModel, EditorProcess, EditorRegistry, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorData, isEditorDataClass, isEditorEgate, isEditorProcess, isEditorRegistry, -} from '../../model/editormodel'; -import { ModalityType } from '../constants'; -import { calculateReach, calInitEGates } from './ChecklistCalculator'; +} from '@/smart/model/editormodel'; +import type { ModalityType } from '@/smart/utils/constants'; +import { calculateReach, calInitEGates } from '@/smart/utils/checklist/ChecklistCalculator'; export function calculateTaskList( model: EditorModel, diff --git a/packages/legacy/src/smart/utils/constants.ts b/src/smart/utils/constants.ts similarity index 89% rename from packages/legacy/src/smart/utils/constants.ts rename to src/smart/utils/constants.ts index e56b898c..e14e9845 100644 --- a/packages/legacy/src/smart/utils/constants.ts +++ b/src/smart/utils/constants.ts @@ -1,14 +1,12 @@ -import { OpenFileDialogProps } from '@riboseinc/paneron-extension-kit/types/dialogs'; -import { ObjectDataset } from '@riboseinc/paneron-extension-kit/types/objects'; -import { DataType } from '../serialize/interface/baseinterface'; -import { VarType } from '../serialize/interface/supportinterface'; +import type { OpenFileDialogProps } from '@riboseinc/paneron-extension-kit/types/dialogs'; +import type { ObjectDataset } from '@riboseinc/paneron-extension-kit/types/objects'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import { VarType } from '@paneron/libmmel/interface/supportinterface'; export const WSVERSION = 'v1.0.0-dev1'; export const MAPVERSION = 'v1.0.0-dev1'; export const DOCVERSION = 'v1.0.0-dev1'; export const MODELVERSION = 'v1.0.0-dev3'; -export const EXTENSIONVERSION = 'v1.0.0-dev18'; -export const PANERONVERSION = 'v1 beta23'; export const MODALITY = ['MUST', 'SHALL', 'SHOULD', 'CAN', 'MAY'] as const; diff --git a/packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts b/src/smart/utils/handler/cascadeModelHandler.ts similarity index 93% rename from packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts rename to src/smart/utils/handler/cascadeModelHandler.ts index f487e10c..fbd961df 100644 --- a/packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts +++ b/src/smart/utils/handler/cascadeModelHandler.ts @@ -1,24 +1,25 @@ -import { +import type { DataCascadeDCID, DataCascadeIDs, -} from '../../model/editor/components/elements'; -import { +} from '@/smart/model/editor/components/elements'; +import type { EditorApproval, EditorDataClass, EditorNode, EditorProcess, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorDataClass, isEditorProcess, -} from '../../model/editormodel'; -import { DataType } from '../../serialize/interface/baseinterface'; -import { +} from '@/smart/model/editormodel'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELNote, MMELProvision, -} from '../../serialize/interface/supportinterface'; -import { isApproval } from '../../serialize/util/validation'; -import { setReplace } from '../ModelFunctions'; +} from '@paneron/libmmel/interface/supportinterface'; +import { isApproval } from '@paneron/libmmel/util/validation'; +import { setReplace } from '@/smart/utils/ModelFunctions'; export type RoleAttribute = 'actor' | 'approver'; diff --git a/packages/legacy/src/smart/utils/map/AutoMap.ts b/src/smart/utils/map/AutoMap.ts similarity index 91% rename from packages/legacy/src/smart/utils/map/AutoMap.ts rename to src/smart/utils/map/AutoMap.ts index 162f7171..30e7058f 100644 --- a/packages/legacy/src/smart/utils/map/AutoMap.ts +++ b/src/smart/utils/map/AutoMap.ts @@ -1,10 +1,13 @@ -import { Edge, Node, Position } from 'react-flow-renderer'; -import { EditorModel, isEditorProcess } from '../../model/editormodel'; -import { MapProfile } from '../../model/mapmodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createEdge, RepoLegend, RepoNodeType } from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from '../repo/io'; +import type { Edge, Node } from 'react-flow-renderer'; +import { Position } from 'react-flow-renderer'; +import type { EditorModel } from '@/smart/model/editormodel'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { RepoNodeType } from '@/smart/utils/repo/CommonFunctions'; +import { createEdge, RepoLegend } from '@/smart/utils/repo/CommonFunctions'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; type Maps = Record; type Nodes = Record; diff --git a/packages/legacy/src/smart/utils/map/MappingCalculator.ts b/src/smart/utils/map/MappingCalculator.ts similarity index 95% rename from packages/legacy/src/smart/utils/map/MappingCalculator.ts rename to src/smart/utils/map/MappingCalculator.ts index c8ad9a7b..82725043 100644 --- a/packages/legacy/src/smart/utils/map/MappingCalculator.ts +++ b/src/smart/utils/map/MappingCalculator.ts @@ -1,32 +1,33 @@ -import { RefObject } from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; +import type { RefObject } from 'react'; +import { CSSROOTVARIABLES } from '@/css/root.css'; import { map_style_diff__source, map_style__coverage, map_style__source, -} from '../../../css/visual'; -import { +} from '@/css/visual'; +import type { EditorModel, EditorNode, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorEgate, isEditorProcess, ModelType, -} from '../../model/editormodel'; -import { PageHistory } from '../../model/history'; -import { LegendInterface, MapperSelectedInterface } from '../../model/States'; -import { +} from '@/smart/model/editormodel'; +import type { PageHistory } from '@/smart/model/history'; +import type { LegendInterface, MapperSelectedInterface } from '@/smart/model/States'; +import type { MappingDoc, MappingMeta, MappingType, MapProfile, MapSet, -} from '../../model/mapmodel'; -import { SerializedStyles } from '@emotion/react'; -import { DocStatement, MMELDocument } from '../../model/document'; -import { getNamespace } from '../ModelFunctions'; -import { getMapDiffStyleById } from './MappingDiff'; +} from '@/smart/model/mapmodel'; +import type { SerializedStyles } from '@emotion/react'; +import type { DocStatement, MMELDocument } from '@/smart/model/document'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import { getMapDiffStyleById } from '@/smart/utils/map/MappingDiff'; export enum MapCoverType { FULL = 'full', diff --git a/packages/legacy/src/smart/utils/map/MappingDiff.ts b/src/smart/utils/map/MappingDiff.ts similarity index 88% rename from packages/legacy/src/smart/utils/map/MappingDiff.ts rename to src/smart/utils/map/MappingDiff.ts index cd315150..666f55f3 100644 --- a/packages/legacy/src/smart/utils/map/MappingDiff.ts +++ b/src/smart/utils/map/MappingDiff.ts @@ -1,24 +1,27 @@ -import { SerializedStyles } from '@emotion/react'; -import { Edge, Elements, Node, Position } from 'react-flow-renderer'; -import { map_style_diff__coverage } from '../../../css/visual'; -import { MappingType, MapProfile } from '../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { LegendInterface } from '../../model/States'; -import { createNodeContent } from '../../ui/mapper/repo/RepoMapNode'; -import { calculateDocumentMapping } from '../DocumentFunctions'; +import type { SerializedStyles } from '@emotion/react'; +import type { Edge, Elements, Node } from 'react-flow-renderer'; +import { Position } from 'react-flow-renderer'; +import { map_style_diff__coverage } from '@/css/visual'; +import type { MappingType, MapProfile } from '@/smart/model/mapmodel'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import type { LegendInterface } from '@/smart/model/States'; +import { createNodeContent } from '@/smart/ui/mapper/repo/RepoMapNode'; +import { calculateDocumentMapping } from '@/smart/utils/DocumentFunctions'; +import type { + RepoNodeDiffType } from '@/smart/utils/repo/CommonFunctions'; import { createEdge, getRepoItemDesc, - RepoDiffLegend, - RepoNodeDiffType, -} from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from '../repo/io'; -import { - MapCoverType, + RepoDiffLegend +} from '@/smart/utils/repo/CommonFunctions'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import type { MapDiffEdgeResult, MapEdgeResult, - MapResultType, -} from './MappingCalculator'; + MapResultType } from '@/smart/utils/map/MappingCalculator'; +import { + MapCoverType +} from '@/smart/utils/map/MappingCalculator'; export const MapDiffSourceValues = [ 'new', diff --git a/packages/legacy/src/smart/utils/map/RepoMap.ts b/src/smart/utils/map/RepoMap.ts similarity index 82% rename from packages/legacy/src/smart/utils/map/RepoMap.ts rename to src/smart/utils/map/RepoMap.ts index d224845e..8ecce823 100644 --- a/packages/legacy/src/smart/utils/map/RepoMap.ts +++ b/src/smart/utils/map/RepoMap.ts @@ -1,14 +1,16 @@ -import { Edge, Elements, Node, Position } from 'react-flow-renderer'; -import { MapProfile } from '../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createNodeContent } from '../../ui/mapper/repo/RepoMapNode'; +import type { Edge, Elements, Node } from 'react-flow-renderer'; +import { Position } from 'react-flow-renderer'; +import type { MapProfile } from '@/smart/model/mapmodel'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { createNodeContent } from '@/smart/ui/mapper/repo/RepoMapNode'; +import type { + RepoNodeType } from '@/smart/utils/repo/CommonFunctions'; import { createEdge, getRepoItemDesc, - RepoLegend, - RepoNodeType, -} from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from '../repo/io'; + RepoLegend +} from '@/smart/utils/repo/CommonFunctions'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; type Maps = Record; type Nodes = Record; diff --git a/packages/legacy/src/smart/utils/measurement/BasicFunctions.ts b/src/smart/utils/measurement/BasicFunctions.ts similarity index 82% rename from packages/legacy/src/smart/utils/measurement/BasicFunctions.ts rename to src/smart/utils/measurement/BasicFunctions.ts index 2516c99e..5e729000 100644 --- a/packages/legacy/src/smart/utils/measurement/BasicFunctions.ts +++ b/src/smart/utils/measurement/BasicFunctions.ts @@ -1,11 +1,12 @@ -import { MTreeNode } from '../../model/Measurement'; -import { MMELVariable } from '../../serialize/interface/supportinterface'; +import type { MTreeNode } from '@/smart/model/Measurement'; +import type { MMELVariable } from '@paneron/libmmel/interface/supportinterface'; +import type { + MBinOperatorTypes, + MListOperatorTypes } from '@/smart/utils/measurement/Operators'; import { MBinaryOperators, - MBinOperatorTypes, - MListOperators, - MListOperatorTypes, -} from './Operators'; + MListOperators +} from '@/smart/utils/measurement/Operators'; export function measurementValidCheck( def: string, diff --git a/packages/legacy/src/smart/utils/measurement/Checker.ts b/src/smart/utils/measurement/Checker.ts similarity index 92% rename from packages/legacy/src/smart/utils/measurement/Checker.ts rename to src/smart/utils/measurement/Checker.ts index b4c4bf71..d02fd311 100644 --- a/packages/legacy/src/smart/utils/measurement/Checker.ts +++ b/src/smart/utils/measurement/Checker.ts @@ -1,24 +1,27 @@ -import { IToastProps } from '@blueprintjs/core'; -import { +import type { IToastProps } from '@blueprintjs/core'; +import type { EditorModel, EditorNode, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorEgate, isEditorProcess, -} from '../../model/editormodel'; -import { +} from '@/smart/model/editormodel'; +import type { EnviromentValues, EnviromentVariables, MeasureResult, - MeasureRType, - MTestReport, -} from '../../model/Measurement'; -import { LegendInterface } from '../../model/States'; -import { MMELEdge } from '../../serialize/interface/flowcontrolinterface'; -import { MMELTable, VarType } from '../../serialize/interface/supportinterface'; -import { buildEdgeConnections } from '../ModelFunctions'; -import { evaluateCondition, resolveMTNode } from './Evaluator'; -import { parseMeasurement } from './Parser'; + MTestReport } from '@/smart/model/Measurement'; +import { + MeasureRType +} from '@/smart/model/Measurement'; +import type { LegendInterface } from '@/smart/model/States'; +import type { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; +import type { MMELTable } from '@paneron/libmmel/interface/supportinterface'; +import { VarType } from '@paneron/libmmel/interface/supportinterface'; +import { buildEdgeConnections } from '@/smart/utils/ModelFunctions'; +import { evaluateCondition, resolveMTNode } from '@/smart/utils/measurement/Evaluator'; +import { parseMeasurement } from '@/smart/utils/measurement/Parser'; export const MeasureResultStyles: Record = { [MeasureRType.OK] : { label : 'OK: Test passed', color : 'lightgreen' }, diff --git a/packages/legacy/src/smart/utils/measurement/Evaluator.ts b/src/smart/utils/measurement/Evaluator.ts similarity index 89% rename from packages/legacy/src/smart/utils/measurement/Evaluator.ts rename to src/smart/utils/measurement/Evaluator.ts index 8878846f..e182863b 100644 --- a/packages/legacy/src/smart/utils/measurement/Evaluator.ts +++ b/src/smart/utils/measurement/Evaluator.ts @@ -1,12 +1,12 @@ -import { +import type { EnviromentValues, EnviromentVariables, MTestReport, MTreeNode, -} from '../../model/Measurement'; -import { isBinaryOperator, isListOperator } from './BasicFunctions'; -import { MBOperators, MComparison, MLOperators } from './Operators'; -import { parseCondition } from './Parser'; +} from '@/smart/model/Measurement'; +import { isBinaryOperator, isListOperator } from '@/smart/utils/measurement/BasicFunctions'; +import { MBOperators, MComparison, MLOperators } from '@/smart/utils/measurement/Operators'; +import { parseCondition } from '@/smart/utils/measurement/Parser'; export function getFinalValueFromNode(a: MTreeNode): string | number { if (Array.isArray(a.value)) { diff --git a/packages/legacy/src/smart/utils/measurement/Operators.ts b/src/smart/utils/measurement/Operators.ts similarity index 94% rename from packages/legacy/src/smart/utils/measurement/Operators.ts rename to src/smart/utils/measurement/Operators.ts index 86538fa1..87035121 100644 --- a/packages/legacy/src/smart/utils/measurement/Operators.ts +++ b/src/smart/utils/measurement/Operators.ts @@ -1,10 +1,10 @@ -import { +import type { EnviromentValues, EnviromentVariables, MTreeNode, -} from '../../model/Measurement'; -import { createMTreeNodeWithValue } from './BasicFunctions'; -import { getListFromNode, getValueFromNode } from './Evaluator'; +} from '@/smart/model/Measurement'; +import { createMTreeNodeWithValue } from '@/smart/utils/measurement/BasicFunctions'; +import { getListFromNode, getValueFromNode } from '@/smart/utils/measurement/Evaluator'; export type BinaryOperator = ( a: MTreeNode, diff --git a/packages/legacy/src/smart/utils/measurement/Parser.ts b/src/smart/utils/measurement/Parser.ts similarity index 92% rename from packages/legacy/src/smart/utils/measurement/Parser.ts rename to src/smart/utils/measurement/Parser.ts index 8c89ba34..ec1c2d41 100644 --- a/packages/legacy/src/smart/utils/measurement/Parser.ts +++ b/src/smart/utils/measurement/Parser.ts @@ -1,13 +1,14 @@ -import { MTreeNode } from '../../model/Measurement'; -import { isSpace } from '../ModelFunctions'; +import type { MTreeNode } from '@/smart/model/Measurement'; +import { isSpace } from '@/smart/utils/parser_helpers'; import { createMTreeNodeWithOperator, createMTreeNodeWithValue, createMTreeNodeWithVariable, isBinaryOperator, isListOperator, -} from './BasicFunctions'; -import { MComparators, MComparatorTypes } from './Operators'; +} from '@/smart/utils/measurement/BasicFunctions'; +import type { MComparatorTypes } from '@/smart/utils/measurement/Operators'; +import { MComparators } from '@/smart/utils/measurement/Operators'; export interface MToken { text: string; diff --git a/packages/legacy/src/smart/utils/nlp/nlp.ts b/src/smart/utils/nlp/nlp.ts similarity index 95% rename from packages/legacy/src/smart/utils/nlp/nlp.ts rename to src/smart/utils/nlp/nlp.ts index 6499b11a..39c45a39 100644 --- a/packages/legacy/src/smart/utils/nlp/nlp.ts +++ b/src/smart/utils/nlp/nlp.ts @@ -1,17 +1,19 @@ -import { ArrowHeadType, Edge, Elements, Node } from 'react-flow-renderer'; -import { isEditorProcess } from '../../model/editormodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { +import type { Edge, Elements, Node } from 'react-flow-renderer'; +import { ArrowHeadType } from 'react-flow-renderer'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { NLPItem, NLPJSON, NLPToken, NLPTreeNode, ProvisionRDF, - RDFVersion, STNode, - STRelation, -} from '../../model/SemanticTriple'; -import * as Logger from '../../../lib/logger'; + STRelation } from '@/smart/model/SemanticTriple'; +import { + RDFVersion +} from '@/smart/model/SemanticTriple'; +import * as Logger from '@/lib/logger'; const nlpServer = 'http://localhost:9000'; const width = 180; diff --git a/packages/legacy/src/smart/utils/nlp/query.ts b/src/smart/utils/nlp/query.ts similarity index 91% rename from packages/legacy/src/smart/utils/nlp/query.ts rename to src/smart/utils/nlp/query.ts index 4832bd6d..0c4251c1 100644 --- a/packages/legacy/src/smart/utils/nlp/query.ts +++ b/src/smart/utils/nlp/query.ts @@ -1,11 +1,12 @@ -import { +import type { NLPJSON, ProvisionRDF, - RDFVersion, - STNode, -} from '../../model/SemanticTriple'; -import * as Logger from '../../../lib/logger'; -import { converQuestionRDF, parseText } from './nlp'; + STNode } from '@/smart/model/SemanticTriple'; +import { + RDFVersion +} from '@/smart/model/SemanticTriple'; +import * as Logger from '@/lib/logger'; +import { converQuestionRDF, parseText } from '@/smart/utils/nlp/nlp'; const QuestionWords = [ 'what', diff --git a/src/smart/utils/parser_helpers.ts b/src/smart/utils/parser_helpers.ts new file mode 100644 index 00000000..ca4fd786 --- /dev/null +++ b/src/smart/utils/parser_helpers.ts @@ -0,0 +1,3 @@ +export function isSpace(x: string): boolean { + return /\s/.test(x); +} diff --git a/packages/legacy/src/smart/utils/repo/CommonFunctions.ts b/src/smart/utils/repo/CommonFunctions.ts similarity index 91% rename from packages/legacy/src/smart/utils/repo/CommonFunctions.ts rename to src/smart/utils/repo/CommonFunctions.ts index e5e994cd..152e4bf1 100644 --- a/packages/legacy/src/smart/utils/repo/CommonFunctions.ts +++ b/src/smart/utils/repo/CommonFunctions.ts @@ -1,13 +1,13 @@ -import { Edge } from 'react-flow-renderer'; -import { +import type { Edge } from 'react-flow-renderer'; +import type { RepoDocItem, RepoImpItem, RepoIndex, RepoItems, RepoRefItem, -} from '../../model/repo'; -import { LegendInterface } from '../../model/States'; -import { getPathByNS, RepoFileType } from './io'; +} from '@/smart/model/repo'; +import type { LegendInterface } from '@/smart/model/States'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; export type RepoNodeType = 'own' | 'repo' | 'outside'; diff --git a/packages/legacy/src/smart/utils/repo/LinkAnalysis.ts b/src/smart/utils/repo/LinkAnalysis.ts similarity index 81% rename from packages/legacy/src/smart/utils/repo/LinkAnalysis.ts rename to src/smart/utils/repo/LinkAnalysis.ts index f3e5b28d..307d4150 100644 --- a/packages/legacy/src/smart/utils/repo/LinkAnalysis.ts +++ b/src/smart/utils/repo/LinkAnalysis.ts @@ -1,13 +1,15 @@ -import { Edge, Elements, Node, Position } from 'react-flow-renderer'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createNodeContent } from '../../ui/mapper/repo/RepoMapNode'; +import type { Edge, Elements, Node } from 'react-flow-renderer'; +import { Position } from 'react-flow-renderer'; +import type { ModelWrapper } from '@/smart/model/modelwrapper'; +import type { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { createNodeContent } from '@/smart/ui/mapper/repo/RepoMapNode'; +import type { + RepoNodeType } from '@/smart/utils/repo/CommonFunctions'; import { getRepoItemDesc, - RepoLegend, - RepoNodeType, -} from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from './io'; + RepoLegend +} from '@/smart/utils/repo/CommonFunctions'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; type Nodes = Record; type Edges = Record; diff --git a/packages/legacy/src/smart/utils/repo/io.ts b/src/smart/utils/repo/io.ts similarity index 91% rename from packages/legacy/src/smart/utils/repo/io.ts rename to src/smart/utils/repo/io.ts index 0a930c66..a95b5f0d 100644 --- a/packages/legacy/src/smart/utils/repo/io.ts +++ b/src/smart/utils/repo/io.ts @@ -3,11 +3,8 @@ import { isMMELDataClass, isMMELProcess, isMMELRegistry, -} from '../../model/editormodel'; -import { - isJSONApproval, - isJSONDataClass, - isJSONProcess, +} from '@/smart/model/editormodel'; +import type { JSONApproval, JSONComment, JSONDataAttribute, @@ -16,26 +13,31 @@ import { JSONProcess, JSONProvision, JSONRegistry, - MMELJSON, -} from '../../model/json'; -import { DataType, MMELNode } from '../../serialize/interface/baseinterface'; + MMELJSON } from '@/smart/model/json'; import { + isJSONApproval, + isJSONDataClass, + isJSONProcess +} from '@/smart/model/json'; +import type { MMELNode } from '@paneron/libmmel/interface/baseinterface'; +import { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELDataAttribute, MMELDataClass, -} from '../../serialize/interface/datainterface'; -import { MMELModel } from '../../serialize/interface/model'; -import { +} from '@paneron/libmmel/interface/datainterface'; +import type { MMELModel } from '@paneron/libmmel/interface/model'; +import type { MMELApproval, MMELProcess, -} from '../../serialize/interface/processinterface'; -import { +} from '@paneron/libmmel/interface/processinterface'; +import type { MMELComment, MMELNote, MMELProvision, -} from '../../serialize/interface/supportinterface'; -import { MODELVERSION } from '../constants'; -import { createMetaData } from '../EditorFactory'; -import * as Logger from '../../../lib/logger'; +} from '@paneron/libmmel/interface/supportinterface'; +import { MODELVERSION } from '@/smart/utils/constants'; +import { createMetaData } from '@/smart/utils/EditorFactory'; +import * as Logger from '@/lib/logger'; export enum RepoFileType { MODEL = 'model', diff --git a/packages/legacy/src/smart/utils/reportFunctions.ts b/src/smart/utils/reportFunctions.ts similarity index 89% rename from packages/legacy/src/smart/utils/reportFunctions.ts rename to src/smart/utils/reportFunctions.ts index 757ce4fa..168d7651 100644 --- a/packages/legacy/src/smart/utils/reportFunctions.ts +++ b/src/smart/utils/reportFunctions.ts @@ -1,13 +1,14 @@ +import type { + EditorModel } from '@/smart/model/editormodel'; import { - EditorModel, isEditorApproval, isEditorProcess, -} from '../model/editormodel'; -import { getNamespace, referenceSorter } from './ModelFunctions'; -import * as Logger from '../../lib/logger'; -import { MapProfile } from '../model/mapmodel'; +} from '@/smart/model/editormodel'; +import { getNamespace, referenceSorter } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import type { MapProfile } from '@/smart/model/mapmodel'; import { Liquid } from 'liquidjs'; -import { MMELToSerializable } from './repo/io'; +import { MMELToSerializable } from '@/smart/utils/repo/io'; export function genReport( text: string, diff --git a/packages/legacy/src/smart/utils/simulation/viewFunctions.ts b/src/smart/utils/simulation/viewFunctions.ts similarity index 77% rename from packages/legacy/src/smart/utils/simulation/viewFunctions.ts rename to src/smart/utils/simulation/viewFunctions.ts index 44bb3ded..55a6e52a 100644 --- a/packages/legacy/src/smart/utils/simulation/viewFunctions.ts +++ b/src/smart/utils/simulation/viewFunctions.ts @@ -1,7 +1,7 @@ -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { flow_node__highlighed } from '../../../css/visual'; -import { SimulationState } from '../../model/simulation'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import { flow_node__highlighed } from '@/css/visual'; +import type { SimulationState } from '@/smart/model/simulation'; +import type { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; const selectedcolor = 'lightyellow'; const normalcolor = CSSROOTVARIABLES['--plain-node-color']; diff --git a/packages/legacy/src/smart/utils/summary/RegistrySummary.ts b/src/smart/utils/summary/RegistrySummary.ts similarity index 92% rename from packages/legacy/src/smart/utils/summary/RegistrySummary.ts rename to src/smart/utils/summary/RegistrySummary.ts index ba00acf3..63f530c8 100644 --- a/packages/legacy/src/smart/utils/summary/RegistrySummary.ts +++ b/src/smart/utils/summary/RegistrySummary.ts @@ -1,17 +1,19 @@ -import { +import type { EditorModel, EditorNode, - EditorSubprocess, + EditorSubprocess } from '@/smart/model/editormodel'; +import { isEditorApproval, isEditorProcess, -} from '../../model/editormodel'; +} from '@/smart/model/editormodel'; +import type { + PageHistory } from '@/smart/model/history'; import { addToHistory, cloneHistory, - createPageHistory, - PageHistory, -} from '../../model/history'; -import { LegendInterface } from '../../model/States'; + createPageHistory +} from '@/smart/model/history'; +import type { LegendInterface } from '@/smart/model/States'; export enum SearchHighlightType { SELECTED = 'selected', diff --git a/packages/legacy/src/smart/utils/typecheckings.ts b/src/smart/utils/typecheckings.ts similarity index 63% rename from packages/legacy/src/smart/utils/typecheckings.ts rename to src/smart/utils/typecheckings.ts index c191e95d..1fc13a9b 100644 --- a/packages/legacy/src/smart/utils/typecheckings.ts +++ b/src/smart/utils/typecheckings.ts @@ -1,12 +1,14 @@ -import { EditorNode, isEditorDataClass } from '../model/editormodel'; -import { DataType } from '../serialize/interface/baseinterface'; -import { MMELEnum } from '../serialize/interface/datainterface'; -import { +import type { EditorNode } from '@/smart/model/editormodel'; +import { isEditorDataClass } from '@/smart/model/editormodel'; +import type { DataType } from '@paneron/libmmel/interface/baseinterface'; +import type { MMELEnum } from '@paneron/libmmel/interface/datainterface'; +import type { BASICTYPES, + SearchableNodeTypes } from '@/smart/utils/constants'; +import { DATATYPE, - searchableNodeDataTypes, - SearchableNodeTypes, -} from './constants'; + searchableNodeDataTypes +} from '@/smart/utils/constants'; export function isSearchableNodeTypes(x: DataType): x is SearchableNodeTypes { for (const type of searchableNodeDataTypes) { diff --git a/packages/legacy/src/smart/utils/xml/BSIXML.ts b/src/smart/utils/xml/BSIXML.ts similarity index 96% rename from packages/legacy/src/smart/utils/xml/BSIXML.ts rename to src/smart/utils/xml/BSIXML.ts index 4f3e22a7..b11faaf9 100644 --- a/packages/legacy/src/smart/utils/xml/BSIXML.ts +++ b/src/smart/utils/xml/BSIXML.ts @@ -1,8 +1,8 @@ import React from 'react'; -import { DocSection, DocStatement, MMELDocument } from '../../model/document'; -import { XMLElement } from '../../model/xmlelement'; -import { DOCVERSION } from '../constants'; -import { elementToString, isXMLElement, parseXML } from './XMLParser'; +import type { DocSection, DocStatement, MMELDocument } from '@/smart/model/document'; +import type { XMLElement } from '@/smart/model/xmlelement'; +import { DOCVERSION } from '@/smart/utils/constants'; +import { elementToString, isXMLElement, parseXML } from '@/smart/utils/xml/XMLParser'; function getElementValue(xml: XMLElement, name: string): string { const array = xml.xmlChild[name]; diff --git a/packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts b/src/smart/utils/xml/XMLDocumentFunctions.ts similarity index 97% rename from packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts rename to src/smart/utils/xml/XMLDocumentFunctions.ts index e5e65f21..c001c2c7 100644 --- a/packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts +++ b/src/smart/utils/xml/XMLDocumentFunctions.ts @@ -1,8 +1,8 @@ import React from 'react'; -import { DocSection, DocStatement, MMELDocument } from '../../model/document'; -import { XMLElement } from '../../model/xmlelement'; -import { DOCVERSION } from '../constants'; -import { elementToString, isXMLElement, parseXML } from './XMLParser'; +import type { DocSection, DocStatement, MMELDocument } from '@/smart/model/document'; +import type { XMLElement } from '@/smart/model/xmlelement'; +import { DOCVERSION } from '@/smart/utils/constants'; +import { elementToString, isXMLElement, parseXML } from '@/smart/utils/xml/XMLParser'; interface CountFigTable { fig: number; diff --git a/packages/legacy/src/smart/utils/xml/XMLParser.ts b/src/smart/utils/xml/XMLParser.ts similarity index 95% rename from packages/legacy/src/smart/utils/xml/XMLParser.ts rename to src/smart/utils/xml/XMLParser.ts index 89abf382..9b9c451a 100644 --- a/packages/legacy/src/smart/utils/xml/XMLParser.ts +++ b/src/smart/utils/xml/XMLParser.ts @@ -1,9 +1,10 @@ -import { +import type { XMLElement, XMLNodeContent, - XMLToken, + XMLToken } from '@/smart/model/xmlelement'; +import { XMLTokenType, -} from '../../model/xmlelement'; +} from '@/smart/model/xmlelement'; export function parseXML(data: string): XMLElement { data = removeComments(data); @@ -79,7 +80,7 @@ function parseTokens(token: XMLToken[], pos: number, elm: XMLElement): number { } else if (t.type === XMLTokenType.ENDTAG) { const name = t.data.substring(2, t.data.length - 1); if (name !== elm.tag) { - throw new Error(`End tag does not match start tag ${elm.tag} ${t}`); + throw new Error(`End tag does not match start tag: ${name} instead of ${elm.tag}`); } return pos; } else if (t.type === XMLTokenType.TEXT) { diff --git a/packages/legacy/src/smart/utils/xml/XMLWriter.ts b/src/smart/utils/xml/XMLWriter.ts similarity index 100% rename from packages/legacy/src/smart/utils/xml/XMLWriter.ts rename to src/smart/utils/xml/XMLWriter.ts diff --git a/packages/legacy/src/widgets.tsx b/src/widgets.tsx similarity index 100% rename from packages/legacy/src/widgets.tsx rename to src/widgets.tsx diff --git a/packages/legacy/steps.d.ts b/steps.d.ts similarity index 100% rename from packages/legacy/steps.d.ts rename to steps.d.ts diff --git a/packages/legacy/steps_file.ts b/steps_file.ts similarity index 100% rename from packages/legacy/steps_file.ts rename to steps_file.ts diff --git a/tsconfig.base.json b/tsconfig.base.json index 7d48a6c5..8189b41b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,27 +1,42 @@ { "compilerOptions": { "composite": true, - "target": "esnext", + "target": "es2017", "module": "commonjs", "moduleResolution": "node", + "importsNotUsedAsValues": "error", + "ignoreDeprecations": "5.0", "declaration": true, "declarationMap": true, "isolatedModules": true, "esModuleInterop": true, "resolveJsonModule": true, "allowSyntheticDefaultImports": true, + "importHelpers": true, "strict": true, "skipLibCheck": true, "incremental": true, "experimentalDecorators": true, "allowJs": false, "jsx": "react", - "newLine": "lf" + "lib": [ + "esnext", + "dom" + ], + "newLine": "lf", + // Note: To transform paths for both the output .js and .d.ts files, you need both of the below entries + "plugins": [ + // Transform paths in output .js files + { "transform": "typescript-transform-paths" }, + + // Transform paths in output .d.ts files (Include this line if you output declarations files) + { "transform": "typescript-transform-paths", "afterDeclarations": true } + ] }, - "exclude": [ - "node_modules", - "backup", - "compiled", - "dist" - ] + "ts-node": { + "swc": true, + "compilerOptions": { + "module": "CommonJS" + } + } } diff --git a/packages/legacy/tsconfig.build.json b/tsconfig.build.json similarity index 78% rename from packages/legacy/tsconfig.build.json rename to tsconfig.build.json index 2bf657eb..cb755ba4 100644 --- a/packages/legacy/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,8 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "composite": true, - "isolatedModules": true + "removeComments": true }, "include": [ "src" diff --git a/tsconfig.json b/tsconfig.json index 0f0d61d1..4c8c8191 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,23 +1,24 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "composite": true, - "target": "esnext", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "declarationMap": true, - "isolatedModules": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "strict": true, - "skipLibCheck": true, - "incremental": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "allowJs": false, - "jsx": "react", - "newLine": "lf" + "outDir": "dist", + "rootDir": "src", + "baseUrl": ".", + "paths": { + "@": ["src/plugin"], + "@/*": ["src/*"] + } }, - "files": [] + "files": [], + "include": [ + "**.json", + "*.ts", + "src" + ], + "exclude": [ + "node_modules", + "dist", + "compiled", + "backup" + ] }