Skip to content

Commit

Permalink
chore: update dependencies, fix jsonrepair version, resolve sass warn…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
josdejong committed Oct 22, 2024
1 parent 96e4179 commit 54e5daf
Show file tree
Hide file tree
Showing 52 changed files with 769 additions and 739 deletions.
278 changes: 132 additions & 146 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"dependencies": {
"@codemirror/autocomplete": "^6.18.1",
"@codemirror/commands": "^6.7.0",
"@codemirror/commands": "^6.7.1",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/language": "^6.10.3",
"@codemirror/lint": "^6.8.2",
Expand All @@ -94,12 +94,12 @@
"immutable-json-patch": "^6.0.1",
"jmespath": "^0.16.0",
"json-source-map": "^0.6.1",
"jsonpath-plus": "^9.0.0 || ^10.0.0",
"jsonrepair": "^3.8.1",
"jsonpath-plus": "^9.0.0 || ^10.1.0",
"jsonrepair": "3.8.0",
"lodash-es": "^4.17.21",
"memoize-one": "^6.0.0",
"natural-compare-lite": "^1.4.0",
"sass": "^1.79.5",
"sass": "^1.80.3",
"svelte-awesome": "^3.3.4",
"svelte-select": "^5.8.3",
"vanilla-picker": "^2.12.3"
Expand All @@ -113,32 +113,32 @@
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.11.1",
"@eslint/js": "9.13.0",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "28.0.0",
"@rollup/plugin-commonjs": "28.0.1",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.3.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "12.1.0",
"@rollup/plugin-typescript": "12.1.1",
"@sveltejs/adapter-auto": "3.2.5",
"@sveltejs/kit": "2.7.0",
"@sveltejs/kit": "2.7.2",
"@sveltejs/package": "2.3.5",
"@sveltejs/vite-plugin-svelte": "3.1.2",
"@testing-library/jest-dom": "6.5.0",
"@testing-library/svelte": "5.2.3",
"@testing-library/jest-dom": "6.6.2",
"@testing-library/svelte": "5.2.4",
"@types/cookie": "0.6.0",
"@types/jmespath": "0.15.2",
"@types/jsonpath": "0.2.4",
"@types/lodash-es": "4.17.12",
"@typescript-eslint/eslint-plugin": "7.17.0",
"@typescript-eslint/parser": "7.17.0",
"@vitest/coverage-v8": "2.1.2",
"@vitest/coverage-v8": "2.1.3",
"cpy-cli": "5.0.0",
"del-cli": "6.0.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-svelte": "2.44.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-svelte": "2.46.0",
"globals": "15.11.0",
"husky": "9.1.6",
"jsdom": "25.0.1",
Expand All @@ -152,10 +152,10 @@
"standard-version": "9.5.0",
"svelte": "^4.2.19",
"svelte-check": "4.0.5",
"svelte-eslint-parser": "0.41.1",
"svelte-eslint-parser": "0.43.0",
"svelte-preprocess": "6.0.3",
"typescript": "5.6.3",
"vite": "5.4.8",
"vitest": "2.1.2"
"vite": "5.4.9",
"vitest": "2.1.3"
}
}
13 changes: 7 additions & 6 deletions src/lib/components/JSONEditor.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
@import '../styles';
@use '../styles';
@use '../themes/defaults';

.jse-main {
width: 100%;
height: 100%;
min-width: 0;
min-height: $contents-min-height;
font-family: $font-family;
font-size: $font-size;
min-height: styles.$contents-min-height;
font-family: defaults.$font-family;
font-size: defaults.$font-size;
line-height: normal;
position: relative;
display: flex;
flex-direction: row;

// lighter selection color when the editor doesn't have focus
&:not(.jse-focus) {
--jse-selection-background-color: #{$selection-background-inactive-color};
--jse-context-menu-pointer-background: #{$context-menu-pointer-hover-background};
--jse-selection-background-color: #{defaults.$selection-background-inactive-color};
--jse-context-menu-pointer-background: #{defaults.$context-menu-pointer-hover-background};
}
}
20 changes: 10 additions & 10 deletions src/lib/components/__snapshots__/JSONEditor.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ exports[`JSONEditor > render table mode 1`] = `
class="jse-value-outer svelte-u14cgx"
>
<div
class="jse-value jse-number jse-table-cell svelte-9ohlz8"
class="jse-value jse-number jse-table-cell svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand All @@ -325,7 +325,7 @@ exports[`JSONEditor > render table mode 1`] = `
class="jse-value-outer svelte-u14cgx"
>
<div
class="jse-value jse-string jse-empty jse-table-cell svelte-9ohlz8"
class="jse-value jse-string jse-empty jse-table-cell svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down Expand Up @@ -360,7 +360,7 @@ exports[`JSONEditor > render table mode 1`] = `
class="jse-value-outer svelte-u14cgx"
>
<div
class="jse-value jse-number jse-table-cell svelte-9ohlz8"
class="jse-value jse-number jse-table-cell svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand All @@ -383,7 +383,7 @@ exports[`JSONEditor > render table mode 1`] = `
class="jse-value-outer svelte-u14cgx"
>
<div
class="jse-value jse-string jse-table-cell svelte-9ohlz8"
class="jse-value jse-string jse-table-cell svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down Expand Up @@ -418,7 +418,7 @@ exports[`JSONEditor > render table mode 1`] = `
class="jse-value-outer svelte-u14cgx"
>
<div
class="jse-value jse-number jse-table-cell svelte-9ohlz8"
class="jse-value jse-number jse-table-cell svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand All @@ -441,7 +441,7 @@ exports[`JSONEditor > render table mode 1`] = `
class="jse-value-outer svelte-u14cgx"
>
<div
class="jse-value jse-string jse-empty jse-table-cell svelte-9ohlz8"
class="jse-value jse-string jse-empty jse-table-cell svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down Expand Up @@ -1607,7 +1607,7 @@ exports[`JSONEditor > render tree mode 1`] = `
class="jse-value-outer svelte-1n9xu6u"
>
<div
class="jse-value jse-number svelte-9ohlz8"
class="jse-value jse-number svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down Expand Up @@ -1781,7 +1781,7 @@ exports[`JSONEditor > render tree mode 1`] = `
class="jse-value-outer svelte-1n9xu6u"
>
<div
class="jse-value jse-number svelte-9ohlz8"
class="jse-value jse-number svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down Expand Up @@ -1845,7 +1845,7 @@ exports[`JSONEditor > render tree mode 1`] = `
class="jse-value-outer svelte-1n9xu6u"
>
<div
class="jse-value jse-string svelte-9ohlz8"
class="jse-value jse-string svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down Expand Up @@ -2019,7 +2019,7 @@ exports[`JSONEditor > render tree mode 1`] = `
class="jse-value-outer svelte-1n9xu6u"
>
<div
class="jse-value jse-number svelte-9ohlz8"
class="jse-value jse-number svelte-c0g9qz"
data-type="selectable-value"
role="button"
tabindex="-1"
Expand Down
17 changes: 9 additions & 8 deletions src/lib/components/controls/ColorPickerPopup.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../styles';
@use '../../styles';
@use '../../themes/defaults';

.jse-color-picker-popup {
:global(.picker_wrapper.popup),
:global(.picker_wrapper.popup .picker_arrow::before),
:global(.picker_wrapper.popup .picker_arrow::after) {
background: $color-picker-background;
background: defaults.$color-picker-background;
line-height: normal;
}

Expand All @@ -13,20 +14,20 @@
:global(.picker_editor input),
:global(.picker_sample),
:global(.picker_done button) {
box-shadow: $color-picker-border-box-shadow;
box-shadow: defaults.$color-picker-border-box-shadow;
}

:global(.picker_editor input) {
background: $background-color;
color: $text-color;
background: defaults.$background-color;
color: defaults.$text-color;
}

:global(.picker_done button) {
background: $button-background;
color: $button-color;
background: defaults.$button-background;
color: defaults.$button-color;
}

:global(.picker_done button:hover) {
background: $button-background-highlight;
background: defaults.$button-background-highlight;
}
}
29 changes: 15 additions & 14 deletions src/lib/components/controls/DropdownButton.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
@import '../../styles';
@use '../../styles';
@use '../../themes/defaults';

.jse-dropdown-button {
flex: 1;
line-height: normal;

$background: $context-menu-background;
$background-highlight: $context-menu-background-highlight;
$background: defaults.$context-menu-background;
$background-highlight: defaults.$context-menu-background-highlight;

@include jsoneditor-button;
@include styles.jsoneditor-button;
position: relative;
padding: 0;
display: flex;
Expand All @@ -24,27 +25,27 @@
}

button.jse-open-dropdown {
@include jsoneditor-button;
@include styles.jsoneditor-button;

width: 2em;
background: $context-menu-background;
color: $context-menu-color;
background: defaults.$context-menu-background;
color: defaults.$context-menu-color;
border-radius: 0;

&.jse-visible {
background: $background;
}

&:hover {
background: $context-menu-background-highlight;
background: defaults.$context-menu-background-highlight;
}

&:focus {
z-index: 1;
}

&:disabled {
color: $context-menu-color-disabled;
color: defaults.$context-menu-color-disabled;
background: unset;
}
}
Expand All @@ -56,27 +57,27 @@
left: 0;
z-index: 1;
background: $background;
color: $context-menu-color;
box-shadow: $controls-box-shadow;
color: defaults.$context-menu-color;
box-shadow: defaults.$controls-box-shadow;

&.jse-visible {
display: block;
}

button {
@include jsoneditor-button;
@include styles.jsoneditor-button;

width: 100%;
text-align: left;
padding: $padding;
padding: defaults.$padding;
margin: 0;

&:hover {
background: $background-highlight;
}

&:disabled {
color: $context-menu-color-disabled;
color: defaults.$context-menu-color-disabled;
background: unset;
}
}
Expand Down
15 changes: 8 additions & 7 deletions src/lib/components/controls/EditableDiv.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../styles';
@import './EditableDivShared';
@use '../../styles';
@use 'EditableDivShared';
@use '../../themes/defaults';

// for key and value
div.jse-editable-div {
min-width: 2em;
padding: 0 $input-padding;
padding: 0 styles.$input-padding;
box-sizing: border-box;
outline: none;
border-radius: 1px;
Expand All @@ -25,8 +26,8 @@ div.jse-editable-div {
}

&[contenteditable='true'] {
outline: $edit-outline;
background: $background-color;
outline: defaults.$edit-outline;
background: defaults.$background-color;
position: relative;
display: inline-block;
border-radius: 0;
Expand All @@ -35,13 +36,13 @@ div.jse-editable-div {

&.jse-empty {
&:not(:focus) {
outline: 1px dotted $tag-background;
outline: 1px dotted defaults.$tag-background;
-moz-outline-radius: 2px;
}

&::after {
pointer-events: none;
color: $tag-background;
color: defaults.$tag-background;
}
}
}
Loading

0 comments on commit 54e5daf

Please sign in to comment.