0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-23 23:03:01 +00:00

Compare commits

..

284 Commits

Author SHA1 Message Date
Trevor Buckner
917b63722c typo 2023-10-13 16:32:02 -04:00
Trevor Buckner
c1cbbe0047 Up to v3.10.0 2023-10-13 16:31:08 -04:00
Trevor Buckner
963d76add9 Merge pull request #3093 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.2
Bump @babel/preset-env from 7.22.20 to 7.23.2
2023-10-12 15:42:09 -04:00
Trevor Buckner
e055734d03 Merge pull request #3094 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.2
Bump @babel/core from 7.23.0 to 7.23.2
2023-10-12 15:41:59 -04:00
dependabot[bot]
7c16805680 Bump @babel/core from 7.23.0 to 7.23.2
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.0 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/@babel/core@7.23.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 19:35:37 +00:00
dependabot[bot]
be52e0ecd9 Bump @babel/preset-env from 7.22.20 to 7.23.2
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.20 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 19:34:55 +00:00
Trevor Buckner
175673cdf9 Merge pull request #3088 from naturalcrit/dependabot/npm_and_yarn/eslint-8.51.0
Bump eslint from 8.50.0 to 8.51.0
2023-10-12 15:34:15 -04:00
Trevor Buckner
a279c75826 Merge pull request #3091 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.6.1
Bump mongoose from 7.5.4 to 7.6.1
2023-10-12 15:34:05 -04:00
Trevor Buckner
8be95e7d04 Merge pull request #3095 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.2
Bump @babel/plugin-transform-runtime from 7.22.15 to 7.23.2
2023-10-12 15:33:51 -04:00
Trevor Buckner
8e0c1d78dc Merge pull request #3096 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.4.0
Bump @googleapis/drive from 8.3.1 to 8.4.0
2023-10-12 15:33:42 -04:00
dependabot[bot]
5da73f8ff8 Bump @googleapis/drive from 8.3.1 to 8.4.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.3.1 to 8.4.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.3.1...drive-v8.4.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 03:19:54 +00:00
dependabot[bot]
e20fc680e9 Bump @babel/plugin-transform-runtime from 7.22.15 to 7.23.2
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.15 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 03:19:36 +00:00
dependabot[bot]
e821ddac93 Bump mongoose from 7.5.4 to 7.6.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.4 to 7.6.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.4...7.6.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 03:14:54 +00:00
dependabot[bot]
fab2c2cead Bump eslint from 8.50.0 to 8.51.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.50.0 to 8.51.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.50.0...v8.51.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 03:23:43 +00:00
Trevor Buckner
bd0e142999 Merge pull request #3084 from naturalcrit/UpdateCircleCiNodeVersion
Up Node Version on CircleCi to pass tests
2023-10-06 15:02:49 -04:00
Trevor Buckner
673649abc4 typo 2023-10-06 15:00:50 -04:00
Trevor Buckner
b95a2189a5 Up Node Version on CircleCi to pass tests 2023-10-06 14:59:19 -04:00
Trevor Buckner
f45547d899 Merge pull request #3083 from naturalcrit/dependabot/npm_and_yarn/marked-smartypants-lite-1.0.1
Bump marked-smartypants-lite from 1.0.0 to 1.0.1
2023-10-06 01:16:04 -04:00
dependabot[bot]
f2c970fb79 Bump marked-smartypants-lite from 1.0.0 to 1.0.1
Bumps [marked-smartypants-lite](https://github.com/calculuschild/marked-smartypants-lite) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/calculuschild/marked-smartypants-lite/releases)
- [Changelog](https://github.com/calculuschild/marked-smartypants-lite/blob/main/release.config.cjs)
- [Commits](https://github.com/calculuschild/marked-smartypants-lite/commits/v1.0.1)

---
updated-dependencies:
- dependency-name: marked-smartypants-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 03:16:34 +00:00
Trevor Buckner
6e6a6dd1e3 Merge pull request #3067 from Gazook89/Definition-List-Highlighting
Add syntax highlighting for definition lists
2023-10-05 22:43:58 -04:00
Trevor Buckner
b2fc020d81 Merge pull request #3063 from naturalcrit/dependabot/npm_and_yarn/marked-extended-tables-1.0.7
Bump marked-extended-tables from 1.0.6 to 1.0.7
2023-10-05 15:29:57 -04:00
Trevor Buckner
3bfa3bac3a Merge pull request #3082 from naturalcrit/dependabot/npm_and_yarn/postcss-8.4.31
Bump postcss from 8.4.28 to 8.4.31
2023-10-05 15:29:48 -04:00
dependabot[bot]
00134c6c3d Bump postcss from 8.4.28 to 8.4.31
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.28 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.28...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 19:25:47 +00:00
Trevor Buckner
6a393a1437 Merge pull request #3064 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.0
Bump @babel/core from 7.22.20 to 7.23.0
2023-10-05 15:25:19 -04:00
Trevor Buckner
115be2813d Merge pull request #3076 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.4.2
Bump eslint-plugin-jest from 27.4.0 to 27.4.2
2023-10-05 15:25:11 -04:00
Trevor Buckner
e4a46c84ec Merge pull request #3080 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.4
Bump mongoose from 7.5.2 to 7.5.4
2023-10-05 15:24:57 -04:00
dependabot[bot]
b994bf269a Bump mongoose from 7.5.2 to 7.5.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.2 to 7.5.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.2...7.5.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 03:40:18 +00:00
dependabot[bot]
e7ce8d73bb Bump eslint-plugin-jest from 27.4.0 to 27.4.2
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.4.0 to 27.4.2.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.4.0...v27.4.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 03:52:27 +00:00
Gazook89
c6ef051232 Stylelint the editor.less file. 2023-09-27 22:56:20 -05:00
Gazook89
2c130d1943 add styling for definition lists in the editor. 2023-09-27 22:46:51 -05:00
Gazook89
f1e6a9a41e add syntax highlighting for definition lists 2023-09-27 22:46:51 -05:00
dependabot[bot]
34edd436e7 Bump @babel/core from 7.22.20 to 7.23.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.20 to 7.23.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-26 03:37:54 +00:00
dependabot[bot]
0b13e90dd8 Bump marked-extended-tables from 1.0.6 to 1.0.7
Bumps [marked-extended-tables](https://github.com/calculuschild/marked-extended-tables) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/calculuschild/marked-extended-tables/releases)
- [Changelog](https://github.com/calculuschild/marked-extended-tables/blob/main/release.config.cjs)
- [Commits](https://github.com/calculuschild/marked-extended-tables/commits)

---
updated-dependencies:
- dependency-name: marked-extended-tables
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-26 03:37:38 +00:00
Trevor Buckner
52dcc3b53c Merge pull request #3057 from naturalcrit/CSSLint-V3PHB
CSS Lint on V3 5ePHB theme page
2023-09-25 16:18:28 -04:00
Trevor Buckner
6803db268f Merge pull request #3062 from naturalcrit/dependabot/npm_and_yarn/eslint-8.50.0
Bump eslint from 8.49.0 to 8.50.0
2023-09-25 16:04:25 -04:00
Trevor Buckner
99c45b6cc3 Merge pull request #3061 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.1.0
Bump marked-gfm-heading-id from 3.0.8 to 3.1.0
2023-09-25 16:04:18 -04:00
dependabot[bot]
4cf8e620ee Bump eslint from 8.49.0 to 8.50.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.50.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 03:11:42 +00:00
dependabot[bot]
fb4c33545c Bump marked-gfm-heading-id from 3.0.8 to 3.1.0
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.8 to 3.1.0.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.8...v3.1.0)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 03:11:21 +00:00
Trevor Buckner
68475a6aa0 Merge pull request #3016 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.3.1
Bump @googleapis/drive from 5.1.0 to 8.3.1
2023-09-19 16:39:46 -04:00
Trevor Buckner
e5140bd5b4 Merge pull request #2990 from naturalcrit/dependabot/npm_and_yarn/superagent-8.1.2
Bump superagent from 6.1.0 to 8.1.2
2023-09-19 16:39:09 -04:00
Trevor Buckner
e3c05c83ba Merge branch 'master' into CSSLint-V3PHB 2023-09-19 15:36:46 -04:00
Trevor Buckner
b374f06718 Merge pull request #3058 from naturalcrit/Node20
Update Node to v20
2023-09-19 15:36:23 -04:00
Trevor Buckner
ea8c93d39d Move npm position 2023-09-19 14:43:14 -04:00
Trevor Buckner
6dd8ccff90 Raise Node version 2023-09-19 14:10:28 -04:00
Trevor Buckner
ca90a22c64 Run CSSLint 2023-09-19 12:40:39 -04:00
Trevor Buckner
abc4851375 Merge pull request #2796 from 5e-Cleric/DMG-theme-update
Update in the DMG theme
2023-09-18 16:28:38 -04:00
Trevor Buckner
a155c10d46 Merge branch 'master' into pr/2796 2023-09-18 16:28:20 -04:00
Trevor Buckner
5247f5c87b Update style.less 2023-09-18 16:26:38 -04:00
dependabot[bot]
e41c1ef0bd Bump @googleapis/drive from 5.1.0 to 8.3.1
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 5.1.0 to 8.3.1.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/5.1.0...drive-v8.3.1)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 19:18:17 +00:00
Trevor Buckner
4d6b428f93 Merge pull request #3054 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.20
Bump @babel/preset-env from 7.22.15 to 7.22.20
2023-09-18 15:17:22 -04:00
Trevor Buckner
6928bd9fb4 Merge pull request #3051 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.20
Bump @babel/core from 7.22.17 to 7.22.20
2023-09-18 15:17:14 -04:00
Trevor Buckner
f2855aca85 Merge pull request #3052 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.4.0
Bump eslint-plugin-jest from 27.2.3 to 27.4.0
2023-09-18 15:16:49 -04:00
Trevor Buckner
aeef595ea9 Merge pull request #3055 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.2
Bump mongoose from 7.5.1 to 7.5.2
2023-09-18 15:16:39 -04:00
dependabot[bot]
1a24709da0 Bump mongoose from 7.5.1 to 7.5.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.1 to 7.5.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.1...7.5.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:54:17 +00:00
dependabot[bot]
8c11f47c1f Bump @babel/preset-env from 7.22.15 to 7.22.20
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.15 to 7.22.20.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.20/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:54:04 +00:00
dependabot[bot]
486fbf32b2 Bump eslint-plugin-jest from 27.2.3 to 27.4.0
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.2.3 to 27.4.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.2.3...v27.4.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:53:32 +00:00
dependabot[bot]
8ac3cdcf9d Bump @babel/core from 7.22.17 to 7.22.20
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.17 to 7.22.20.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.20/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:53:17 +00:00
dependabot[bot]
f0fc0bcb6d Bump superagent from 6.1.0 to 8.1.2
Bumps [superagent](https://github.com/ladjs/superagent) from 6.1.0 to 8.1.2.
- [Release notes](https://github.com/ladjs/superagent/releases)
- [Changelog](https://github.com/ladjs/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/ladjs/superagent/compare/v6.1.0...v8.1.2)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-14 21:16:32 +00:00
Trevor Buckner
63a5e9f817 Merge pull request #3048 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.16.0
Bump react-router-dom from 6.15.0 to 6.16.0
2023-09-14 17:15:48 -04:00
Trevor Buckner
5456f4f197 Merge pull request #2791 from 5e-Cleric/FAQ-update
Update FAQ and Landpage
2023-09-14 17:15:39 -04:00
Trevor Buckner
d75ea8943b rewrite Editing and Sharing to better fit 2023-09-14 17:15:05 -04:00
Trevor Buckner
07ae1539aa Merge pull request #2797 from 5e-Cleric/quote-snippet
Quote Snippet
2023-09-14 16:46:06 -04:00
Trevor Buckner
2125b8a026 Small tweaks 2023-09-14 16:44:59 -04:00
dependabot[bot]
b3522bddf1 Bump react-router-dom from 6.15.0 to 6.16.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.15.0 to 6.16.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.16.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-14 03:53:35 +00:00
Víctor Losada Hernández
9dc19d996d reviewed fixes 2023-09-13 23:40:33 +02:00
Trevor Buckner
3e9bea3761 Merge pull request #3043 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.1
Bump mongoose from 7.5.0 to 7.5.1
2023-09-13 09:36:06 -04:00
Trevor Buckner
73e909c4c8 Merge pull request #3045 from naturalcrit/dependabot/npm_and_yarn/jest-29.7.0
Bump jest from 29.6.4 to 29.7.0
2023-09-13 09:35:59 -04:00
dependabot[bot]
53fa6af5f9 Bump jest from 29.6.4 to 29.7.0
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.4 to 29.7.0.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-13 03:33:13 +00:00
dependabot[bot]
4d2edf81a9 Bump mongoose from 7.5.0 to 7.5.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.0 to 7.5.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.0...7.5.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 03:46:23 +00:00
Trevor Buckner
b10b33830a Merge pull request #3038 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.0.8
Bump marked-gfm-heading-id from 3.0.7 to 3.0.8
2023-09-11 18:59:39 -04:00
Trevor Buckner
393ac69581 Merge pull request #3040 from naturalcrit/dependabot/npm_and_yarn/eslint-8.49.0
Bump eslint from 8.48.0 to 8.49.0
2023-09-11 18:59:31 -04:00
Trevor Buckner
1098f6da70 Merge pull request #3039 from naturalcrit/dependabot/npm_and_yarn/npm-10.1.0
Bump npm from 10.0.0 to 10.1.0
2023-09-11 18:59:26 -04:00
Trevor Buckner
a29fed3c89 Merge pull request #3041 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.17
Bump @babel/core from 7.22.15 to 7.22.17
2023-09-11 18:59:19 -04:00
dependabot[bot]
7af3a629f9 Bump @babel/core from 7.22.15 to 7.22.17
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.15 to 7.22.17.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.17/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:32:05 +00:00
dependabot[bot]
b0a9765819 Bump eslint from 8.48.0 to 8.49.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.49.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.49.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:31:50 +00:00
dependabot[bot]
86d18ea0d9 Bump npm from 10.0.0 to 10.1.0
Bumps [npm](https://github.com/npm/cli) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/libnpmhook-v10.0.0...v10.1.0)

---
updated-dependencies:
- dependency-name: npm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:31:19 +00:00
dependabot[bot]
bfe278c81c Bump marked-gfm-heading-id from 3.0.7 to 3.0.8
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.7...v3.0.8)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:30:59 +00:00
Víctor Losada Hernández
9e5103a0c7 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into FAQ-update 2023-09-07 23:14:53 +02:00
Trevor Buckner
7281b6e43c Merge pull request #2768 from G-Ambatte/addEditorThemes-#362
Add editor themes
2023-09-07 10:39:33 -04:00
G.Ambatte
3f6eb7371f Increase ESLint lines for SnippetBar.jsx 2023-09-07 18:28:08 +12:00
G.Ambatte
2b0bbfc2db Merge branch 'master' into addEditorThemes-#362 2023-09-07 18:22:17 +12:00
G.Ambatte
e909bc8f35 Load editorThemes in SnippetBar.jsx 2023-09-07 17:33:36 +12:00
G.Ambatte
e16110da6a Add custom styling for light background themes 2023-09-07 17:05:52 +12:00
G.Ambatte
fcd15e6d9c Merge branch 'addEditorThemes-#362' of https://github.com/G-Ambatte/homebrewery into addEditorThemes-#362 2023-09-07 16:55:49 +12:00
G.Ambatte
3f828c8649 Make Default first option in built themes JSON 2023-09-07 16:55:39 +12:00
Trevor Buckner
bb66cffa13 Merge pull request #3021 from naturalcrit/dependabot/npm_and_yarn/npm-10.0.0
Bump npm from 9.8.1 to 10.0.0
2023-09-06 14:44:26 -04:00
Trevor Buckner
da5a5631ad Merge pull request #2889 from G-Ambatte/trimBrewTitlesOnUserPage-#2775
Remove whitespace from brew titles on UserPage
2023-09-06 11:37:59 -04:00
Sean Robertson
3e43b058a5 Move userpage brew data clean up to app.js 2023-09-06 11:52:28 +12:00
G.Ambatte
a30c2fa1f7 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-09-06 10:58:10 +12:00
G.Ambatte
cb203c29c9 Merge branch 'master' into addEditorThemes-#362 2023-09-06 08:24:22 +12:00
Trevor Buckner
e50d7b8882 Merge pull request #3013 from G-Ambatte/changeColumnFlow-#2982
Change column flow to auto
2023-09-05 16:15:14 -04:00
G.Ambatte
74d6aa7c8a Merge branch 'master' into addEditorThemes-#362 2023-09-06 07:44:24 +12:00
G.Ambatte
e86686807b Merge branch 'master' into changeColumnFlow-#2982 2023-09-06 07:43:50 +12:00
Trevor Buckner
f4356025de Merge pull request #3024 from G-Ambatte/fixVersionError-#2641
Shift manual save to use debounced save function
2023-09-05 14:52:42 -04:00
dependabot[bot]
73b141d08c Bump npm from 9.8.1 to 10.0.0
Bumps [npm](https://github.com/npm/cli) from 9.8.1 to 10.0.0.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v9.8.1...libnpmhook-v10.0.0)

---
updated-dependencies:
- dependency-name: npm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 18:34:36 +00:00
Trevor Buckner
9196ffc480 Merge pull request #3011 from naturalcrit/dependabot/npm_and_yarn/jest-29.6.4
Bump jest from 29.6.2 to 29.6.4
2023-09-05 14:33:12 -04:00
Trevor Buckner
4e18bb047e Merge pull request #3029 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.22.15
Bump @babel/plugin-transform-runtime from 7.22.10 to 7.22.15
2023-09-05 14:33:04 -04:00
Trevor Buckner
e4b4e34216 Merge pull request #3027 from naturalcrit/dependabot/npm_and_yarn/babel/preset-react-7.22.15
Bump @babel/preset-react from 7.22.5 to 7.22.15
2023-09-05 14:30:24 -04:00
Trevor Buckner
d38c1b9ab2 Merge pull request #3014 from naturalcrit/dependabot/npm_and_yarn/eslint-8.48.0
Bump eslint from 8.47.0 to 8.48.0
2023-09-05 14:30:16 -04:00
dependabot[bot]
deaaafd9d2 Bump @babel/plugin-transform-runtime from 7.22.10 to 7.22.15
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.10 to 7.22.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.15/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 18:27:40 +00:00
dependabot[bot]
9b33bf9855 Bump @babel/preset-react from 7.22.5 to 7.22.15
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.22.5 to 7.22.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.15/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 18:27:25 +00:00
Trevor Buckner
e5346d3a6e Merge pull request #3018 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.0
Bump mongoose from 7.4.3 to 7.5.0
2023-09-05 14:27:03 -04:00
Trevor Buckner
d9ca20e17d Merge pull request #3026 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.0.7
Bump marked-gfm-heading-id from 3.0.6 to 3.0.7
2023-09-05 14:26:28 -04:00
Trevor Buckner
a5cb3f085f Merge pull request #3028 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.15
Bump @babel/core from 7.22.10 to 7.22.15
2023-09-05 14:26:14 -04:00
Trevor Buckner
6d28948387 Merge pull request #3030 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.15
Bump @babel/preset-env from 7.22.10 to 7.22.15
2023-09-05 14:26:07 -04:00
dependabot[bot]
65c75b3282 Bump @babel/preset-env from 7.22.10 to 7.22.15
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.10 to 7.22.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.15/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 03:35:27 +00:00
dependabot[bot]
a0f22e31b7 Bump @babel/core from 7.22.10 to 7.22.15
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.10 to 7.22.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.15/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 03:34:18 +00:00
dependabot[bot]
c750eebc11 Bump marked-gfm-heading-id from 3.0.6 to 3.0.7
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.6...v3.0.7)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 03:21:55 +00:00
G.Ambatte
93a93f1907 Shift manual save to use debounced save function 2023-09-04 13:29:37 +12:00
dependabot[bot]
29428b81f6 Bump mongoose from 7.4.3 to 7.5.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.3 to 7.5.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.3...7.5.0)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 03:22:53 +00:00
dependabot[bot]
a542953cec Bump eslint from 8.47.0 to 8.48.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 03:11:48 +00:00
G.Ambatte
183ca51753 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-28 07:50:44 +12:00
G.Ambatte
220816a172 Merge branch 'master' into addEditorThemes-#362 2023-08-28 07:50:33 +12:00
G.Ambatte
840b075c8e Merge branch 'master' into changeColumnFlow-#2982 2023-08-28 07:48:00 +12:00
Trevor Buckner
3ba15a068a Merge pull request #3009 from G-Ambatte/fixFreeBSDInstallScript-#3005
Fix FreeBSD Install Script
2023-08-25 00:30:57 -04:00
G.Ambatte
b99de1c6e1 Change column-fill to auto 2023-08-25 16:16:11 +12:00
dependabot[bot]
73a48501e0 Bump jest from 29.6.2 to 29.6.4
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.2 to 29.6.4.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-25 03:45:43 +00:00
G.Ambatte
599d39b69d Correct service file location in repository 2023-08-25 11:56:48 +12:00
G.Ambatte
ed18ba3108 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-24 14:12:15 +12:00
G.Ambatte
6d93291d5b Merge branch 'master' into addEditorThemes-#362 2023-08-24 14:09:59 +12:00
Trevor Buckner
3fef61cbf8 Merge pull request #2991 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.33.2
Bump eslint-plugin-react from 7.33.1 to 7.33.2
2023-08-21 12:10:05 -04:00
Trevor Buckner
c5d9c3bdc0 Merge pull request #3002 from naturalcrit/dependabot/npm_and_yarn/stylelint-15.10.3
Bump stylelint from 15.10.2 to 15.10.3
2023-08-21 12:09:48 -04:00
Trevor Buckner
6c7af2d968 Merge pull request #3003 from G-Ambatte/bugfix-#2998
Move save location logic out of ShareID check
2023-08-21 12:09:19 -04:00
Trevor Buckner
6130d69906 Rearranged to avoid obscuring the state
`output` variable added an unneeded layer to dig through to understand what is being saved to `setState()`
2023-08-21 12:08:54 -04:00
G.Ambatte
8c975747c4 Move save location logic out of ShareID check 2023-08-21 19:33:51 +12:00
Trevor Buckner
ef6dab24a2 Merge pull request #2997 from G-Ambatte/bugfix-#2996
Move e.preventDefault to after isDragging check
2023-08-20 23:44:25 -04:00
Trevor Buckner
1f09fff94b Merge pull request #3000 from G-Ambatte/bugfix-#2999
Fix crash to white screen on New page
2023-08-20 23:42:24 -04:00
dependabot[bot]
7bcd898c81 Bump stylelint from 15.10.2 to 15.10.3
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.10.2 to 15.10.3.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.2...15.10.3)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 03:00:59 +00:00
G.Ambatte
186809008c Correct check for case of user not being logged in 2023-08-21 14:56:44 +12:00
G.Ambatte
b6e11ba607 Move e.preventDefault to after isDragging check 2023-08-19 15:01:16 +12:00
Trevor Buckner
355b8ac78f Merge pull request #2994 from G-Ambatte/bugfix-#2993
Fix save location logic
2023-08-18 07:20:01 -04:00
G.Ambatte
a2c20a0f7a Fix save location logic 2023-08-18 20:35:26 +12:00
Trevor Buckner
117e399c1d Merge pull request #2979 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.15.0
Bump react-router-dom from 6.14.2 to 6.15.0
2023-08-17 16:45:15 -04:00
Trevor Buckner
a3ac524308 Merge pull request #2978 from G-Ambatte/update-v3.9.2
Update v3.9.2
2023-08-17 16:12:07 -04:00
Trevor Buckner
1e9ba31644 Add date 2023-08-17 16:11:40 -04:00
dependabot[bot]
751728d134 Bump eslint-plugin-react from 7.33.1 to 7.33.2
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.1 to 7.33.2.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.1...v7.33.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-17 03:26:38 +00:00
Trevor Buckner
8e05cdbb43 Merge pull request #2985 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.4.3
Bump mongoose from 7.4.2 to 7.4.3
2023-08-15 10:48:53 -04:00
Trevor Buckner
a5483c549b Merge pull request #2986 from naturalcrit/dependabot/npm_and_yarn/eslint-8.47.0
Bump eslint from 8.46.0 to 8.47.0
2023-08-15 10:48:46 -04:00
dependabot[bot]
746f3d35f8 Bump eslint from 8.46.0 to 8.47.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.47.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:47:18 +00:00
dependabot[bot]
94c902bf38 Bump mongoose from 7.4.2 to 7.4.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.2 to 7.4.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.2...7.4.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:47:06 +00:00
Trevor Buckner
0da1c43dc3 Merge pull request #2983 from G-Ambatte/fixColumnFlow
Fix Markdown render parameter
2023-08-12 01:19:16 -04:00
G.Ambatte
32417e92ff Fix Markdown render parameter 2023-08-12 14:27:34 +12:00
dependabot[bot]
540dee89dd Bump react-router-dom from 6.14.2 to 6.15.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.14.2 to 6.15.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.15.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-11 03:32:08 +00:00
G.Ambatte
1854080771 Merge branch 'master' into update-v3.9.2 2023-08-11 12:52:38 +12:00
Sean Robertson
45207b8114 Up version to 3.9.2 2023-08-11 12:42:20 +12:00
Sean Robertson
2b3c2c9fac Update change log with merged PR info 2023-08-11 12:42:04 +12:00
Trevor Buckner
0b953fcbf3 Merge pull request #2944 from G-Ambatte/experimentalSaveLocation
Add save location setting to local storage
2023-08-10 20:30:13 -04:00
G.Ambatte
0a3453d228 Merge branch 'master' into addEditorThemes-#362 2023-08-11 12:09:02 +12:00
G.Ambatte
6b49e720ca Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-11 12:08:40 +12:00
Sean Robertson
7feaa51de0 Rename renderButton visibility control parameter 2023-08-11 11:56:45 +12:00
G.Ambatte
1729b13574 Merge branch 'master' into experimentalSaveLocation 2023-08-11 11:53:26 +12:00
G.Ambatte
73832fabcc Update client/homebrew/pages/accountPage/accountPage.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2023-08-11 11:15:27 +12:00
Trevor Buckner
bac537244c Merge pull request #2969 from G-Ambatte/addGoogleFileLink
Add Google file link to UserPage BrewItem
2023-08-10 17:19:18 -04:00
G.Ambatte
54f8bb4b08 Merge branch 'master' into addGoogleFileLink 2023-08-10 16:47:07 +12:00
G.Ambatte
38f6929c1d Reverse StorageIcons logic 2023-08-10 16:46:45 +12:00
Trevor Buckner
64ce9ecfa6 Merge pull request #2973 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.10
Bump @babel/preset-env from 7.22.9 to 7.22.10
2023-08-09 13:57:56 -04:00
Trevor Buckner
858990c4bd Merge pull request #2971 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.10
Bump @babel/core from 7.22.9 to 7.22.10
2023-08-09 13:57:48 -04:00
dependabot[bot]
785011cba4 Bump @babel/core from 7.22.9 to 7.22.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 15:27:35 +00:00
dependabot[bot]
50d3b503d9 Bump @babel/preset-env from 7.22.9 to 7.22.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.9 to 7.22.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 15:27:22 +00:00
Trevor Buckner
2f8e2545c6 Merge pull request #2968 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.0.6
Bump marked-gfm-heading-id from 3.0.4 to 3.0.6
2023-08-09 11:26:16 -04:00
Trevor Buckner
d8574e7045 Merge pull request #2972 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.22.10
Bump @babel/plugin-transform-runtime from 7.22.9 to 7.22.10
2023-08-09 11:25:59 -04:00
Víctor Losada Hernández
b3497e14f1 remove italics 2023-08-08 19:15:19 +02:00
Víctor Losada Hernández
d6e0047d4e Merge branch 'master' of https://github.com/naturalcrit/homebrewery into quote-snippet 2023-08-08 19:12:34 +02:00
Víctor Losada Hernández
8ebd5ccff9 syntax change 2023-08-08 19:11:54 +02:00
dependabot[bot]
4a927daff3 Bump @babel/plugin-transform-runtime from 7.22.9 to 7.22.10
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.9 to 7.22.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.10/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 03:02:35 +00:00
G.Ambatte
d28e85209e Add HB icon for Mongo brews 2023-08-07 22:03:49 +12:00
G.Ambatte
cca882869d Add file link to Google icon on User Page 2023-08-07 22:03:17 +12:00
dependabot[bot]
9ae55c87a9 Bump marked-gfm-heading-id from 3.0.4 to 3.0.6
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.4 to 3.0.6.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.4...v3.0.6)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 03:02:48 +00:00
G.Ambatte
99ad96a584 Merge branch 'master' into addEditorThemes-#362 2023-08-05 14:22:31 +12:00
G.Ambatte
f8b42031fb Merge branch 'master' into experimentalSaveLocation 2023-08-05 14:22:05 +12:00
G.Ambatte
850b52d924 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-05 14:22:01 +12:00
Trevor Buckner
b2e7b28b65 Merge pull request #2945 from 5e-Cleric/TOC-generate-fix
exclude covers from TOC generation
2023-08-04 19:16:58 -04:00
Trevor Buckner
3efa7dd0be Merge pull request #2961 from Gazook89/Mobile-tweaks
Simple adjustments for mobile viewing
2023-08-04 16:42:08 -04:00
Trevor Buckner
677e27bb66 Merge pull request #2966 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.4.2
Bump mongoose from 7.4.1 to 7.4.2
2023-08-04 01:51:12 -04:00
Trevor Buckner
da71bd7a10 Merge pull request #2965 from G-Ambatte/reworkClassTables-#2964
Update class table generators
2023-08-04 01:41:02 -04:00
Trevor Buckner
0869f6b29b Just... put the whole table in. 2023-08-04 01:19:33 -04:00
Trevor Buckner
0da5de494e simplify third caster gen 2023-08-04 00:23:23 -04:00
Trevor Buckner
bc9dc8dee9 Clean up half caster gen. 2023-08-04 00:04:17 -04:00
Trevor Buckner
e3e250255e Simplify full caster gen 2023-08-03 23:39:17 -04:00
dependabot[bot]
787a23bdf8 Bump mongoose from 7.4.1 to 7.4.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.1 to 7.4.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.1...7.4.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 03:36:35 +00:00
Trevor Buckner
7aca0f2f10 Use dedent-tabs 2023-08-03 19:23:40 -04:00
Trevor Buckner
999f9c8f25 Rename passed in "classes" to "snippetClasses" for clarity 2023-08-03 17:22:30 -04:00
Trevor Buckner
ee4b2d549b Make CSS class order consistent on snippets 2023-08-03 17:20:38 -04:00
Trevor Buckner
3eb7ce2775 Clean up indentation 2023-08-03 17:16:26 -04:00
Trevor Buckner
4d4371f48c Compact features array 2023-08-03 17:15:14 -04:00
G.Ambatte
47666cc26d Merge branch 'master' into addEditorThemes-#362 2023-08-03 18:29:19 +12:00
G.Ambatte
e8352d996e Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-03 18:29:13 +12:00
G.Ambatte
e6f792900c Merge branch 'master' into experimentalSaveLocation 2023-08-03 18:28:39 +12:00
G.Ambatte
0ddeafd260 Merge branch 'master' into reworkClassTables-#2964 2023-08-02 21:40:22 +12:00
G.Ambatte
4cf54d6ae8 Update class table generators 2023-08-02 21:23:11 +12:00
Gazook89
8d3329069a remove logs 2023-08-01 14:16:31 -05:00
Gazook89
2e13eed2ef revert moving pointerMove & pointerUp, now on splitPane 2023-08-01 13:53:38 -05:00
Gazook89
310faa449d set editor font size to 16px on touchscreens
iOS requires minimum 16px font to prevent auto-zooming into input fields.
2023-08-01 13:29:57 -05:00
Trevor Buckner
8527a976a6 Merge pull request #2936 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.9
Bump @babel/core from 7.22.8 to 7.22.9
2023-08-01 11:27:53 -04:00
dependabot[bot]
54460c52f6 Bump @babel/core from 7.22.8 to 7.22.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.8 to 7.22.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.9/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 15:26:55 +00:00
Trevor Buckner
e81bd2a0d2 Merge pull request #2960 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.33.1
Bump eslint-plugin-react from 7.33.0 to 7.33.1
2023-08-01 11:25:54 -04:00
Trevor Buckner
6c0daa1e4d Merge pull request #2935 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.22.9
Bump @babel/plugin-transform-runtime from 7.22.7 to 7.22.9
2023-08-01 11:25:47 -04:00
dependabot[bot]
25d03faae2 Bump eslint-plugin-react from 7.33.0 to 7.33.1
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.0 to 7.33.1.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.0...v7.33.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 15:22:58 +00:00
Trevor Buckner
378b2204da Merge pull request #2959 from naturalcrit/dependabot/npm_and_yarn/eslint-8.46.0
Bump eslint from 8.45.0 to 8.46.0
2023-08-01 11:21:38 -04:00
Trevor Buckner
447b0939f2 Merge pull request #2957 from naturalcrit/dependabot/npm_and_yarn/jest-29.6.2
Bump jest from 29.6.1 to 29.6.2
2023-08-01 11:21:26 -04:00
Gazook89
0bde336226 move all pointer events to divider, not splitPane 2023-07-31 22:20:27 -05:00
Gazook89
73e44b8d7a add touch-action css property to splitPane 2023-07-31 15:06:09 -05:00
dependabot[bot]
53fbaf87c2 Bump eslint from 8.45.0 to 8.46.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.45.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.45.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 03:14:21 +00:00
Gazook89
a8db7353b0 preventDefaults on pointerEvents to prevent some default behavior. 2023-07-30 20:49:16 -05:00
Gazook89
bda8037cd6 change onMouse events to onPointer events for mobile use. 2023-07-30 20:12:16 -05:00
Gazook89
1f173814ec Add viewport meta tag for mobile view. 2023-07-30 19:40:39 -05:00
Gazook89
deb0e2f85b add meta viewport tag in header 2023-07-30 15:00:42 -05:00
dependabot[bot]
5425ae5d15 Bump jest from 29.6.1 to 29.6.2
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.6.1 to 29.6.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.6.2/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-28 03:15:48 +00:00
G.Ambatte
f03f2c36de Merge branch 'master' into addEditorThemes-#362 2023-07-27 13:59:05 +12:00
G.Ambatte
a1e663bc32 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-27 13:58:01 +12:00
Trevor Buckner
16c842e08f Merge pull request #2939 from naturalcrit/dependabot/npm_and_yarn/eslint-8.45.0
Bump eslint from 8.44.0 to 8.45.0
2023-07-25 19:05:00 -04:00
Trevor Buckner
1c0edce6f6 Merge pull request #2941 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.14.2
Bump react-router-dom from 6.14.1 to 6.14.2
2023-07-25 19:04:47 -04:00
Trevor Buckner
8ec6e66c92 Merge pull request #2947 from naturalcrit/dependabot/npm_and_yarn/npm-9.8.1
Bump npm from 9.8.0 to 9.8.1
2023-07-25 19:04:37 -04:00
Trevor Buckner
330cdb35f4 Merge pull request #2948 from naturalcrit/dependabot/npm_and_yarn/stylelint-15.10.2
Bump stylelint from 15.10.1 to 15.10.2
2023-07-25 19:04:29 -04:00
Trevor Buckner
f93fbab754 Merge pull request #2950 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.33.0
Bump eslint-plugin-react from 7.32.2 to 7.33.0
2023-07-25 19:04:21 -04:00
Trevor Buckner
b9498e49fc Merge pull request #2952 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.4.1
Bump mongoose from 7.3.4 to 7.4.1
2023-07-25 19:04:09 -04:00
dependabot[bot]
4a434bb161 Bump mongoose from 7.3.4 to 7.4.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.3.4 to 7.4.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.3.4...7.4.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 03:49:00 +00:00
dependabot[bot]
a339cb036f Bump eslint-plugin-react from 7.32.2 to 7.33.0
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.32.2 to 7.33.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.33.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-21 03:14:09 +00:00
dependabot[bot]
91eef51fb5 Bump stylelint from 15.10.1 to 15.10.2
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.10.1 to 15.10.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.1...15.10.2)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 03:52:49 +00:00
dependabot[bot]
46b050ae7d Bump npm from 9.8.0 to 9.8.1
Bumps [npm](https://github.com/npm/cli) from 9.8.0 to 9.8.1.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v9.8.0...v9.8.1)

---
updated-dependencies:
- dependency-name: npm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 03:52:26 +00:00
Víctor Losada Hernández
b433691596 exclude covers from TOC generation 2023-07-19 21:38:14 +02:00
G.Ambatte
cef7f98176 Use existing makeActive function 2023-07-19 20:43:49 +12:00
G.Ambatte
b869d086ea Add default to New Page 2023-07-19 20:39:33 +12:00
G.Ambatte
64a361e06c Determine default state and set in local storage 2023-07-19 20:36:55 +12:00
G.Ambatte
9e7e646296 Add username to save key 2023-07-19 20:34:10 +12:00
G.Ambatte
7274d788c5 Clean up comments, change to actual G-Drive check 2023-07-19 19:39:07 +12:00
G.Ambatte
7942f1caed Initial functionality pass 2023-07-19 19:36:14 +12:00
G.Ambatte
343e176b83 Merge branch 'master' into addEditorThemes-#362 2023-07-19 17:19:44 +12:00
G.Ambatte
3db5959cfa Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-19 17:19:35 +12:00
dependabot[bot]
62f9781c8e Bump react-router-dom from 6.14.1 to 6.14.2
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.14.1 to 6.14.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@6.14.2/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.14.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 03:05:33 +00:00
dependabot[bot]
9d53002874 Bump eslint from 8.44.0 to 8.45.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 03:48:12 +00:00
dependabot[bot]
4e7e6f8105 Bump @babel/plugin-transform-runtime from 7.22.7 to 7.22.9
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.7 to 7.22.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.9/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 03:25:35 +00:00
Trevor Buckner
cea1157eb2 Merge pull request #2934 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.3.4
Bump mongoose from 7.3.2 to 7.3.4
2023-07-16 23:24:37 -04:00
Trevor Buckner
d535328eb8 Merge pull request #2938 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.2.3
Bump eslint-plugin-jest from 27.2.2 to 27.2.3
2023-07-16 23:24:24 -04:00
Trevor Buckner
627e9ec7d8 Merge pull request #2937 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.9
Bump @babel/preset-env from 7.22.7 to 7.22.9
2023-07-16 23:24:17 -04:00
dependabot[bot]
ab9b5b7487 Bump eslint-plugin-jest from 27.2.2 to 27.2.3
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.2.2 to 27.2.3.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.2.2...v27.2.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 03:12:13 +00:00
dependabot[bot]
957a8bf05c Bump @babel/preset-env from 7.22.7 to 7.22.9
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.7 to 7.22.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.9/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 03:43:52 +00:00
dependabot[bot]
509390ae03 Bump mongoose from 7.3.2 to 7.3.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.3.2 to 7.3.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.3.2...7.3.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 03:43:01 +00:00
G.Ambatte
d3a70c3d75 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-13 12:20:15 +12:00
G.Ambatte
1806854969 Add onMouseDown handler for Firefox functionality 2023-07-12 20:16:36 +12:00
G.Ambatte
c2570fec6b Merge branch 'master' into addEditorThemes-#362 2023-07-12 19:04:14 +12:00
G.Ambatte
cf3635bccc Merge branch 'master' into addEditorThemes-#362 2023-07-11 07:38:13 +12:00
G.Ambatte
7aa374e529 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-08 19:07:55 +12:00
G.Ambatte
9cb8b46930 Merge branch 'master' into addEditorThemes-#362 2023-07-05 14:24:36 +12:00
G.Ambatte
467b6ff8de Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-05 14:24:27 +12:00
G.Ambatte
a41553637a Add trim to brew description 2023-06-29 16:43:30 +12:00
G.Ambatte
636f2f9372 Add title trim before new saves and updates 2023-06-29 16:35:26 +12:00
G.Ambatte
4ded080a58 Trim titles before alphabetical ListPage sorting 2023-06-29 16:30:06 +12:00
G.Ambatte
a5885c8f4f Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-06-29 13:26:48 +12:00
G.Ambatte
4cb2a9ef76 Merge branch 'master' into addEditorThemes-#362 2023-06-29 13:24:56 +12:00
G.Ambatte
661872f332 Merge branch 'master' into addEditorThemes-#362 2023-06-23 09:44:18 +12:00
Víctor Losada Hernández
dbb4476eb4 newline necessary 2023-06-22 23:32:26 +02:00
Víctor Losada Hernández
65f55dfc12 duplicated .page 2023-06-22 23:29:01 +02:00
Víctor Losada Hernández
95322595bf Merge branch 'master' of https://github.com/naturalcrit/homebrewery into FAQ-update 2023-06-22 23:18:44 +02:00
G.Ambatte
8c0ca988ae Trim brew.title on UserPage 2023-06-17 19:50:05 +12:00
G.Ambatte
e1a22ed76c Merge branch 'master' into addEditorThemes-#362 2023-06-14 08:39:18 +12:00
G.Ambatte
7e660aad45 Add styling for columnSplite and pageLine 2023-06-12 20:49:15 +12:00
G.Ambatte
c8df449aac Style custom blocks in editor on dark themes 2023-06-12 19:52:13 +12:00
G.Ambatte
7681be2e9c Merge branch 'master' into addEditorThemes-#362 2023-06-10 14:25:23 +12:00
G.Ambatte
455b364160 Merge branch 'master' into addEditorThemes-#362 2023-05-10 08:40:51 +12:00
G.Ambatte
56dbfc032c Merge branch 'master' into addEditorThemes-#362 2023-05-09 10:19:35 +12:00
Victor Losada Hernandez
86823b43b1 generated quotes, correct small caps 2023-04-23 15:53:35 +02:00
Victor Losada Hernandez
0abfb23ef2 first line difference phb vs dmg 2023-04-23 15:28:43 +02:00
Victor Losada Hernandez
da5d4236b6 initial styling 2023-04-23 15:21:48 +02:00
Victor Losada Hernandez
963236f961 tables within notes & drop caps 2023-04-23 15:11:29 +02:00
Victor Losada Hernandez
2d4a3ec910 landing page update 2023-04-22 15:30:22 +02:00
Victor Losada Hernandez
40afdf18d6 editor width bug q removed 2023-04-15 22:01:00 +02:00
Victor Losada Hernandez
13944d3a76 Log out question removed 2023-04-15 21:41:44 +02:00
G.Ambatte
3c168065ee Merge branch 'master' into addEditorThemes-#362 2023-04-16 07:13:39 +12:00
G.Ambatte
cf42520305 Merge branch 'master' into addEditorThemes-#362 2023-04-12 14:05:19 +12:00
G.Ambatte
d5ac237d40 Merge branch 'master' into addEditorThemes-#362 2023-04-05 12:24:56 +12:00
G.Ambatte
c666d6acb9 Merge branch 'master' into addEditorThemes-#362 2023-04-05 07:45:03 +12:00
G.Ambatte
2869726efd Merge branch 'master' into addEditorThemes-#362 2023-04-04 13:00:04 +12:00
G.Ambatte
ae9a29c28c Merge branch 'master' into addEditorThemes-#362 2023-04-02 17:59:36 +12:00
G.Ambatte
c660f87dff Load from & save to local storage 2023-04-02 17:57:11 +12:00
G.Ambatte
a86c728710 Remove obsolete styling 2023-04-02 16:53:41 +12:00
G.Ambatte
b28e183f95 Remove obsolete dev function 2023-04-02 16:53:30 +12:00
G.Ambatte
dc55880544 Initial theme selector functionality 2023-04-02 16:42:45 +12:00
G.Ambatte
5e9b451e29 Pass current editor theme to SnippetBar as prop 2023-04-02 16:17:50 +12:00
G.Ambatte
977cbeed43 Load available CM themes to global config 2023-04-02 15:17:44 +12:00
G.Ambatte
da6fcb297a Compile list of available themes during build 2023-04-02 15:17:30 +12:00
G.Ambatte
b2546d908a Shift CSS link to CodeEditor render 2023-04-02 13:19:43 +12:00
G.Ambatte
7dd1368c09 Add editorTheme to editor.jsx and downstream 2023-04-02 12:53:26 +12:00
G.Ambatte
51f657d2c5 Add CM Themes to build folder 2023-04-02 12:22:06 +12:00
55 changed files with 2837 additions and 6186 deletions

View File

@@ -5,12 +5,12 @@
version: 2.1
orbs:
node: circleci/node@3.0.0
node: circleci/node@5.1.0
jobs:
build:
docker:
- image: cimg/node:16.11.0
- image: cimg/node:20.8.0
- image: mongo:4.4
working_directory: ~/homebrewery
@@ -27,7 +27,7 @@ jobs:
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: sudo npm install -g npm@8.10.0
- run: sudo npm install -g npm@10.2.0
- node/install-packages:
app-dir: ~/homebrewery
cache-path: node_modules
@@ -45,7 +45,7 @@ jobs:
test:
docker:
- image: cimg/node:16.11.0
- image: cimg/node:20.8.0
working_directory: ~/homebrewery
parallelism: 1

View File

@@ -80,6 +80,104 @@ pre {
## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Friday 13/10/2023 - v3.10.0
{{taskList
##### G-Ambatte
* [x] Fix user preferred save location being ignored
Fixes issue [#2993](https://github.com/naturalcrit/homebrewery/issues/2993)
* [x] Fix crash to white screen when starting new brews while not signed in
Fixes issue [#2999](https://github.com/naturalcrit/homebrewery/issues/2999)
* [x] Fix FreeBSD install script
Fixes issue [#3005](https://github.com/naturalcrit/homebrewery/issues/3005)
* [x] Fix *"This brew has been changed on another device"* triggering when manually saving during auto-save
Fixes issue [#2641](https://github.com/naturalcrit/homebrewery/issues/2641)
* [x] Fix Firefox different column-flow behavior
Fixes issue [#2982](https://github.com/naturalcrit/homebrewery/issues/2982)
* [x] Fix brew titles being mis-sorted on user page
Fixes issue [#2775](https://github.com/naturalcrit/homebrewery/issues/2775)
* [x] Text Editor themes now available via new drop-down
Fixes issue [#362](https://github.com/naturalcrit/homebrewery/issues/362)
##### 5e-Cleric
* [x] New {{openSans **PHB → {{fas,fa-quote-right}} QUOTE** }} snippet for V3!
Fixes issue [#2920](https://github.com/naturalcrit/homebrewery/issues/2920)
* [x] Several updates and fixes to FAQ and Welcome page
Fixes issue [#2729](https://github.com/naturalcrit/homebrewery/issues/2729),
[#2787](https://github.com/naturalcrit/homebrewery/issues/2787)
##### Gazook89
* [x] Add syntax highlighting for Definition Lists <code>:\:</code>
}}
### Thursday 17/08/2023 - v3.9.2
{{taskList
##### Calculuschild
* [x] Fix links to certain old Google Drive files
Fixes issue [#2917](https://github.com/naturalcrit/homebrewery/issues/2917)
##### G-Ambatte
* [x] Menus now open on click, and internally consistent
Fixes issue [#2702](https://github.com/naturalcrit/homebrewery/issues/2702), [#2782](https://github.com/naturalcrit/homebrewery/issues/2782)
* [x] Add smarter footer snippet
Fixes issue [#2289](https://github.com/naturalcrit/homebrewery/issues/2289)
* [x] Add sanitization in Style editor
Fixes issue [#1437](https://github.com/naturalcrit/homebrewery/issues/1437)
* [x] Rework class table snippets to remove unnecessary randomness
Fixes issue [#2964](https://github.com/naturalcrit/homebrewery/issues/2964)
* [x] Add User Page link to Google Drive file for file owners, add icons for additional storage locations
Fixes issue [#2954](https://github.com/naturalcrit/homebrewery/issues/2954)
* [x] Add default save location selection to Account Page
Fixes issue [#2943](https://github.com/naturalcrit/homebrewery/issues/2943)
##### 5e-Cleric
* [x] Exclude cover pages from Table of Content generation (editing on mobile is still not recommended)
Fixes issue [#2920](https://github.com/naturalcrit/homebrewery/issues/2920)
##### Gazook89
* [x] Adjustments to improve mobile viewing
}}
### Wednesday 28/06/2023 - v3.9.1
{{taskList
@@ -124,6 +222,8 @@ Fixes issue [#2790](https://github.com/naturalcrit/homebrewery/issues/2790)
Fixes issue [#2784](https://github.com/naturalcrit/homebrewery/issues/2784)
}}
\page
### Wednesday 12/04/2023 - v3.8.0
{{taskList
@@ -185,8 +285,6 @@ Fixes issues [#2731](https://github.com/naturalcrit/homebrewery/issues/2731)
}}
\page
### Monday 13/03/2023 - v3.7.2
{{taskList
@@ -267,7 +365,11 @@ Fixes issues [#2603](https://github.com/naturalcrit/homebrewery/issues/2603)
* [x] Add message to refresh the browser if the user is missing an update to the Homebrewery
Fixes issues [#2583](https://github.com/naturalcrit/homebrewery/issues/2583)
}}
\page
{{taskList
##### G-Ambatte
* [x] Auto-compile Themes CSS on development server
@@ -277,7 +379,6 @@ Fixes issues [#2583](https://github.com/naturalcrit/homebrewery/issues/2583)
* [x] Fix cloned brews inheriting the parent view count
}}
\page
### Friday 23/12/2022 - v3.5.0
{{taskList
@@ -1361,4 +1462,4 @@ Massive changelog incoming:
* Added `phb.standalone.css` plus a build system for creating it
* Added page numbers and footer text
* Page accent now flips each page
* Page accent now flips each page

View File

@@ -147,11 +147,11 @@ const BrewRenderer = createClass({
},
renderPage : function(pageText, index){
const cleanPageText = this.sanitizeScriptTags(pageText);
let cleanPageText = this.sanitizeScriptTags(pageText);
if(this.props.renderer == 'legacy')
return <div className='phb page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(cleanPageText) }} key={index} />;
else {
pageText += `\n\n&nbsp;\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
cleanPageText += `\n\n&nbsp;\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
return (
<div className='page' id={`p${index + 1}`} key={index} >
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: Markdown.render(cleanPageText) }} />

View File

@@ -10,6 +10,8 @@ const CodeEditor = require('naturalcrit/codeEditor/codeEditor.jsx');
const SnippetBar = require('./snippetbar/snippetbar.jsx');
const MetadataEditor = require('./metadataEditor/metadataEditor.jsx');
const EDITOR_THEME_KEY = 'HOMEBREWERY-EDITOR-THEME';
const SNIPPETBAR_HEIGHT = 25;
const DEFAULT_STYLE_TEXT = dedent`
/*=======--- Example CSS styling ---=======*/
@@ -34,12 +36,14 @@ const Editor = createClass({
onMetaChange : ()=>{},
reportError : ()=>{},
renderer : 'legacy'
editorTheme : 'default',
renderer : 'legacy'
};
},
getInitialState : function() {
return {
view : 'text' //'text', 'style', 'meta'
editorTheme : this.props.editorTheme,
view : 'text' //'text', 'style', 'meta'
};
},
@@ -51,6 +55,13 @@ const Editor = createClass({
this.updateEditorSize();
this.highlightCustomMarkdown();
window.addEventListener('resize', this.updateEditorSize);
const editorTheme = window.localStorage.getItem(EDITOR_THEME_KEY);
if(editorTheme) {
this.setState({
editorTheme : editorTheme
});
}
},
componentWillUnmount : function() {
@@ -138,6 +149,17 @@ const Editor = createClass({
codeMirror.addLineClass(lineNumber, 'text', 'columnSplit');
}
// definition lists
if(line.includes('::')){
const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym;
let match;
while ((match = regex.exec(line)) != null){
codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'define' });
codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length }, { className: 'term' });
codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[2]) }, { line: lineNumber, ch: line.indexOf(match[2]) + match[2].length }, { className: 'definition' });
}
}
// Highlight injectors {style}
if(line.includes('{') && line.includes('}')){
const regex = /(?:^|[^{\n])({(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\2})/gm;
@@ -255,6 +277,13 @@ const Editor = createClass({
this.refs.codeEditor?.updateSize();
},
updateEditorTheme : function(newTheme){
window.localStorage.setItem(EDITOR_THEME_KEY, newTheme);
this.setState({
editorTheme : newTheme
});
},
//Called by CodeEditor after document switch, so Snippetbar can refresh UndoHistory
rerenderParent : function (){
this.forceUpdate();
@@ -269,7 +298,8 @@ const Editor = createClass({
view={this.state.view}
value={this.props.brew.text}
onChange={this.props.onTextChange}
rerenderParent={this.rerenderParent}/>
editorTheme={this.state.editorTheme}
rerenderParent={this.rerenderParent} />
</>;
}
if(this.isStyle()){
@@ -281,6 +311,7 @@ const Editor = createClass({
value={this.props.brew.style ?? DEFAULT_STYLE_TEXT}
onChange={this.props.onStyleChange}
enableFolding={false}
editorTheme={this.state.editorTheme}
rerenderParent={this.rerenderParent} />
</>;
}
@@ -324,6 +355,8 @@ const Editor = createClass({
undo={this.undo}
redo={this.redo}
historySize={this.historySize()}
currentEditorTheme={this.state.editorTheme}
updateEditorTheme={this.updateEditorTheme}
cursorPos={this.refs.codeEditor?.getCursorPosition() || {}} />
{this.renderEditor()}

View File

@@ -1,65 +1,73 @@
.editor{
@import 'themes/codeMirror/customEditorStyles.less';
.editor {
position : relative;
width : 100%;
.codeEditor{
.codeEditor {
height : 100%;
.pageLine{
.pageLine {
background : #33333328;
border-top : #339 solid 1px;
border-top : #333399 solid 1px;
}
.editor-page-count{
color : grey;
.editor-page-count {
float : right;
color : grey;
}
.columnSplit{
font-style : italic;
color : grey;
background-color : fade(#299, 15%);
border-bottom : #299 solid 1px;
.columnSplit {
font-style : italic;
color : grey;
background-color : fade(#229999, 15%);
border-bottom : #229999 solid 1px;
}
.block:not(.cm-comment){
color : purple;
.define {
&:not(.term):not(.definition) {
font-weight : bold;
color : #949494;
background : #E5E5E5;
border-radius : 3px;
}
&.term { color : rgb(96, 117, 143); }
&.definition { color : rgb(97, 57, 178); }
}
.block:not(.cm-comment) {
font-weight : bold;
color : purple;
//font-style: italic;
}
.inline-block:not(.cm-comment){
color : red;
.inline-block:not(.cm-comment) {
font-weight : bold;
color : red;
//font-style: italic;
}
.injection:not(.cm-comment){
.injection:not(.cm-comment) {
font-weight : bold;
color : green;
font-weight : bold;
}
}
.brewJump{
position : absolute;
background-color : @teal;
cursor : pointer;
width : 30px;
height : 30px;
display : flex;
align-items : center;
bottom : 20px;
right : 20px;
z-index : 1000000;
justify-content : center;
.tooltipLeft("Jump to brew page");
.brewJump {
position : absolute;
right : 20px;
bottom : 20px;
z-index : 1000000;
display : flex;
align-items : center;
justify-content : center;
width : 30px;
height : 30px;
cursor : pointer;
background-color : @teal;
.tooltipLeft('Jump to brew page');
}
.editorToolbar{
position: absolute;
top: 5px;
left: 50%;
color: black;
font-size: 13px;
z-index: 9;
span {
padding: 2px 5px;
}
.editorToolbar {
position : absolute;
top : 5px;
left : 50%;
z-index : 9;
font-size : 13px;
color : black;
span { padding : 2px 5px; }
}
}

View File

@@ -1,3 +1,4 @@
/*eslint max-lines: ["warn", {"max": 250, "skipBlankLines": true, "skipComments": true}]*/
require('./snippetbar.less');
const React = require('react');
const createClass = require('create-react-class');
@@ -15,6 +16,8 @@ ThemeSnippets['V3_5eDMG'] = require('themes/V3/5eDMG/snippets.js');
ThemeSnippets['V3_Journal'] = require('themes/V3/Journal/snippets.js');
ThemeSnippets['V3_Blank'] = require('themes/V3/Blank/snippets.js');
const EditorThemes = require('build/homebrew/codeMirror/editorThemes.json');
const execute = function(val, props){
if(_.isFunction(val)) return val(props);
return val;
@@ -24,24 +27,26 @@ const Snippetbar = createClass({
displayName : 'SnippetBar',
getDefaultProps : function() {
return {
brew : {},
view : 'text',
onViewChange : ()=>{},
onInject : ()=>{},
onToggle : ()=>{},
showEditButtons : true,
renderer : 'legacy',
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
cursorPos : {}
brew : {},
view : 'text',
onViewChange : ()=>{},
onInject : ()=>{},
onToggle : ()=>{},
showEditButtons : true,
renderer : 'legacy',
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
updateEditorTheme : ()=>{},
cursorPos : {}
};
},
getInitialState : function() {
return {
renderer : this.props.renderer,
snippets : []
renderer : this.props.renderer,
themeSelector : false,
snippets : []
};
},
@@ -95,6 +100,31 @@ const Snippetbar = createClass({
this.props.onInject(injectedText);
},
toggleThemeSelector : function(){
this.setState({
themeSelector : !this.state.themeSelector
});
},
changeTheme : function(e){
if(e.target.value == this.props.currentEditorTheme) return;
this.props.updateEditorTheme(e.target.value);
this.setState({
showThemeSelector : false,
});
},
renderThemeSelector : function(){
return <div className='themeSelector'>
<select value={this.props.currentEditorTheme} onChange={this.changeTheme} onMouseDown={(this.changeTheme)}>
{EditorThemes.map((theme, key)=>{
return <option key={key} value={theme}>{theme}</option>;
})}
</select>
</div>;
},
renderSnippetGroups : function(){
const snippets = this.state.snippets.filter((snippetGroup)=>snippetGroup.view === this.props.view);
@@ -124,6 +154,12 @@ const Snippetbar = createClass({
<i className='fas fa-redo' />
</div>
<div className='divider'></div>
<div className={`editorTool editorTheme ${this.state.themeSelector ? 'active' : ''}`}
onClick={this.toggleThemeSelector} >
<i className='fas fa-palette' />
</div>
{this.state.themeSelector && this.renderThemeSelector()}
<div className='divider'></div>
<div className={cx('text', { selected: this.props.view === 'text' })}
onClick={()=>this.props.onViewChange('text')}>
<i className='fa fa-beer' />
@@ -196,5 +232,4 @@ const SnippetGroup = createClass({
</div>
</div>;
},
});

View File

@@ -46,6 +46,15 @@
color : black;
}
}
&.editorTheme{
.tooltipLeft('Editor Themes');
font-size : 0.75em;
color : black;
&.active{
color : white;
background-color: black;
}
}
&.divider {
background: linear-gradient(#000, #000) no-repeat center/1px 100%;
width: 5px;
@@ -54,6 +63,15 @@
}
}
}
.themeSelector{
position: absolute;
left: -65px;
top: 30px;
z-index: 999;
width: 170px;
background-color: black;
border-radius: 5px;
}
}
.snippetBarButton{
height : @menuHeight;

View File

@@ -16,6 +16,8 @@ const HelpNavItem = require('../../navbar/help.navitem.jsx');
const NaturalCritIcon = require('naturalcrit/svg/naturalcrit.svg.jsx');
let SAVEKEY = '';
const AccountPage = createClass({
displayName : 'AccountPage',
getDefaultProps : function() {
@@ -29,6 +31,27 @@ const AccountPage = createClass({
uiItems : this.props.uiItems
};
},
componentDidMount : function(){
if(!this.state.saveLocation && this.props.uiItems.username) {
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${this.props.uiItems.username}`;
let saveLocation = window.localStorage.getItem(SAVEKEY);
saveLocation = saveLocation ?? (this.state.uiItems.googleId ? 'GOOGLE-DRIVE' : 'HOMEBREWERY');
this.makeActive(saveLocation);
}
},
makeActive : function(newSelection){
if(this.state.saveLocation == newSelection) return;
window.localStorage.setItem(SAVEKEY, newSelection);
this.setState({
saveLocation : newSelection
});
},
renderButton : function(name, key, shouldRender=true){
if(!shouldRender) return;
return <button className={this.state.saveLocation==key ? 'active' : ''} onClick={()=>{this.makeActive(key);}}>{name}</button>;
},
renderNavItems : function() {
return <Navbar>
@@ -61,6 +84,11 @@ const AccountPage = createClass({
</p>
}
</div>
<div className='dataGroup'>
<h4>Default Save Location</h4>
{this.renderButton('Homebrewery', 'HOMEBREWERY')}
{this.renderButton('Google Drive', 'GOOGLE-DRIVE', this.state.uiItems.googleId)}
</div>
</>;
},

View File

@@ -7,6 +7,7 @@ const moment = require('moment');
const request = require('../../../../utils/request-middleware.js');
const googleDriveIcon = require('../../../../googleDrive.svg');
const homebreweryIcon = require('../../../../thumbnail.png');
const dedent = require('dedent-tabs').default;
const BrewItem = createClass({
@@ -90,11 +91,17 @@ const BrewItem = createClass({
</a>;
},
renderGoogleDriveIcon : function(){
if(!this.props.brew.googleId) return;
renderStorageIcon : function(){
if(this.props.brew.googleId) {
return <span title={this.props.brew.webViewLink ? 'Your Google Drive Storage': 'Another User\'s Google Drive Storage'}>
<a href={this.props.brew.webViewLink} target='_blank'>
<img className='googleDriveIcon' src={googleDriveIcon} alt='googleDriveIcon' />
</a>
</span>;
}
return <span>
<img className='googleDriveIcon' src={googleDriveIcon} alt='googleDriveIcon' />
return <span title='Homebrewery Storage'>
<img className='homebreweryIcon' src={homebreweryIcon} alt='homebreweryIcon' />
</span>;
},
@@ -144,7 +151,7 @@ const BrewItem = createClass({
Last updated: ${moment(brew.updatedAt).local().format(dateFormatString)}`}>
<i className='fas fa-sync-alt' /> {moment(brew.updatedAt).fromNow()}
</span>
{this.renderGoogleDriveIcon()}
{this.renderStorageIcon()}
</div>
<div className='links'>

View File

@@ -98,4 +98,11 @@
padding : 0px;
margin : -5px;
}
.homebreweryIcon {
mix-blend-mode : darken;
height : 24px;
position : relative;
top : 5px;
left : -5px;
}
}

View File

@@ -89,7 +89,7 @@ const ListPage = createClass({
sortBrewOrder : function(brew){
if(!brew.title){brew.title = 'No Title';}
const mapping = {
'alpha' : _.deburr(brew.title.toLowerCase()),
'alpha' : _.deburr(brew.title.trim().toLowerCase()),
'created' : moment(brew.createdAt).format(),
'updated' : moment(brew.updatedAt).format(),
'views' : brew.views,

View File

@@ -16,6 +16,23 @@
margin : 5px 0px;
border : 2px solid black;
border-radius : 5px;
button {
background-color : transparent;
border : 1px solid black;
border-radius : 5px;
width : 125px;
color : black;
margin-right : 5px;
&.active {
background-color: #0007;
color: white;
&:before {
content: '\f00c';
font-family: 'FONT AWESOME 5 FREE';
margin-right: 5px;
}
}
}
}
h1, h2, h3, h4 {
width : 100%;

View File

@@ -91,7 +91,7 @@ const EditPage = createClass({
if(!(e.ctrlKey || e.metaKey)) return;
const S_KEY = 83;
const P_KEY = 80;
if(e.keyCode == S_KEY) this.save();
if(e.keyCode == S_KEY) this.trySave(true);
if(e.keyCode == P_KEY) window.open(`/print/${this.processShareId()}?dialog=true`, '_blank').focus();
if(e.keyCode == P_KEY || e.keyCode == S_KEY){
e.stopPropagation();
@@ -137,13 +137,14 @@ const EditPage = createClass({
return !_.isEqual(this.state.brew, this.savedBrew);
},
trySave : function(){
trySave : function(immediate=false){
if(!this.debounceSave) this.debounceSave = _.debounce(this.save, SAVE_TIMEOUT);
if(this.hasChanges()){
this.debounceSave();
} else {
this.debounceSave.cancel();
}
if(immediate) this.debounceSave.flush();
},
handleGoogleClick : function(){

View File

@@ -16,9 +16,9 @@ The Homebrewery makes the creation and sharing of authentic looking Fifth-Editio
**Try it!** Simply edit the text on the left and watch it *update live* on the right. Note that not every button is visible on this demo page. Click New {{fas,fa-plus-square}} in the navbar above to start brewing with all the features!
### Editing and Sharing
When you create your own homebrew, you will be given a *edit url* and a *share url*.
When you create a new homebrew document ("brew"), your document will be given a *edit link* and a *share link*.
Any changes you make while on the *edit url* will be automatically saved to the database within a few seconds. Anyone with the edit url will be able to make edits to your homebrew, so be careful about who you share it with.
The *edit link* is where you write your brew. If you edit a brew while logged in, you are added as one of the brew's authors, and no one else can edit that brew until you add them as a new author via the {{fa,fa-info-circle}} **Properties** tab. Brews without any author can still be edited by anyone with the *edit link*, so be careful about who you share it with if you prefer to work without an account.
Anyone with the *share url* will be able to access a read-only version of your homebrew.
@@ -48,57 +48,63 @@ If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,
\column
## New in V3.0.0
We've implemented an extended Markdown-like syntax for block and span elements, plus a few other changes, eliminating the need for HTML tags like `div` and `span` in most cases. No raw HTML tags should be needed in a brew (*but can still be used if you insist*).
## V3 vs Legacy
The Homebrewery has two renderers: Legacy and V3. The V3 renderer is recommended for all users because it is more powerful, more customizable, and continues to receive new feature updates while Legacy does not. However Legacy mode will remain available for older brews and veteran users.
At any time, any individual brew can be changed to your renderer of choice via the {{fa,fa-info-circle}} **Properties** tab on your brew. However, converting between Legacy and V3 may require heavily tweaking the document; while both renderers can use raw HTML, V3 prefers a streamlined curly bracket syntax that avoids the complex HTML structures required by Legacy.
Much of the syntax and styling has changed in V3, so converting a Legacy brew to V3 (or vice-versa) will require tweaking your document. *However*, all brews made prior to the release of v3.0.0 will still render normally, and you may switch between the "Legacy" brew renderer and the newer "V3" renderer via the {{fa,fa-info-circle}} **Properties** button on your brew at any time.
Scroll down to the next page for a brief summary of the changes and new features available in V3!
Scroll down to the next page for a brief summary of the changes and features available in V3!
#### New Things All The Time!
Check out the latest updates in the full changelog [here](/changelog).
### Helping out
Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Naturalcrit) to help me keep the servers running.
Like this tool? Head over to our [Patreon](https://www.patreon.com/Naturalcrit) to help us keep the servers running.
This tool will **always** be free, never have ads, and I will never offer any "premium" features or whatever.
This tool will **always** be free, never have ads, and we will never offer any "premium" features or whatever.
### Bugs, Issues, Suggestions?
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
Need help getting started or just the right look for your brew? Head to [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let us know!
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
- Check the [Frequently Asked Questions](/faq) page first for quick answers.
- Get help or the right look for your brew by posting on [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) or joining the [Discord Of Many Things](https://discord.gg/by3deKx).
- Report technical issues or provide feedback on the [GitHub Repo](https://github.com/naturalcrit/homebrewery/).
### Legal Junk
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). Which means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
If you wish to sell or in some way gain profit for what's created on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
#### Crediting Me
If you'd like to credit me in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
#### Crediting Us
If you'd like to credit us in your brew, we'd be flattered! Just reference that you made it with The Homebrewery.
### More Homebrew Resources
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The <a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'>Discord of Many Things</a> is another great resource to connect with fellow homebrewers for help and feedback.
[![Discord](/assets/discordOfManyThings.svg){width:50px,float:right,padding-left:10px}](https://discord.gg/by3deKx)
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The [Discord Of Many Things](https://discord.gg/by3deKx) is another great resource to connect with fellow homebrewers for help and feedback.
{{position:absolute;top:20px;right:20px;width:auto
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things' style='color: black;'><img src='/assets/discord.png' style='height:30px'/></a>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='Github' style='color: black; padding-left: 5px;'><img src='/assets/github.png' style='height:30px'/></a>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='Patreon' style='color: black; padding-left: 5px;'><img src='/assets/patreon.png' style='height:30px'/></a>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='Reddit' style='color: black; padding-left: 5px;'><img src='/assets/reddit.png' style='height:30px'/></a>
[![Discord](/assets/discord.png){height:30px}](https://discord.gg/by3deKx)
[![Github](/assets/github.png){height:30px}](https://github.com/naturalcrit/homebrewery)
[![Patreon](/assets/patreon.png){height:30px}](https://patreon.com/NaturalCrit)
[![Reddit](/assets/reddit.png){height:30px}](https://www.reddit.com/r/homebrewery/)
}}
\page
## Markdown+
The Homebrewery aims to make homebrewing as simple as possible, providing a live editor with Markdown syntax that is more human-readable and faster to write with than raw HTML.
In version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
**You can enable V3 via the {{fa,fa-info-circle}} Properties button!**
From version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
### Curly Brackets
The biggest change in V3 is the replacement of `<span></span>` and `<div></div>` with `{{ }}` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as css properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
Standard Markdown lacks several equivalences to HTML. Hence, we have introduced `{{ }}` as a replacement for `<span></span>` and `<div></div>` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as CSS properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
#### Span
My favorite author is {{pen,#author,color:orange,font-family:"trebuchet ms" Brandon Sanderson}}. The orange text has a class of `pen`, an id of `author`, is colored orange, and given a new font. The first space outside of quotes marks the beginning of the content.
@@ -126,16 +132,17 @@ A blank line can be achieved with a run of one or more `:` alone on a line. More
::
Much nicer than `<br><br><br><br><br>`
### Definition Lists
**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.
### Column Breaks
Column and page breaks with `\column` and `\page`.
\column
### Tables
Tables now allow column & row spanning between cells. This is included in some updated snippets, but a simplified example is given below.
@@ -163,13 +170,13 @@ Using *Curly Injection* you can assign an id, classes, or inline CSS properties
![alt-text](https://s-media-cache-ak0.pinimg.com/736x/4a/81/79/4a8179462cfdf39054a418efd4cb743e.jpg) {width:100px,border:"2px solid",border-radius:10px}
\* *When using Imgur-hosted images, use the "direct link", which can be found when you click into your image in the Imgur interace.*
\* *When using Imgur-hosted images, use the "direct link", which can be found when you click into your image in the Imgur interface.*
## Snippets
Homebrewery comes with a series of *code snippets* found at the top of the editor pane that make it easy to create brews as quickly as possible. Just set your cursor where you want the code to appear in the editor pane, choose a snippet, and make the adjustments you need.
## Style Editor Panel
{{fa,fa-paint-brush}} Technically released prior to v3 but still new to many users, check out the new **Style Editor** located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
{{fa,fa-paint-brush}} Usually overlooked or unused by some users, the **Style Editor** tab is located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
{{pageNumber 2}}
{{footnote PART 2 | BORING STUFF}}

View File

@@ -20,9 +20,10 @@ const BrewRenderer = require('../../brewRenderer/brewRenderer.jsx');
const { DEFAULT_BREW } = require('../../../../server/brewDefaults.js');
const BREWKEY = 'homebrewery-new';
const BREWKEY = 'homebrewery-new';
const STYLEKEY = 'homebrewery-new-style';
const METAKEY = 'homebrewery-new-meta';
const METAKEY = 'homebrewery-new-meta';
let SAVEKEY;
const NewPage = createClass({
@@ -62,12 +63,16 @@ const NewPage = createClass({
brew.renderer = metaStorage?.renderer ?? brew.renderer;
brew.theme = metaStorage?.theme ?? brew.theme;
brew.lang = metaStorage?.lang ?? brew.lang;
this.setState({
brew : brew
});
}
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${global.account?.username || ''}`;
const saveStorage = localStorage.getItem(SAVEKEY) || 'HOMEBREWERY';
this.setState({
brew : brew,
saveGoogle : (saveStorage == 'GOOGLE-DRIVE' && this.state.saveGoogle)
});
localStorage.setItem(BREWKEY, brew.text);
if(brew.style)
localStorage.setItem(STYLEKEY, brew.style);

View File

@@ -11,6 +11,7 @@ const template = async function(name, title='', props = {}){
return `<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, height=device-height, interactive-widget=resizes-visual" />
<link href="//use.fontawesome.com/releases/v5.15.1/css/all.css" rel="stylesheet" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" />
<link href=${`/${name}/bundle.css`} rel='stylesheet' />

25
faq.md
View File

@@ -62,16 +62,13 @@ pre {
```
# FAQ
{{wide Updated Oct. 11, 2021}}
{{wide Updated Apr. 15, 2023}}
### The site is down for me! Anyone else?
You can check the site status here: [Everyone or Just Me](https://downforeveryoneorjustme.com/homebrewery.naturalcrit.com)
### How do I log out?
Go to https://homebrewery.naturalcrit.com/login, and hit the "*logout*" link.
### Why am I getting an error when trying to save, and my account is linked to Google?
@@ -120,26 +117,6 @@ The fonts used were originally created for use with the English language, though
### Whenever I click on the "Get PDF" button, instead of getting a download, it opens Print Preview in another tab.
Yes, this is by design. In the print preview, select "Save as PDF" as the Destination, and then click "Save". There will be a normal download dialog where you can save your brew as a PDF.
### The preview window is suddenly gone, I can only see the editor side of the Homebrewery (or the other way around).
1. Press `CTRL`+`SHIFT`+`i` (or right-click and select "Inspect") while in the Homebrewery.
2. Expand...
```
- `body`
- `main`
- `div class="homebrew"`
- `div class="editPage page"`
- `div class="content"`
- `div class="splitPane"`
```
There you will find 3 divs: `div class="pane" [...]`, `div class="divider" [...]`, and `div class="pane" [...]`.
The `class="pane"` looks similar to this: `div class="pane" data-reactid="36" style="flex: 0 0 auto; width: 925px;"`.
Change whatever stands behind width: to something smaller than your display width.
### I have white borders on the bottom/sides of the print preview.
The Homebrewery paper size and your print paper size do not match.

View File

@@ -13,7 +13,7 @@ npm install
npm audit fix
npm run postinstall
cp freebsd/rc.d/homebrewery /usr/local/etc/rc.d/
cp install/freebsd/rc.d/homebrewery /usr/local/etc/rc.d/
chmod +x /usr/local/etc/rc.d/homebrewery
sysrc homebrewery_enable=YES

5401
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,10 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.9.1",
"version": "3.10.0",
"engines": {
"node": ">=18.16.x"
"npm": "^10.2.x",
"node": ">=20.8.x"
},
"repository": {
"type": "git",
@@ -78,11 +79,11 @@
]
},
"dependencies": {
"@babel/core": "^7.22.8",
"@babel/plugin-transform-runtime": "^7.22.7",
"@babel/preset-env": "^7.22.7",
"@babel/preset-react": "^7.22.5",
"@googleapis/drive": "^5.1.0",
"@babel/core": "^7.23.2",
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-react": "^7.22.15",
"@googleapis/drive": "^8.4.0",
"body-parser": "^1.20.2",
"classnames": "^2.3.2",
"codemirror": "^5.65.6",
@@ -98,31 +99,30 @@
"less": "^3.13.1",
"lodash": "^4.17.21",
"marked": "5.1.1",
"marked-extended-tables": "^1.0.6",
"marked-gfm-heading-id": "^3.0.4",
"marked-smartypants-lite": "^1.0.0",
"marked-extended-tables": "^1.0.7",
"marked-gfm-heading-id": "^3.1.0",
"marked-smartypants-lite": "^1.0.1",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4",
"mongoose": "^7.3.2",
"mongoose": "^7.6.1",
"nanoid": "3.3.4",
"nconf": "^0.12.0",
"npm": "^9.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-frame-component": "^4.1.3",
"react-router-dom": "6.14.1",
"react-router-dom": "6.16.0",
"sanitize-filename": "1.6.3",
"superagent": "^6.1.0",
"superagent": "^8.1.2",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
},
"devDependencies": {
"eslint": "^8.44.0",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-react": "^7.32.2",
"jest": "^29.6.1",
"eslint": "^8.51.0",
"eslint-plugin-jest": "^27.4.2",
"eslint-plugin-react": "^7.33.2",
"jest": "^29.7.0",
"jest-expect-message": "^1.1.3",
"postcss-less": "^6.0.0",
"stylelint": "^15.10.1",
"stylelint": "^15.10.3",
"stylelint-config-recess-order": "^4.3.0",
"stylelint-config-recommended": "^13.0.0",
"stylelint-stylistic": "^0.4.3",

View File

@@ -99,6 +99,24 @@ fs.emptyDirSync('./build');
await fs.copy('./themes/assets', './build/assets');
await fs.copy('./client/icons', './build/icons');
//v==---------------------------MOVE CM EDITOR THEMES -----------------------------==v//
editorThemeFiles = fs.readdirSync('./node_modules/codemirror/theme');
const editorThemeFile = './themes/codeMirror/editorThemes.json';
if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile);
const stream = fs.createWriteStream(editorThemeFile, { flags: 'a' });
stream.write('[\n"default"');
for (themeFile of editorThemeFiles) {
stream.write(`,\n"${themeFile.slice(0, -4)}"`);
}
stream.write('\n]\n');
stream.end();
await fs.copy('./node_modules/codemirror/theme', './build/homebrew/cm-themes');
await fs.copy('./themes/codeMirror', './build/homebrew/codeMirror');
//v==----------------------------- BUNDLE PACKAGES --------------------------------==v//
const bundles = await pack('./client/homebrew/homebrew.jsx', {

View File

@@ -257,6 +257,7 @@ app.get('/user/:username', async (req, res, next)=>{
brew.pageCount = googleBrews[match].pageCount;
brew.renderer = googleBrews[match].renderer;
brew.version = googleBrews[match].version;
brew.webViewLink = googleBrews[match].webViewLink;
googleBrews.splice(match, 1);
}
}
@@ -267,6 +268,9 @@ app.get('/user/:username', async (req, res, next)=>{
}
req.brews = _.map(brews, (brew)=>{
// Clean up brew data
brew.title = brew.title?.trim();
brew.description = brew.description?.trim();
return sanitizeBrew(brew, ownAccount ? 'edit' : 'share');
});

View File

@@ -106,7 +106,7 @@ const GoogleActions = {
const obj = await drive.files.list({
pageSize : 1000,
pageToken : NextPageToken || '',
fields : 'nextPageToken, files(id, name, description, createdTime, modifiedTime, properties)',
fields : 'nextPageToken, files(id, name, description, createdTime, modifiedTime, properties, webViewLink)',
q : 'mimeType != \'application/vnd.google-apps.folder\' and trashed = false'
})
.catch((err)=>{
@@ -139,7 +139,8 @@ const GoogleActions = {
published : file.properties.published ? file.properties.published == 'true' : false,
systems : [],
lang : file.properties.lang,
thumbnail : file.properties.thumbnail
thumbnail : file.properties.thumbnail,
webViewLink : file.webViewLink
};
});
return brews;

View File

@@ -153,6 +153,9 @@ const api = {
brew.text = api.mergeBrewText(brew);
_.defaults(brew, DEFAULT_BREW);
brew.title = brew.title.trim();
brew.description = brew.description.trim();
},
newGoogleBrew : async (account, brew, res)=>{
const oAuth2Client = GoogleActions.authCheck(account, res);
@@ -217,6 +220,8 @@ const api = {
const { saveToGoogle, removeFromGoogle } = req.query;
let afterSave = async ()=>true;
brew.title = brew.title.trim();
brew.description = brew.description.trim() || '';
brew.text = api.mergeBrewText(brew);
if(brew.googleId && removeFromGoogle) {

View File

@@ -1,36 +0,0 @@
let CodeMirror;
if(typeof navigator !== 'undefined'){
CodeMirror = require('codemirror');
//Language Modes
require('codemirror/mode/gfm/gfm.js'); //Github flavoured markdown
require('codemirror/mode/css/css.js');
require('codemirror/mode/javascript/javascript.js');
//Addons
//Code folding
require('codemirror/addon/fold/foldcode.js');
require('codemirror/addon/fold/foldgutter.js');
//Search and replace
require('codemirror/addon/search/search.js');
require('codemirror/addon/search/searchcursor.js');
require('codemirror/addon/search/jump-to-line.js');
require('codemirror/addon/search/match-highlighter.js');
require('codemirror/addon/search/matchesonscrollbar.js');
require('codemirror/addon/dialog/dialog.js');
//Trailing space highlighting
// require('codemirror/addon/edit/trailingspace.js');
//Active line highlighting
// require('codemirror/addon/selection/active-line.js');
//Scroll past last line
require('codemirror/addon/scroll/scrollpastend.js');
//Auto-closing
//XML code folding is a requirement of the auto-closing tag feature and is not enabled
require('codemirror/addon/fold/xml-fold.js');
require('codemirror/addon/edit/closetag.js');
const foldCode = require('./helpers/fold-code');
foldCode.registerHomebreweryHelper(CodeMirror);
}
module.exports = CodeMirror;

View File

@@ -4,15 +4,45 @@ const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const closeTag = require('./helpers/close-tag');
const Hints = require('./helpers/widget-elements/hints/hints.jsx');
const CodeMirror = require('./code-mirror.js');
const closeTag = require('./close-tag');
const themeWidgets = require('../../../themes/V3/5ePHB/widgets');
let CodeMirror;
if(typeof navigator !== 'undefined'){
CodeMirror = require('codemirror');
//Language Modes
require('codemirror/mode/gfm/gfm.js'); //Github flavoured markdown
require('codemirror/mode/css/css.js');
require('codemirror/mode/javascript/javascript.js');
//Addons
//Code folding
require('codemirror/addon/fold/foldcode.js');
require('codemirror/addon/fold/foldgutter.js');
//Search and replace
require('codemirror/addon/search/search.js');
require('codemirror/addon/search/searchcursor.js');
require('codemirror/addon/search/jump-to-line.js');
require('codemirror/addon/search/match-highlighter.js');
require('codemirror/addon/search/matchesonscrollbar.js');
require('codemirror/addon/dialog/dialog.js');
//Trailing space highlighting
// require('codemirror/addon/edit/trailingspace.js');
//Active line highlighting
// require('codemirror/addon/selection/active-line.js');
//Scroll past last line
require('codemirror/addon/scroll/scrollpastend.js');
//Auto-closing
//XML code folding is a requirement of the auto-closing tag feature and is not enabled
require('codemirror/addon/fold/xml-fold.js');
require('codemirror/addon/edit/closetag.js');
const foldCode = require('./fold-code');
foldCode.registerHomebreweryHelper(CodeMirror);
}
const CodeEditor = createClass({
displayName : 'CodeEditor',
hintsRef : React.createRef(),
getDefaultProps : function() {
return {
language : '',
@@ -20,16 +50,13 @@ const CodeEditor = createClass({
wrap : true,
onChange : ()=>{},
enableFolding : true,
editorTheme : 'default'
};
},
getInitialState : function() {
return {
docs : {},
widgetUtils : {},
widgets : {},
hints : [],
hintsField : undefined,
docs : {}
};
},
@@ -66,8 +93,9 @@ const CodeEditor = createClass({
this.codeMirror.setOption('foldOptions', false);
}
this.state.widgetUtils.updateWidgetGutter();
this.state.widgetUtils.updateAllLineWidgets();
if(prevProps.editorTheme !== this.props.editorTheme){
this.codeMirror.setOption('theme', this.props.editorTheme);
}
},
buildEditor : function() {
@@ -132,10 +160,11 @@ const CodeEditor = createClass({
},
foldGutter : true,
foldOptions : this.foldOptions(this.codeMirror),
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'widget-gutter'],
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
autoCloseTags : true,
styleActiveLine : true,
showTrailingSpace : false,
theme : this.props.editorTheme
// specialChars : / /,
// specialCharPlaceholder : function(char) {
// const el = document.createElement('span');
@@ -146,69 +175,9 @@ const CodeEditor = createClass({
});
closeTag.autoCloseCurlyBraces(CodeMirror, this.codeMirror);
this.setState({
widgetUtils : require('./helpers/widgets')(themeWidgets, this.codeMirror, (hints, field)=>{
this.setState({
hints,
hintsField : field
});
})
});
// Note: codeMirror passes a copy of itself in this callback. cm === this.codeMirror. Either one works.
this.codeMirror.on('change', (cm)=>{
this.props.onChange(cm.getValue());
this.state.widgetUtils.updateWidgetGutter();
});
this.codeMirror.on('cursorActivity', (cm)=>{
const { line } = cm.getCursor();
for (const key in this.state.widgets) {
if(key != line) {
this.state.widgetUtils.removeLineWidget(key, this.state.widgets[key]);
}
}
this.setState({
hints : [],
hintsField : undefined
});
const { widgets } = this.codeMirror.lineInfo(line);
if(!widgets) {
const widget = this.state.widgetUtils.updateLineWidgets(line);
if(widget) {
this.setState({
widgets : {
[line] : widget
}
});
}
}
});
this.codeMirror.on('change', (cm)=>{this.props.onChange(cm.getValue());});
this.updateSize();
this.codeMirror.on('gutterClick', (cm, n)=>{
// Open line widgets when 'widget-gutter' marker clicked
if(this.codeMirror.lineInfo(n).gutterMarkers?.['widget-gutter']) {
const { widgets } = this.codeMirror.lineInfo(n);
if(!widgets) {
const widget = this.state.widgetUtils.updateLineWidgets(n);
if(widget) {
this.setState({
widgets : { ...this.state.widgets, [n]: widget }
});
}
} else {
for (const widget of widgets) {
this.state.widgetUtils.removeLineWidget(n, widget);
}
this.setState({
hints : [],
hintsField : undefined
});
}
}
});
},
indent : function () {
@@ -440,19 +409,13 @@ const CodeEditor = createClass({
}
};
},
keyDown : function(e) {
if(this.hintsRef.current) {
this.hintsRef.current.keyDown(e);
}
},
//----------------------//
render : function(){
const { hints, hintsField } = this.state;
return <React.Fragment>
<div className='codeEditor' ref='editor' style={this.props.style} onKeyDown={this.keyDown}/>
<Hints ref={this.hintsRef} hints={hints} field={hintsField}/>
</React.Fragment>;
return <>
<link href={`../homebrew/cm-themes/${this.props.editorTheme}.css`} rel='stylesheet' />
<div className='codeEditor' ref='editor' style={this.props.style}/>
</>;
}
});

View File

@@ -2,8 +2,6 @@
@import (less) 'codemirror/addon/fold/foldgutter.css';
@import (less) 'codemirror/addon/search/matchesonscrollbar.css';
@import (less) 'codemirror/addon/dialog/dialog.css';
@import (less) 'codemirror/addon/hint/show-hint.css';
@import 'naturalcrit/styles/colors.less';
@keyframes sourceMoveAnimation {
50% {background-color: red; color: white;}
@@ -11,12 +9,15 @@
}
.codeEditor{
@media screen and (pointer : coarse) {
font-size : 16px;
}
.CodeMirror-foldmarker {
font-family: inherit;
text-shadow: none;
font-weight: 600;
color: grey;
}
}
.sourceMoveFlash .CodeMirror-line{
animation-name: sourceMoveAnimation;
@@ -32,51 +33,4 @@
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQAgMAAABW5NbuAAAACVBMVEVHcEwAAAAAAAAWawmTAAAAA3RSTlMAPBJ6PMxpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAFUlEQVQI12NgwACcCQysASAEZGAAACMuAX06aCQUAAAAAElFTkSuQmCC) no-repeat right;
// }
//}
.widget-gutter {
width: .7em;
}
.snippet-options-widget {
padding: 2px 0;
>div {
display: flex;
flex-wrap: wrap;
}
* {
margin: 0 2px 2px 2px;
}
input {
max-width: 10vw;
}
}
.widget-field {
border: 2px solid #ddd;
&.default {
background-color: @purple;
border: 2px solid @purple;
color: white;
>input {
background-color: @purple;
color: white;
}
}
&.suggested {
background-color: #ddd;
border: 2px dashed grey;
color: grey;
>input {
background-color: #ddd;
color: black;
}
}
}
}

View File

@@ -1,48 +0,0 @@
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
require('./checkbox.less');
const CodeMirror = require('../../../code-mirror.js');
const Checkbox = createClass({
getDefaultProps : function() {
return {
value : '',
prefix : '',
cm : {},
n : -1,
default : false
};
},
handleChange : function (e) {
const { cm, n, value, prefix } = this.props;
const { text } = cm.lineInfo(n);
const updatedPrefix = `{{${prefix}`;
if(e.target?.checked)
cm.replaceRange(`,${value}`, CodeMirror.Pos(n, updatedPrefix.length), CodeMirror.Pos(n, updatedPrefix.length), '+insert');
else {
const start = text.indexOf(`,${value}`);
if(start > -1)
cm.replaceRange('', CodeMirror.Pos(n, start), CodeMirror.Pos(n, start + value.length + 1), '-delete');
}
},
render : function() {
const { cm, n, value, prefix, def } = this.props;
const { text } = cm.lineInfo(n);
const id = [prefix, value, n].join('-');
let className = 'widget-field widget-checkbox';
if(def) {
className += ' default';
}
return <React.Fragment>
<div className={className}>
<input type='checkbox' id={id} onChange={this.handleChange} checked={_.includes(text, `,${value}`)}/>
<label htmlFor={id}>{_.startCase(value)}</label>
</div>
</React.Fragment>;
}
});
module.exports = Checkbox;

View File

@@ -1,7 +0,0 @@
.widget-checkbox {
display: inline-block;
flex: 0 0 auto;
background-color: #ddd;
border-radius: 10px;
padding: 4px 2px;
}

View File

@@ -1,95 +0,0 @@
require('./color-selector.less');
const React = require('react');
const createClass = require('create-react-class');
const { PATTERNS, STYLE_FN, SNIPPET_TYPE } = require('../constants');
const CodeMirror = require('../../../code-mirror');
const debounce = require('lodash.debounce');
const ColorSelector = createClass({
getDefaultProps : function() {
return {
field : {},
cm : {},
n : undefined,
text : '',
def : false
};
},
getInitialState : function() {
return {
value : ''
};
},
componentDidMount : function() {
const { field, text } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = text.match(pattern) ?? [];
this.setState({
value : value,
});
},
componentDidUpdate({ text }) {
const { field } = this.props;
if(this.props.text !== text) {
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = this.props.text.match(pattern) ?? [];
this.setState({
value,
});
}
},
onChange : function(e) {
const { cm, text, field, n, snippetType } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, current] = text.match(pattern) ?? [null, field.name, ''];
let index = text.indexOf(`${label}:${current}`);
while (index !== -1 && text[index - 1] === '-') {
index = text.indexOf(`${label}:${current}`, index + 1);
}
let value = e.target.value;
if(index === -1) {
if(snippetType === SNIPPET_TYPE.INLINE) {
index = text.indexOf('}');
}
index = index === -1 ? text.length : index;
value = `,${field.name}:${value}`;
} else {
index = index + 1 + field.name.length;
}
cm.replaceRange(value, CodeMirror.Pos(n, index), CodeMirror.Pos(n, index + current.length), '+insert');
this.setState({
value : e.target.value,
});
},
debounce : debounce((self, e)=>self.onChange(e), 300),
onChangeDebounce : function(e) {
this.setState({
value : e.target.value,
});
this.debounce(this, e);
},
render : function() {
const { field, n, text, def } = this.props;
const { value } = this.state;
const style = STYLE_FN(value);
const id = `${field?.name}-${n}`;
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, __] = text.match(pattern) ?? [null, undefined, ''];
let className = 'widget-field color-selector';
if(!label) {
className += ' suggested';
}
if(def) {
className += ' default';
}
return <React.Fragment>
<div className={className}>
<label htmlFor={id}>{field.name}:</label>
<input className='color' type='color' value={value} onChange={this.onChangeDebounce}/>
<input id={id} className='text' type='text' style={style} value={value} onChange={this.onChange}/>
</div>
</React.Fragment>;
}
});
module.exports = ColorSelector;

View File

@@ -1,8 +0,0 @@
.color-selector {
.color {
height: 17px;
width: 13px;
padding: 0;
margin: 0;
}
}

View File

@@ -1,50 +0,0 @@
const _ = require('lodash');
export const UNITS = ['cm', 'mm', 'in', 'px', 'pt', 'pc', 'em', 'ex', 'ch', 'rem', 'vw', 'vh', 'vmin', 'vmax', '%'];
export const HINT_TYPE = {
VALUE : 0,
NUMBER_SUFFIX : 1
};
export const SNIPPET_TYPE = {
BLOCK : 0,
INLINE : 1,
INJECTOR : 2,
};
export const FIELD_TYPE = {
TEXT : 0,
CHECKBOX : 1,
IMAGE_SELECTOR : 2,
COLOR_SELECTOR : 3,
};
const textField = (name)=>new RegExp(`[{,;](${name}):([^};,"\\(]*\\((?!,)[^};"\\)]*\\)|"[^},;"]*"|[^},;]*)`);
export const PATTERNS = {
snippet : {
[SNIPPET_TYPE.BLOCK] : (name)=>new RegExp(`^{{${name}(?:[^a-zA-Z].*)?`),
[SNIPPET_TYPE.INLINE] : (name)=>new RegExp(`{{${name}`),
[SNIPPET_TYPE.INJECTOR] : ()=>new RegExp(`^\\!\\[(?:[a-zA-Z -]+)?\\]\\(.*\\).*{[a-zA-Z0-9:, "'-]+}$`),
},
field : {
[FIELD_TYPE.TEXT] : textField,
[FIELD_TYPE.IMAGE_SELECTOR] : (name)=>new RegExp(`{{(${name})(\\d*)`),
[FIELD_TYPE.COLOR_SELECTOR] : textField
},
collectStyles : new RegExp(`(?:([a-zA-Z-]+):(?!\\/))+`, 'g'),
};
export const NUMBER_PATTERN = new RegExp(`([^-\\d]*)([-\\d]+)(${UNITS.join('|')})?(.*)`);
export const fourDigitNumberFromValue = (value)=>typeof value === 'number' ? (()=>{
const str = String(value);
return _.range(0, 4 - str.length).map(()=>'0').join('') + str;
})() : value;
const DEFAULT_WIDTH = '30px';
export const STYLE_FN = (value, extras = {})=>({
width : `calc(${value?.length ?? 0}ch + ${value?.length ? `${DEFAULT_WIDTH} / 2` : DEFAULT_WIDTH})`,
...extras
});

View File

@@ -1,128 +0,0 @@
const React = require('react');
const createClass = require('create-react-class');
const { NUMBER_PATTERN } = require('../constants');
const Hints = createClass({
hintsRef : React.createRef(),
activeHintRef : React.createRef(),
getDefaultProps : function() {
return {
hints : [],
field : undefined,
};
},
getInitialState : function() {
return {
activeHint : 0
};
},
componentDidUpdate : function({ hints }) {
const hintsLength = this.props.hints.length;
if(hintsLength - 1 < this.state.activeHint && hintsLength !== hints.length) {
this.setState({
activeHint : hintsLength === 0 ? 0 : hintsLength - 1
});
return;
}
if(this.hintsRef.current && this.activeHintRef.current) {
const offset = this.activeHintRef.current.offsetTop;
const scrollTop = this.hintsRef.current.scrollTop;
if(scrollTop + 50 < offset || scrollTop + 50 > offset) {
this.hintsRef.current.scrollTo({
top : offset - 50,
behavior : 'smooth'
});
}
}
},
componentDidMount : function() {},
keyDown : function(e) {
const { code } = e;
const { activeHint } = this.state;
const { hints, field } = this.props;
const match = field?.state?.value?.match(NUMBER_PATTERN);
if(code === 'ArrowDown') {
e.preventDefault();
if(!match || !match?.at(3)) {
this.setState({
activeHint : activeHint === hints.length - 1 ? 0 : activeHint + 1
});
}
} else if(code === 'ArrowUp') {
e.preventDefault();
if(!match || !match?.at(3)) {
this.setState({
activeHint : activeHint === 0 ? hints.length - 1 : activeHint - 1
});
}
} else if(code === 'Enter') {
e.preventDefault();
if(!match || !match?.at(3)) {
field?.hintSelected(hints[activeHint]);
this.setState({
activeHint : 0
});
}
}
},
render : function() {
const { activeHint } = this.state;
const { hints, field } = this.props;
if(!field) return null;
const bounds = field.fieldRef[field.state.id]?.current?.getBoundingClientRect();
if(!bounds) return null;
const hintElements = hints
.filter((h)=>h.hint !== field.state.value)
.map((h, i)=>{
let className = 'CodeMirror-hint';
if(activeHint === i) {
className += ' CodeMirror-hint-active';
return <li key={i}
role={'option'}
className={className}
onMouseDown={(e)=>field.hintSelected(h, e)}
ref={this.activeHintRef}>
{h.hint}
</li>;
}
return <li key={i}
role={'option'}
className={className}
onMouseDown={(e)=>field.hintSelected(h, e)}>
{h.hint}
</li>;
});
let style = {
display : 'none'
};
if(hintElements.length > 0) {
style = {
...style,
display : 'block',
top : `${bounds.top - 5}px`,
left : `${bounds.left}px`
};
}
return <React.Fragment>
<ul role={'listbox'}
id={'hints'}
aria-expanded={true}
className={'CodeMirror-hints default'}
style={style}
ref={this.hintsRef}>
{hintElements}
</ul>
</React.Fragment>;
}
});
module.exports = Hints;

View File

@@ -1,92 +0,0 @@
require('./image-selector.less');
const React = require('react');
const createClass = require('create-react-class');
const { Modal, modalHelpers } = require('../modal/modal.jsx');
const { PATTERNS } = require('../constants.js');
const CodeMirror = require('../../../code-mirror.js');
const _ = require('lodash');
const ImageSelector = createClass({
modalRef : React.createRef(),
getDefaultProps : function () {
return {
field : {},
cm : {},
n : undefined
};
},
getInitialState : function() {
return {
selected : undefined,
};
},
componentDidMount : function() {
modalHelpers.mount(this);
},
componentDidUpdate : function() {
const { name, preview, values } = this.props.field;
const { selected } = this.state;
const images = values.map((v, i)=>{
const className = String(selected) === String(v) ? 'selected' : '';
return <img key={i} className={className} src={preview(v)} alt={`${name} image ${v}`} onClick={()=>this.select(v)}/>;
});
this.state.modalRoot?.render(<Modal ref={this.modalRef} header={_.startCase(name)} save={this.save}>
<div className={'images'}>
{images}
</div>
</Modal>);
},
componentWillUnmount : function() {
modalHelpers.unmount(this);
},
save : function() {
const { cm, field, n } = this.props;
const { text } = cm.lineInfo(n);
const pattern = PATTERNS.field[field.type](field.name);
const [fullmatch, label, current] = text.match(pattern);
if(!fullmatch) {
console.warn('something is wrong... please report this warning with a screenshot');
return;
}
const currentText = `${label}${current ?? ''}`;
const index = 2;
const value = label + this.state.selected;
cm.replaceRange(value, CodeMirror.Pos(n, index), CodeMirror.Pos(n, index + currentText.length), '+insert');
},
select : function(value) {
this.setState({
selected : value
});
},
showModal : function() {
const { cm, field, n } = this.props;
const { text } = cm.lineInfo(n);
const pattern = PATTERNS.field[field.type](field.name);
const [fullmatch, _, current] = text.match(pattern);
if(!fullmatch) {
return;
}
this.setState({
selected : current
});
this.modalRef.current.setVisible(true);
},
render : function () {
return <React.Fragment>
<button onClick={this.showModal}>Select Image</button>
</React.Fragment>;
}
});
module.exports = ImageSelector;

View File

@@ -1,23 +0,0 @@
.images {
display: flex;
flex-direction: row;
flex-wrap: wrap;
max-height: 60vh;
overflow-y: scroll;
img {
flex: 0 0 auto;
max-width: 10vw;
max-height: 20vh;
border-radius: 10px;
&:hover {
background-color: rgba(0, 0, 0, .1);
}
&.selected {
background-color: rgba(0, 0, 0, .175);
}
}
}

View File

@@ -1,11 +0,0 @@
const Text = require('./text/text.jsx');
const Checkbox = require('./checkbox/checkbox.jsx');
const ImageSelector = require('./image-selector/image-selector.jsx');
const ColorSelector = require('./color-selector/color-selector.jsx');
module.exports = {
Text : Text,
Checkbox : Checkbox,
ImageSelector : ImageSelector,
ColorSelector : ColorSelector,
};

View File

@@ -1,75 +0,0 @@
require('./modal.less');
const React = require('react');
const ReactDOMClient = require('react-dom/client');
const createClass = require('create-react-class');
const Modal = createClass({
getDefaultProps : function () {
return {
header : '',
save : ()=>{},
};
},
getInitialState : function() {
return {
visible : false,
};
},
setVisible : function(visible) {
this.setState({
visible
});
},
save : function() {
this.props.save();
this.setVisible(false);
},
render : function () {
const { children, header } = this.props;
const { visible } = this.state;
return <React.Fragment>
{visible ? <div className={'bg-cover'}>
<div className={'modal'}>
<h1>{header}</h1>
<hr/>
{children}
<div className={'action-row'}>
<button id={'save'} onClick={()=>this.save()}>Save</button>
<button id={'cancel'} onClick={()=>this.setVisible(false)}>Cancel</button>
</div>
</div>
</div> : null}
</React.Fragment>;
}
});
module.exports = {
/*
* Requirements:
* - modalRef member variable
* - should be re-rendered via `this.state.modalRoot?.render` in `componentDidUpdate`
*/
Modal,
modalHelpers : {
// should be called in `componentDidMount`
// `self` should be passed as the component instance (`this`)
mount : (self)=>{
const el = document.createElement('div');
const root = ReactDOMClient.createRoot(el);
document.querySelector('body').append(el);
self.setState({
el,
modalRoot : root
});
},
// should be called in `componentWillUnmount`
// `self` should be passed as the component instance (`this`)
unmount : (self)=>{
self.state.el.remove();
}
}
};

View File

@@ -1,58 +0,0 @@
@import 'naturalcrit/styles/colors.less';
.bg-cover {
width: 100vw;
height: 100vh;
position: absolute;
z-index: 10000000;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, .5);
}
.modal {
position: absolute;
top: 10vh;
left: 25vw;
width: 50vw;
min-height: 50vh;
max-height: 80vh;
background-color: #fff;
border-radius: 10px;
box-shadow: 5px 5px 50px black;
display: flex;
flex-direction: column;
justify-content: space-between;
h1 {
margin-top: 5px;
margin-left: 5px;
font-size: 2em;
}
>* {
flex: 0 0 auto;
}
.action-row {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: left;
>* {
flex: 0 0 auto;
margin-left: 5px;
}
}
button {
&#cancel {
background-color: @redLight;
&:hover {
background-color: @red;
}
}
}
}

View File

@@ -1,165 +0,0 @@
require('./text.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const { NUMBER_PATTERN, HINT_TYPE, PATTERNS, STYLE_FN, FIELD_TYPE, SNIPPET_TYPE } = require('../constants');
const CodeMirror = require('../../../code-mirror.js');
const Text = createClass({
fieldRef : {},
getDefaultProps : function() {
return {
field : {},
text : '',
n : 0,
setHints : ()=>{},
onChange : ()=>{},
getStyleHints : ()=>{},
def : false,
snippetType : -1
};
},
getInitialState : function() {
return {
value : '',
id : ''
};
},
componentDidUpdate : function({ text }, { value }) {
if(this.props.text !== text) {
const { field, n } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = this.props.text.match(pattern) ?? [];
this.setState({
value : value,
id : `${field?.name}-${n}`
});
}
if(this.state.value !== value) {
const { field } = this.props;
this.props.setHints(this, field.hints ? this.props.getStyleHints(field, this.state.value) : []);
}
},
componentDidMount : function() {
const { field, text, n } = this.props;
const id = `${field?.name}-${n}`;
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = text.match(pattern) ?? [];
this.setState({
value : value,
id
});
this.fieldRef[id] = React.createRef();
},
componentWillUnmount : function() {
this.fieldRef = undefined;
this.fieldRef = {};
this.fieldRef[this.state.id]?.remove();
},
setFocus : function(e) {
const { type } = e;
const { field } = this.props;
this.props.setHints(this, type === 'focus' && field.hints ? this.props.getStyleHints(field, this.state.value) : []);
},
hintSelected : function(h, e) {
let value;
if(h?.type === HINT_TYPE.VALUE) {
value = h.hint;
} else if(h?.type === HINT_TYPE.NUMBER_SUFFIX) {
const match = this.state.value.match(NUMBER_PATTERN);
let suffix = match?.at(4) ?? '';
for (const char of h.hint) {
if(suffix.at(0) === char) {
suffix = suffix.slice(1);
}
}
value = `${match?.at(1) ?? ''}${match?.at(2) ?? ''}${h.hint}${suffix}`;
}
this.onChange({
target : {
value
}
});
},
keyDown : function(e) {
const { code } = e;
const { field } = this.props;
const { value } = this.state;
const match = value?.match(NUMBER_PATTERN);
if(code === 'ArrowDown') {
if(match && CSS.supports(field.name, value)) {
e.preventDefault();
this.onChange({
target : {
value : `${match.at(1) ?? ''}${Number(match[2]) - field.increment}${match[3] ?? ''}${match.at(4) ?? ''}`
}
});
}
} else if(code === 'ArrowUp') {
if(match && CSS.supports(field.name, value)) {
e.preventDefault();
this.onChange({
target : {
value : `${match.at(1) ?? ''}${Number(match[2]) + field.increment}${match[3] ?? ''}${match.at(4) ?? ''}`
}
});
}
}
},
onChange : function (e){
const { cm, text, field, n, snippetType } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, current] = text.match(pattern) ?? [null, field.name, ''];
let index = text.indexOf(`${label}:${current}`);
let value = e.target.value;
if(index === -1) {
if(snippetType === SNIPPET_TYPE.INLINE) {
index = text.indexOf('}');
}
index = index === -1 ? text.length : index;
value = `,${field.name}:${value}`;
} else {
index = index + 1 + field.name.length;
}
cm.replaceRange(value, CodeMirror.Pos(n, index), CodeMirror.Pos(n, index + current.length), '+insert');
this.setState({
value : e.target.value,
});
},
render : function() {
const { value, id } = this.state;
const { field, text, def } = this.props;
const style = STYLE_FN(value);
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, __] = text.match(pattern) ?? [null, undefined, ''];
let className = 'widget-field';
if(!label) {
className += ' suggested';
}
if(def) {
className += ' default';
}
return <React.Fragment>
<div className={className}>
<label htmlFor={id}>{field.name}:</label>
<input id={id} type='text' value={value}
style={style}
ref={this.fieldRef[id]}
onChange={this.onChange}
onFocus={this.setFocus}
onBlur={this.setFocus}
onKeyDown={this.keyDown}/>
</div>
</React.Fragment>;
}
});
module.exports = Text;

View File

@@ -1,37 +0,0 @@
.widget-field {
display: inline-block;
flex: 0 0 auto;
background-color: #ddd;
border-radius: 10px;
padding: 4px 2px;
>label {
display: inline;
width: 50px;
margin: 0 0;
}
>input {
background-color: #ddd;
border: none;
}
>.hints {
position: relative;
left: 30px;
max-height: 100px;
overflow-y: scroll;
background-color: white;
>.hint {
margin: 0 0;
padding: 2px;
cursor: default;
&:hover,
&.active {
background-color: rgba(0, 0, 0, 0.1);
}
}
}
}

View File

@@ -1,188 +0,0 @@
const React = require('react');
const ReactDOMClient = require('react-dom/client');
const { PATTERNS, FIELD_TYPE, HINT_TYPE, UNITS } = require('./widget-elements/constants');
require('./widget-elements/hints/hints.jsx');
const { Text, Checkbox, ImageSelector, ColorSelector } = require('./widget-elements');
const CodeMirror = require('../code-mirror.js');
// See https://codemirror.net/5/addon/hint/css-hint.js for code reference
const pseudoClasses = { 'active' : 1, 'after' : 1, 'before' : 1, 'checked' : 1, 'default' : 1,
'disabled' : 1, 'empty' : 1, 'enabled' : 1, 'first-child' : 1, 'first-letter' : 1,
'first-line' : 1, 'first-of-type' : 1, 'focus' : 1, 'hover' : 1, 'in-range' : 1,
'indeterminate' : 1, 'invalid' : 1, 'lang' : 1, 'last-child' : 1, 'last-of-type' : 1,
'link' : 1, 'not' : 1, 'nth-child' : 1, 'nth-last-child' : 1, 'nth-last-of-type' : 1,
'nth-of-type' : 1, 'only-of-type' : 1, 'only-child' : 1, 'optional' : 1, 'out-of-range' : 1,
'placeholder' : 1, 'read-only' : 1, 'read-write' : 1, 'required' : 1, 'root' : 1,
'selection' : 1, 'target' : 1, 'valid' : 1, 'visited' : 1
};
const genKey = (...args)=>args.join('-');
module.exports = function(widgets, cm, setHints) {
const roots = {};
const spec = CodeMirror.resolveMode('text/css');
const headless = CodeMirror(()=>{});
const makeTempCSSDoc = (value)=>CodeMirror.Doc(`.selector {\n${value}\n}`, 'text/css');
// See https://codemirror.net/5/addon/hint/css-hint.js for code reference
const getStyleHints = (field, value)=>{
const tempDoc = makeTempCSSDoc(`${field.name}:${value?.replaceAll(`'"`, '') ?? ''}`);
headless.swapDoc(tempDoc);
const pos = CodeMirror.Pos(1, field.name.length + 1 + (value?.length ?? 0), false);
const token = headless.getTokenAt(pos);
const inner = CodeMirror.innerMode(tempDoc.getMode(), token?.state);
if(inner.mode.name !== 'css') return;
if(token.type === 'keyword' && '!important'.indexOf(token.string) === 0)
return { list : ['!important'], from : CodeMirror.Pos(pos.line, token.start),
to : CodeMirror.Pos(pos.line, token.end) };
let start = token.start, end = pos.ch, word = token.string.slice(0, end - start);
if(/[^\w$_-]/.test(word)) {
word = ''; start = end = pos.ch;
}
let result = [];
const add = (keywords)=>{
for (const name in keywords)
if(!word || name.lastIndexOf(word, 0) === 0)
result.push(name);
};
const st = inner.state.state;
if(st === 'pseudo' || token.type === 'variable-3') {
add(pseudoClasses);
} else if(st === 'block' || st === 'maybeprop') {
add(spec.propertyKeywords);
} else if(st === 'prop' || st === 'parens' || st === 'at' || st === 'params') {
add(spec.valueKeywords);
add(spec.colorKeywords);
} else if(st === 'media' || st === 'media_parens') {
add(spec.mediaTypes);
add(spec.mediaFeatures);
}
result = result.map((h)=>({ hint: h, type: HINT_TYPE.VALUE }))
.filter((h)=>CSS.supports(field.name, h.hint) && h.hint.includes(value ?? ''));
const numberSuffix = word.slice(-4).replaceAll(/\d/g, '');
if(token.type === 'number' && !UNITS.includes(numberSuffix)) {
result.push(...UNITS
.filter((u)=>u.includes(numberSuffix) && CSS.supports(field.name, `${value.replaceAll(/\D/g, '') ?? ''}${u}`))
.map((u)=>({ hint: u, type: HINT_TYPE.NUMBER_SUFFIX }))
);
}
return result;
};
const widgetOptions = widgets.map((widget)=>({
name : widget.name,
pattern : PATTERNS.snippet[widget.type](widget.name),
renderWidget : (n, node)=>{
roots[n] = roots[n] ?? {};
const parent = document.createElement('div');
const id = `${widget.name}-${n}`;
parent.id = id;
const textFieldNames = (widget.fields || []).filter((f)=>f.type === FIELD_TYPE.TEXT || f.type === FIELD_TYPE.COLOR_SELECTOR).map((f)=>f.name);
const { text } = cm.lineInfo(n);
const fields = (widget.fields || []).map((field)=>{
const key = genKey(widget.name, n, field.name);
if(field.type === FIELD_TYPE.CHECKBOX) {
return <Checkbox key={key} cm={cm} n={n} prefix={widget.name} value={field.name} def={true}/>;
} else if(field.type === FIELD_TYPE.TEXT) {
return <Text key={key} field={field} cm={cm} n={n} text={text} setHints={(f, h)=>setHints(h, f)} getStyleHints={getStyleHints} def={true} snippetType={widget.type}/>;
} else if(field.type === FIELD_TYPE.IMAGE_SELECTOR) {
return <ImageSelector key={key} field={field} cm={cm} n={n}/>;
} else if(field.type === FIELD_TYPE.COLOR_SELECTOR) {
return <ColorSelector key={key} field={field} cm={cm} n={n} text={text} def={true} snippetType={widget.type}/>;
} else {
return null;
}
}).filter(Boolean);
const styles = [...text.matchAll(PATTERNS.collectStyles)].map(([_, style])=>{
if(textFieldNames.includes(style)) return false;
const field = {
name : style,
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true,
};
const key = genKey(widget.name, n, style);
if(style.includes('color')) {
return <ColorSelector key={key} field={field} cm={cm} n={n} text={text} snippetType={widget.type}/>;
}
return <Text key={key} field={field} cm={cm} n={n} text={text} setHints={(f, h)=>setHints(h, f)} getStyleHints={getStyleHints} snippetType={widget.type}/>;
}).filter(Boolean);
const root = roots[n][id] ?? ReactDOMClient.createRoot(node || parent);
root.render(<React.Fragment>
{fields}
{styles}
</React.Fragment>);
roots[n][id] = root;
return node || parent;
}
}));
const updateLineWidgets = (n)=>{
const { text, widgets } = cm.lineInfo(n);
const widgetOption = widgetOptions.find((option)=>!!text.match(option.pattern));
if(!widgetOption) return;
if(!!widgets) {
for (const widget of widgets) {
widgetOption.renderWidget(n, widget.node);
}
} else {
return cm.addLineWidget(n, widgetOption.renderWidget(n), {
above : false,
coverGutter : false,
noHScroll : true,
className : `snippet-options-widget ${widgetOption.name}-widget ${widgetOption.name}-widget-${n}`
});
}
};
return {
roots,
removeLineWidget : (n, widget)=>{
roots[n][widget.node.id]?.unmount();
delete roots[n][widget.node.id];
widget?.clear();
},
updateLineWidgets,
updateAllLineWidgets : ()=>{
for (let i = 0; i < cm.lineCount(); i++) {
const { widgets } = cm.lineInfo(i);
if(!!widgets) {
updateLineWidgets(i);
}
}
},
updateWidgetGutter : ()=>{
cm.operation(()=>{
for (let i = 0; i < cm.lineCount(); i++) {
const { text, widgets } = cm.lineInfo(i);
if(widgetOptions.some((option)=>text.match(option.pattern))) {
if(widgets) {
continue;
}
const optionsMarker = document.createElement('div');
optionsMarker.style.color = '#822';
optionsMarker.style.cursor = 'pointer';
optionsMarker.innerHTML = '●';
cm.setGutterMarker(i, 'widget-gutter', optionsMarker);
} else {
cm.setGutterMarker(i, 'widget-gutter', null);
}
}
});
}
};
};

View File

@@ -61,7 +61,8 @@ const SplitPane = createClass({
return result;
},
handleUp : function(){
handleUp : function(e){
e.preventDefault();
if(this.state.isDragging){
this.props.onDragFinish(this.state.currentDividerPos);
window.localStorage.setItem(this.props.storageKey, this.state.currentDividerPos);
@@ -78,6 +79,7 @@ const SplitPane = createClass({
handleMove : function(e){
if(!this.state.isDragging) return;
e.preventDefault();
const newSize = this.limitPosition(e.pageX);
this.setState({
currentDividerPos : newSize,
@@ -122,7 +124,7 @@ const SplitPane = createClass({
renderDivider : function(){
return <>
{this.renderMoveArrows()}
<div className='divider' onMouseDown={this.handleDown} >
<div className='divider' onPointerDown={this.handleDown} >
<div className='dots'>
<i className='fas fa-circle' />
<i className='fas fa-circle' />
@@ -133,7 +135,7 @@ const SplitPane = createClass({
},
render : function(){
return <div className='splitPane' onMouseMove={this.handleMove} onMouseUp={this.handleUp}>
return <div className='splitPane' onPointerMove={this.handleMove} onPointerUp={this.handleUp}>
<Pane
ref='pane1'
width={this.state.currentDividerPos}

View File

@@ -11,6 +11,7 @@
flex : 1;
}
.divider{
touch-action : none;
display : table;
height : 100%;
width : 15px;

View File

@@ -10,6 +10,21 @@
background-image : url(/assets/DMG_background.png);
background-size : cover;
/*TABLES WITHIN NOTES*/
.note table tbody tr:nth-child(odd) {
background:#fff;
}
/*DROP CAP*/
h1 + p::first-letter {
background-image: unset;
color:black;
}
.quote p:first-child::first-line {
all: unset;
}
&:after {
background-image : url(/assets/DMG_footerAccent.png);
height: 58px;
@@ -25,4 +40,4 @@
.partCover {
background-image: @partCoverHeaderDMG;
}
}
}

View File

@@ -8,6 +8,7 @@ const ClassFeatureGen = require('./snippets/classfeature.gen.js');
const CoverPageGen = require('./snippets/coverpage.gen.js');
const TableOfContentsGen = require('./snippets/tableOfContents.gen.js');
const indexGen = require('./snippets/index.gen.js');
const QuoteGen = require('./snippets/quote.gen.js');
const dedent = require('dedent-tabs').default;
@@ -123,6 +124,11 @@ module.exports = [
icon : 'fas fa-mask',
gen : ClassFeatureGen,
},
{
name : 'Quote',
icon : 'fas fa-quote-right',
gen : QuoteGen,
},
{
name : 'Note',
icon : 'fas fa-sticky-note',
@@ -220,34 +226,51 @@ module.exports = [
view : 'text',
snippets : [
{
name : 'Class Table',
icon : 'fas fa-table',
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
},
{
name : 'Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.full('classTable,wide'),
},
{
name : '1/2 Class Table',
icon : 'fas fa-list-alt',
gen : ClassTableGen.half('classTable,decoration,frame'),
},
{
name : '1/2 Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.half('classTable'),
},
{
name : '1/3 Class Table',
icon : 'fas fa-border-all',
gen : ClassTableGen.third('classTable,frame'),
},
{
name : '1/3 Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.third('classTable'),
name : 'Class Tables',
icon : 'fas fa-table',
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
subsnippets : [
{
name : 'Martial Class Table',
icon : 'fas fa-table',
gen : ClassTableGen.non('classTable,frame,decoration'),
},
{
name : 'Martial Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.non('classTable'),
},
{
name : 'Full Caster Class Table',
icon : 'fas fa-table',
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
},
{
name : 'Full Caster Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.full('classTable,wide'),
},
{
name : 'Half Caster Class Table',
icon : 'fas fa-list-alt',
gen : ClassTableGen.half('classTable,frame,decoration,wide'),
},
{
name : 'Half Caster Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.half('classTable,wide'),
},
{
name : 'Third Caster Spell Table',
icon : 'fas fa-border-all',
gen : ClassTableGen.third('classTable,frame,decoration'),
},
{
name : 'Third Caster Spell Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.third('classTable'),
}
]
},
{
name : 'Rune Table',

View File

@@ -1,132 +1,138 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
const features = [
'Astrological Botany',
'Biochemical Sorcery',
'Civil Divination',
'Consecrated Augury',
'Demonic Anthropology',
'Divinatory Mineralogy',
'Exo Interfacer',
'Genetic Banishing',
'Gunpowder Torturer',
'Gunslinger Corruptor',
'Hermetic Geography',
'Immunological Cultist',
'Malefic Chemist',
'Mathematical Pharmacy',
'Nuclear Biochemistry',
'Orbital Gravedigger',
'Pharmaceutical Outlaw',
'Phased Linguist',
'Plasma Gunslinger',
'Police Necromancer',
'Ritual Astronomy',
'Sixgun Poisoner',
'Seismological Alchemy',
'Spiritual Illusionism',
'Statistical Occultism',
'Spell Analyst',
'Torque Interfacer'
'Astrological Botany', 'Biochemical Sorcery', 'Civil Divination',
'Consecrated Augury', 'Demonic Anthropology', 'Divinatory Mineralogy',
'Exo Interfacer', 'Genetic Banishing', 'Gunpowder Torturer',
'Gunslinger Corruptor', 'Hermetic Geography', 'Immunological Cultist',
'Malefic Chemist', 'Mathematical Pharmacy', 'Nuclear Biochemistry',
'Orbital Gravedigger', 'Pharmaceutical Outlaw', 'Phased Linguist',
'Plasma Gunslinger', 'Police Necromancer', 'Ritual Astronomy',
'Sixgun Poisoner', 'Seismological Alchemy', 'Spiritual Illusionism',
'Statistical Occultism', 'Spell Analyst', 'Torque Interfacer'
].map((f)=>_.padEnd(f, 21)); // Pad to equal length of 21 chars long
const classnames = [
'Ackerman', 'Berserker-Typist', 'Concierge', 'Fishmonger',
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'
];
const classnames = ['Ackerman', 'Berserker-Typist', 'Concierge', 'Fishmonger',
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'];
const levels = ['1st', '2nd', '3rd', '4th', '5th',
'6th', '7th', '8th', '9th', '10th',
'11th', '12th', '13th', '14th', '15th',
'16th', '17th', '18th', '19th', '20th'];
const profBonus = [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6];
const maxes = [4, 3, 3, 3, 3, 2, 2, 1, 1];
const drawSlots = function(Slots, rows, padding){
let slots = Number(Slots);
return _.times(rows, function(i){
const max = maxes[i];
if(slots < 1) return _.pad('—', padding);
const res = _.min([max, slots]);
slots -= res;
return _.pad(res.toString(), padding);
}).join(' | ');
};
module.exports = {
full : function(classes){
const classname = _.sample(classnames);
let cantrips = 3;
let spells = 1;
let slots = 2;
return `{{${classes}\n##### The ${classname}\n` +
`| Level | Proficiency | Features | Cantrips | Spells | --- Spell Slots Per Spell Level ---|||||||||\n`+
`| ^| Bonus ^| ^| Known ^| Known ^|1st |2nd |3rd |4th |5th |6th |7th |8th |9th |\n`+
`|:-----:|:-----------:|:-------------|:--------:|:------:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|\n${
_.map(levels, function(levelName, level){
const res = [
_.pad(levelName, 5),
_.pad(`+${profBonus[level]}`, 2),
_.padEnd(_.sample(features), 21),
_.pad(cantrips.toString(), 8),
_.pad(spells.toString(), 6),
drawSlots(slots, 9, 2),
].join(' | ');
cantrips += _.random(0, 1);
spells += _.random(0, 1);
slots += _.random(0, 2);
return `| ${res} |`;
}).join('\n')}\n}}\n\n`;
non : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### The ${_.sample(classnames)}
| Level | Proficiency Bonus | Features | ${_.sample(features)} |
|:-----:|:-----------------:|:---------|:---------------------:|
| 1st | +2 | ${_.sample(features)} | 2 |
| 2nd | +2 | ${_.sample(features)} | 2 |
| 3rd | +2 | ${_.sample(features)} | 3 |
| 4th | +2 | ${_.sample(features)} | 3 |
| 5th | +3 | ${_.sample(features)} | 3 |
| 6th | +3 | ${_.sample(features)} | 4 |
| 7th | +3 | ${_.sample(features)} | 4 |
| 8th | +3 | ${_.sample(features)} | 4 |
| 9th | +4 | ${_.sample(features)} | 4 |
| 10th | +4 | ${_.sample(features)} | 4 |
| 11th | +4 | ${_.sample(features)} | 4 |
| 12th | +4 | ${_.sample(features)} | 5 |
| 13th | +5 | ${_.sample(features)} | 5 |
| 14th | +5 | ${_.sample(features)} | 5 |
| 15th | +5 | ${_.sample(features)} | 5 |
| 16th | +5 | ${_.sample(features)} | 5 |
| 17th | +6 | ${_.sample(features)} | 6 |
| 18th | +6 | ${_.sample(features)} | 6 |
| 19th | +6 | ${_.sample(features)} | 6 |
| 20th | +6 | ${_.sample(features)} | unlimited |
}}\n\n`;
},
half : function(classes){
const classname = _.sample(classnames);
let featureScore = 1;
return `{{${classes}\n##### The ${classname}\n` +
`| Level | Proficiency Bonus | Features | ${_.pad(_.sample(features), 21)} |\n` +
`|:-----:|:-----------------:|:---------|:---------------------:|\n${
_.map(levels, function(levelName, level){
const res = [
_.pad(levelName, 5),
_.pad(`+${profBonus[level]}`, 2),
_.padEnd(_.sample(features), 23),
_.pad(`+${featureScore}`, 21),
].join(' | ');
featureScore += _.random(0, 1);
return `| ${res} |`;
}).join('\n')}\n}}\n\n`;
full : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### The ${_.sample(classnames)}
| Level | Proficiency | Features | Cantrips | --- Spell Slots Per Spell Level ---|||||||||
| ^| Bonus ^| ^| Known ^|1st |2nd |3rd |4th |5th |6th |7th |8th |9th |
|:-----:|:-----------:|:-------------|:--------:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| 1st | +2 | ${_.sample(features)} | 2 | 2 | — | — | — | — | — | — | — | — |
| 2nd | +2 | ${_.sample(features)} | 2 | 3 | — | — | — | — | — | — | — | — |
| 3rd | +2 | ${_.sample(features)} | 2 | 4 | 2 | — | — | — | — | — | — | — |
| 4th | +2 | ${_.sample(features)} | 3 | 4 | 3 | — | — | — | — | — | — | — |
| 5th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 2 | — | — | — | — | — | — |
| 6th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | — | — | — | — | — | — |
| 7th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 1 | — | — | — | — | — |
| 8th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | — | — | — | — | — |
| 9th | +4 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | 1 | — | — | — | — |
| 10th | +4 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | 1 | — | — | — | — |
| 11th | +4 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | — | — | — |
| 12th | +4 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | — | — | — |
| 13th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — |
| 14th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — |
| 15th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — |
| 16th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — |
| 17th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | 1 |
| 18th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 1 | 1 | 1 | 1 | 1 |
| 19th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 1 | 1 | 1 |
| 20th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 2 | 1 | 1 |
}}\n\n`;
},
third : function(classes){
const classname = _.sample(classnames);
half : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### The ${_.sample(classnames)}
| Level | Proficiency | Features | Spells |--- Spell Slots Per Spell Level ---|||||
| ^| Bonus ^| ^| Known ^| 1st | 2nd | 3rd | 4th | 5th |
|:-----:|:-----------:|:-------------|:------:|:-----:|:-----:|:-----:|:-----:|:-----:|
| 1st | +2 | ${_.sample(features)} | — | — | — | — | — | — |
| 2nd | +2 | ${_.sample(features)} | 2 | 2 | — | — | — | — |
| 3rd | +2 | ${_.sample(features)} | 3 | 3 | — | — | — | — |
| 4th | +2 | ${_.sample(features)} | 3 | 3 | — | — | — | — |
| 5th | +3 | ${_.sample(features)} | 4 | 4 | 2 | — | — | — |
| 6th | +3 | ${_.sample(features)} | 4 | 4 | 2 | — | — | — |
| 7th | +3 | ${_.sample(features)} | 5 | 4 | 3 | — | — | — |
| 8th | +3 | ${_.sample(features)} | 5 | 4 | 3 | — | — | — |
| 9th | +4 | ${_.sample(features)} | 6 | 4 | 3 | 2 | — | — |
| 10th | +4 | ${_.sample(features)} | 6 | 4 | 3 | 2 | — | — |
| 11th | +4 | ${_.sample(features)} | 7 | 4 | 3 | 3 | — | — |
| 12th | +4 | ${_.sample(features)} | 7 | 4 | 3 | 3 | — | — |
| 13th | +5 | ${_.sample(features)} | 8 | 4 | 3 | 3 | 1 | — |
| 14th | +5 | ${_.sample(features)} | 8 | 4 | 3 | 3 | 1 | — |
| 15th | +5 | ${_.sample(features)} | 9 | 4 | 3 | 3 | 2 | — |
| 16th | +5 | ${_.sample(features)} | 9 | 4 | 3 | 3 | 2 | — |
| 17th | +6 | ${_.sample(features)} | 10 | 4 | 3 | 3 | 3 | 1 |
| 18th | +6 | ${_.sample(features)} | 10 | 4 | 3 | 3 | 3 | 1 |
| 19th | +6 | ${_.sample(features)} | 11 | 4 | 3 | 3 | 3 | 2 |
| 20th | +6 | ${_.sample(features)} | 11 | 4 | 3 | 3 | 3 | 2 |
}}\n\n`;
},
let cantrips = 3;
let spells = 1;
let slots = 2;
return `{{${classes}\n##### ${classname} Spellcasting\n` +
`| Class | Cantrips | Spells |--- Spells Slots per Spell Level ---||||\n` +
`| Level ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |\n` +
`|:------:|:--------:|:-------:|:-------:|:-------:|:-------:|:-------:|\n${
_.map(levels, function(levelName, level){
const res = [
_.pad(levelName, 6),
_.pad(cantrips.toString(), 8),
_.pad(spells.toString(), 7),
drawSlots(slots, 4, 7),
].join(' | ');
cantrips += _.random(0, 1);
spells += _.random(0, 1);
slots += _.random(0, 1);
return `| ${res} |`;
}).join('\n')}\n}}\n\n`;
third : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### ${_.sample(classnames)} Spellcasting
| Level | Cantrips | Spells |--- Spells Slots per Spell Level ---||||
| ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |
|:-----:|:--------:|:------:|:-------:|:-------:|:-------:|:-------:|
| 3rd | 2 | 3 | 2 | — | — | — |
| 4th | 2 | 4 | 3 | — | — | — |
| 5th | 2 | 4 | 3 | — | — | — |
| 6th | 2 | 4 | 3 | — | — | — |
| 7th | 2 | 5 | 4 | 2 | — | — |
| 8th | 2 | 6 | 4 | 2 | — | — |
| 9th | 2 | 6 | 4 | 2 | — | — |
| 10th | 3 | 7 | 4 | 3 | — | — |
| 11th | 3 | 8 | 4 | 3 | — | — |
| 12th | 3 | 8 | 4 | 3 | — | — |
| 13th | 3 | 9 | 4 | 3 | 2 | — |
| 14th | 3 | 10 | 4 | 3 | 2 | — |
| 15th | 3 | 10 | 4 | 3 | 2 | — |
| 16th | 3 | 11 | 4 | 3 | 3 | — |
| 17th | 3 | 11 | 4 | 3 | 3 | — |
| 18th | 3 | 11 | 4 | 3 | 3 | — |
| 19th | 3 | 12 | 4 | 3 | 3 | 1 |
| 20th | 3 | 13 | 4 | 3 | 3 | 1 |
}}\n\n`;
}
};

View File

@@ -0,0 +1,51 @@
const _ = require("lodash");
const quotes = [
"The sword glinted in the dim light, its edges keen and deadly. As the adventurer reached for it, he couldn't help but feel a surge of excitement mixed with fear. This was no ordinary blade.",
"The dragon's roar shook the ground beneath their feet, and the brave knight stood tall, his sword at the ready. He knew that this would be the battle of his life, but he was determined to emerge victorious.",
"The wizard's laboratory was a sight to behold, filled with bubbling cauldrons, ancient tomes, and strange artifacts from distant lands. As the apprentice gazed around in wonder, she knew that she was about to embark on a journey unlike any other.",
"The tavern was packed with rowdy patrons, their voices raised in song and laughter. The bard took center stage, strumming his lute and launching into a tale of adventure and heroism that had the crowd hanging on his every word.",
"The thief crept through the shadows, his eyes scanning the room for any sign of danger. He knew that one false move could mean the difference between success and failure, and he was determined to come out on top.",
"The elf queen stood atop her castle walls, surveying the kingdom below with a mix of pride and sadness. She knew that the coming war would be brutal, but she was determined to protect her people at all costs.",
"The necromancer's tower loomed in the distance, its dark spires piercing the sky. As the adventurers approached, they could feel the chill of death emanating from within",
"The ranger moved through the forest like a shadow, his senses attuned to every sound and movement around him. He knew that danger lurked behind every tree, but he was ready for whatever came his way.",
"The paladin knelt before the altar, his hands clasped in prayer. He knew that his faith would be tested in the days ahead, but he was ready to face whatever trials lay in store for him.",
"The druid communed with the spirits of nature, his mind merging with the trees, the animals, and the very earth itself. He knew that his power came with a great responsibility, and he was determined to use it for the greater good.",
];
const authors = [
"Unknown",
"James Wyatt",
"Eolande Blackwood",
"Ragnar Ironheart",
"Lyra Nightshade",
"Valtorius Darkstar",
"Isadora Fireheart",
"Theron Shadowbane",
"Lirien Starweaver",
"Drogathar Bonecrusher",
"Kaelen Frostblade",
];
const books = [
"The Blade of Destiny",
"Dragonfire and Steel",
"The Bard's Tale",
"Darkness Rising",
"The Sacred Quest",
"Shadows in the Forest",
"The Starweaver Chronicles",
"Beneath the Bones",
"Moonlit Magic",
"Frost and Fury",
];
module.exports = () => {
return `
{{quote
${_.sample(quotes)}
{{attribution ${_.sample(authors)}, *${_.sample(books)}*}}
}}
\n`;
};

View File

@@ -29,21 +29,23 @@ const getTOC = (pages)=>{
const res = [];
_.each(pages, (page, pageNum)=>{
const lines = page.split('\n');
_.each(lines, (line)=>{
if(_.startsWith(line, '# ')){
const title = line.replace('# ', '');
add1(title, pageNum);
}
if(_.startsWith(line, '## ')){
const title = line.replace('## ', '');
add2(title, pageNum);
}
if(_.startsWith(line, '### ')){
const title = line.replace('### ', '');
add3(title, pageNum);
}
});
if(!page.includes("{{frontCover}}") && !page.includes("{{insideCover}}") && !page.includes("{{partCover}}") && !page.includes("{{backCover}}")) {
const lines = page.split('\n');
_.each(lines, (line)=>{
if(_.startsWith(line, '# ')){
const title = line.replace('# ', '');
add1(title, pageNum);
}
if(_.startsWith(line, '## ')){
const title = line.replace('## ', '');
add2(title, pageNum);
}
if(_.startsWith(line, '### ')){
const title = line.replace('### ', '');
add3(title, pageNum);
}
});
}
});
return res;
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,154 +0,0 @@
const _ = require('lodash');
const { SNIPPET_TYPE, FIELD_TYPE, fourDigitNumberFromValue } = require('../../../shared/naturalcrit/codeEditor/helpers/widget-elements/constants');
module.exports = [{
name : 'monster',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'frame',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}]
}, {
name : 'classTable',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'frame',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'decoration',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}]
}, {
name : 'runeTable',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'frame',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'font-family',
type : FIELD_TYPE.TEXT
}]
}, {
name : 'index',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'columns',
type : FIELD_TYPE.TEXT,
increment : 1
}]
}, {
name : 'image',
type : SNIPPET_TYPE.INJECTOR,
fields : []
}, {
name : 'artist',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'top',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}]
}, {
name : 'watercolor',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'watercolor',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/watercolor/watercolor${value}.png`,
values : _.range(1, 13)
}, {
name : 'top',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}, {
name : 'left',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}, {
name : 'width',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}, {
name : 'opacity',
type : FIELD_TYPE.TEXT,
increment : 5
}, {
name : 'background-color',
type : FIELD_TYPE.COLOR_SELECTOR,
}]
}, {
name : 'imageMaskCenter',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'imageMaskCenter',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/waterColorMasks/center/${fourDigitNumberFromValue(value)}.webp`,
values : _.range(1, 17)
}, {
name : '--offsetX',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--offsetY',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--rotation',
type : FIELD_TYPE.TEXT,
increment : 5,
}]
}, {
name : 'imageMaskEdge',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'imageMaskEdge',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/waterColorMasks/edge/${fourDigitNumberFromValue(value)}.webp`,
values : _.range(1, 9)
}, {
name : '--offset',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--rotation',
type : FIELD_TYPE.TEXT,
increment : 5,
}]
}, {
name : 'imageMaskCorner',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'imageMaskCorner',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/waterColorMasks/corner/${fourDigitNumberFromValue(value)}.webp`,
values : _.range(1, 38)
}, {
name : '--offsetX',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--offsetY',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--rotation',
type : FIELD_TYPE.TEXT,
increment : 5,
}]
}];

View File

@@ -33,7 +33,7 @@ body {
}
}
.useColumns(@multiplier : 1, @fillMode: balance){
.useColumns(@multiplier : 1, @fillMode: auto){
column-fill : @fillMode;
column-count : 2;
}
@@ -42,6 +42,7 @@ body {
column-span : all;
columns : inherit;
column-gap : inherit;
column-fill : inherit;
}
.page{
.useColumns();

View File

@@ -0,0 +1,88 @@
.editor .codeEditor .CodeMirror {
// Themes with dark backgrounds
&.cm-s-3024-night,
&.cm-s-abbott,
&.cm-s-abcdef,
&.cm-s-ambiance,
&.cm-s-ayu-dark,
&.cm-s-ayu-mirage,
&.cm-s-base16-dark,
&.cm-s-bespin,
&.cm-s-blackboard,
&.cm-s-cobalt,
&.cm-s-colorforth,
&.cm-s-darcula,
&.cm-s-dracula,
&.cm-s-duotone-dark,
&.cm-s-erlang-dark,
&.cm-s-gruvbox-dark,
&.cm-s-hopscotch,
&.cm-s-icecoder,
&.cm-s-isotope,
&.cm-s-lesser-dark,
&.cm-s-liquibyte,
&.cm-s-lucario,
&.cm-s-material,
&.cm-s-material-darker,
&.cm-s-material-ocean,
&.cm-s-material-palenight,
&.cm-s-mbo,
&.cm-s-midnight,
&.cm-s-monokai,
&.cm-s-moxer,
&.cm-s-night,
&.cm-s-nord,
&.cm-s-oceanic-next,
&.cm-s-panda-syntax,
&.cm-s-paraiso-dark,
&.cm-s-pastel-on-dark,
&.cm-s-railscasts,
&.cm-s-rubyblue,
&.cm-s-seti,
&.cm-s-shadowfox,
&.cm-s-the-matrix,
&.cm-s-tomorrow-night-bright,
&.cm-s-tomorrow-night-eighties,
&.cm-s-twilight,
&.cm-s-vibrant-ink,
&.cm-s-xq-dark,
&.cm-s-yonce,
&.cm-s-zenburn
{
.CodeMirror-code {
.block:not(.cm-comment) {
color: magenta;
}
.columnSplit {
color: black;
background-color: rgba(35,153,153,0.5);
}
.pageLine {
background-color: rgba(255,255,255,0.75);
& ~ pre.CodeMirror-line {
color: black;
}
}
}
}
// Themes with light backgrounds
&.cm-s-default,
&.cm-s-3024-day,
&.cm-s-ambiance-mobile,
&.cm-s-base16-light,
&.cm-s-duotone-light,
&.cm-s-eclipse,
&.cm-s-elegant,
&.cm-s-juejin,
&.cm-s-neat,
&.cm-s-neo,
&.cm-s-paraiso-lightm
&.cm-s-solarized,
&.cm-s-ssms,
&.cm-s-ttcn,
&.cm-s-xq-light,
&.cm-s-yeti {
// Future styling for themes with light backgrounds
--dummyVar: 'currently unused';
}
}

View File

@@ -0,0 +1,68 @@
[
"default",
"3024-day",
"3024-night",
"abbott",
"abcdef",
"ambiance-mobile",
"ambiance",
"ayu-dark",
"ayu-mirage",
"base16-dark",
"base16-light",
"bespin",
"blackboard",
"cobalt",
"colorforth",
"darcula",
"dracula",
"duotone-dark",
"duotone-light",
"eclipse",
"elegant",
"erlang-dark",
"gruvbox-dark",
"hopscotch",
"icecoder",
"idea",
"isotope",
"juejin",
"lesser-dark",
"liquibyte",
"lucario",
"material-darker",
"material-ocean",
"material-palenight",
"material",
"mbo",
"mdn-like",
"midnight",
"monokai",
"moxer",
"neat",
"neo",
"night",
"nord",
"oceanic-next",
"panda-syntax",
"paraiso-dark",
"paraiso-light",
"pastel-on-dark",
"railscasts",
"rubyblue",
"seti",
"shadowfox",
"solarized",
"ssms",
"the-matrix",
"tomorrow-night-bright",
"tomorrow-night-eighties",
"ttcn",
"twilight",
"vibrant-ink",
"xq-dark",
"xq-light",
"yeti",
"yonce",
"zenburn"
]