├── .gitignore ├── .prettierrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── Scroller.svelte ├── appveyor.yml ├── package.json ├── rollup.config.js └── test ├── public ├── bundle.js.map └── index.html ├── runner.js └── src ├── App.svelte ├── index.js └── utils.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | yarn.lock 4 | yarn-error.log 5 | package-lock.json 6 | index.mjs 7 | index.js 8 | test/public/bundle.js 9 | !test/src/index.js -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none" 5 | } 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "stable" 4 | 5 | env: 6 | global: 7 | - BUILD_TIMEOUT=10000 -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # svelte-scroller changelog 2 | 3 | ## 2.0.7 4 | 5 | - Fix initial width ([#15](https://github.com/sveltejs/svelte-scroller/pull/15)) 6 | - Update `index` more conservatively ([#14](https://github.com/sveltejs/svelte-scroller/pull/14)) 7 | 8 | ## 2.0.6 9 | 10 | - Prevent offscreen scrollers from overflowing their containers 11 | 12 | ## 2.0.5 13 | 14 | - Add `visible` binding 15 | 16 | ## 2.0.4 17 | 18 | - Run handlers on window resize 19 | 20 | ## 2.0.3 21 | 22 | - Undo previous change 😬 23 | 24 | ## 2.0.2 25 | 26 | - Use dimension bindings rather than `resize` handler for better reliability 27 | 28 | ## 2.0.1 29 | 30 | - Make `offset` continuous before and after foreground passes threshold 31 | 32 | ## 2.0.0 33 | 34 | - Update for Svelte 3 35 | 36 | ## 1.0.5 37 | 38 | - Handle case where scroller abruptly disappears from viewport 39 | 40 | ## 1.0.4 41 | 42 | - Remove instance from scroll manager on destroy 43 | - Abort scroll handler if viewport is offscreen in browsers without IntersectionObserver 44 | 45 | ## 1.0.3 46 | 47 | - Whoops 48 | 49 | ## 1.0.2 50 | 51 | - Make SSR friendly 52 | 53 | ## 1.0.1 54 | 55 | - Fix `pkg.svelte` 56 | 57 | ## 1.0.0 58 | 59 | - First release 60 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Rich Harris 2 | 3 | Permission is hereby granted by the authors of this software, to any person, to use the software for any purpose, free of charge, including the rights to run, read, copy, change, distribute and sell it, and including usage rights to any patents the authors may hold on it, subject to the following conditions: 4 | 5 | This license, or a link to its text, must be included with all copies of the software and any derivative works. 6 | 7 | Any modification to the software submitted to the authors may be incorporated into the software under the terms of this license. 8 | 9 | The software is provided "as is", without warranty of any kind, including but not limited to the warranties of title, fitness, merchantability and non-infringement. The authors have no obligation to provide support or updates for the software, and may not be held liable for any damages, claims or other liability arising from its use. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # svelte-scroller ([demo](https://svelte.dev/repl/76846b7ae27b3a21becb64ffd6e9d4a6?version=3)) 2 | 3 | A scroller component for Svelte apps. 4 | 5 | ## Installation 6 | 7 | ```bash 8 | yarn add @sveltejs/svelte-scroller 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```html 14 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | This is the background content. It will stay fixed in place while the 30 | foreground scrolls over the top. 31 | 32 | 33 | Section {index + 1} is currently active. 34 | 35 | 36 | 37 | This is the first section. 38 | This is the second section. 39 | This is the third section. 40 | 41 | 42 | ``` 43 | 44 | You must have one `slot="background"` element and one `slot="foreground"` element — see [composing with <slot>](https://svelte.dev/tutorial/slots) for more info. 45 | 46 | ## Parameters 47 | 48 | The following parameters are available: 49 | 50 | | parameter | default | description | 51 | | --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 52 | | top | 0 | The vertical position that the top of the foreground must scroll past before the background becomes fixed, as a proportion of window height | 53 | | bottom | 1 | The inverse of `top` — once the bottom of the foreground passes this point, the background becomes unfixed | 54 | | threshold | 0.5 | Once a section crosses this point, it becomes 'active' | 55 | | query | 'section' | A CSS selector that describes the individual sections of your foreground | 56 | | parallax | false | If `true`, the background will scroll such that the bottom edge reaches the `bottom` at the same time as the foreground. This effect can be unpleasant for people with high motion sensitivity, so use it advisedly | 57 | 58 | ## `index`, `offset`, `progress` and `count` 59 | 60 | By binding to these properties, you can track the user's behaviour: 61 | 62 | - `index` — the currently active section 63 | - `offset` — how far the section has scrolled past the `threshold`, as a value between 0 and 1 64 | - `progress` — how far the foreground has travelled, where 0 is the top of the foreground crossing `top`, and 1 is the bottom crossing `bottom` 65 | - `count` — the number of sections 66 | 67 | You can rename them with e.g. `bind:index={i}`. 68 | 69 | ## Configuring webpack 70 | 71 | If you're using webpack with [svelte-loader](https://github.com/sveltejs/svelte-loader), make sure that you add `"svelte"` to [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) in your webpack config. This ensures that webpack imports the uncompiled component (`src/index.html`) rather than the compiled version (`index.mjs`) — this is more efficient. 72 | 73 | If you're using Rollup with [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte), this will happen automatically. 74 | 75 | ## License 76 | 77 | [LIL](LICENSE) 78 | -------------------------------------------------------------------------------- /Scroller.svelte: -------------------------------------------------------------------------------- 1 | 62 | 63 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 223 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # http://www.appveyor.com/docs/appveyor-yml 2 | 3 | version: "{build}" 4 | 5 | clone_depth: 10 6 | 7 | init: 8 | - git config --global core.autocrlf false 9 | 10 | environment: 11 | matrix: 12 | # node.js 13 | - nodejs_version: 8 14 | 15 | install: 16 | - ps: Install-Product node $env:nodejs_version 17 | - npm install 18 | 19 | build: off 20 | 21 | test_script: 22 | - node --version && npm --version 23 | - npm test 24 | 25 | matrix: 26 | fast_finish: false 27 | 28 | # cache: 29 | # - C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache 30 | # - node_modules -> package.json # local npm modules -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sveltejs/svelte-scroller", 3 | "version": "2.0.7", 4 | "description": "A component for Svelte apps", 5 | "svelte": "Scroller.svelte", 6 | "scripts": { 7 | "build": "rollup -c", 8 | "dev": "rollup -cw", 9 | "prepublishOnly": "npm test", 10 | "test": "node test/runner.js", 11 | "test:browser": "npm run build && sirv test/public", 12 | "pretest": "npm run build" 13 | }, 14 | "devDependencies": { 15 | "faucet": "^0.0.1", 16 | "port-authority": "^1.1.2", 17 | "puppeteer": "^10.0.0", 18 | "rollup": "^2.51.1", 19 | "rollup-plugin-commonjs": "^9.2.2", 20 | "rollup-plugin-node-resolve": "^4.0.1", 21 | "rollup-plugin-svelte": "^7.1.0", 22 | "sirv": "^1.0.12", 23 | "sirv-cli": "^1.0.12", 24 | "svelte": "^3.38.2", 25 | "tap-dot": "^2.0.0", 26 | "tape-modern": "^1.1.2" 27 | }, 28 | "repository": "https://github.com/sveltejs/svelte-scroller", 29 | "author": "Rich Harris", 30 | "license": "LIL", 31 | "keywords": [ 32 | "svelte" 33 | ], 34 | "files": [ 35 | "Scroller.svelte" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import svelte from 'rollup-plugin-svelte'; 2 | import resolve from 'rollup-plugin-node-resolve'; 3 | import commonjs from 'rollup-plugin-commonjs'; 4 | 5 | export default [ 6 | { 7 | input: 'test/src/index.js', 8 | output: { 9 | file: 'test/public/bundle.js', 10 | format: 'iife' 11 | }, 12 | plugins: [ 13 | resolve(), 14 | commonjs(), 15 | svelte({ 16 | compilerOptions: { 17 | accessors: true 18 | }, 19 | emitCss: false 20 | }) 21 | ] 22 | } 23 | ]; 24 | -------------------------------------------------------------------------------- /test/public/bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal.mjs","../../Scroller.svelte","../src/App.svelte","../../node_modules/tape-modern/dist/tape-modern.esm.js","../src/index.js"],"sourcesContent":["function noop() {}\n\nconst identity = x => x;\n\nfunction assign(tar, src) {\n\tfor (const k in src) tar[k] = src[k];\n\treturn tar;\n}\n\nfunction is_promise(value) {\n\treturn value && typeof value.then === 'function';\n}\n\nfunction add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nfunction run(fn) {\n\treturn fn();\n}\n\nfunction blank_object() {\n\treturn Object.create(null);\n}\n\nfunction run_all(fns) {\n\tfns.forEach(run);\n}\n\nfunction is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\nfunction safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\n\nfunction not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\nfunction validate_store(store, name) {\n\tif (!store || typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nfunction subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(store.subscribe(callback));\n}\n\nfunction create_slot(definition, ctx, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, fn) {\n\treturn definition[1]\n\t\t? assign({}, assign(ctx.$$scope.ctx, definition[1](fn ? fn(ctx) : {})))\n\t\t: ctx.$$scope.ctx;\n}\n\nfunction get_slot_changes(definition, ctx, changed, fn) {\n\treturn definition[1]\n\t\t? assign({}, assign(ctx.$$scope.changed || {}, definition[1](fn ? fn(changed) : {})))\n\t\t: ctx.$$scope.changed || {};\n}\n\nfunction exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\nconst tasks = new Set();\nlet running = false;\n\nfunction run_tasks() {\n\ttasks.forEach(task => {\n\t\tif (!task[0](window.performance.now())) {\n\t\t\ttasks.delete(task);\n\t\t\ttask[1]();\n\t\t}\n\t});\n\n\trunning = tasks.size > 0;\n\tif (running) requestAnimationFrame(run_tasks);\n}\n\nfunction clear_loops() {\n\t// for testing...\n\ttasks.forEach(task => tasks.delete(task));\n\trunning = false;\n}\n\nfunction loop(fn) {\n\tlet task;\n\n\tif (!running) {\n\t\trunning = true;\n\t\trequestAnimationFrame(run_tasks);\n\t}\n\n\treturn {\n\t\tpromise: new Promise(fulfil => {\n\t\t\ttasks.add(task = [fn, fulfil]);\n\t\t}),\n\t\tabort() {\n\t\t\ttasks.delete(task);\n\t\t}\n\t};\n}\n\nfunction append(target, node) {\n\ttarget.appendChild(node);\n}\n\nfunction insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor);\n}\n\nfunction detach(node) {\n\tnode.parentNode.removeChild(node);\n}\n\nfunction detach_between(before, after) {\n\twhile (before.nextSibling && before.nextSibling !== after) {\n\t\tbefore.parentNode.removeChild(before.nextSibling);\n\t}\n}\n\nfunction detach_before(after) {\n\twhile (after.previousSibling) {\n\t\tafter.parentNode.removeChild(after.previousSibling);\n\t}\n}\n\nfunction detach_after(before) {\n\twhile (before.nextSibling) {\n\t\tbefore.parentNode.removeChild(before.nextSibling);\n\t}\n}\n\nfunction destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\nfunction element(name) {\n\treturn document.createElement(name);\n}\n\nfunction svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\nfunction text(data) {\n\treturn document.createTextNode(data);\n}\n\nfunction space() {\n\treturn text(' ');\n}\n\nfunction empty() {\n\treturn text('');\n}\n\nfunction listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\nfunction prevent_default(fn) {\n\treturn function(event) {\n\t\tevent.preventDefault();\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction stop_propagation(fn) {\n\treturn function(event) {\n\t\tevent.stopPropagation();\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse node.setAttribute(attribute, value);\n}\n\nfunction set_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tif (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key in node) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\nfunction set_custom_element_data(node, prop, value) {\n\tif (prop in node) {\n\t\tnode[prop] = value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\nfunction xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\nfunction get_binding_group_value(group) {\n\tconst value = [];\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.push(group[i].__value);\n\t}\n\treturn value;\n}\n\nfunction to_number(value) {\n\treturn value === '' ? undefined : +value;\n}\n\nfunction time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\nfunction children(element) {\n\treturn Array.from(element.childNodes);\n}\n\nfunction claim_element(nodes, name, attributes, svg) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeName === name) {\n\t\t\tfor (let j = 0; j < node.attributes.length; j += 1) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) node.removeAttribute(attribute.name);\n\t\t\t}\n\t\t\treturn nodes.splice(i, 1)[0]; // TODO strip unwanted attributes\n\t\t}\n\t}\n\n\treturn svg ? svg_element(name) : element(name);\n}\n\nfunction claim_text(nodes, data) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 3) {\n\t\t\tnode.data = data;\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn text(data);\n}\n\nfunction set_data(text, data) {\n\ttext.data = '' + data;\n}\n\nfunction set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\nfunction set_style(node, key, value) {\n\tnode.style.setProperty(key, value);\n}\n\nfunction select_option(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nfunction select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nfunction select_value(select) {\n\tconst selected_option = select.querySelector(':checked') || select.options[0];\n\treturn selected_option && selected_option.__value;\n}\n\nfunction select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n\nfunction add_resize_listener(element, fn) {\n\tif (getComputedStyle(element).position === 'static') {\n\t\telement.style.position = 'relative';\n\t}\n\n\tconst object = document.createElement('object');\n\tobject.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n\tobject.type = 'text/html';\n\n\tlet win;\n\n\tobject.onload = () => {\n\t\twin = object.contentDocument.defaultView;\n\t\twin.addEventListener('resize', fn);\n\t};\n\n\tif (/Trident/.test(navigator.userAgent)) {\n\t\telement.appendChild(object);\n\t\tobject.data = 'about:blank';\n\t} else {\n\t\tobject.data = 'about:blank';\n\t\telement.appendChild(object);\n\t}\n\n\treturn {\n\t\tcancel: () => {\n\t\t\twin && win.removeEventListener && win.removeEventListener('resize', fn);\n\t\t\telement.removeChild(object);\n\t\t}\n\t};\n}\n\nfunction toggle_class(element, name, toggle) {\n\telement.classList[toggle ? 'add' : 'remove'](name);\n}\n\nfunction custom_event(type, detail) {\n\tconst e = document.createEvent('CustomEvent');\n\te.initCustomEvent(type, false, false, detail);\n\treturn e;\n}\n\nlet stylesheet;\nlet active = 0;\nlet current_rules = {};\n\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n\tlet hash = 5381;\n\tlet i = str.length;\n\n\twhile (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n\treturn hash >>> 0;\n}\n\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n\tconst step = 16.666 / duration;\n\tlet keyframes = '{\\n';\n\n\tfor (let p = 0; p <= 1; p += step) {\n\t\tconst t = a + (b - a) * ease(p);\n\t\tkeyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n\t}\n\n\tconst rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n\tconst name = `__svelte_${hash(rule)}_${uid}`;\n\n\tif (!current_rules[name]) {\n\t\tif (!stylesheet) {\n\t\t\tconst style = element('style');\n\t\t\tdocument.head.appendChild(style);\n\t\t\tstylesheet = style.sheet;\n\t\t}\n\n\t\tcurrent_rules[name] = true;\n\t\tstylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n\t}\n\n\tconst animation = node.style.animation || '';\n\tnode.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n\n\tactive += 1;\n\treturn name;\n}\n\nfunction delete_rule(node, name) {\n\tnode.style.animation = (node.style.animation || '')\n\t\t.split(', ')\n\t\t.filter(name\n\t\t\t? anim => anim.indexOf(name) < 0 // remove specific animation\n\t\t\t: anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n\t\t)\n\t\t.join(', ');\n\n\tif (name && !--active) clear_rules();\n}\n\nfunction clear_rules() {\n\trequestAnimationFrame(() => {\n\t\tif (active) return;\n\t\tlet i = stylesheet.cssRules.length;\n\t\twhile (i--) stylesheet.deleteRule(i);\n\t\tcurrent_rules = {};\n\t});\n}\n\nfunction create_animation(node, from, fn, params) {\n\tif (!from) return noop;\n\n\tconst to = node.getBoundingClientRect();\n\tif (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom) return noop;\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = 300,\n\t\teasing = identity,\n\t\tstart: start_time = window.performance.now() + delay,\n\t\tend = start_time + duration,\n\t\ttick = noop,\n\t\tcss\n\t} = fn(node, { from, to }, params);\n\n\tlet running = true;\n\tlet started = false;\n\tlet name;\n\n\tconst css_text = node.style.cssText;\n\n\tfunction start() {\n\t\tif (css) {\n\t\t\tif (delay) node.style.cssText = css_text; // TODO create delayed animation instead?\n\t\t\tname = create_rule(node, 0, 1, duration, 0, easing, css);\n\t\t}\n\n\t\tstarted = true;\n\t}\n\n\tfunction stop() {\n\t\tif (css) delete_rule(node, name);\n\t\trunning = false;\n\t}\n\n\tloop(now => {\n\t\tif (!started && now >= start_time) {\n\t\t\tstart();\n\t\t}\n\n\t\tif (started && now >= end) {\n\t\t\ttick(1, 0);\n\t\t\tstop();\n\t\t}\n\n\t\tif (!running) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (started) {\n\t\t\tconst p = now - start_time;\n\t\t\tconst t = 0 + 1 * easing(p / duration);\n\t\t\ttick(t, 1 - t);\n\t\t}\n\n\t\treturn true;\n\t});\n\n\tif (delay) {\n\t\tif (css) node.style.cssText += css(0, 1);\n\t} else {\n\t\tstart();\n\t}\n\n\ttick(0, 1);\n\n\treturn stop;\n}\n\nfunction fix_position(node) {\n\tconst style = getComputedStyle(node);\n\n\tif (style.position !== 'absolute' && style.position !== 'fixed') {\n\t\tconst { width, height } = style;\n\t\tconst a = node.getBoundingClientRect();\n\t\tnode.style.position = 'absolute';\n\t\tnode.style.width = width;\n\t\tnode.style.height = height;\n\t\tconst b = node.getBoundingClientRect();\n\n\t\tif (a.left !== b.left || a.top !== b.top) {\n\t\t\tconst style = getComputedStyle(node);\n\t\t\tconst transform = style.transform === 'none' ? '' : style.transform;\n\n\t\t\tnode.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n\t\t}\n\t}\n}\n\nlet current_component;\n\nfunction set_current_component(component) {\n\tcurrent_component = component;\n}\n\nfunction get_current_component() {\n\tif (!current_component) throw new Error(`Function called outside component initialization`);\n\treturn current_component;\n}\n\nfunction beforeUpdate(fn) {\n\tget_current_component().$$.before_render.push(fn);\n}\n\nfunction onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\nfunction afterUpdate(fn) {\n\tget_current_component().$$.after_render.push(fn);\n}\n\nfunction onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\nfunction createEventDispatcher() {\n\tconst component = current_component;\n\n\treturn (type, detail) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(type, detail);\n\t\t\tcallbacks.slice().forEach(fn => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t}\n\t};\n}\n\nfunction setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n}\n\nfunction getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\n\tif (callbacks) {\n\t\tcallbacks.slice().forEach(fn => fn(event));\n\t}\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\n\nlet update_promise;\nconst binding_callbacks = [];\nconst render_callbacks = [];\n\nfunction schedule_update() {\n\tif (!update_promise) {\n\t\tupdate_promise = Promise.resolve();\n\t\tupdate_promise.then(flush);\n\t}\n}\n\nfunction add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\nfunction tick() {\n\tschedule_update();\n\treturn update_promise;\n}\n\nfunction add_binding_callback(fn) {\n\tbinding_callbacks.push(fn);\n}\n\nfunction flush() {\n\tconst seen_callbacks = new Set();\n\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\twhile (dirty_components.length) {\n\t\t\tconst component = dirty_components.shift();\n\t\t\tset_current_component(component);\n\t\t\tupdate(component.$$);\n\t\t}\n\n\t\twhile (binding_callbacks.length) binding_callbacks.shift()();\n\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\twhile (render_callbacks.length) {\n\t\t\tconst callback = render_callbacks.pop();\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\tcallback();\n\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\t\t\t}\n\t\t}\n\t} while (dirty_components.length);\n\n\tupdate_promise = null;\n}\n\nfunction update($$) {\n\tif ($$.fragment) {\n\t\t$$.update($$.dirty);\n\t\trun_all($$.before_render);\n\t\t$$.fragment.p($$.dirty, $$.ctx);\n\t\t$$.dirty = null;\n\n\t\t$$.after_render.forEach(add_render_callback);\n\t}\n}\n\nlet promise;\n\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\n\treturn promise;\n}\n\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nlet outros;\n\nfunction group_outros() {\n\toutros = {\n\t\tremaining: 0,\n\t\tcallbacks: []\n\t};\n}\n\nfunction check_outros() {\n\tif (!outros.remaining) {\n\t\trun_all(outros.callbacks);\n\t}\n}\n\nfunction on_outro(callback) {\n\toutros.callbacks.push(callback);\n}\n\nfunction create_in_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick: tick$$1 = noop,\n\t\t\tcss\n\t\t} = config;\n\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick$$1(0, 1);\n\n\t\tconst start_time = window.performance.now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tif (task) task.abort();\n\t\trunning = true;\n\n\t\ttask = loop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick$$1(1, 0);\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn running = false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick$$1(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tlet started = false;\n\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\n\t\t\tdelete_rule(node);\n\n\t\t\tif (typeof config === 'function') {\n\t\t\t\tconfig = config();\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_out_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = true;\n\tlet animation_name;\n\n\tconst group = outros;\n\n\tgroup.remaining += 1;\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick: tick$$1 = noop,\n\t\t\tcss\n\t\t} = config;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = window.performance.now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tloop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick$$1(0, 1);\n\n\t\t\t\t\tif (!--group.remaining) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.callbacks);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick$$1(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (typeof config === 'function') {\n\t\twait().then(() => {\n\t\t\tconfig = config();\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_bidirectional_transition(node, fn, params, intro) {\n\tlet config = fn(node, params);\n\n\tlet t = intro ? 0 : 1;\n\n\tlet running_program = null;\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction init(program, duration) {\n\t\tconst d = program.b - t;\n\t\tduration *= Math.abs(d);\n\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick: tick$$1 = noop,\n\t\t\tcss\n\t\t} = config;\n\n\t\tconst program = {\n\t\t\tstart: window.performance.now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\tprogram.group = outros;\n\t\t\toutros.remaining += 1;\n\t\t}\n\n\t\tif (running_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\n\t\t\tif (b) tick$$1(0, 1);\n\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\n\t\t\tloop(now => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick$$1(t = running_program.b, 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.remaining) run_all(running_program.group.callbacks);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick$$1(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\n\treturn {\n\t\trun(b) {\n\t\t\tif (typeof config === 'function') {\n\t\t\t\twait().then(() => {\n\t\t\t\t\tconfig = config();\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\nfunction handle_promise(promise, info) {\n\tconst token = info.token = {};\n\n\tfunction update(type, index, key, value) {\n\t\tif (info.token !== token) return;\n\n\t\tinfo.resolved = key && { [key]: value };\n\n\t\tconst child_ctx = assign(assign({}, info.ctx), info.resolved);\n\t\tconst block = type && (info.current = type)(child_ctx);\n\n\t\tif (info.block) {\n\t\t\tif (info.blocks) {\n\t\t\t\tinfo.blocks.forEach((block, i) => {\n\t\t\t\t\tif (i !== index && block) {\n\t\t\t\t\t\tgroup_outros();\n\t\t\t\t\t\ton_outro(() => {\n\t\t\t\t\t\t\tblock.d(1);\n\t\t\t\t\t\t\tinfo.blocks[i] = null;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tblock.o(1);\n\t\t\t\t\t\tcheck_outros();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tinfo.block.d(1);\n\t\t\t}\n\n\t\t\tblock.c();\n\t\t\tif (block.i) block.i(1);\n\t\t\tblock.m(info.mount(), info.anchor);\n\n\t\t\tflush();\n\t\t}\n\n\t\tinfo.block = block;\n\t\tif (info.blocks) info.blocks[index] = block;\n\t}\n\n\tif (is_promise(promise)) {\n\t\tpromise.then(value => {\n\t\t\tupdate(info.then, 1, info.value, value);\n\t\t}, error => {\n\t\t\tupdate(info.catch, 2, info.error, error);\n\t\t});\n\n\t\t// if we previously had a then/catch block, destroy it\n\t\tif (info.current !== info.pending) {\n\t\t\tupdate(info.pending, 0);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tif (info.current !== info.then) {\n\t\t\tupdate(info.then, 1, info.value, promise);\n\t\t\treturn true;\n\t\t}\n\n\t\tinfo.resolved = { [info.value]: promise };\n\t}\n}\n\nfunction destroy_block(block, lookup) {\n\tblock.d(1);\n\tlookup[block.key] = null;\n}\n\nfunction outro_and_destroy_block(block, lookup) {\n\ton_outro(() => {\n\t\tdestroy_block(block, lookup);\n\t});\n\n\tblock.o(1);\n}\n\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n\tblock.f();\n\toutro_and_destroy_block(block, lookup);\n}\n\nfunction update_keyed_each(old_blocks, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n\tlet o = old_blocks.length;\n\tlet n = list.length;\n\n\tlet i = o;\n\tconst old_indexes = {};\n\twhile (i--) old_indexes[old_blocks[i].key] = i;\n\n\tconst new_blocks = [];\n\tconst new_lookup = {};\n\tconst deltas = {};\n\n\ti = n;\n\twhile (i--) {\n\t\tconst child_ctx = get_context(ctx, list, i);\n\t\tconst key = get_key(child_ctx);\n\t\tlet block = lookup[key];\n\n\t\tif (!block) {\n\t\t\tblock = create_each_block(key, child_ctx);\n\t\t\tblock.c();\n\t\t} else if (dynamic) {\n\t\t\tblock.p(changed, child_ctx);\n\t\t}\n\n\t\tnew_blocks[i] = new_lookup[key] = block;\n\n\t\tif (key in old_indexes) deltas[key] = Math.abs(i - old_indexes[key]);\n\t}\n\n\tconst will_move = {};\n\tconst did_move = {};\n\n\tfunction insert(block) {\n\t\tif (block.i) block.i(1);\n\t\tblock.m(node, next);\n\t\tlookup[block.key] = block;\n\t\tnext = block.first;\n\t\tn--;\n\t}\n\n\twhile (o && n) {\n\t\tconst new_block = new_blocks[n - 1];\n\t\tconst old_block = old_blocks[o - 1];\n\t\tconst new_key = new_block.key;\n\t\tconst old_key = old_block.key;\n\n\t\tif (new_block === old_block) {\n\t\t\t// do nothing\n\t\t\tnext = new_block.first;\n\t\t\to--;\n\t\t\tn--;\n\t\t}\n\n\t\telse if (!new_lookup[old_key]) {\n\t\t\t// remove old block\n\t\t\tdestroy(old_block, lookup);\n\t\t\to--;\n\t\t}\n\n\t\telse if (!lookup[new_key] || will_move[new_key]) {\n\t\t\tinsert(new_block);\n\t\t}\n\n\t\telse if (did_move[old_key]) {\n\t\t\to--;\n\n\t\t} else if (deltas[new_key] > deltas[old_key]) {\n\t\t\tdid_move[new_key] = true;\n\t\t\tinsert(new_block);\n\n\t\t} else {\n\t\t\twill_move[old_key] = true;\n\t\t\to--;\n\t\t}\n\t}\n\n\twhile (o--) {\n\t\tconst old_block = old_blocks[o];\n\t\tif (!new_lookup[old_block.key]) destroy(old_block, lookup);\n\t}\n\n\twhile (n) insert(new_blocks[n - 1]);\n\n\treturn new_blocks;\n}\n\nfunction measure(blocks) {\n\tconst rects = {};\n\tlet i = blocks.length;\n\twhile (i--) rects[blocks[i].key] = blocks[i].node.getBoundingClientRect();\n\treturn rects;\n}\n\nfunction get_spread_update(levels, updates) {\n\tconst update = {};\n\n\tconst to_null_out = {};\n\tconst accounted_for = {};\n\n\tlet i = levels.length;\n\twhile (i--) {\n\t\tconst o = levels[i];\n\t\tconst n = updates[i];\n\n\t\tif (n) {\n\t\t\tfor (const key in o) {\n\t\t\t\tif (!(key in n)) to_null_out[key] = 1;\n\t\t\t}\n\n\t\t\tfor (const key in n) {\n\t\t\t\tif (!accounted_for[key]) {\n\t\t\t\t\tupdate[key] = n[key];\n\t\t\t\t\taccounted_for[key] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlevels[i] = n;\n\t\t} else {\n\t\t\tfor (const key in o) {\n\t\t\t\taccounted_for[key] = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const key in to_null_out) {\n\t\tif (!(key in update)) update[key] = undefined;\n\t}\n\n\treturn update;\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\n\nfunction spread(args) {\n\tconst attributes = Object.assign({}, ...args);\n\tlet str = '';\n\n\tObject.keys(attributes).forEach(name => {\n\t\tif (invalid_attribute_name_character.test(name)) return;\n\n\t\tconst value = attributes[name];\n\t\tif (value === undefined) return;\n\t\tif (value === true) str += \" \" + name;\n\n\t\tconst escaped = String(value)\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\n\t\tstr += \" \" + name + \"=\" + JSON.stringify(escaped);\n\t});\n\n\treturn str;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t\"'\": ''',\n\t'&': '&',\n\t'<': '<',\n\t'>': '>'\n};\n\nfunction escape(html) {\n\treturn String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\n\nfunction each(items, fn) {\n\tlet str = '';\n\tfor (let i = 0; i < items.length; i += 1) {\n\t\tstr += fn(items[i], i);\n\t}\n\treturn str;\n}\n\nconst missing_component = {\n\t$$render: () => ''\n};\n\nfunction validate_component(component, name) {\n\tif (!component || !component.$$render) {\n\t\tif (name === 'svelte:component') name += ' this={...}';\n\t\tthrow new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n\t}\n\n\treturn component;\n}\n\nfunction debug(file, line, column, values) {\n\tconsole.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n\tconsole.log(values); // eslint-disable-line no-console\n\treturn '';\n}\n\nlet on_destroy;\n\nfunction create_ssr_component(fn) {\n\tfunction $$render(result, props, bindings, slots) {\n\t\tconst parent_component = current_component;\n\n\t\tconst $$ = {\n\t\t\ton_destroy,\n\t\t\tcontext: new Map(parent_component ? parent_component.$$.context : []),\n\n\t\t\t// these will be immediately discarded\n\t\t\ton_mount: [],\n\t\t\tbefore_render: [],\n\t\t\tafter_render: [],\n\t\t\tcallbacks: blank_object()\n\t\t};\n\n\t\tset_current_component({ $$ });\n\n\t\tconst html = fn(result, props, bindings, slots);\n\n\t\tset_current_component(parent_component);\n\t\treturn html;\n\t}\n\n\treturn {\n\t\trender: (props = {}, options = {}) => {\n\t\t\ton_destroy = [];\n\n\t\t\tconst result = { head: '', css: new Set() };\n\t\t\tconst html = $$render(result, props, {}, options);\n\n\t\t\trun_all(on_destroy);\n\n\t\t\treturn {\n\t\t\t\thtml,\n\t\t\t\tcss: {\n\t\t\t\t\tcode: Array.from(result.css).map(css => css.code).join('\\n'),\n\t\t\t\t\tmap: null // TODO\n\t\t\t\t},\n\t\t\t\thead: result.head\n\t\t\t};\n\t\t},\n\n\t\t$$render\n\t};\n}\n\nfunction get_store_value(store) {\n\tlet value;\n\tstore.subscribe(_ => value = _)();\n\treturn value;\n}\n\nfunction bind(component, name, callback) {\n\tif (component.$$.props.indexOf(name) === -1) return;\n\tcomponent.$$.bound[name] = callback;\n\tcallback(component.$$.ctx[name]);\n}\n\nfunction mount_component(component, target, anchor) {\n\tconst { fragment, on_mount, on_destroy, after_render } = component.$$;\n\n\tfragment.m(target, anchor);\n\n\t// onMount happens after the initial afterUpdate. Because\n\t// afterUpdate callbacks happen in reverse order (inner first)\n\t// we schedule onMount callbacks before afterUpdate callbacks\n\tadd_render_callback(() => {\n\t\tconst new_on_destroy = on_mount.map(run).filter(is_function);\n\t\tif (on_destroy) {\n\t\t\ton_destroy.push(...new_on_destroy);\n\t\t} else {\n\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t// most likely as a result of a binding initialising\n\t\t\trun_all(new_on_destroy);\n\t\t}\n\t\tcomponent.$$.on_mount = [];\n\t});\n\n\tafter_render.forEach(add_render_callback);\n}\n\nfunction destroy(component, detaching) {\n\tif (component.$$) {\n\t\trun_all(component.$$.on_destroy);\n\t\tcomponent.$$.fragment.d(detaching);\n\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\tcomponent.$$.on_destroy = component.$$.fragment = null;\n\t\tcomponent.$$.ctx = {};\n\t}\n}\n\nfunction make_dirty(component, key) {\n\tif (!component.$$.dirty) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty = {};\n\t}\n\tcomponent.$$.dirty[key] = true;\n}\n\nfunction init(component, options, instance, create_fragment, not_equal$$1, prop_names) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\n\tconst props = options.props || {};\n\n\tconst $$ = component.$$ = {\n\t\tfragment: null,\n\t\tctx: null,\n\n\t\t// state\n\t\tprops: prop_names,\n\t\tupdate: noop,\n\t\tnot_equal: not_equal$$1,\n\t\tbound: blank_object(),\n\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\tbefore_render: [],\n\t\tafter_render: [],\n\t\tcontext: new Map(parent_component ? parent_component.$$.context : []),\n\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty: null\n\t};\n\n\tlet ready = false;\n\n\t$$.ctx = instance\n\t\t? instance(component, props, (key, value) => {\n\t\t\tif ($$.bound[key]) $$.bound[key](value);\n\n\t\t\tif ($$.ctx) {\n\t\t\t\tconst changed = not_equal$$1(value, $$.ctx[key]);\n\t\t\t\tif (ready && changed) {\n\t\t\t\t\tmake_dirty(component, key);\n\t\t\t\t}\n\n\t\t\t\t$$.ctx[key] = value;\n\t\t\t\treturn changed;\n\t\t\t}\n\t\t})\n\t\t: props;\n\n\t$$.update();\n\tready = true;\n\trun_all($$.before_render);\n\t$$.fragment = create_fragment($$.ctx);\n\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\t$$.fragment.l(children(options.target));\n\t\t} else {\n\t\t\t$$.fragment.c();\n\t\t}\n\n\t\tif (options.intro && component.$$.fragment.i) component.$$.fragment.i();\n\t\tmount_component(component, options.target, options.anchor);\n\t\tflush();\n\t}\n\n\tset_current_component(parent_component);\n}\n\nlet SvelteElement;\nif (typeof HTMLElement !== 'undefined') {\n\tSvelteElement = class extends HTMLElement {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tfor (const key in this.$$.slotted) {\n\t\t\t\tthis.appendChild(this.$$.slotted[key]);\n\t\t\t}\n\t\t}\n\n\t\tattributeChangedCallback(attr$$1, oldValue, newValue) {\n\t\t\tthis[attr$$1] = newValue;\n\t\t}\n\n\t\t$destroy() {\n\t\t\tdestroy(this, true);\n\t\t\tthis.$destroy = noop;\n\t\t}\n\n\t\t$on(type, callback) {\n\t\t\t// TODO should this delegate to addEventListener?\n\t\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\t\tcallbacks.push(callback);\n\n\t\t\treturn () => {\n\t\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t\t};\n\t\t}\n\n\t\t$set() {\n\t\t\t// overridden by instance, if it has props\n\t\t}\n\t};\n}\n\nclass SvelteComponent {\n\t$destroy() {\n\t\tdestroy(this, true);\n\t\tthis.$destroy = noop;\n\t}\n\n\t$on(type, callback) {\n\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\tcallbacks.push(callback);\n\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t$set() {\n\t\t// overridden by instance, if it has props\n\t}\n}\n\nclass SvelteComponentDev extends SvelteComponent {\n\tconstructor(options) {\n\t\tif (!options || (!options.target && !options.$$inline)) {\n\t\t\tthrow new Error(`'target' is a required option`);\n\t\t}\n\n\t\tsuper();\n\t}\n\n\t$destroy() {\n\t\tsuper.$destroy();\n\t\tthis.$destroy = () => {\n\t\t\tconsole.warn(`Component was already destroyed`); // eslint-disable-line no-console\n\t\t};\n\t}\n}\n\nexport { create_animation, fix_position, handle_promise, append, insert, detach, detach_between, detach_before, detach_after, destroy_each, element, svg_element, text, space, empty, listen, prevent_default, stop_propagation, attr, set_attributes, set_custom_element_data, xlink_attr, get_binding_group_value, to_number, time_ranges_to_array, children, claim_element, claim_text, set_data, set_input_type, set_style, select_option, select_options, select_value, select_multiple_value, add_resize_listener, toggle_class, custom_event, destroy_block, outro_and_destroy_block, fix_and_outro_and_destroy_block, update_keyed_each, measure, current_component, set_current_component, beforeUpdate, onMount, afterUpdate, onDestroy, createEventDispatcher, setContext, getContext, bubble, clear_loops, loop, dirty_components, intros, schedule_update, add_render_callback, tick, add_binding_callback, flush, get_spread_update, invalid_attribute_name_character, spread, escaped, escape, each, missing_component, validate_component, debug, create_ssr_component, get_store_value, group_outros, check_outros, on_outro, create_in_transition, create_out_transition, create_bidirectional_transition, noop, identity, assign, is_promise, add_location, run, blank_object, run_all, is_function, safe_not_equal, not_equal, validate_store, subscribe, create_slot, get_slot_context, get_slot_changes, exclude_internal_props, bind, mount_component, init, SvelteElement, SvelteComponent, SvelteComponentDev };\n","\n\n\n\n\n\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\n","\n\n\n\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar fulfil;\nvar done = new Promise(function (f) {\n fulfil = f;\n});\nfunction start() {\n if (!running) {\n running = true;\n console.log('TAP version 13');\n Promise.resolve().then(function () {\n var hasOnly = tests.some(function (test) { return test.only; });\n tests.forEach(function (test) {\n test.shouldRun = test.skip\n ? false\n : hasOnly ? test.only : true;\n });\n dequeue();\n });\n }\n}\nvar test = Object.assign(function test(name, fn) {\n tests.push({ name: name, fn: fn, skip: false, only: false, shouldRun: false });\n start();\n}, {\n skip: function (name, fn) {\n tests.push({ name: name, fn: fn, skip: true, only: false, shouldRun: null });\n start();\n },\n only: function (name, fn) {\n tests.push({ name: name, fn: fn, skip: false, only: true, shouldRun: null });\n start();\n }\n});\nvar i = 0;\nvar running = false;\nvar tests = [];\nvar passed = 0;\nvar failed = 0;\nvar skipped = 0;\nvar isNode = typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]';\nfunction logResult(ok, operator, msg, info) {\n if (info === void 0) { info = {}; }\n if (ok) {\n console.log(\"ok \" + i + \" \\u2014 \" + msg);\n passed += 1;\n }\n else {\n console.log(\"not ok \" + i + \" \\u2014 \" + msg);\n failed += 1;\n console.log(' ---');\n console.log(\" operator: \" + operator);\n if (isNode) {\n var util = require('util');\n if ('expected' in info)\n console.log(\" expected:\\n \" + util.format(info.expected).replace(/\\n/gm, \"\\n \"));\n if ('actual' in info)\n console.log(\" actual:\\n \" + util.format(info.actual).replace(/\\n/gm, \"\\n \"));\n }\n else {\n if ('expected' in info)\n console.log(\" expected:\", info.expected);\n if ('actual' in info)\n console.log(\" actual:\", info.actual);\n }\n // find where the error occurred, and try to clean it up\n var lines = new Error().stack.split('\\n').slice(3);\n var cwd_1 = '';\n if (isNode) {\n cwd_1 = process.cwd();\n if (/[\\/\\\\]/.test(cwd_1[0]))\n cwd_1 += cwd_1[0];\n var dirname = typeof __dirname === 'string' && __dirname.replace(/dist$/, '');\n for (var i_1 = 0; i_1 < lines.length; i_1 += 1) {\n if (~lines[i_1].indexOf(dirname)) {\n lines = lines.slice(0, i_1);\n break;\n }\n }\n }\n var stack = lines\n .map(function (line) { return \" \" + line.replace(cwd_1, '').trim(); })\n .join('\\n');\n console.log(\" stack: \\n\" + stack);\n console.log(\" ...\");\n }\n}\nvar assert = {\n fail: function (msg) { return logResult(false, 'fail', msg); },\n pass: function (msg) { return logResult(true, 'pass', msg); },\n ok: function (value, msg) {\n if (msg === void 0) { msg = 'should be truthy'; }\n return logResult(Boolean(value), 'ok', msg, {\n actual: value,\n expected: true\n });\n },\n equal: function (a, b, msg) {\n if (msg === void 0) { msg = 'should be equal'; }\n return logResult(a === b, 'equal', msg, {\n actual: a,\n expected: b\n });\n },\n throws: function (fn, expected, msg) {\n if (msg === void 0) { msg = 'should throw'; }\n try {\n fn();\n logResult(false, 'throws', msg, {\n expected: expected\n });\n }\n catch (err) {\n if (expected instanceof Error) {\n logResult(err.name === expected.name, 'throws', msg, {\n actual: err.name,\n expected: expected.name\n });\n }\n else if (expected instanceof RegExp) {\n logResult(expected.test(err.toString()), 'throws', msg, {\n actual: err.toString(),\n expected: expected\n });\n }\n else if (typeof expected === 'function') {\n logResult(expected(err), 'throws', msg, {\n actual: err\n });\n }\n else {\n throw new Error(\"Second argument to t.throws must be an Error constructor, regex, or function\");\n }\n }\n }\n};\nfunction dequeue() {\n return __awaiter(this, void 0, void 0, function () {\n var test, err_1, total;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n test = tests[i++];\n if (!test) return [3 /*break*/, 5];\n if (!test.shouldRun) {\n if (test.skip) {\n console.log(\"# skip \" + test.name);\n }\n skipped += 1;\n dequeue();\n return [2 /*return*/];\n }\n console.log(\"# \" + test.name);\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, test.fn(assert)];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n failed += 1;\n console.log(\"not ok \" + i + \" \\u2014 \" + err_1.message);\n console.error(\" \" + err_1.stack.replace(/^\\s+/gm, ' '));\n return [3 /*break*/, 4];\n case 4:\n dequeue();\n return [3 /*break*/, 6];\n case 5:\n total = passed + failed + skipped;\n console.log(\"\\n1..\" + total);\n console.log(\"# tests \" + total);\n if (passed)\n console.log(\"# pass \" + passed);\n if (failed)\n console.log(\"# fail \" + failed);\n if (skipped)\n console.log(\"# skip \" + skipped);\n fulfil();\n if (isNode)\n process.exit(failed ? 1 : 0);\n _a.label = 6;\n case 6: return [2 /*return*/];\n }\n });\n });\n}\n\nexport { done, test, assert };\n//# sourceMappingURL=tape-modern.esm.js.map\n","import App from './App.svelte';\nimport { assert, test, done } from 'tape-modern';\n\n// setup\nconst target = document.querySelector('main');\n\nfunction normalize(html) {\n\tconst div = document.createElement('div');\n\tdiv.innerHTML = html\n\t\t.replace(//g, '')\n\t\t.replace(/svelte-ref-\\w+=\"\"/g, '')\n\t\t.replace(/\\s*svelte-\\w+\\s*/g, '')\n\t\t.replace(/class=\"\"/g, '')\n\t\t.replace(/>\\s+/g, '>')\n\t\t.replace(/\\s+ {\n\tassert.equal(normalize(a), normalize(b));\n};\n\n// tests\ntest('exists', t => {\n\tconst app = new App({\n\t\ttarget\n\t});\n\n\tassert.equal(app.scroller.index, 0);\n\tassert.equal(app.scroller.count, 0);\n\tassert.equal(app.scroller.top, 0);\n\tassert.equal(app.scroller.bottom, 1);\n\tassert.equal(app.scroller.threshold, 0.5);\n\n\t// TODO write some more tests\n\n\tapp.$destroy();\n});\n\n// this allows us to close puppeteer once tests have completed\nwindow.done = done;"],"names":["run"],"mappings":";;;CAAA,SAAS,IAAI,GAAG,EAAE;AAClB,AAEA;CACA,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;CAC1B,CAAC,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;CACtC,CAAC,OAAO,GAAG,CAAC;CACZ,CAAC;AACD,AAUA;CACA,SAAS,GAAG,CAAC,EAAE,EAAE;CACjB,CAAC,OAAO,EAAE,EAAE,CAAC;CACb,CAAC;;CAED,SAAS,YAAY,GAAG;CACxB,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;;CAED,SAAS,OAAO,CAAC,GAAG,EAAE;CACtB,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;CAClB,CAAC;;CAED,SAAS,WAAW,CAAC,KAAK,EAAE;CAC5B,CAAC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;CACpC,CAAC;;CAED,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE;CAC9B,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,KAAK,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;CAC/F,CAAC;AACD,AAcA;CACA,SAAS,WAAW,CAAC,UAAU,EAAE,GAAG,EAA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Q,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CACrC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CACrC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;CACnC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CACtC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;;CAE3C;;CAEA,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC;;CAEH;CACA,MAAM,CAAC,IAAI,GAAG,IAAI;;;;"} -------------------------------------------------------------------------------- /test/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | svelte-scroller tests 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/runner.js: -------------------------------------------------------------------------------- 1 | const ports = require('port-authority'); 2 | const http = require('http'); 3 | const sirv = require('sirv'); 4 | const puppeteer = require('puppeteer'); 5 | 6 | async function go() { 7 | const port = await ports.find(1234); 8 | console.log(`found available port: ${port}`); 9 | const server = http.createServer(sirv('test/public')); 10 | server.listen(port); 11 | await ports.wait(port).catch(() => {}); // workaround windows gremlins 12 | 13 | const browser = await puppeteer.launch({args: ['--no-sandbox']}); 14 | const page = await browser.newPage(); 15 | 16 | page.on('console', msg => { 17 | console[msg.type()](msg.text()); 18 | }); 19 | 20 | await page.goto(`http://localhost:${port}`); 21 | 22 | await page.evaluate(() => done); 23 | await browser.close(); 24 | server.close(); 25 | } 26 | 27 | go(); -------------------------------------------------------------------------------- /test/src/App.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/src/index.js: -------------------------------------------------------------------------------- 1 | import App from './App.svelte'; 2 | import { assert, test, done } from 'tape-modern'; 3 | 4 | // setup 5 | const target = document.querySelector('main'); 6 | 7 | function normalize(html) { 8 | const div = document.createElement('div'); 9 | div.innerHTML = html 10 | .replace(//g, '') 11 | .replace(/svelte-ref-\w+=""/g, '') 12 | .replace(/\s*svelte-\w+\s*/g, '') 13 | .replace(/class=""/g, '') 14 | .replace(/>\s+/g, '>') 15 | .replace(/\s+ { 22 | assert.equal(normalize(a), normalize(b)); 23 | }; 24 | 25 | // tests 26 | test('exists', (t) => { 27 | const app = new App({ 28 | target 29 | }); 30 | 31 | assert.equal(app.scroller.index, 0); 32 | assert.equal(app.scroller.count, 0); 33 | assert.equal(app.scroller.top, 0); 34 | assert.equal(app.scroller.bottom, 1); 35 | assert.equal(app.scroller.threshold, 0.5); 36 | 37 | // TODO write some more tests 38 | 39 | app.$destroy(); 40 | }); 41 | 42 | // this allows us to close puppeteer once tests have completed 43 | window.done = done; 44 | -------------------------------------------------------------------------------- /test/src/utils.js: -------------------------------------------------------------------------------- 1 | export function indent(node, spaces) { 2 | if (node.childNodes.length === 0) return; 3 | 4 | if (node.childNodes.length > 1 || node.childNodes[0].nodeType !== 3) { 5 | const first = node.childNodes[0]; 6 | const last = node.childNodes[node.childNodes.length - 1]; 7 | 8 | const head = `\n${spaces} `; 9 | const tail = `\n${spaces}`; 10 | 11 | if (first.nodeType === 3) { 12 | first.data = `${head}${first.data}`; 13 | } else { 14 | node.insertBefore(document.createTextNode(head), first); 15 | } 16 | 17 | if (last.nodeType === 3) { 18 | last.data = `${last.data}${tail}`; 19 | } else { 20 | node.appendChild(document.createTextNode(tail)); 21 | } 22 | 23 | let lastType = null; 24 | for (let i = 0; i < node.childNodes.length; i += 1) { 25 | const child = node.childNodes[i]; 26 | if (child.nodeType === 1) { 27 | indent(node.childNodes[i], `${spaces} `); 28 | 29 | if (lastType === 1) { 30 | node.insertBefore(document.createTextNode(head), child); 31 | i += 1; 32 | } 33 | } 34 | 35 | lastType = child.nodeType; 36 | } 37 | } 38 | } 39 | 40 | export function normalize(html) { 41 | const div = document.createElement('div'); 42 | div.innerHTML = html 43 | .replace(//g, '') 44 | .replace(//g, '') 45 | .replace(/class="svelte-\w+"\s*/g, '') 46 | .replace(/>\s+/g, '>') 47 | .replace(/\s+ { 57 | setTimeout(fulfil, ms); 58 | }); 59 | } --------------------------------------------------------------------------------
29 | This is the background content. It will stay fixed in place while the 30 | foreground scrolls over the top. 31 |
Section {index + 1} is currently active.