Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
- `npm audit fix`
- also fix build warnings
- also fix stylelint to work with tailwind @ directives
  • Loading branch information
irahopkinson committed Oct 15, 2024
1 parent 106796b commit f0eee43
Show file tree
Hide file tree
Showing 10 changed files with 710 additions and 1,118 deletions.
6 changes: 5 additions & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.stylelintrc.js and https://github.com/paranext/paranext-extension-template/blob/main/.stylelintrc.js

module.exports = {
extends: ['stylelint-config-recommended', 'stylelint-config-sass-guidelines'],
extends: [
'stylelint-config-recommended',
'stylelint-config-sass-guidelines',
'stylelint-config-tailwindcss/scss',
],
overrides: [
{
files: ['**/*.scss'],
Expand Down
2 changes: 1 addition & 1 deletion extensions/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# paranext-core/extensions

Template for creating multiple Platform.Bible extensions in one repo
Official extensions provided by Paranext.

<!-- Opening comment tag for Template Info Section. Ignore this for now. More info in [Hide Template Info](#hide-template-info).
Expand Down
5 changes: 3 additions & 2 deletions extensions/src/platform-scripture-editor/.stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ module.exports = {
'no-descending-specificity': null,
'selector-max-compound-selectors': 4,
'selector-max-id': 1,

// #endregion

// only -webkit-mask-... rules are working, not the ones without -webkit
'property-no-vendor-prefix': [true, { ignoreProperties: [/mask-.*/] }],
},
};

// #endregion
51 changes: 40 additions & 11 deletions extensions/src/platform-scripture-editor/src/_editor-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,55 +308,81 @@ i.redo {
background-image: none;
}

%paragraph {
.icon.m,
.icon.nb,
.icon.p,
.icon.pi,
.icon.paragraph {
// could be replaced with lucid icon text
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-paragraph.svg');
background-image: none;
}

%h-one {
.icon.ms,
.icon.ms1,
.icon.r,
.icon.s,
.icon.large-heading,
.icon.h1 {
// could be replaced with lucid icon heading-1
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h1.svg');
background-image: none;
}

%h-two {
.icon.ms2,
.icon.small-heading,
.icon.h2 {
// could be replaced with lucid icon heading-2
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h2.svg');
background-image: none;
}

%h-three {
.icon.ms3,
.icon.h3 {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h3.svg');
background-image: none;
}

%square-one {
.icon.mt,
.icon.mt1,
.icon.square-1 {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/1-square.svg');
background-image: none;
}

%square-two {
.icon.mt2,
.icon.square-2 {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/2-square.svg');
background-image: none;
}

%square-three {
.icon.mt3,
.icon.square-3 {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/3-square.svg');
background-image: none;
}

%square-four {
.icon.mt4,
.icon.square-4 {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/4-square.svg');
background-image: none;
}

%bookmark {
.icon.cl,
.icon.bookmark {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/bookmark.svg');
background-image: none;
}

%file-earmark {
.icon.ide,
.icon.h,
.icon.h1,
.icon.h2,
.icon.h3,
.icon.toc1,
.icon.toc2,
.icon.toc3,
.icon.file-earmark {
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/file-earmark.svg');
background-image: none;
}
Expand All @@ -373,7 +399,10 @@ i.redo {
background-image: none;
}

%quote {
.icon.b,
.icon.q1,
.icon.q2,
.icon.quote {
// could be replaced with lucid icon message-square-quote
-webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/chat-square-quote.svg');
background-image: none;
Expand Down
68 changes: 12 additions & 56 deletions extensions/src/platform-scripture-editor/src/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
pointer-events: none;
margin-block-start: 1em;
margin-inline-start: calc(10px + 2.5vw);
width: fill-available;
width: stretch;
}

.editor-text-bold {
Expand Down Expand Up @@ -402,20 +402,12 @@ i.redo {
background-image: url('/assets/images/icons/arrow-clockwise.svg');
}

%paragraph {
background-image: url('/assets/images/icons/text-paragraph.svg');
}

.icon.m,
.icon.nb,
.icon.p,
.icon.pi,
.icon.paragraph {
@extend %paragraph;
}

%h-one {
background-image: url('/assets/images/icons/type-h1.svg');
background-image: url('/assets/images/icons/text-paragraph.svg');
}

.icon.ms,
Expand All @@ -424,77 +416,45 @@ i.redo {
.icon.s,
.icon.large-heading,
.icon.h1 {
@extend %h-one;
}

%h-two {
background-image: url('/assets/images/icons/type-h2.svg');
background-image: url('/assets/images/icons/type-h1.svg');
}

.icon.ms2,
.icon.small-heading,
.icon.h2 {
@extend %h-two;
}

%h-three {
background-image: url('/assets/images/icons/type-h3.svg');
background-image: url('/assets/images/icons/type-h2.svg');
}

.icon.ms3,
.icon.h3 {
@extend %h-three;
background-image: url('/assets/images/icons/type-h3.svg');
}


%square-one {
background-image: url('/assets/images/icons/1-square.svg');
}

.icon.mt,
.icon.mt1,
.icon.square-1 {
@extend %square-one;
}

%square-two {
background-image: url('/assets/images/icons/2-square.svg');
background-image: url('/assets/images/icons/1-square.svg');
}

.icon.mt2,
.icon.square-2 {
@extend %square-two;
}

%square-three {
background-image: url('/assets/images/icons/3-square.svg');
background-image: url('/assets/images/icons/2-square.svg');
}

.icon.mt3,
.icon.square-3 {
@extend %square-three;
}

%square-four {
background-image: url('/assets/images/icons/4-square.svg');
background-image: url('/assets/images/icons/3-square.svg');
}

.icon.mt4,
.icon.square-4 {
@extend %square-four;
}

%bookmark {
background-image: url('/assets/images/icons/bookmark.svg');
background-image: url('/assets/images/icons/4-square.svg');
}

.icon.cl,
.icon.bookmark {
@extend %bookmark;
}

%file-earmark {
background-image: url('/assets/images/icons/file-earmark.svg');
background-image: url('/assets/images/icons/bookmark.svg');
}

.icon.ide,
Expand All @@ -506,7 +466,7 @@ i.redo {
.icon.toc2,
.icon.toc3,
.icon.file-earmark {
@extend %file-earmark;
background-image: url('/assets/images/icons/file-earmark.svg');
}

.icon.bullet-list,
Expand All @@ -519,15 +479,11 @@ i.redo {
background-image: url('/assets/images/icons/list-ol.svg');
}

%quote {
background-image: url('/assets/images/icons/chat-square-quote.svg');
}

.icon.b,
.icon.q1,
.icon.q2,
.icon.quote {
@extend %quote;
background-image: url('/assets/images/icons/chat-square-quote.svg');
}

.icon.ban {
Expand Down
2 changes: 1 addition & 1 deletion lib/papi-dts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"escape-string-regexp": "^5.0.0",
"rimraf": "^6.0.1",
"typedoc": "^0.26.7",
"typedoc": "^0.26.9",
"typescript": "^5.4.5"
},
"volta": {
Expand Down
14 changes: 7 additions & 7 deletions lib/platform-bible-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@tanstack/react-table": "^8.19.2",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^1.0.0",
"lucide-react": "^0.367.0",
"lucide-react": "^0.452.0",
"next-themes": "^0.3.0",
"platform-bible-utils": "file:../platform-bible-utils",
"react-data-grid": ">=7.0.0-beta.42",
Expand All @@ -78,7 +78,7 @@
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@babel/preset-env": "^7.25.7",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@mui/icons-material": "^5.15.10",
Expand All @@ -90,7 +90,7 @@
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.13",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.3.2",
Expand All @@ -103,15 +103,15 @@
"prettier": "^3.3.3",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-tailwindcss": "^0.6.1",
"stylelint": "^16.9.0",
"stylelint": "^16.10.0",
"stylelint-config-recommended": "^14.0.1",
"stylelint-config-sass-guidelines": "^11.1.0",
"stylelint-config-sass-guidelines": "^12.1.0",
"stylelint-config-tailwindcss": "^0.0.7",
"tailwindcss": "^3.4.3",
"tailwindcss-scoped-preflight": "^2.1.0",
"ts-jest": "^29.2.5",
"tslib": "^2.7.0",
"typedoc": "^0.26.7",
"typedoc": "^0.26.9",
"typescript": "^5.4.5",
"vite": "^4.5.5",
"vite-tsconfig-paths": "^4.3.2"
Expand Down
4 changes: 2 additions & 2 deletions lib/platform-bible-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
"prettier-plugin-jsdoc": "^1.3.0",
"stringz": "^2.1.0",
"tslib": "^2.7.0",
"typedoc": "^0.26.7",
"typedoc": "^0.26.9",
"typescript": "^5.4.5",
"vite": "^5.4.8"
"vite": "^5.4.9"
},
"volta": {
"extends": "../../package.json"
Expand Down
Loading

0 comments on commit f0eee43

Please sign in to comment.