UNPKG

scrawl-canvas

Version:
927 lines (578 loc) 51.9 kB
<!DOCTYPE html> <html> <head> <title>Core library</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> <link rel="stylesheet" media="all" href="../../docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <ul id="jump_to"> <li> <a class="large" href="javascript:void(0);">Jump To &hellip;</a> <a class="small" href="javascript:void(0);">+</a> <div id="jump_wrapper"> <div id="jump_page_wrapper"> <div id="jump_page"> <a class="source" href="animationloop.html"> ./source/core/animationloop.js </a> <a class="source" href="document.html"> ./source/core/document.js </a> <a class="source" href="events.html"> ./source/core/events.js </a> <a class="source" href="init.html"> ./source/core/init.js </a> <a class="source" href="library.html"> ./source/core/library.js </a> <a class="source" href="random-seed.html"> ./source/core/random-seed.js </a> <a class="source" href="snippets.html"> ./source/core/snippets.js </a> <a class="source" href="userInteraction.html"> ./source/core/userInteraction.js </a> <a class="source" href="utilities.html"> ./source/core/utilities.js </a> <a class="source" href="../factory/action.html"> ./source/factory/action.js </a> <a class="source" href="../factory/anchor.html"> ./source/factory/anchor.js </a> <a class="source" href="../factory/animation.html"> ./source/factory/animation.js </a> <a class="source" href="../factory/bezier.html"> ./source/factory/bezier.js </a> <a class="source" href="../factory/block.html"> ./source/factory/block.js </a> <a class="source" href="../factory/canvas.html"> ./source/factory/canvas.js </a> <a class="source" href="../factory/cell.html"> ./source/factory/cell.js </a> <a class="source" href="../factory/cog.html"> ./source/factory/cog.js </a> <a class="source" href="../factory/color.html"> ./source/factory/color.js </a> <a class="source" href="../factory/conicGradient.html"> ./source/factory/conicGradient.js </a> <a class="source" href="../factory/coordinate.html"> ./source/factory/coordinate.js </a> <a class="source" href="../factory/crescent.html"> ./source/factory/crescent.js </a> <a class="source" href="../factory/element.html"> ./source/factory/element.js </a> <a class="source" href="../factory/emitter.html"> ./source/factory/emitter.js </a> <a class="source" href="../factory/filter.html"> ./source/factory/filter.js </a> <a class="source" href="../factory/filterEngine-bluenoiseData.html"> ./source/factory/filterEngine-bluenoiseData.js </a> <a class="source" href="../factory/filterEngine.html"> ./source/factory/filterEngine.js </a> <a class="source" href="../factory/fontAttributes.html"> ./source/factory/fontAttributes.js </a> <a class="source" href="../factory/gradient.html"> ./source/factory/gradient.js </a> <a class="source" href="../factory/grid.html"> ./source/factory/grid.js </a> <a class="source" href="../factory/group.html"> ./source/factory/group.js </a> <a class="source" href="../factory/imageAsset.html"> ./source/factory/imageAsset.js </a> <a class="source" href="../factory/line.html"> ./source/factory/line.js </a> <a class="source" href="../factory/lineSpiral.html"> ./source/factory/lineSpiral.js </a> <a class="source" href="../factory/loom.html"> ./source/factory/loom.js </a> <a class="source" href="../factory/mesh.html"> ./source/factory/mesh.js </a> <a class="source" href="../factory/net.html"> ./source/factory/net.js </a> <a class="source" href="../factory/noiseAsset.html"> ./source/factory/noiseAsset.js </a> <a class="source" href="../factory/oval.html"> ./source/factory/oval.js </a> <a class="source" href="../factory/palette.html"> ./source/factory/palette.js </a> <a class="source" href="../factory/particle.html"> ./source/factory/particle.js </a> <a class="source" href="../factory/particleForce.html"> ./source/factory/particleForce.js </a> <a class="source" href="../factory/particleHistory.html"> ./source/factory/particleHistory.js </a> <a class="source" href="../factory/particleSpring.html"> ./source/factory/particleSpring.js </a> <a class="source" href="../factory/particleWorld.html"> ./source/factory/particleWorld.js </a> <a class="source" href="../factory/pattern.html"> ./source/factory/pattern.js </a> <a class="source" href="../factory/phrase.html"> ./source/factory/phrase.js </a> <a class="source" href="../factory/picture.html"> ./source/factory/picture.js </a> <a class="source" href="../factory/polygon.html"> ./source/factory/polygon.js </a> <a class="source" href="../factory/polyline.html"> ./source/factory/polyline.js </a> <a class="source" href="../factory/quadratic.html"> ./source/factory/quadratic.js </a> <a class="source" href="../factory/quaternion.html"> ./source/factory/quaternion.js </a> <a class="source" href="../factory/radialGradient.html"> ./source/factory/radialGradient.js </a> <a class="source" href="../factory/rawAsset.html"> ./source/factory/rawAsset.js </a> <a class="source" href="../factory/rdAsset.html"> ./source/factory/rdAsset.js </a> <a class="source" href="../factory/rectangle.html"> ./source/factory/rectangle.js </a> <a class="source" href="../factory/renderAnimation.html"> ./source/factory/renderAnimation.js </a> <a class="source" href="../factory/shape.html"> ./source/factory/shape.js </a> <a class="source" href="../factory/spiral.html"> ./source/factory/spiral.js </a> <a class="source" href="../factory/spriteAsset.html"> ./source/factory/spriteAsset.js </a> <a class="source" href="../factory/stack.html"> ./source/factory/stack.js </a> <a class="source" href="../factory/star.html"> ./source/factory/star.js </a> <a class="source" href="../factory/state.html"> ./source/factory/state.js </a> <a class="source" href="../factory/tetragon.html"> ./source/factory/tetragon.js </a> <a class="source" href="../factory/ticker.html"> ./source/factory/ticker.js </a> <a class="source" href="../factory/tracer.html"> ./source/factory/tracer.js </a> <a class="source" href="../factory/tween.html"> ./source/factory/tween.js </a> <a class="source" href="../factory/unstackedElement.html"> ./source/factory/unstackedElement.js </a> <a class="source" href="../factory/vector.html"> ./source/factory/vector.js </a> <a class="source" href="../factory/videoAsset.html"> ./source/factory/videoAsset.js </a> <a class="source" href="../factory/wheel.html"> ./source/factory/wheel.js </a> <a class="source" href="../mixin/anchor.html"> ./source/mixin/anchor.js </a> <a class="source" href="../mixin/asset.html"> ./source/mixin/asset.js </a> <a class="source" href="../mixin/assetAdvancedFunctionality.html"> ./source/mixin/assetAdvancedFunctionality.js </a> <a class="source" href="../mixin/assetConsumer.html"> ./source/mixin/assetConsumer.js </a> <a class="source" href="../mixin/base.html"> ./source/mixin/base.js </a> <a class="source" href="../mixin/cascade.html"> ./source/mixin/cascade.js </a> <a class="source" href="../mixin/delta.html"> ./source/mixin/delta.js </a> <a class="source" href="../mixin/displayShape.html"> ./source/mixin/displayShape.js </a> <a class="source" href="../mixin/dom.html"> ./source/mixin/dom.js </a> <a class="source" href="../mixin/entity.html"> ./source/mixin/entity.js </a> <a class="source" href="../mixin/filter.html"> ./source/mixin/filter.js </a> <a class="source" href="../mixin/mimic.html"> ./source/mixin/mimic.js </a> <a class="source" href="../mixin/path.html"> ./source/mixin/path.js </a> <a class="source" href="../mixin/pattern.html"> ./source/mixin/pattern.js </a> <a class="source" href="../mixin/pivot.html"> ./source/mixin/pivot.js </a> <a class="source" href="../mixin/position.html"> ./source/mixin/position.js </a> <a class="source" href="../mixin/shapeBasic.html"> ./source/mixin/shapeBasic.js </a> <a class="source" href="../mixin/shapeCurve.html"> ./source/mixin/shapeCurve.js </a> <a class="source" href="../mixin/shapePathCalculation.html"> ./source/mixin/shapePathCalculation.js </a> <a class="source" href="../mixin/styles.html"> ./source/mixin/styles.js </a> <a class="source" href="../mixin/tween.html"> ./source/mixin/tween.js </a> </div> </div> </li> </ul> <ul class="sections"> <li id="section-1"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-1">&#x00a7;</a> </div> <h1 id="core-library">Core library</h1> <p>Scrawl-canvas stores most of the objects it creates in a centralized space, so that they can be referenced from other places in the code base, and from user-written code. </p> <p>While some sections are dedicated to a single type of object, other sections are aggregations - this may lead to name conflicts if coders are not rigorous in their naming conventions when creating objects (through the <strong>make</strong> factory functions).</p> <p><code>Exported object</code> (to modules and scrawl object). Scrawl-canvas exposes the library, and its sections, for import into other script files</p> </div> </li> <li id="section-2"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-2">&#x00a7;</a> </div> <p>No imports required</p> </div> </li> <li id="section-3"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-3">&#x00a7;</a> </div> <p>Current version</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> version = <span class="hljs-string">&#x27;8.9.4&#x27;</span>;</pre></div></div> </li> <li id="section-4"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-4">&#x00a7;</a> </div> <p>Objects created using the <strong>makeAnchor</strong> factory</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> anchor = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> anchornames = [];</pre></div></div> </li> <li id="section-5"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-5">&#x00a7;</a> </div> <p>Objects created using the <strong>makeAnimation</strong> and <strong>makeRender</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> animation = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> animationnames = [];</pre></div></div> </li> <li id="section-6"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-6">&#x00a7;</a> </div> <p>Objects - specifically tickers - created using the <strong>makeTicker</strong> and <strong>makeTween</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> animationtickers = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> animationtickersnames = [];</pre></div></div> </li> <li id="section-7"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-7">&#x00a7;</a> </div> <p>An aggregate of all contents in the canvas, element, entity and stack sections of the library.</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> artefact = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> artefactnames = [];</pre></div></div> </li> <li id="section-8"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-8">&#x00a7;</a> </div> <p>Scrawl-canvas wrappers for visual media (images, videos, sprites). Anything that a Picture entity or Pattern style can use as their asset source needs to be included in this section of the library</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> asset = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> assetnames = [];</pre></div></div> </li> <li id="section-9"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-9">&#x00a7;</a> </div> <p>Canvas element wrappers created during Scrawl-canvas initialization, and the <strong>makeCanvas</strong>, <strong>getCanvas</strong> and <strong>addCanvas</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> canvas = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> canvasnames = [];</pre></div></div> </li> <li id="section-10"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-10">&#x00a7;</a> </div> <p>Objects created using the <strong>makeCell</strong> and <strong>canvas.buildCell</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> cell = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> cellnames = [];</pre></div></div> </li> <li id="section-11"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-11">&#x00a7;</a> </div> <p>DOM element wrappers created during Scrawl-canvas initialization, and created using the <strong>makeElement</strong>, <strong>Stack.addExistingDomElement</strong> and <strong>Stack.addNewElement</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> element = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> elementnames = [];</pre></div></div> </li> <li id="section-12"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-12">&#x00a7;</a> </div> <p>All canvas-related artefacts (Blocks, Wheels, etc) get stored in the <strong>entity</strong> section of the library. </p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> entity = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> entitynames = [];</pre></div></div> </li> <li id="section-13"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-13">&#x00a7;</a> </div> <p>Objects created using the <strong>makeFilter</strong> factory</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> filter = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> filternames = [];</pre></div></div> </li> <li id="section-14"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-14">&#x00a7;</a> </div> <p>Used internally by Phrase artefacts</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> fontattribute = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> fontattributenames = [];</pre></div></div> </li> <li id="section-15"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-15">&#x00a7;</a> </div> <p>Objects created using the <strong>makeGroup</strong> factory, and generated as part of the process of creating Stack and Canvas artefacts, and Cell assets.</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> group = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> groupnames = [];</pre></div></div> </li> <li id="section-16"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-16">&#x00a7;</a> </div> <p>Used internally by Gradient and RadialGradient styles</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> palette = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> palettenames = [];</pre></div></div> </li> <li id="section-17"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-17">&#x00a7;</a> </div> <p>Physics-related objects</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> particle = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> particlenames = []; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> force = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> forcenames = []; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> spring = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> springnames = []; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> world = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> worldnames = [];</pre></div></div> </li> <li id="section-18"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-18">&#x00a7;</a> </div> <p>Section classes are used with Phrase entitys - we store the class definitions in the library so that they can be easily shared between Phrases</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> sectionClasses = { <span class="hljs-string">&#x27;DEFAULTS&#x27;</span>: { <span class="hljs-attr">defaults</span>: <span class="hljs-literal">true</span> }, <span class="hljs-string">&#x27;b&#x27;</span>: { <span class="hljs-attr">weight</span>: <span class="hljs-string">&#x27;bold&#x27;</span> }, <span class="hljs-string">&#x27;/b&#x27;</span>: { <span class="hljs-attr">weight</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;strong&#x27;</span>: { <span class="hljs-attr">weight</span>: <span class="hljs-string">&#x27;bold&#x27;</span> }, <span class="hljs-string">&#x27;/strong&#x27;</span>: { <span class="hljs-attr">weight</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;BOLD&#x27;</span>: { <span class="hljs-attr">weight</span>: <span class="hljs-string">&#x27;bold&#x27;</span> }, <span class="hljs-string">&#x27;/BOLD&#x27;</span>: { <span class="hljs-attr">weight</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;i&#x27;</span>: { <span class="hljs-attr">style</span>: <span class="hljs-string">&#x27;italic&#x27;</span> }, <span class="hljs-string">&#x27;/i&#x27;</span>: { <span class="hljs-attr">style</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;em&#x27;</span>: { <span class="hljs-attr">style</span>: <span class="hljs-string">&#x27;italic&#x27;</span> }, <span class="hljs-string">&#x27;/em&#x27;</span>: { <span class="hljs-attr">style</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;ITALIC&#x27;</span>: { <span class="hljs-attr">style</span>: <span class="hljs-string">&#x27;italic&#x27;</span> }, <span class="hljs-string">&#x27;/ITALIC&#x27;</span>: { <span class="hljs-attr">style</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;u&#x27;</span>: { <span class="hljs-attr">underline</span>: <span class="hljs-literal">true</span> }, <span class="hljs-string">&#x27;/u&#x27;</span>: { <span class="hljs-attr">underline</span>: <span class="hljs-literal">false</span> }, <span class="hljs-string">&#x27;UNDERLINE&#x27;</span>: { <span class="hljs-attr">underline</span>: <span class="hljs-literal">true</span> }, <span class="hljs-string">&#x27;/UNDERLINE&#x27;</span>: { <span class="hljs-attr">underline</span>: <span class="hljs-literal">false</span> }, <span class="hljs-string">&#x27;OVERLINE&#x27;</span>: { <span class="hljs-attr">overline</span>: <span class="hljs-literal">true</span> }, <span class="hljs-string">&#x27;/OVERLINE&#x27;</span>: { <span class="hljs-attr">overline</span>: <span class="hljs-literal">false</span> }, <span class="hljs-string">&#x27;SMALL-CAPS&#x27;</span>: { <span class="hljs-attr">variant</span>: <span class="hljs-string">&#x27;small-caps&#x27;</span> }, <span class="hljs-string">&#x27;/SMALL-CAPS&#x27;</span>: { <span class="hljs-attr">variant</span>: <span class="hljs-string">&#x27;normal&#x27;</span> }, <span class="hljs-string">&#x27;HIGHLIGHT&#x27;</span>: { <span class="hljs-attr">highlight</span>: <span class="hljs-literal">true</span> }, <span class="hljs-string">&#x27;/HIGHLIGHT&#x27;</span>: { <span class="hljs-attr">highlight</span>: <span class="hljs-literal">false</span> }, };</pre></div></div> </li> <li id="section-19"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-19">&#x00a7;</a> </div> <p>Stack element wrappers created during Scrawl-canvas initialization, and created using the <strong>makeStack</strong> and <strong>addStack</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> stack = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> stacknames = [];</pre></div></div> </li> <li id="section-20"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-20">&#x00a7;</a> </div> <p>Objects created using the <strong>makeTween</strong> and <strong>makeAction</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> tween = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> tweennames = [];</pre></div></div> </li> <li id="section-21"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-21">&#x00a7;</a> </div> <p>Objects created using the <strong>makeGradient</strong>, <strong>makeRadialGradient</strong>, <strong>makePattern</strong> and <strong>makeColor</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> styles = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> stylesnames = [];</pre></div></div> </li> <li id="section-22"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-22">&#x00a7;</a> </div> <p>DOM unstackedElement wrappers created using the <strong>makeUnstackedElement</strong> and <strong>makeSnippet</strong> factories</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> unstackedelement = {}; <span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> unstackedelementnames = [];</pre></div></div> </li> <li id="section-23"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-23">&#x00a7;</a> </div> <p>All <strong>makeXXX</strong> factory functions get added as references to the <strong>constructors</strong> section of the library - used mainly as part of Scrawl-canvas cloning functionality.</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> constructors = {};</pre></div></div> </li> <li id="section-24"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-24">&#x00a7;</a> </div> <p>Convenience value, used internally</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> radian = <span class="hljs-title class_">Math</span>.<span class="hljs-property">PI</span> / <span class="hljs-number">180</span>;</pre></div></div> </li> <li id="section-25"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-25">&#x00a7;</a> </div> <p>Convenience set, used internally</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> css = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Set</span>([<span class="hljs-string">&#x27;all&#x27;</span>, <span class="hljs-string">&#x27;background&#x27;</span>, <span class="hljs-string">&#x27;backgroundAttachment&#x27;</span>, <span class="hljs-string">&#x27;backgroundBlendMode&#x27;</span>, <span class="hljs-string">&#x27;backgroundClip&#x27;</span>, <span class="hljs-string">&#x27;backgroundColor&#x27;</span>, <span class="hljs-string">&#x27;backgroundOrigin&#x27;</span>, <span class="hljs-string">&#x27;backgroundPosition&#x27;</span>, <span class="hljs-string">&#x27;backgroundRepeat&#x27;</span>, <span class="hljs-string">&#x27;border&#x27;</span>, <span class="hljs-string">&#x27;borderBottom&#x27;</span>, <span class="hljs-string">&#x27;borderBottomColor&#x27;</span>, <span class="hljs-string">&#x27;borderBottomStyle&#x27;</span>, <span class="hljs-string">&#x27;borderBottomWidth&#x27;</span>, <span class="hljs-string">&#x27;borderCollapse&#x27;</span>, <span class="hljs-string">&#x27;borderColor&#x27;</span>, <span class="hljs-string">&#x27;borderLeft&#x27;</span>, <span class="hljs-string">&#x27;borderLeftColor&#x27;</span>, <span class="hljs-string">&#x27;borderLeftStyle&#x27;</span>, <span class="hljs-string">&#x27;borderLeftWidth&#x27;</span>, <span class="hljs-string">&#x27;borderRight&#x27;</span>, <span class="hljs-string">&#x27;borderRightColor&#x27;</span>, <span class="hljs-string">&#x27;borderRightStyle&#x27;</span>, <span class="hljs-string">&#x27;borderRightWidth&#x27;</span>, <span class="hljs-string">&#x27;borderSpacing&#x27;</span>, <span class="hljs-string">&#x27;borderStyle&#x27;</span>, <span class="hljs-string">&#x27;borderTop&#x27;</span>, <span class="hljs-string">&#x27;borderTopColor&#x27;</span>, <span class="hljs-string">&#x27;borderTopStyle&#x27;</span>, <span class="hljs-string">&#x27;borderTopWidth&#x27;</span>, <span class="hljs-string">&#x27;borderWidth&#x27;</span>, <span class="hljs-string">&#x27;clear&#x27;</span>, <span class="hljs-string">&#x27;color&#x27;</span>, <span class="hljs-string">&#x27;columns&#x27;</span>, <span class="hljs-string">&#x27;content&#x27;</span>, <span class="hljs-string">&#x27;counterIncrement&#x27;</span>, <span class="hljs-string">&#x27;counterReset&#x27;</span>, <span class="hljs-string">&#x27;cursor&#x27;</span>, <span class="hljs-string">&#x27;direction&#x27;</span>, <span class="hljs-string">&#x27;display&#x27;</span>, <span class="hljs-string">&#x27;emptyCells&#x27;</span>, <span class="hljs-string">&#x27;float&#x27;</span>, <span class="hljs-string">&#x27;font&#x27;</span>, <span class="hljs-string">&#x27;fontFamily&#x27;</span>, <span class="hljs-string">&#x27;fontSize&#x27;</span>, <span class="hljs-string">&#x27;fontSizeAdjust&#x27;</span>, <span class="hljs-string">&#x27;fontStretch&#x27;</span>, <span class="hljs-string">&#x27;fontStyle&#x27;</span>, <span class="hljs-string">&#x27;fontSynthesis&#x27;</span>, <span class="hljs-string">&#x27;fontVariant&#x27;</span>, <span class="hljs-string">&#x27;fontVariantAlternates&#x27;</span>, <span class="hljs-string">&#x27;fontVariantCaps&#x27;</span>, <span class="hljs-string">&#x27;fontVariantEastAsian&#x27;</span>, <span class="hljs-string">&#x27;fontVariantLigatures&#x27;</span>, <span class="hljs-string">&#x27;fontVariantNumeric&#x27;</span>, <span class="hljs-string">&#x27;fontVariantPosition&#x27;</span>, <span class="hljs-string">&#x27;fontWeight&#x27;</span>, <span class="hljs-string">&#x27;grid&#x27;</span>, <span class="hljs-string">&#x27;gridArea&#x27;</span>, <span class="hljs-string">&#x27;gridAutoColumns&#x27;</span>, <span class="hljs-string">&#x27;gridAutoFlow&#x27;</span>, <span class="hljs-string">&#x27;gridAutoPosition&#x27;</span>, <span class="hljs-string">&#x27;gridAutoRows&#x27;</span>, <span class="hljs-string">&#x27;gridColumn&#x27;</span>, <span class="hljs-string">&#x27;gridColumnStart&#x27;</span>, <span class="hljs-string">&#x27;gridColumnEnd&#x27;</span>, <span class="hljs-string">&#x27;gridRow&#x27;</span>, <span class="hljs-string">&#x27;gridRowStart&#x27;</span>, <span class="hljs-string">&#x27;gridRowEnd&#x27;</span>, <span class="hljs-string">&#x27;gridTemplate&#x27;</span>, <span class="hljs-string">&#x27;gridTemplateAreas&#x27;</span>, <span class="hljs-string">&#x27;gridTemplateRows&#x27;</span>, <span class="hljs-string">&#x27;gridTemplateColumns&#x27;</span>, <span class="hljs-string">&#x27;imageResolution&#x27;</span>, <span class="hljs-string">&#x27;imeMode&#x27;</span>, <span class="hljs-string">&#x27;inherit&#x27;</span>, <span class="hljs-string">&#x27;inlineSize&#x27;</span>, <span class="hljs-string">&#x27;isolation&#x27;</span>, <span class="hljs-string">&#x27;letterSpacing&#x27;</span>, <span class="hljs-string">&#x27;lineBreak&#x27;</span>, <span class="hljs-string">&#x27;lineHeight&#x27;</span>, <span class="hljs-string">&#x27;listStyle&#x27;</span>, <span class="hljs-string">&#x27;listStyleImage&#x27;</span>, <span class="hljs-string">&#x27;listStylePosition&#x27;</span>, <span class="hljs-string">&#x27;listStyleType&#x27;</span>, <span class="hljs-string">&#x27;margin&#x27;</span>, <span class="hljs-string">&#x27;marginBlockStart&#x27;</span>, <span class="hljs-string">&#x27;marginBlockEnd&#x27;</span>, <span class="hljs-string">&#x27;marginInlineStart&#x27;</span>, <span class="hljs-string">&#x27;marginInlineEnd&#x27;</span>, <span class="hljs-string">&#x27;marginBottom&#x27;</span>, <span class="hljs-string">&#x27;marginLeft&#x27;</span>, <span class="hljs-string">&#x27;marginRight&#x27;</span>, <span class="hljs-string">&#x27;marginTop&#x27;</span>, <span class="hljs-string">&#x27;marks&#x27;</span>, <span class="hljs-string">&#x27;mask&#x27;</span>, <span class="hljs-string">&#x27;maskType&#x27;</span>, <span class="hljs-string">&#x27;maxWidth&#x27;</span>, <span class="hljs-string">&#x27;maxHeight&#x27;</span>, <span class="hljs-string">&#x27;maxBlockSize&#x27;</span>, <span class="hljs-string">&#x27;maxInlineSize&#x27;</span>, <span class="hljs-string">&#x27;maxZoom&#x27;</span>, <span class="hljs-string">&#x27;minWidth&#x27;</span>, <span class="hljs-string">&#x27;minHeight&#x27;</span>, <span class="hljs-string">&#x27;minBlockSize&#x27;</span>, <span class="hljs-string">&#x27;minInlineSize&#x27;</span>, <span class="hljs-string">&#x27;minZoom&#x27;</span>, <span class="hljs-string">&#x27;mixBlendMode&#x27;</span>, <span class="hljs-string">&#x27;objectFit&#x27;</span>, <span class="hljs-string">&#x27;objectPosition&#x27;</span>, <span class="hljs-string">&#x27;offsetBlockStart&#x27;</span>, <span class="hljs-string">&#x27;offsetBlockEnd&#x27;</span>, <span class="hljs-string">&#x27;offsetInlineStart&#x27;</span>, <span class="hljs-string">&#x27;offsetInlineEnd&#x27;</span>, <span class="hljs-string">&#x27;orphans&#x27;</span>, <span class="hljs-string">&#x27;overflow&#x27;</span>, <span class="hljs-string">&#x27;overflowWrap&#x27;</span>, <span class="hljs-string">&#x27;overflowX&#x27;</span>, <span class="hljs-string">&#x27;overflowY&#x27;</span>, <span class="hljs-string">&#x27;pad&#x27;</span>, <span class="hljs-string">&#x27;padding&#x27;</span>, <span class="hljs-string">&#x27;paddingBlockStart&#x27;</span>, <span class="hljs-string">&#x27;paddingBlockEnd&#x27;</span>, <span class="hljs-string">&#x27;paddingInlineStart&#x27;</span>, <span class="hljs-string">&#x27;paddingInlineEnd&#x27;</span>, <span class="hljs-string">&#x27;paddingBottom&#x27;</span>, <span class="hljs-string">&#x27;paddingLeft&#x27;</span>, <span class="hljs-string">&#x27;paddingRight&#x27;</span>, <span class="hljs-string">&#x27;paddingTop&#x27;</span>, <span class="hljs-string">&#x27;pageBreakAfter&#x27;</span>, <span class="hljs-string">&#x27;pageBreakBefore&#x27;</span>, <span class="hljs-string">&#x27;pageBreakInside&#x27;</span>, <span class="hljs-string">&#x27;pointerEvents&#x27;</span>, <span class="hljs-string">&#x27;position&#x27;</span>, <span class="hljs-string">&#x27;prefix&#x27;</span>, <span class="hljs-string">&#x27;quotes&#x27;</span>, <span class="hljs-string">&#x27;rubyAlign&#x27;</span>, <span class="hljs-string">&#x27;rubyMerge&#x27;</span>, <span class="hljs-string">&#x27;rubyPosition&#x27;</span>, <span class="hljs-string">&#x27;scrollBehavior&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapCoordinate&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapDestination&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapPointsX&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapPointsY&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapType&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapTypeX&#x27;</span>, <span class="hljs-string">&#x27;scrollSnapTypeY&#x27;</span>, <span class="hljs-string">&#x27;shapeImageThreshold&#x27;</span>, <span class="hljs-string">&#x27;shapeMargin&#x27;</span>, <span class="hljs-string">&#x27;shapeOutside&#x27;</span>, <span class="hljs-string">&#x27;tableLayout&#x27;</span>, <span class="hljs-string">&#x27;textAlign&#x27;</span>, <span class="hljs-string">&#x27;textDecoration&#x27;</span>, <span class="hljs-string">&#x27;textIndent&#x27;</span>, <span class="hljs-string">&#x27;textOrientation&#x27;</span>, <span class="hljs-string">&#x27;textOverflow&#x27;</span>, <span class="hljs-string">&#x27;textRendering&#x27;</span>, <span class="hljs-string">&#x27;textShadow&#x27;</span>, <span class="hljs-string">&#x27;textTransform&#x27;</span>, <span class="hljs-string">&#x27;textUnderlinePosition&#x27;</span>, <span class="hljs-string">&#x27;unicodeRange&#x27;</span>, <span class="hljs-string">&#x27;unset&#x27;</span>, <span class="hljs-string">&#x27;verticalAlign&#x27;</span>, <span class="hljs-string">&#x27;widows&#x27;</span>, <span class="hljs-string">&#x27;willChange&#x27;</span>, <span class="hljs-string">&#x27;wordBreak&#x27;</span>, <span class="hljs-string">&#x27;wordSpacing&#x27;</span>, <span class="hljs-string">&#x27;wordWrap&#x27;</span>, <span class="hljs-string">&#x27;zIndex&#x27;</span>]);</pre></div></div> </li> <li id="section-26"> <div class="annotation"> <div class="sswrap "> <a class="ss" href="#section-26">&#x00a7;</a> </div> <p>Convenience set, used internally</p> </div> <div class="content"><div class='highlight'><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> xcss = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Set</span>([<span class="hljs-string">&#x27;alignContent&#x27;</span>, <span class="hljs-string">&#x27;alignItems&#x27;</span>, <span class="hljs-string">&#x27;alignSelf&#x27;</span>, <span class="hljs-string">&#x27;animation&#x27;</span>, <span class="hljs-string">&#x27;animationDelay&#x27;</span>, <span class="hljs-string">&#x27;animationDirection&#x27;</span>, <span class="hljs-string">&#x27;animationDuration&#x27;</span>, <span class="hljs-string">&#x27;animationFillMode&#x27;</span>, <span class="hljs-string">&#x27;animationIterationCount&#x27;</span>, <span class="hljs-string">&#x27;animationName&#x27;</span>, <span class="hljs-string">&#x27;animationPlayState&#x27;</span>, <span class="hljs-string">&#x27;animationTimingFunction&#x27;</span>, <span class="hljs-string">&#x27;backfaceVisibility&#x27;</span>, <span class="hljs-string">&#x27;backgroundImage&#x27;</span>, <span class="hljs-string">&#x27;backgroundSize&#x27;</span>, <span class="hljs-string">&#x27;borderBottomLeftRadius&#x27;</span>, <span class="hljs-string">&#x27;borderBottomRightRadius&#x27;</span>, <span class="hljs-string">&#x27;borderImage&#x27;</span>, <span class="hljs-string">&#x27;borderImageOutset&#x27;</span>, <span class="hljs-string">&#x27;borderImageRepeat&#x27;</span>, <span class="hljs-string">&#x27;borderImageSlice&#x27;</span>, <span class="hljs-string">&#x27;borderImageSource&#x27;</span>, <span class="hljs-string">&#x27;borderImageWidth&#x27;</span>, <span class="hljs-string">&#x27;borderRadius&#x27;</span>, <span class="hljs-string">&#x27;borderTopLeftRadius&#x27;</span>, <span class="hljs-string">&#x27;borderTopRightRadius&#x27;</span>, <span class="hljs-string">&#x27;boxDecorationBreak&#x27;</span>, <span class="hljs-string">&#x27;boxShadow&#x27;</span>, <span class="hljs-string">&#x27;boxSizing&#x27;</span>, <span class="hljs-string">&#x27;columnCount&#x27;</span>, <span class="hljs-string">&#x27;columnFill&#x27;</span>, <span class="hljs-string">&#x27;columnGap&#x27;</span>, <span class="hljs-string">&#x27;columnRule&#x27;</span>, <span class="hljs-string">&#x27;columnRuleColor&#x27;</span>, <span class="hljs-string">&#x27;columnRuleStyle&#x27;</span>, <span class="hljs-string">&#x27;columnRuleWidth&#x27;</span>, <span class="hljs-string">&#x27;columnSpan&#x27;</span>, <span class="hljs-string">&#x27;columnWidth&#x27;</span>, <span class="hljs-string">&#x27;filter&#x27;</span>, <span class="hljs-string">&#x27;flex&#x27;</span>, <span class="hljs-string">&#x27;flexBasis&#x27;</span>, <span class="hljs-string">&#x27;flexDirection&#x27;</span>, <span class="hljs-string">&#x27;flexFlow&#x27;</span>, <span class="hljs-string">&#x27;flexGrow&#x27;</span>, <span class="hljs-string">&#x27;flexShrink&#x27;</span>, <span class="hljs-string">&#x27;flexWrap&#x27;</span>, <span class="hljs-string">&#x27;fontFeatureSettings&#x27;</span>, <span class="hljs-string">&#x27;fontKerning&#x27;</span>, <span class="hljs-string">&#x27;fontLanguageOverride&#x27;</span>, <span class="hljs-string">&#x27;h