Commit Graph

39 Commits (630a76c1b629abadd45332769a80c9c287d72a64)

Author SHA1 Message Date
Brett Zamir b620eb55bb Update build (`npm run prep` now restored) 2020-07-18 19:25:50 +08:00
Brett Zamir ce2a8fb1e8 - Linting: As per latest ash-nazg
- Docs: Add feature and PR templates
- npm: Update devDeps.
2020-06-20 15:55:23 +08:00
Brett Zamir 850bf97fc1 - Build: Update copies of core-js-bundle and stackblur and other files per latest Rollup/Babel
- Build: Use new rollup/plugin-babel in other Rollup file
- npm: Update devDeps.
2020-05-10 20:16:21 +08:00
Brett Zamir 381a0d9460 - Build: Update per latest Babel/Rollup
- npm: Update devDeps (no resulting license changes)
2020-05-04 09:26:21 +08:00
Brett Zamir ea58adbab1 - Build: Update with namespaced `parseFloat`, etc. changes
- npm: Update devDeps. (remove axe-core now that bundled with cypress-axe)
2020-03-31 00:25:54 +08:00
Brett Zamir 2b07946b6b - Build: Update per latest Rollup
- npm: Update devDeps
2020-03-24 10:04:15 +08:00
Brett Zamir 231fdb2189 - Update: Underscore copy; build files per Rollup/Babel updates
- npm: Update devDeps (babel, cypress, linting, mocha, rollup related)
2020-03-07 17:45:59 +08:00
Brett Zamir 33c84d89b8 - Linting (ESLint): As per latest ash-nazg
- npm: Update devDeps
2020-02-01 20:44:13 +08:00
Brett Zamir d9d4d94976 - Linting (ESLint): Apply per latest ash-nazg (jsdoc: complete sentence descriptions)
- npm: Update devDeps
2019-12-31 15:27:16 +08:00
Brett Zamir 477d5fdb6c - Linting (ESLint): Update as per latest ash-nazg (bad jsdoc)
- npm: Update devDeps
2019-12-31 13:14:33 +08:00
Brett Zamir aee1a45fd7 - npm: Update devDeps
- Build: Update dist files
2019-12-19 16:59:45 +08:00
Brett Zamir a59170fbe1 - Linting (ESLint): Simplify regexes
- npm: Update scripts to reflect removal of `all_tests.html`;
  remove `browser-test` script
- npm: Update devDeps
2019-11-30 11:41:01 +08:00
Brett Zamir e1671cc372 - Linting (ESLint): Per latest ash-nazg/eslint
- npm: Update devDeps
2019-11-23 19:17:32 +08:00
Brett Zamir 19f7962c4a - Revert `prefer-named-capture-group` due to apparently problematic Babel plugin 2019-11-16 10:08:38 +08:00
Brett Zamir a09c47283e - Linting: Add `ignore` folder to ignore file; ensure license versions are valid semver
- npm: Update devDeps
2019-11-13 14:16:06 +08:00
Brett Zamir d856dbae4a - Build: Update build per latest Babel
- npm: Add script to fix eslint errors
- npm: Update devDeps
2019-10-01 17:33:36 +08:00
Brett Zamir 404911827e - Linting (ESLint): Apply new rules ("fixme"->"todo"; prefer regex literals; defaults at end)
- Optimization: Image size
- npm: Bump devDeps (Babel/eslint/rollup-related; imageoptim, testcafe)
2019-09-20 12:40:31 +08:00
Brett Zamir f734625587 - Fix: Avoid race condition in `jQuery.svgIcons.js` (evident
when attempting to load from `file:` URL in Chrome)
- npm: Update devDeps
2019-07-04 15:15:58 +08:00
Brett Zamir 4177146acd - Linting (ESLint): Remove now unneeded config and add per new update
- Refactoring: Prefer for-of, event.key (newly enforced linting)
- Refactoring: Better var. names
- npm: Update devDeps and update local copies
2019-06-11 16:40:28 +08:00
Brett Zamir d5ef6c5619 - Linting: Use new preference for "object"; fix @example code; bad @returns
- npm: Update devDeps
2019-05-22 23:43:29 +08:00
Brett Zamir 597644999d - Refactoring: Use `static` keyword for classes 2019-05-08 09:58:18 +08:00
Brett Zamir 1d56d75837 - Linting (JSDoc): Reenable jsdoc/valid-jsdoc as fixed; notes re: `valid-jsdoc` replacement; use same namepath
- npm: Update devDep
2019-04-17 19:12:55 +08:00
Brett Zamir 6d2794beb4 - Testing: Skip js errors in Testcafe; we're getting some uncaught
error despite not replicating manually; should file a Testcafe issue
- Build: Update
- npm: Update devDeps
2019-04-03 17:05:18 +08:00
Brett Zamir dade2a7b37 - Linting (ESLint): Apply coding standards
- Testing (Refactoring): Abstract out to helper file functions for approving local storage and opening the main menu
- Docs (CHANGES): Update
- npm: Update devDeps; update nested deps for security audit
2019-03-16 12:33:35 +08:00
Brett Zamir d01abf19d2 - npm: Update devDeps
- Linting (ESLint): New ash-nazg rules
2019-02-21 19:41:09 +08:00
Brett Zamir 01083faf73 - Docs: Update CHANGES
- npm: Update devDeps
- npm: Bump to 4.2.0
2018-12-13 09:48:06 +08:00
Brett Zamir 3f861af42d - Update: Bump StackBlur version 2018-11-25 22:15:33 +08:00
Brett Zamir 845dbbd7d7 - Linting (ESLint): Prefer `addEventListener`, exponentiation operator, avoiding catastrophic regexes, prefer spread, prefer startsWith/endsWith, no fn ref in iterator
- npm: Update devDeps (rollup and eslint-config-ash-nazg)
2018-11-21 21:03:14 +08:00
Brett Zamir 1c284c948d - Fix (regression): RGBColor
- npm: Bump to 4.0.1
2018-11-16 15:44:20 +08:00
Brett Zamir 2e5c7557a9 - Breaking change: `loadSvgString` now returns a `Promise` rather than accepting a callback
- Breaking change: Treat callbacks to `editor.ready` as Promises, only resolving after all resolve
- Breaking change: Make `editor.runCallbacks` return a `Promise` which resolves upon all callbacks resolving
- Breaking change: Require `npx` (used with `babel-node`) to allow Node files
  for HTML building and JSDoc type checking to be expressed as ESM.
- Breaking change: `addExtension` now throws upon a repeated attempt to add an already-added extension
- Breaking change (storage preference cookies): Namespace the cookie as "svgeditstore" instead of just "store"
- Breaking change (API): Remove `svgCanvas.rasterExport` fourth (callback) argument, collapsing fifth (options) to fourth
- Breaking change (API): Remove `svgCanvas.exportPDF` third (callback) argument
- Breaking change (API): `editor/contextmenu.js` `add` now throws instead of giving a console error only upon detecting a bad menuitem or preexisting context menu
- Breaking change (API): Remove `svgCanvas.embedImage` second (callback) argument
- Breaking change (API): Make `getHelpXML` a class instead of instance method of `RGBColor`
- Breaking change (internal API): Refactor `dbox` (and `alert`/`confirm`/`process`/`prompt`/`select`) to avoid a callback argument in favor of return a Promise
- Fix: Avoid running in extension `langReady` multiple times or serially
- Enhancement (API): Add svgCanvas.runExtension to run just one extension and add `nameFilter` callback to `runExtensions`
- Enhancement (API): Supply `$` (our wrapped jQuery) to extensions so can use its plugins, e.g., dbox with its `alert`
- Enhancement: Use alert dialog in place of `alert` in webappfind
- Enhancement: `editor.ready` now returns a Promise resolving when all callbacks have resolved
- Enhancement: Allow `noAlert` option as part of second argument to `loadSvgString` (and `loadFromURL` and `loadFromDataURI`) to avoid UI alert (and trigger promise rejection)
- Enhancement: Make `dbox` as a separate module for alert, prompt, etc. dialogs
- Refactoring: Internal `PaintBox` as class; other misc. tweaks; no bitwise in canvg
- Linting (ESLint): Further linting changes (for editor); rename `.eslintrc` -> `.eslintrc.json` per recommendation
- Optimization: Recompress images (imageoptim-cli updated)
- npm: Update devDeps
- npm: Bump to 4.0.0
2018-11-16 12:48:23 +08:00
Brett Zamir aef7b095ef - Refactoring: Avoid unnecessary addEventListener `false`; change internal
jPicker function to class (used with `new`)
- Linting (ESLint): Add `valid-jsdoc` rule and make fixes; but turn off for
  now due to <https://github.com/eslint/eslint/issues/11036> and
  <https://github.com/eslint/eslint/issues/11037>
- Docs (JSDoc): Add some Markdown for variables, line breaks; tighten checks
  for overly generic types (though allow for `.Function` as in
  `jQuery.Function`) and avoid one previously missed instance
2018-10-31 00:31:12 +08:00
Brett Zamir 2835ec11b6 - Refactoring: Avoid redundant use of *AttributeNS methods with
`null` value; just use *Attribute methods without namespace
2018-10-23 18:14:27 +08:00
Brett Zamir ae58be8277 - Build: Babel 7
- npm: Update qr-manipulation
2018-09-26 21:27:52 +08:00
Brett Zamir dab1ff81af - Fix (jPicker): Avoid setting `Math.precision` pseudo-global
- Refactoring (jPicker): Use ES6 templates; avoid unnecessary check
- Refactoring: Avoid useless assignment (courtesty lgtm)
- Build: Update files
2018-09-22 09:01:13 +08:00
Brett Zamir ed6aa3fcb8 - Build: Update `dist` files 2018-09-13 22:57:01 +08:00
Brett Zamir acb57c1609 - Fix: Add images (and references) for fallback (#135)
- Fix (canvg): blur export fix
- i18n (Chinese): A few fixes (#135)
- Optimize: Further image optimizing
- Refactoring: Avoid custom JS substitution syntax
- Refactoring: Reorder default extension list
2018-07-31 00:18:39 -07:00
Brett Zamir b4d7b221e0 - Update dist files 2018-07-26 00:06:38 -07:00
Brett Zamir a3f0b8e501 - Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath', 'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented
- Breaking change: Rename "svgutils.js" to "utilities.js" (make in conformity with JSDoc module naming convention)
- Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear purpose and avoid confusing with editor)
- Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js"
- Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js"
- Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js"
- Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css"
- Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to have file name more closely reflect name)
- Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js"
- Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js"
- Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a poyfill of SVGPathSeg)
- Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson` for consistency
- Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for consistency
- Breaking change: Have `exportPDF` resolve with `output` and `outputType` rather than `dataurlstring` (as type may vary)
- Breaking change: Rename `extensions/mathjax/MathJax.js` to `extensions/mathjax/MathJax.min.js`
- Breaking change: Avoid recent change to have editor ready callbacks return Promises (we're not using and advantageous to keep sequential)
- Breaking change: Avoid recent addition of locale-side function in ext-imagelib for l10n
- Breaking change: Change name of ext-arrows.js from `Arrows` to `arrows` for sake of file path (not localized anyways).
- Breaking change: Change `addlangData` extension event to `addLangData` for consistency with method name
- Breaking change: Have `readLang`  return lang and data but do not call `setLang`
- Fix: Have general locales load first so extensions may use
- Fix: Provide `importLocale` to extensions `init` so it may delay adding of the extension until locale data loaded
- Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME type to PNG
- Fix: Wrong name for moinsave
- Update: Update WebAppFind per new API changes
- Enhancement: Make `setStrings` public on editor for late setting (used
  by `ext-shapes.js`)
- Enhancement: Add `extensions_added` event
- Enhancement: Add `message` event (Relay messages including those which
  have been been received prior to extension load)
- Enhancement: Allow SVGEdit to work out of the box--avoid need for copying sample config file. Should also help with Github-based file servers
- Enhancement: Allow avoiding "name" in extension export (just extract out of file name)
- Enhancement: Add stack blur to canvg by default (and refactoring it)
- Enhancement: Return `Promise` for `embedImage` (as with some other loading methods)
- Enhancement: Supply `importLocale` to `langReady` to facilitate extension locale loading
- Enhancement: Recover if an extension fails to load (just log and otherwise ignore)
- Enhancement: More i18n of extensions (also fixed issue with some console warnings about missing locale strings); i18nize Hello World too
- Enhancement: Allowing importing of locales within `addLangData`
- npm: Update devDeps
- Docs: Migrate copies of all old wiki pages to docs/from-old-wiki folder; intended for a possible move to Markdown, so raw HTML (with formatting) was not preserved, though named links had their absolute URL links preserved
- Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements
- Docs: Add Edtior doc file for help to general users
- Docs: Clarify/simplify install instructions
- npm/Docs (JSDoc): Add script to check for overly generic types
- Docs (JSDoc): For config/prefs and extension creating, link to tutorials (moved tutorials to own directory to avoid recursion problems by jsdoc)
- Docs (JSDoc): Add modules (upper case for usual main entrance files or regular names)
- Docs (JSDoc): Fill out missing areas; indicate return of `undefined`; consistency with `@returns`
- Docs (JSDoc): Add our own layout template to support overflow
- Docs (JSDoc): Use cleverLinks and disallow unknown tags
- Docs (JSDoc): Insist on "pedantic" flag; put output directory in config
- Docs (JSDoc): Use more precise Integer/Float over number, the specific type of array/function/object
- Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens`
- Docs: Generally update/improve docs (fixes #92)
- Docs: Update links to `latest` path (Avoid needing to update such references upon each release)
- Docs: 80 chars max
- Refactoring: Drop code for extension as function (already requiring export to be an object)
- Refactoring: Object destructuring, `Object.entries`, Object shorthand, array extras, more camelCase variable names
- Refactoring: Add a `Command` base class
- Refactoring: Simplify svgicons `callback` ready detection
- Refactoring: Put `let` or `const` closer to scope
- Refactoring: Remove unneeded `delimiter` from regex escaping utility
- Refactoring: Clearer variable names
- Refactoring: Use (non-deprecated) Event constructors
- Testing: Use new Sinon
2018-07-08 22:39:46 -07:00
Brett Zamir 9f65b1adb9 - Breaking change: Extension now formatted as export (and `this` is set to editor, including for `callback`)
- Breaking change: Locale now formatted as export
- Breaking change: Moved out remaining modular i18n (imagelib) to own folder
- Breaking change: Drop `executeAfterLoads` (and getJSPDF/getCanvg)
- Breaking change: `RGBColor` must accept `new`
- Breaking change: canvg - `stackBlurCanvasRGBA` must be set now by function (`setStackBlurCanvasRGBA`) rather than global; `canvg` now a named export
- Breaking change: Avoid passing `canvg`/`buildCanvgCallback` to extensions (have them import)
- Fix: i18nize imaglib more deeply
- Fix: Positioning of Document Properties dialog (Fixes #246)
- Fix (regression): PDF Export (Fixes #249)
- Fix (regression): Add polyfill for `ChildNode`/`ParentNode` (and use further)
- Fix (regression): Apply Babel universally to dependencies
- Fix (regression): Ordering of `uaPrefix` function in `svgEditor.js`
- Fix (regression): Embedded API
- Fix (embedded editor): Fix backspace key in Firefox so it doesn't navigate out of frame
- Fix: Alert if no exportWindow for PDF (e.g., if blocked)
- Refactoring( RGBColor) `RGBColor` as class, without rebuilding constants, optimize string replacement, move methods to prototype, use templates and object literals, use `Object.keys`
- Refactoring (canvg) Use classes more internally, use shorthand objects; array extras, return to lazy-loading
- Refactoring: Use Promises in place of `$.getScript`; always return Promises in case deciding to await resolving
- Refactoring: Avoid importing `RGBColor` into `svgutils.js` (jsPDF imports it itself)
- Refactoring: Arrow functions, destructuring, shorter property references
- Refactoring: Fix `lang` and `dir` for locales (though not in use currently anyways)
- Refactoring: Provide path config for canvg, jspdf
2018-06-12 06:50:28 +08:00