Commit Graph

81 Commits (5eb3e090340335063b503cb25a5d52ff0cf2e2a1)

Author SHA1 Message Date
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 8d179aee0c - Deprecated: Should now use `avoidClientSideDownload` in place of
`avoidClientSide` (config for `ext-server_opensave.js`).
- Enhancement: Added `avoidClientSideOpen` config for
    `ext-server_opensave.js`
- npm: Update devDeps (including switching from deprecate opn-cli
    package to open-cli)
2019-05-21 17:50:56 +08:00
Brett Zamir fc0c53f61a - Breaking change: Switch from deprecated `@babel/polyfill` to
`core-js-bundle` and `regenerator-runtime` replacements
- Fix: Fully redirect extension entrances for lacking browser support
- Docs: Simplify comments in HTML files re: script purposes
- Docs: Update release instructions
- npm: Update devDeps (jsdoc, security audit)
- npm: Bump to 5.0.0
2019-05-07 08:02:32 +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 879022a3c5 - Docs: Avoid parsing externally copied files for docs 2019-04-09 09:01:19 +08:00
Brett Zamir 5abd183c43 - Docs (Accessibility): Link to rule issues 2019-04-03 18:01:25 +08:00
Brett Zamir bff04dd58a - Docs (Accessibility): Refer to known issues 2019-04-03 17:33:25 +08:00
Brett Zamir 056f4f197c - Enhancement (svgIcons): Fix JSDoc param def; add `alt` options
- Accessibility: Begin work, add aria-label to some buttons and
    form controls; add `role=main`; `<img alt>`; `<iframe title>`
- i18n: Add `lang` attribute
- Refactoring: lbs, simplify i18nized element retrieval call
- Docs: Some JSDoc descriptions, JSDoc spacing, fix svgIcons param
    def; add todo
- Testing: Avoid reporting meta-viewport (have own zooming
    controls and difficult to fix)
2019-04-03 16:32:14 +08:00
Brett Zamir c6d07fbb7c - Fix: Extension locales with hyphens
- npm: Bump to 4.1.0
2018-11-29 20:41:50 +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 901c9547fe TODO: Besides splitting this out from previous commit, should really avoid markdown field in favor of modifying jsdoc to report wherever it lays out "prettyprint"; still probably missing some one-liners; see https://github.com/google/code-prettify; update builds to confirm new stackblur is working; add below to CHANGES; add back for eslint-plugin-jsdoc once merged (though need new version `^3.9.1`); move any linting changes to other linting branch
- Refactoring (minor): Add favicon to canvas demo
- Linting (ESLint Markdown JavaScript): Add `eslint-plugin-markdown` with
  slightly loosened config (`no-undef` and `padded-blocks` off and
  `no-unused-vars` as a warning)
- Linting (ESLint JSDoc code comments): Add `eslint-plugin-jsdoc` and apply to
    JSDoc code comments
- Linting (ESLint): Completely avoid unescaped tabs in files
- Docs (Linting): Add linting info file
- npm: Rename `copy-deps` script to `copy`
- Refactoring: Add stackblur-canvas as a dependency and copy it in (until such time as we can do so for canvg)
2018-11-07 14:51:09 +08:00
Brett Zamir afa5576ed1 TODO: Check out https://github.com/qard/remark-lint-code and https://www.npmjs.com/package/remark-lint-code-eslint ; add below to CHANGES
- Docs (JSDocs) Switch to JS-based config file
- Leverage syntax highlighting reporting of JSDoc to lint our code (npm version does not seem to reflect that on Github, so we use Github version we need)
- Docs (ESLint): Apply most of our ESLint rules (except `no-undefined` and `padded-blocks`) to sample code blocks
2018-11-04 16:49:27 +08:00
Brett Zamir 14aad38bd6 - Docs (3.0.0): Clarify 2018-10-26 08:44:19 +08:00
Brett Zamir 126b2cb840 - Docs (3.0.0): Clarify 2018-10-26 08:08:26 +08:00
Brett Zamir 5c96501507 - Docs (ReleaseInstructions): Clarify need for npm permissions to publish 2018-10-25 11:05:48 +08:00
Brett Zamir b573a85fba - Fix: Save broken on Firefox (since FF version?)
- Docs: Mention potentially more frequent release schedule
- Docs (ReleaseInstructions): Update per new testing; update
  `grep-doc` -> `types-doc` and indicate current failing status; indicate
  when `build-doc` will be used; clarify `npm pack`
- npm: Add newly renamed `jsdoc-check-overly-generic-types.js` to ignore
- npm: Bump to 3.1.1
2018-10-25 10:45:57 +08:00
Brett Zamir 6b0e54af07 - Docs (ReleaseInstructions): Clarify build instructions for release 2018-10-25 09:43:08 +08:00
Brett Zamir 07f59ba01a - Refactoring: Reorder path config to group (non-modular-dependent) image
paths together (and correct code comment)
- Docs: CHANGES clarifications/fixes
- Docs: Migrations documents section
- Docs: Add code comment re: use of `extIconsPath` in Mathjax
- Docs: Add JSDoc indicate @this for `ExtensionInitResponse#callback`
- Build: Update build files
- npm: Bump to 3.1.0
2018-10-24 13:52:08 +08:00
Brett Zamir 5b4dae0d30 - Docs: CHANGES clarifications
- Docs: More info on `importLocale` for extensions
- Refactoring: Better type-checking on `canvasRGBA_` (but set correctly by default anyways)
- Build: Remove unused Makefile
2018-10-23 18:35:49 +08:00
Brett Zamir 052a2c4571 - Docs: Add CHANGES info for npm 3.0.0-alpha.1 (i.e., changes between 2.8.1 and alpha.2)
- Docs: Add "optimization" and "localization" as commit prefixes
2018-10-22 10:58:39 +08:00
Brett Zamir 253732025a - Linting (Markdown): Fix linting format
- Linting (HTML): Add linting file
2018-10-19 15:19:18 +08:00
Brett Zamir 6faa49eacb - Docs: Contributing 2018-10-01 14:59:43 +08:00
Brett Zamir c1a5a96c0e - Docs: Clear up release instructions 2018-09-30 12:32:05 +08:00
Brett Zamir 18e741acec - Docs: Avoid unnecessary step in checkout 2018-09-30 12:24:12 +08:00
Brett Zamir 71b2b33e41 - Fix: Avoid errors occurring in Chrome now for `supportsGoodTextCharPos`
- Linting: Avoid Jamilih file in doc linting
- Testing: Add testcafe (ESLint plugin/rules, accessibility test
  (failing), ui test beginnings (passing))
- Docs: Add "Testing" prefix to contributing file
- npm: Bump to 3.0.0-rc.3
2018-09-30 12:13:34 +08:00
Brett Zamir ae7d0d1331 - Compatibility fix (openclipart): Ensure polyfill present; make separate non-modular build (still not integrated as API incomplete)
- Docs: Add compatibility fix to Contributing
2018-09-26 16:06:57 +08:00
Brett Zamir 90ff5b9479 - Update (Imagelib): Remove extra (and more outdated) jQuery copy
- Refactoring (minor): Reuse local variable
- Docs: Contributing re: updates
2018-09-25 14:21:40 +08:00
Brett Zamir 0034447d44 - Imagelib backward compatibility enhancement: Allow string based API
again so as not to break old SVG-Edit which fail at *presence* of
  `namespace` (fixes #274)
- Known regression: Remove Openclipart as its site's now setting of
  `X-Frame-Options` to `"sameorigin"` makes it unusable on our end
  for our cross-origin uses
- Forward compatibility enhancement: For IAN image library, add
  `svgedit=3` param to URL so that it can keep using old API for
  SVG-Edit versions before 3, while conditionally using new object-based
  API now (and if we switch exclusively to the object-based API in the
  future, this site will continue to work)
- Docs: Add "Forward compatibility enhancement" to list
2018-09-25 10:13:29 +08:00
Brett Zamir 72b0cee994 - Docs (CHANGES)
- Docs: Add "known regression" as possible commit prefix
2018-09-22 10:12:11 +08:00
Brett Zamir be17cd249c LGTM.com-inspired changes:
- Fix: Ensure all apostrophes are escaped for `toXml` utility
- Fix: Avoid error if `URL` is not defined
- Fix (jPicker): Precision argument had not been passed in previously
- Fix (Star extension): Minor: Avoid erring if `inradius` is `NaN`
- Refactoring: Avoid passing unused arguments, setting unused variables,
  and making unnecessary checks; avoid useless call to `createSVGMatrix`
- Linting (LGTM): Add `lgtm.yml` file (still some remaining items flagged
  but hoping for in-code flagging)
- Docs: Contributing file
2018-09-21 10:56:07 +08:00
Brett Zamir f0a48cdb13 - Docs: Update FAQ, including reference to ad blockers and export 2018-09-14 06:28:23 +08:00
Brett Zamir b370f4a207 - Docs: Release building (alternative for `build.js`) 2018-07-31 15:22:49 -07:00
Brett Zamir 97d093d6ef - Linting (ESLint): Add xdomain file to ignore file
- Fix (i18n): Regression in last commit with locales and apostrophe values
- npm: Avoid adding config files to ignore file
- npm: Bump to 3.0.0-rc.2
- Build: Update build
2018-07-31 15:15:25 -07:00
Brett Zamir 986f13b55c - Docs (README): Latest is not necessarily a prerelease
- Docs (Release instructions): Version (semver) should be 3 digits; fix github.io paths
2018-07-19 16:15:37 -07:00
Brett Zamir 8a5894c622 - Docs: Update release instructions 2018-07-19 16:03:40 -07:00
Brett Zamir bee5870197 - npm: Bump to 3.0.0-rc.1
- Docs: No longer need to update `svg-edit.github.io` as referencing "latest" but add note to add to "Recent news"
2018-07-19 15:08:52 -07:00
Brett Zamir 0a25236477 - Breaking change: Avoid adding `assignAttributes`, `addSVGElementFromJson`,
`call`, `copyElem`, `findDefs`, `getElem`, `getId`, `getIntersectionList`,
  `getMouseTarget`, `getNextId`, `getUrlFromAttr`, `hasMatrixTransform`,
  `matrixMultiply`, `recalculateAllSelectedDimensions`,
  `recalculateDimensions`, `remapElement`, `removeUnusedDefElems`, `round`,
  `runExtensions`, `sanitizeSvg`, `setGradient` `transformListToTransform`
  (and mistaken `toString` export) to `getPrivateMethods` (passed to
  extensions) as available as public ones
- Build: Update ext-xdomain-messaging
- Fix (extension): ForeignObject editor
- Docs: Avoid reporting deliberate "Any" type
- Docs: Further docs (`logMatrix`, `getPrivateMethods`)
- Docs: Suggest `npm pack`
2018-07-19 14:58:30 -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
tetedacier 057f5a5dc2 Activate markdown plugin 2018-07-05 18:02:46 +02:00
troy351 971ffda89a
Docs: fixed table layout 2018-06-20 13:57:09 +08:00
troy351 7e5abd3469
Docs: fixed table layout 2018-06-20 13:56:14 +08:00
Brett Zamir 812ca80230 - Docs: Further exclusions 2018-05-31 17:45:48 +08:00
Brett Zamir bbded75c54 - ExtensionDocs update 2018-05-31 17:09:53 +08:00
Brett Zamir a27a5d5637 - Docs: Exclude from jsdoc firefox-extension, opera-widget, screencasts, test folders and build.html.js/rollup files
- Docs: Further JSDoc of methods
- Docs: Transfer some changes from ExtensionDocs on wiki (need to fully reconcile)
- Refactoring (minor): variadic args through ellipsis
2018-05-31 16:07:44 +08:00
Brett Zamir f2b1a1ff0c - Enhancement: Allow callback argument and return promise
for canvas methods: `rasterExport` and `exportPDF`
2018-05-30 16:47:43 +08:00
Brett Zamir 41201cf452 - Docs: Reference JSDocs in README
- Docs (ReleaseInstructions): Clarify README changing; lbs
2018-05-30 11:40:55 +08:00
Brett Zamir df69ba2b72 - Move jsdoc output to public directory so may be visible on releases (while still having in a `.gitignore`) 2018-05-30 11:32:56 +08:00
Brett Zamir f1bdd668c6 - Docs (ReleaseInstructions): Avoid referencing binary files for now;
include mention of ES6 Module HTML file and need to copy
    config files (without `.git`/`.gitignore` files); mention reviewing
    Github release format
2018-05-30 11:16:54 +08:00
Brett Zamir 3b04fe0c63 - Docs: Add README link to pre-release
- Docs (ReleaseInstructions): Comment out Makefile-related instructions for now and
    add to-dos (README referencing current version and `package-lock.json`, tagging)
- npm: Bump to 3.0.0-alpha.4
2018-05-30 10:57:28 +08:00
Brett Zamir 8c9e40d349 - Breaking change: Rename config file to `svgedit-config-iife.js` (or for the module version, `svgedit-config-es.js`);
also expect one directory higher; incorporates #207 (@iuyiuy)
- Breaking change: Separate `extIconsPath` from `extPath` (not copying over icons)
- Breaking change: Don't reference `custom.css` in HTML; can instead be referenced in JavaScript through
    the config file (provided in `svgedit-config-sample-iife.js`/`svgedit-config-sample-es.js` as `svgedit-custom.css` for
    better namespacing); incorporates #207 (@iuyiuy)
- Breaking change: Remove minified jgraduate/spinbtn files (minified within Rollup routine)
- Fix: Zoom when scrolled; incorporates #169 (@AndrolGenhald), adapting for conventions; also allow avoidance when shift key pressed
- Fix: Update Atom feed reference in HTML
- Fixes related to recent commits: Some path and method name fixes needed, function order, missing methods, variable scope declaration, no need for DOMContentLoaded listeners in modules, switch back to non-default export, avoid trimming nullish, deal with mock tests, fix `math.matrixMultiply`, use jquery-svg where needed for array/SVG attributes; add babel-polyfill and defer script to imagelib; other misc. fixes
- Enhancement: Move config-sample.js out of `editor` directory
- Enhancement: For `callback`-style extensions, also provide config object; add following
   to that object: buildCanvgCallback, canvg, decode64, encode64, executeAfterLoads, getTypeMap, isChrome, ieIE, NS, text2xml
- Enhancement: Complete ES6 modules work (extensions, locales, tests), along with Babel;
    make Node build routine for converting modular source to non-modular,
    use `loadStylesheets` for modular stylehsheet defining (but parallel loading);
- Enhancement: Add `stylesheets` config for modular but parallel stylesheet loading with `@default` option for simple inclusion/exclusion of defaults (if not going with default).
- Refactoring: Clean up `svg-editor.html`: consistent indents; avoid extra lbs, avoid long lines
- Refactoring: Avoid embedded API adding inline JavaScript listener
- Refactoring: Move layers and context code to `draw.js`
- Refactoring: Move `pathActions` from `svgcanvas.js` (though preserve aliases to these methods on `canvas`) and `convertPath` from `svgutils.js` to `path.js`
- Refactoring: Move `getStrokedBBox` from `svgcanvas.js` (while keeping an alias) to `svgutils.js` (as `getStrokedBBoxDefaultVisible` to avoid conflict with existing)
- Docs: Remove "dependencies" comments in code except where summarizing role of jQuery or a non-obvious dependency
- Refactoring/Linting: Enfore `no-extra-semi` and `quote-props` rules
- Refactoring: Further avoidance of quotes on properties (as possible)
- Refactoring: Use `class` in place of functions where intended as classes
- Refactoring: Consistency and granularity in extensions imports
- Testing: Update QUnit to 2.6.1 (node_modules) and Sinon to 5.0.8 (and add sinon-test at 2.1.3) and enforce eslint-plugin-qunit linting rules; update custom extensions
- Testing: Add node-static for automating (and accessing out-of-directory contents)
- Testing: Avoid HTML attributes for styling
- Testing: Add npm `test` script
- Testing: Comment out unused jQuery SVG test
- Testing: Add test1 and svgutils_performance_test to all tests page
- Testing: Due apparently to Path having not been a formal class, the test was calling it without `new`; refactored now with sufficient mock data to take into account it is a class
- npm: Update devDeps
- npm: Add html modules and config build to test script
2018-05-25 20:03:14 +08:00