Recent Releases of svgtiler
svgtiler - v3.4.1
- New
--use-defsoption wraps<symbol>s etc. in<defs>, which shouldn't be necessary but works around an Inkscape bug with<symbol>s nested inside<symbol>s, which arise e.g. when combining SVG Tiler outputs together with SVG Tiler.
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.4.0...v3.4.1
- CoffeeScript
Published by edemaine 6 months ago
svgtiler - v3.4.0
- External SVG files (loaded via either a mapping to
filename.svgor by callingrequire("filename.svg")) get theirids/hrefs automatically prefixed by a globally unique prefix based on the filename, to avoid id collisions especially between multiple included files.- In particular, this makes it easy to use SVG Tiler to combine together other SVG Tiler outputs, such as when drawing gadgets and then gadget assemblies.
- Thanks to @slef for finding this issue and helping write the fix.
- SVG Tiler now warns if the output SVG has duplicate
ids, which is invalid XML/SVG. This will help with future debugging, such as when manually buildingids in mappings.
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.3.0...v3.4.0
- CoffeeScript
Published by edemaine 6 months ago
svgtiler - v3.3.0
- New file type:
.psvis Pipe-Separated Values which uses separator|. This separator is both uncommon and looks nice to humans (unlike tabs in .tsv). It also looks like Markdown tables (but keys aren't automatically trimmed of whitespace). - New example: Mario crossover gadget
- Easier debugging of SVG parse errors on the web: detect and display
<parseerror>s generated by web platform's XML parser - Fix
--marginwithout--uneven(previously added an extra blank row at the end) (#110) - Fix path handling on Windows (previously, absolute paths with drive names sometimes got directories such as
./prepended, which in particular maderequirebuggy) - Fix handling of absent
boundingBox/overflowBox(probably just occurred on web) - Fix documentation (links, Mario palettes)
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.2.1...v3.3.0
- CoffeeScript
Published by edemaine 9 months ago
svgtiler - v3.2.1
- Support
alignment-baseline: hangingas inalignment-baselinedocumentation examples
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.2.0...v3.2.1
- CoffeeScript
Published by edemaine over 1 year ago
svgtiler - v3.2.0
- LaTeX
<text>alignment (with-t/--tex) improvements:- Fix
text-alignsupport: previously, the emitted\llap/\rlapwas backwards - Use
\makebox(0,0)[...]instead of\llap/\rlapto enable: - Support
alignment-baseline, specificallytop/text-topfort,middle/centralfor vertical centering behavior of\makebox, and anything else forb(effectively the default, as before).
- Fix
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.1.8...v3.2.0
- CoffeeScript
Published by edemaine over 1 year ago
svgtiler - v3.1.6
- The Witness definitions are now much more extensive, thanks to the corresponding paper, with several more examples
- API documentation fleshed out more, in particular relating to DOM methods
- Fix handling of spaces in JSX (#107)
- Upgrade babel, glob, preact, stylus, xmldom dependencies
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.1.5...v3.1.6
- CoffeeScript
Published by edemaine over 2 years ago
svgtiler - v3.1.5
- Update dependencies, in particular removing some (unlikely) security issues
- Examples improvements
- Mario tileset now includes items and allows for firebars made of multiple fires. Example of Mario clause gadget.
- Fix tests of
unevenLengths
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.1.4...v3.1.5
- CoffeeScript
Published by edemaine over 2 years ago
svgtiler - v3.1.3
- Fix
wrapping to keep z-index,boundingBox,overflowproperties of top-level tag. This is useful with layer stacking via arrays, for example, where we don't need aviewBoxin any but the first layer. - Fix paths for re-used (cached) mapping files from multiple directories. Previously, if you re-used a file from multiple directories (when recursing into directories), relative paths might not work.
- Improve "bad SVG Tiler version number" error message to say how to upgrade (
npm install -g svgtiler@latest).
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.1.2...v3.1.3
- CoffeeScript
Published by edemaine about 3 years ago
svgtiler - v3.1.2
- Fix: Don't automatically set
viewBoxofsvgtiler.added content. This was causing issues from<rect>or<image>withwidthandheightsetting the wrong bounding box (becausexandywas ignored). - Fix global
svgtiler.defcontent used insvgtiler.addcontent (which previously wasn't getting checked so the def didn't get included).
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.1.1...v3.1.2
- CoffeeScript
Published by edemaine about 3 years ago
svgtiler - v3.1.0
RendergainsforEachhelper that iterates over all cells with aContextRendergainscontexthelper to make newContextinstances at arbitrary locationsContextgainsstartsWith/endsWithshortcut helpers (to query thekeyeven when it might beundefined)- Empty fragments returned from mapping now treated like empty symbols (just like empty-string SVG content); previously crashed (#104)
- Empty content returned from mapping always treated as having width/height 0 instead of warning
- Not-first symbols in an array stack no longer warn about missing width/height (#105)
- Documentation improvements:
- Render class
keyisundefined, notnull, when out of bounds- How to upgrade with NPM
Full Changelog: https://github.com/edemaine/svgtiler/compare/v3.0.0...v3.1.0
- CoffeeScript
Published by edemaine about 3 years ago
svgtiler - v3.0.0
- Major rewrite to improve usage and add a ton of features, including Maketiles, stacked symbols in a single tile, automatically dynamic map functions, arbitrary pre/postprocessing, global underlays/overlays,
<def>s support, better SVG cropping, improved performance, and smaller SVG outputs. - New "Maketile" feature for setting default
svgtilercommand-line arguments (replacing the need for Makefiles andmake). (#84, #99)Maketile.argscan specify default command-line arguments, as if they were in a shell. In particular, you can use glob patterns like**/*.asc, quotes and backslash escapes, and comments via#. Unlike shells, you can freely use multiple lines.Maketile.jsorMaketile.coffeecanexport make(orexport default) with a function that runssvgtilerwith computed arguments.svgtiler(...args)is like runningsvgtileron the command line with the specified arguments. String arguments are parsed as in.args, whileArrayarguments are treated as is without further processing. You can also pass in already loadedDrawing,Mapping, orStyleobjects.- You can write multiple make rules (chosen on the command line) by wrapping functions in an object or
Map(similar to mapping files), or write a generic function that takes the rule name as an argument. - You can loop over files matching a glob pattern via
svgtiler.glob, and check for additional glob pattern matches viasvgtiler.match. - If you specify an actual file (mapping and/or drawing), default Maketiles get ignored.
- You can still specify additional arguments to add to what's run by the
Maketile, e.g.svgtiler -v. - You can specify a differently named Maketile via
--maketile.
- Other command-line changes: (#84, #99)
- Specifying a directory name on the command line recurses into that directory, running the
Maketilewithin. -Olets you override the generated output filename stem (sans extension), including specifying patterns likeprefix_*_suffix(#84)-s key=valuesetsshare.keyto the string"value", as shorthand for creating a mapping file that setsshare.( ... )contains mapping files,-sshare settings, and other command-line options to within the parentheses.--bg colorfor specifying background color. (#57)--use-dataaddsdata-{key,i,j,k}attributes to<use>tags. (#48)--use-hrefuseshrefattributes instead ofxlink:href--cleanfor deleting files that would be generated.- Support multiple single-dash arguments like
-pPas shorthand for-p -P. -v/--verboseoption to help debug e.g. Babel processing.
- Specifying a directory name on the command line recurses into that directory, running the
- Generalized mappings (#13)
- All function mappings are now automatically dynamic; no need to wrap in a second layer of function.
- For efficiency, you can force a function (or any mapping) to be treated as static (dependent only on key, not e.g. neighbors) via
svgtiler.staticwrapper. - Function mappings get
contextas a second argument (afterkey) in addition tothis, which is helpful for passingcontextaround or when using=>arrow functions (which can't receivethis). Current context can also be found viagetContext(). - Mapping can defined by
MaporWeakMapas alternative to raw object. - Sequential composition mapping via
new Mappings map1, map2applies both maps and takes the first match, as if two maps were specified on the command line. (#89) - Can nest functions, objects,
Maps,Mappings, orArrays (see below) arbitrarily deep.
- Tiles can stack multiple
<symbol>s on top of each other, by returning an array of SVG content from a mapping function (#33). The first non-null symbol defines defines the tile size.- Each
<symbol>can have its ownz-index, for proper component stacking. - Deduplication of the individual
<symbol>s makes for smaller SVG output. - Parallel composition mapping via
[map1, map2]applies both maps and stacks one on top of the other (depending onz-index). (#83)
- Each
<symbol>s in mappings no longer needviewBox; you can simply specifywidthandheightand theviewBoxwill default to0 0 width height. You can also specify both and it behaves as in SVG. (#44)boundingBoxis the new name for theoverflowBoxattribute (though the old name is still supported). The box can now be smaller than the layout box (specified viawidth/heightorviewBox), which trims the overall bounding box when possible (#86). Technically this is a BREAKING CHANGE if youroverflowBoxis smaller than the layout box, but this is what it ought to happen then..js/.coffeemapping files can now have many newexports:initis useful for applying side effects to thesharedobject; it runs once per "load" of the mapping file, with mapping files alwaysiniting in command-line order (but sometimes more than once to restore an old state).preprocesslets you scan and/or modify the tile keys in a drawing (#79)postprocesslets you draw global content after tiles have been rendered (#81)- The mapping object can be exported as
map, as a more descriptive name thandefault. - For the final expression to be implicitly exported as the default, it must be an object expression (literal) or function expression; in particular, it cannot be an assignment or function call. Potentially BREAKING CHANGE, but fixes the behavior in many other files.
- You can specify a background fill (drawn via a big backing rectangle) via the
--bgcommand-line option, or viasvgtiler.background(color). (#57) This is a helpful special case ofpostprocessing. - Tiles causing errors in your
.js/.coffeecode now render as a warning symbol, and will no longer prevent the rest of the drawing from rendering. This makes it easier to see where your mapping code is crashing, and helps you write mappings incrementally. (#49) - Drawing file behavior tweaks (BREAKING CHANGES)
- Lines in ASCII art and CSV/TSV/SSV files are automatically normalized to have the same length, by appending blank strings (
'') to short lines (same as XLSX files were). You can get the old behavior via--uneven. (#85) - A blank sheet name in a spreadsheet file no longer has
_in the generated filename. - If a spreadsheet file has only one sheet and it has a nonblank name, it will be in the generated filename.
- Lines in ASCII art and CSV/TSV/SSV files are automatically normalized to have the same length, by appending blank strings (
- Examples
- New grid-graph example, including
<marker>demonstration - Chess examples with attack graph via
postprocess - Tilt example modernized to use Preact
- Improve mario example to use tile arrays to reduce duplication and demonstrate background feature.
- Modernize to new generalized mappings, e.g. avoiding excess function wrappers and using
svgtiler.static
- New grid-graph example, including
- API changes:
renderDOM(and otherrendermethods) now takemappingsandstylesas part of general settings object, instead of as separate arguments. Thesemappingsandstylesare now automatically cast intoMappingandStyleobjects if needed. Butmappingscan no longer be a map object; it needs to be of the form{map: ...}(or{default: ...}), just like what would beimport *ed from a mapping file. BREAKING CHANGESsvgtiler.deflets you build markers, gradients, clip masks, etc. with automatically generated IDs, with automatic deduplication and removal of unused defs, and makes it easy to reference them. (#38)svgtiler.idlets you build unique IDs, e.g. to re-use a graphical object (#38). (svgtiler.defalso uses this internally.)svgtiler.add(svg)to add SVG content to the current rendering, e.g., in apreprocessorpostprocessfunction. This also enables adding metadata like<title>(#94).svgtiler.require(filename)loads a file (including drawings like ASCII art or spreadsheets, mappings, etc.) as if it were on the command line, producing aMapping,Drawing,Drawings,Style,Args, orSVGFileobject.svgtiler.needVersionfor specifying version constraints on SVG Tiler, e.g.svgtiler.needVersion('3.x')in yourMaketile.coffee. (#99)svgtiler.getContext()to find the currentContextfor a tile rendering, so you don't need to pass it through to auxiliary functions.svgtiler.runWithContext()allows you to override the result ofsvgtiler.getContext().Contexthas newatmethod for absolute indexing (#78) andsetmethod for modifying keys (#69)Contextno longer hassymbolsorsymbolattributes (as cells are now rendered one at a time, instead of all ahead of time).Contextobject now shared throughout each drawing, so you could store extra drawing-specific data there.Contexthasrenderattribute pointing to currentRenderinstance, in addition todrawingattribute pointer to currentDrawinginstance.Drawingkeys are now allowed to be objects other thanStrings, e.g., via preprocessing or when creating manually vianew Drawing.Drawinghas newat,get, andsetmethods.Drawing's main attribute renamed fromdatatokeys, andMapping's main attribute renamed fromdatatomap. (#88)Drawinghas newmarginsandunevenLengthsattributes for understanding what happened during margin trimming and uneven length fixing.Mapping'smoduleattribute renamed toexports.- New
Renderclass represents a rendering task for oneDrawing, including all render parameters (e.g.drawing,mappings, andstyles). xMin,xMax,yMin,yMax,width,height, andlayersattributes which are useful inpreprocessandpostprocess.idmethod for generating unique IDs;svgtiler.idcalls this.defmethod for including<defs>content;svgtiler.defcalls this.addmethod for adding SVG content;svgtiler.addcalls this.makeDOM,makeSVG,makeTeXreplace oldrenderSVGDOM,renderSVG, andrenderTeXmethods ofDrawing.svgtiler.getRender()to find the currentRenderjob, so you don't need to pass it through to auxiliary functions.svgtiler.runWithRender()to override.- New
TileandSVGSymbolclasses:Tilerepresents an expanded (and possibly parsed) tile at a specific location, whileSVGSymbolrepresents the parsed SVG<symbol>content (which can be used by many tiles). These replaceSymbol,StaticSymbol, andDynamicSymbolclasses. (In particular, avoids name conflict with JS'sSymbol.) - The constructors for
Drawing,Mapping, andStyleand their subclasses now make it much easier to create the equivalent of drawing, mapping, and style files without actual files. For most subclassesXofInput,new X(data, options)generally takes the file contents as the first argument. For example,new ASCIIMapping(asc)will now parse an ASCII file, andnew StylusStyle(content)will now parse Stylus content. MappingsandStylesare now justArraysubclasses. Instead ofMappings.from([map1, map2]), you now just usenew Mappings(map1, map2).- New
Driverclass representing command-line-style drivers, with inheritance of options from the parent, to support proper recursion. svgtiler.getDriver()to find the currentDriver;svgtiler.runWithDriver()allows you to override the result ofsvgtiler.getDriver().
- Optimizations
- Tile caching/deduplication is now global to each rendering, not local to each dynamic
Symbol(#50), enabling re-use when multiple tile keys expand to the same SVG. - Tiles with empty SVG content no longer render
<symbol>s or<use>s. This can vastly reduce SVG outputs with blank space. (In one case, I got an 82% reduction.) - Generated
<use>tags usually avoid repeatingwidthandheight. (I've seen this reduce large examples with many tiles by ~35%.) - Preact VDOM converted more efficiently to internal xmldom, speeding up use of Precat by around 7x. (#82)
- Inlined images use shorter
ids.
- Tile caching/deduplication is now global to each rendering, not local to each dynamic
- Bug fixes
- No longer override existing
width/heightattributes in<image>s. - Remove
z-indexfromstyleattribute to produce valid SVG. - Prevent mappings accidentally matching tile keys
constructorandtoString. - Fix TeX generation when SVG didn't need to rebuild, and when there was an unrecognized symbol.
- Fix
renderDOMaccidentally using one element's settings for future elements too. - Fixes for running in browser, including Preact VDOM
- No longer override existing
Full Changelog: https://github.com/edemaine/svgtiler/compare/v2.4.1...v3.0.0
- CoffeeScript
Published by edemaine about 3 years ago
svgtiler - v2.4.1
- Fix
svgtilerCLI on Windows, broken in v2.3.0 when fixing Linux, by wrapping CLI in another NodeJS layer - Revise Mario example to use new
sharefeature - Improve documentation, e.g., what "SKIPPED" and "UNCHANGED" mean.
- Minor code cleanup
Full Changelog: https://github.com/edemaine/svgtiler/compare/v2.4.0...v2.4.1
- CoffeeScript
Published by edemaine over 3 years ago
svgtiler - v2.4.0
- Selective building (#70):
svgtilerno longer builds everything; it now acts likemakeand selectively builds what it detects needs rebuilding..svg/.texfiles will be recomputed only when they are older than the drawing file, any mapping file (or one of theirrequired dependencies), or any style file; otherwise, you will see the message(SKIPPED). These files only get rewritten (and their date stamp changed) if their contents have actually changed; otherwise, you will see the message(UNCHANGED). This pairs well with the PDF/PNG conversion of v2.3.0, which only does Inkscape conversion when the SVG file is newer: if the SVG doesn't change, it will no longer trigger PDF/PNG conversion.- Use
-f/--forceto override and force all builds, like the old behavior.
- Use
- Support
require/importing raster images and SVG files from JavaScript/CoffeeScript mapping files (#73). Returns the SVG content as Preact Virtual DOM, making it easy to modify (e.g., strip off<svg>wrapper or add a child). Raw SVG string also available viarequire(...).svg. - New Chess example illustrating new
requirefeature for loading and manipulating.svgfiles, dynamic symbol computation, and JSX notation for creating and composing symbols. - Provide new
shareglobal variable for sharing state between mapping files (#77). For example, this lets you define one mapping file whose behavior is controlled by options specified by one or more other mapping files. (See revised Mario example.) - Add
matchmethod toContextfor simpler RegExp matching (previously documented by not implemented) - Omit SVG Tiler version number from generated
.texfiles, for consistent builds and version control across multiple users - Warn instead of crash when mapping returns string
- Fix multiple
xmlns:xlinkattributes arising when embedding using.svgfiles directly inside tiles. - Fix removal of SVG/XML comment headers in
.svgsource files (whenrequire/importing and for namespace mangling) - Remove
examplesdirectory from NPM package, reducing package size from 1.1 MB (135.6 kB compressed) to 184.9 kB (55.8 kB compressed), for faster installation. - Document
-i/--inkscapeoption - Documentation now has table of contents for easier navigation
Full Changelog: https://github.com/edemaine/svgtiler/compare/v2.3.0...v2.4.0
- CoffeeScript
Published by edemaine over 3 years ago
svgtiler - v2.3.0
- More efficient conversion of SVG files to PDF/PNG via a new spin-off project svgink. (#75)
- You can now specify an
.svgfile (drawn with another tool) directly on the command line to just convert it to PDF/PNG. (Alternatively, you can runsvginkdirectly.) (#75) - New command-line options
-f/--forceto force conversion. - Bug fix for Linux which prevented v2.2.0 from running.
- API change: renamed
SVGTilerExceptiontoSVGTilerError.
Full Changelog: https://github.com/edemaine/svgtiler/compare/v2.2.0...v2.3.0
- CoffeeScript
Published by edemaine over 3 years ago
svgtiler - v2.2.0
- .js and .coffee mapping files are now loaded as NodeJS modules. (Previously, they were run as special functions.)
- Makes these files more interoperable when using them as mappings vs. via
requireorimport. - Reveals additional Node features (e.g.
moduleglobal) - Enables a lot of other exciting features:
- Makes these files more interoperable when using them as mappings vs. via
- New support for
importsyntax as an alternative torequire. - New ways to specify the mapping from a mapping file:
export default mappingorexports.default = mapping. You can still just write themappingat the end of the file. required andimported modules can use JSX syntax, so you can share JSX code between mapping files. (#65)- Source maps are now fully supported, which means errors from your CoffeeScript mapping files will now have correct line numbers. (#56)
- Command-line interface has new options for setting the output directory, helping you keep organized. (#58)
-o/--outputsets an overall default output directory-os/--output-svg,-op/--output-pdf,-oP/--output-png,-ot/--output-texcontrol output directory by file type
- API changes to support a settings object instead of overriding class static attributes. (#47)
- All settings can now be overridden in
renderDOMviadata-*attributes. - New
defaultSettingsexported object to modify defaults. - Replaces old undocumented
renderDOMDefaultsobject. - Replaces old undocumented overrides:
Drawing.inlineImages,Drawing.keepMargins,Drawing.useHref,Drawings.keepHidden,Symbol.svgEncoding,Symbol.forceWidth,Symbol.forceHeight,Symbol.texText,Symbol.overflowDefault
- All settings can now be overridden in
xmldomupgrade means that>is now escaped as>. This can affect CSS output, but should make the resulting SVG easier to parse.
Full Changelog: https://github.com/edemaine/svgtiler/compare/v2.1.1...v2.2.0
- CoffeeScript
Published by edemaine almost 4 years ago
svgtiler - v2.1.0
- New
renderDOMAPI feature for rendering DOM elements that contain drawings (e.g. ASCII art) directly into SVG (#64). See these slides for an example of usage. MappingAPI now supports direct construction of a mapping vianew Mapping(data)wheredatais an object or function. (Previously, you had to create anew Mappingand then call theloadmethod.)- Document above subset of API as stable
- CoffeeScript
Published by edemaine over 4 years ago
svgtiler - v2.0.1
- Update xmldom, improving SVG output in edge cases, in particular addressing a security vulnerability
- Update Babel and xlsx
- CoffeeScript
Published by edemaine over 4 years ago
svgtiler - v2.0.0
- BREAKING CHANGE: Switch from
preserveAspectRatio="xMinYMin meet"to defaultpreserveAspectRatio="xMidyMid meet"(centering), which seems more useful especially in the context of slides. See preserveAspectRatio. - Fix
hrefattribute in case of image embedding (broken in v1.17.0 when addingDrawing.hreffeature)
- CoffeeScript
Published by edemaine over 4 years ago
svgtiler - v1.17.0
- API improvements:
renderSVG*no longer requires thestylesargumentDrawing.useHrefcan be set to use<use href=...>(SVG 2) instead of<use xlink:href=...>(SVG 1.1). This behaves better when embedding directly into HTML.
- Fix use of svgtiler on web (via
<script>tag, no bundling)- Switch from
setAttributeNStosetAttribute; onlycreateElementNSseems to be needed/preferred - Workarounds for
grapheme-splitter(with imperfect Unicode handling),prettify-xml(no prettification), and version number ((web))
- Switch from
- CoffeeScript
Published by edemaine over 4 years ago
svgtiler - v1.16.3
- Update dependencies, including DoS security vulnerabilities in
xlsx - Render Preact to string before duplicate detection, needed for latest Preact. You may need smaller SVG output files thanks to better duplicate detection.
- Fix
svgtilernot knowing its own version number (in.svg_texfiles and command-line output) - Fix exports when using
svgtiler.jsin browser or in Node - Fix handling of symbol without
viewBoxand manualwidth/heightvia--tw/--thoptions (as inexamples/tilt).
- CoffeeScript
Published by edemaine over 4 years ago
svgtiler - v1.16.2
- Upgrade
xmldom(security and other fixes, but also some minor incompatibilities)
- CoffeeScript
Published by edemaine almost 5 years ago
svgtiler - v1.16.1
- Fix support for zero-size
viewBoxwidth and/or height, so that "Even zero-width and zero-height symbols will get rendered (unlessoverflow="hidden")" as claimed in README and as used to be (regression likely introduced in 1.15.0).
- CoffeeScript
Published by edemaine over 5 years ago
svgtiler - v1.16.0
- CSS styling can now be specified in Stylus or CSS (#38)
- Inkscape 1.0 (which has different command-line syntax) is now supported for automatic PDF/PNG conversion
- New
.js/.coffeeevaluation viaFunctionengine instead ofeval, which should offer a more consistent environment and is hopefully also faster. No more messing with the first line of code, which gives source maps more of a chance. Should be backwards-compatible via a new implicit-final-return Babel plugin. Context(thisin symbol definitions) now hasmatchmethod for regular expression matching (#12)- SVG
ids are escaped differently, now completely following the relevant specification (no dollar signs allowed) and unwritten spec (colons don't work on embedded SVGs). Underscores are the answer. Generated SVGs will differ but be more compatible. - Generated SVGs no longer have nonstandard
z-indexoroverflowBoxattributes (#62) or strayxmlns - Improved testing, including SVG validation which now fully passes
- Many documentation improvements
- Rewrote opening paragraphs, including earlier demonstrations and links to examples
- Add links to papers using SVG TIler (#27) [add an issue/PR to include your own paper!]
- Link to Preact API and mention helpfulness of
cloneElement
- API exports more, including
extensionMap,escapeId,Style, andconvertSVG - Dependencies use fixed versions for reliability
- Makefile revamped (#26)
- CoffeeScript
Published by edemaine almost 6 years ago
svgtiler - v1.15.2
- Force specific preact version to work around this issue
- Support for
.cssfiles inlined into<style>tags (#38) - Animation example, illustrating CSS
- CoffeeScript
Published by edemaine almost 6 years ago
svgtiler - v1.15.1
- Super Mario Bros. example (#31)
- Document
--no-overflow optionin command-line help
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.15.0
- BREAKING: Change default
overflowbehavior tovisible, unless--no-overflowoption specified (#60)- Remove now-unnecessary
overflowattributes from examples
- Remove now-unnecessary
- New
<image>processing:- Automatic inlining of
<image>s unless--no-inlineoption specified (#42) - Sharing of duplicate inlined images via another level of
<symbol>s - For all
<image>s (not just those included directly by filename), set defaultimage-renderingtopixelated(via Inkscape/Chrome hack). - Also apply the hack when
image-rendering="pixelated"orimage-rendering="optimizeSpeed"specified. - Don't apply the hack when
image-rendering="auto", for example, so can get smooth rendering that way. - For all
<image>s (not just those included directly by filename), setwidthandheightto that of the image (scaling if exactly one is specified).
- Automatic inlining of
- BREAKING API change:
Symbol.idis now a static property instead of a function, set in constructor and via newsetIdmethod. - Bug fix in processing
styleattributes (introduced in v1.12) - Fix
viewBox/overflowBoxparsing (previously did not support comma-without-space separators) - Change automatic
viewBoxoutput to use spaces instead of commas (a stylistic, not functional, change)
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.14.0
- Give
Context(thisin any function defining a symbol) access tofilename(drawing filename) andsubname(sheet name within e.g..xlsxfile). This makes it easy to customize e.g. colors for specific images, while sharing .js/.coffee code among many files. (#59)
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.13.0
- Improved LaTeX support (#54) [BREAKING from v1.12]:
- Switch from
.texto.svg_texextension for LaTeX component. This fixes use of figures in arXiv.org submissions, which preventsfile.pdfandfile.texfrom simultaneously existing. It also parallels the.pdf/.pdf_texoutput of Inkscape. But it's different, as the separation is done while generating the SVG instead of while generating the PDF, so we don't use.pdf_tex. - Correct relative scaling: SVG units are 1px = 0.75bp, not 0.75pt. This slightly (<0.4%) affects the default (and \svgscale'd) sizing of figures, but now matches the default from
\includegraphicsapplied to the PDF. - Support
currfile.styas a way to find auxiliary graphics file in LaTeX output. - Improve documentation, both in
.svg_texfile and in README.
- Switch from
- Revamp README into sections
- Output svgtiler version in help, to help with debugging
- Update compiled examples to new
idstyle ($vinstead of-vfrom v1.11)
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.12.1
- Workaround relative paths not working in MacOS distribution of Inkscape, which should fix
.pdfand.pnggeneration (command-line options-pand-P) on MacOS
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.11.0
- Versioned ids use
$v5suffix instead of-v5suffix, avoiding ambiguity (#45) - Rename
$UNRECOGNIZED$symbol, avoidingidambiguity (#45) - Support slashes in direct image filenames by fixing escaping
- Fix id generation for blank key
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.10.0
- Reset symbol numbering before each SVG output, which makes for more consistent outputs (#53)
- Warn about duplicate symbol labels (#45)
- Initial support for use as a module: Export all classes, namespaces,
unrecognizedSymbol,mainfunction - Initial support for in-browser use:
- Wrap in function to prevent polluting namespace (except
svgtilerwhich is the exported module) - Mock Node's
pathmodule to the extent needed (extension detection) - Fix use of
DOMParserbecause of CoffeeScript scoping, anddomImplementation - Force SVG namespace before parsing, so we get the correct namespaceURI in created nodes, without outputting additional
xmlnsattributes - Extend
Input.parseFileAPI to allow passing in file data directly
- Wrap in function to prevent polluting namespace (except
- Rename
svg2->convertSVGin API - Bug fixes in bounding box detection, which improved
tiltexample - Bug fix in
polyominoexample (wrongviewBoxspecified) - Optimization: avoid creating
ContextforStaticSymbols which don't use it, via newusesContexthint - Upgrade CoffeeScript, preact, Babel, csv-parse, xlsx, xmldom, image-size, async-limiter dependencies
- CoffeeScript 2.5 now supports
xlink:hreftags (#41)
- CoffeeScript 2.5 now supports
- CoffeeScript
Published by edemaine about 6 years ago
svgtiler - v1.9.0
- Support JSX and CoffeeScript's analog via Preact (#32). You can now beautifully mix JavaScript/CoffeeScript and bare SVG content with minimal notation in between (just
{}s to return to *Script). - See new polyomino example for how this cleans up code.
- Unfortunately, our new use of Babel broke the feature introduced in 1.6.2: Errors in .coffee files are no longer prefixed with correct filename and line numbers. I'll try to get this back, somehow...
- Fix
DynamicSymbolcaching: would re-use symbol when generating objects, even if contents differed. (Also necessary for current approach to JSX.)
- CoffeeScript
Published by edemaine over 6 years ago
svgtiler - v1.8.0
- Feature: Automatic width/height of tiles via
width="auto"andheight="auto" - Feature: Undefined symbols are now rendered like � so they're easier to locate (#18)
- Bug fix: Handling of relative filenames in mapping files
- Cleanup: Refactor
overflow: visiblecheck - Documentation improvements
- Testing/build improvements (#26)
- CoffeeScript
Published by edemaine over 6 years ago
svgtiler - v1.7.1
- Add z-index attribute support as alternative to
style="z-index:..."(#36) - Fix CSV/SSV/etc. parsing (was crashing since v1.6.0 from bug in 826a1c4 code cleanup)
- Improve maze example
- Improve documentation
- Fix root Makefile somewhat (#26)
- CoffeeScript
Published by edemaine almost 7 years ago
svgtiler - v1.7.0
- Full Unicode support in ASCII art files: one "symbol" per Unicode grapheme (as defined by UAX #29), via grapheme-splitter library
- CoffeeScript
Published by edemaine almost 7 years ago
svgtiler - v1.6.2
- Add support for
__dirnameand__filenamein .coffee/.js formats - Errors in .coffee/.js files are now prefixed with correct filename and line numbers
- Use
sourceURLmapping for .js - Correctly rewrite line numbers in .coffee errors
- Use
- Fix bug with numeric entries in xlsx sheets
- Code cleanup to use fewer static methods
- CoffeeScript
Published by edemaine almost 7 years ago
svgtiler - v1.6.1
- Better error message when accidentally returning null from symbol function (js/coffee modes)
- Treat empty returned string (in js/coffee modes) as blank 0-by-0 SVG tile (fixing #30)
- Bug fix embedding of SVG files with root
idproperty accidentally overwriting actualidof symbol
- CoffeeScript
Published by edemaine almost 7 years ago
svgtiler - v1.6.0
- Ignore hidden sheets in
.xlsxfiles, making it easy to deprecate sheets (#29). You can override this behavior with--hidden - Force Unix-style
\nnewlines for consistent builds across architectures (better Windows support!) - Upgrade
csv-parseandxlsxNPM packages - Much nicer SVG parse errors/warnings (#21).
- Beginning of exports for module or browser use
- CoffeeScript
Published by edemaine about 7 years ago
svgtiler - v1.5.1
- Inkscape-generated PDF is now automatically sanitized to remove any
/CreationDate, unless--no-sanitizecommand-line option is specified. This is useful for version control: you can regenerate all your figures and generally not get any diffs if nothing changed.
- CoffeeScript
Published by edemaine about 8 years ago
svgtiler - v1.5.0
- New command-line option
-j Nor--jobs Nruns up toNInkscape jobs in parallel, similar tomake. The default behavior remains running the Inkscape jobs one after the other, but if you want to use your multiple cores/CPUs, you can specify e.g.-j 4to run up to four Inkscape jobs in parallel. (SVG Tiler occupies another thread, but it's rarely much of a bottleneck, so it doesn't count as a "job" inN.) - Along the way, I thoroughly tested and cleaned up error handling when running Inkscape. If Inkscape fails, you should now definitely be told about it, running in both sequential and parallel mode.
- Update to CoffeeScript 2. So you can use CS2 features in your
.coffeecode if you want (and if your Node version supports the output; e.g., if you useawait, you should have Node 8+).
- CoffeeScript
Published by edemaine about 8 years ago
svgtiler - v1.4.2
- Fix PDF and PNG generation to workaround an Inkscape bug that causes the ignoring of any symbols that had strange characters (e.g.
|) that required percent encoding. The workaround is to replace%encoding to instead use the character$, another allowed (but not specially interpreted) symbol in SVGids. - As a consequence, Tetris examples now have black background as intended (properly interpreting space).
- CoffeeScript
Published by edemaine about 8 years ago
svgtiler - v1.4.0
- Support PNG/JPG images as symbol specifiers, automatically turning them into SVG that includes them (but images must be in the same directory)
- Improve Tilt examples, and add Tetris examples
- Add automatic
<image>size detection - Bug fix: Fix
<ellipse>size detection - Performance: Increase speed when not using some features (CoffeeScript, CSV, XLS, PDF) by pushing
requirecalls as late as possible - Cleanup
tile-width/tile-heightdocumentation and attributes
- CoffeeScript
Published by edemaine about 8 years ago
svgtiler - v1.3.4
- Fix symbol names in output SVG to avoid using colons, which seemed to wreck havoc in SVGs embedded via
<img>into HTML. - Unfortunately, we were encoding all unusual characters using colons, so all SVGs should be regenerated.
- Now code is simpler, just using encodeURIComponent.
- CoffeeScript
Published by edemaine over 8 years ago
svgtiler -
- PDF conversion fixes: fix non-XLS case, show inkscape launch errors
- CoffeeScript
Published by edemaine over 8 years ago
svgtiler -
- Render zero-width/zero-height symbols when
style="overflow: visible"is specified, despite CSS rules.
- CoffeeScript
Published by edemaine over 8 years ago
svgtiler -
-p/--pdf command-line option to automatically convert all exported SVG files to PDF via Inkscape
- CoffeeScript
Published by edemaine almost 9 years ago
svgtiler -
- Support blank symbols in .txt mapping files (#17)
- CoffeeScript
Published by edemaine almost 9 years ago
svgtiler -
- Command-line examples in documentation (#16)
- CoffeeScript
Published by edemaine almost 9 years ago
svgtiler -
- Fix support for filenames in
.txtmapping files (#15)
- CoffeeScript
Published by edemaine almost 9 years ago
svgtiler -
- Excel, OpenOffice, etc. spreadsheet support. In particular, multiple sheets in one file! (#19)
- Mapping function can now return
nullorundefined, and it will be the same as a missing mapping for that symbol (so it might render funny, but at least it won't crash). (#11)
- CoffeeScript
Published by edemaine almost 9 years ago