diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index aefdf3e..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** - -- Browser with version [e.g. chrome 22, firefox 70.0.1] -- Devtools version [e.g. 1.3.1, built from master] -- Svelte version [e.g. 3.15.0] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/assets/screenshot-1.1.0.png b/.github/assets/screenshot-1.1.0.png deleted file mode 100644 index 73e570a..0000000 Binary files a/.github/assets/screenshot-1.1.0.png and /dev/null differ diff --git a/.github/assets/screenshot-2.0.0.png b/.github/assets/screenshot-2.0.0.png deleted file mode 100644 index 71857f8..0000000 Binary files a/.github/assets/screenshot-2.0.0.png and /dev/null differ diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml deleted file mode 100644 index 0d411e1..0000000 --- a/.github/workflows/quality.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: QA - -on: - push: - branches: [master] - pull_request: - -jobs: - check: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - run: pnpm install - - run: pnpm check - - # test: - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # node-version: [16, 18, 20] - # os: [ubuntu-latest, windows-latest, macOS-latest] - - # steps: - # - uses: actions/checkout@v3 - # - uses: pnpm/action-setup@v2 - # - uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node-version }} - # cache: pnpm - - # - run: pnpm install - # - run: pnpm test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 826ac1f..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,90 +0,0 @@ -name: REL - -on: - push: - branches: [master] - pull_request: - -jobs: - manifest: - runs-on: ubuntu-latest - outputs: - version: ${{ steps.extract.outputs.version }} - - steps: - - uses: actions/checkout@v4 - - id: extract - working-directory: ./workspace/extension/static - run: echo "version=$(jq -r '.version' manifest.json)" >> $GITHUB_OUTPUT - - bundle: - runs-on: ubuntu-latest - needs: manifest - - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - run: pnpm install - - working-directory: ./workspace/extension - run: pnpm build && cd build && zip -r svelte-devtools * - - - uses: actions/upload-artifact@v4 - with: - name: extension-${{ github.sha }} - path: workspace/extension/build/svelte-devtools.zip - - - if: github.event_name == 'pull_request' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.number }} - WORKFLOW: ${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts - run: | - url=https://github.com/$WORKFLOW/$(gh api repos/$WORKFLOW --jq '.artifacts[0].id') - commented=$(gh pr view $PR_NUMBER --json comments --jq '.comments[].author.login | select(. | contains("github-actions"))') - body="Try the changes in this PR by [side-loading the built extension]($url). :rocket:" - - if [ -z "$commented" ]; then - gh pr comment $PR_NUMBER --body "$body" - else - gh pr comment $PR_NUMBER --edit-last --body "$body" - fi - - publish: - runs-on: ubuntu-latest - needs: [manifest, bundle] - - if: | - github.repository == 'sveltejs/svelte-devtools' && - github.event_name == 'push' && github.ref == 'refs/heads/master' && - startsWith(github.event.head_commit.message, format('~ v{0}', needs.manifest.outputs.version)) - - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/download-artifact@v4 - - - working-directory: extension-${{ github.sha }} - run: | - pnpm dlx web-ext sign --channel unlisted \ - --api-key ${{ secrets.WEB_EXT_API_KEY }} \ - --api-secret ${{ secrets.WEB_EXT_API_SECRET }} - - - working-directory: extension-${{ github.sha }} - env: - GH_TOKEN: ${{ github.token }} - run: | # https://cli.github.com/manual/gh_release_create - gh release create v${{ needs.manifest.outputs.version }} \ - svelte-devtools.zip web-ext-artifacts/*.xpi#svelte-devtools.xpi \ - --title ${{ needs.manifest.outputs.version }} \ - --draft --generate-notes --notes ' - Built from ${{ github.event.head_commit.id }} at https://github.com/sveltejs/svelte-devtools/actions/runs/${{ github.run_id }} - - Chrome Web Store: https://chrome.google.com/webstore/detail/svelte-devtools/kfidecgcdjjfpeckbblhmfkhmlgecoff - - Firefox Signed Add-on: https://github.com/sveltejs/svelte-devtools/releases/download/v${{ needs.manifest.outputs.version }}/svelte-devtools.xpi - ---' - - # TODO: publish to Chrome Web Store diff --git a/.gitignore b/.gitignore deleted file mode 100644 index aaa9ce1..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules - -.DS_Store -.cache -.env diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index e12a68b..0000000 --- a/.prettierrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "printWidth": 100, - "semi": true, - "singleQuote": true, - "tabWidth": 2, - "useTabs": true, - "overrides": [ - { - "files": ["pnpm-lock.yaml"], - "options": { - "rangeEnd": 0 - } - }, - - { - "files": ["package.json"], - "options": { - "plugins": ["prettier-plugin-sort-package-json"] - } - }, - { - "files": ["*.md"], - "options": { - "tabWidth": 4 - } - }, - { - "files": ["*.svelte"], - "options": { - "plugins": ["prettier-plugin-svelte"] - } - } - ] -} diff --git a/LICENSE b/LICENSE deleted file mode 100644 index a84ea85..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Christian Timothy Johnson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index f630494..0000000 --- a/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Svelte DevTools - - - - - Chrome Web Store - - - -Svelte DevTools is a browser extension for the [Svelte](https://svelte.dev/) framework. It allows you to inspect the Svelte state and component hierarchies in the Developer Tools. - -After installing you will see a new tab in Developer Tools. This tab displays a tree of Svelte components, HTMLx blocks, and DOM elements that were rendered on the page. By selecting one of the nodes in the tree, you can inspect and edit its current state in the panel to the right. - -> For Firefox users, you can install the [`.xpi` file of the latest version from the GitHub releases page](https://github.com/sveltejs/svelte-devtools/releases/latest). Note that if you grab the `.zip` file, you will need to load it as a temporary extension and enable "Always Allow on localhost" in the extension settings. - -![2.0.0 Screenshot](./.github/assets/screenshot-2.0.0.png '2.0.0 Screenshot') - -## Requirements - -The `svelte-devtools` extension requires the following to be true: - -- Chrome or Firefox version 121 or higher -- Application running Svelte version `^4.0.0` -- Application compiled with `dev: true` ([SvelteKit](https://kit.svelte.dev/) does this automatically for you) - -## Development - -Clone this repository and setup the environment with `pnpm` - -```sh -git clone https://github.com/sveltejs/svelte-devtools.git -cd svelte-devtools -pnpm install - -cd workspace/extension -pnpm dev -``` - -To work on the extension, run the `dev` script from `workspace/extension` directory - -```sh -cd workspace/extension -pnpm dev -``` - -This will build the extension and create a directory called `build`. Steps may vary depending on the browser you are using, but generally: - -1. Navigate to the extensions settings page -2. Turn on the 'Developer mode' switch -3. Click 'Load Unpacked' and select the `build` directory - -## Acknowledgements - -- This extension was initially created and developed by [RedHatter](https://github.com/RedHatter) diff --git a/bundle.js b/bundle.js new file mode 100644 index 0000000..fb56acc --- /dev/null +++ b/bundle.js @@ -0,0 +1,2674 @@ +(function () { + 'use strict'; + + function noop() { } + function assign(tar, src) { + // @ts-ignore + for (const k in src) + tar[k] = src[k]; + return tar; + } + function is_promise(value) { + return value && typeof value === 'object' && typeof value.then === 'function'; + } + function add_location(element, file, line, column, char) { + element.__svelte_meta = { + loc: { file, line, column, char } + }; + } + function run(fn) { + return fn(); + } + function blank_object() { + return Object.create(null); + } + function run_all(fns) { + fns.forEach(run); + } + function is_function(thing) { + return typeof thing === 'function'; + } + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); + } + function is_empty(obj) { + return Object.keys(obj).length === 0; + } + function create_slot(definition, ctx, $$scope, fn) { + if (definition) { + const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); + return definition[0](slot_ctx); + } + } + function get_slot_context(definition, ctx, $$scope, fn) { + return definition[1] && fn + ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) + : $$scope.ctx; + } + function get_slot_changes(definition, $$scope, dirty, fn) { + if (definition[2] && fn) { + const lets = definition[2](fn(dirty)); + if ($$scope.dirty === undefined) { + return lets; + } + if (typeof lets === 'object') { + const merged = []; + const len = Math.max($$scope.dirty.length, lets.length); + for (let i = 0; i < len; i += 1) { + merged[i] = $$scope.dirty[i] | lets[i]; + } + return merged; + } + return $$scope.dirty | lets; + } + return $$scope.dirty; + } + function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) { + const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn); + if (slot_changes) { + const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); + slot.p(slot_context, slot_changes); + } + } + + function append(target, node) { + target.appendChild(node); + } + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + function detach(node) { + node.parentNode.removeChild(node); + } + function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } + } + function element(name) { + return document.createElement(name); + } + function text(data) { + return document.createTextNode(data); + } + function space() { + return text(' '); + } + function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); + } + function prevent_default(fn) { + return function (event) { + event.preventDefault(); + // @ts-ignore + return fn.call(this, event); + }; + } + function stop_propagation(fn) { + return function (event) { + event.stopPropagation(); + // @ts-ignore + return fn.call(this, event); + }; + } + function attr(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); + } + function children(element) { + return Array.from(element.childNodes); + } + function custom_event(type, detail) { + const e = document.createEvent('CustomEvent'); + e.initCustomEvent(type, false, false, detail); + return e; + } + + let current_component; + function set_current_component(component) { + current_component = component; + } + function get_current_component() { + if (!current_component) + throw new Error('Function called outside component initialization'); + return current_component; + } + function createEventDispatcher() { + const component = get_current_component(); + return (type, detail) => { + const callbacks = component.$$.callbacks[type]; + if (callbacks) { + // TODO are there situations where events could be dispatched + // in a server (non-DOM) environment? + const event = custom_event(type, detail); + callbacks.slice().forEach(fn => { + fn.call(component, event); + }); + } + }; + } + + const dirty_components = []; + const binding_callbacks = []; + const render_callbacks = []; + const flush_callbacks = []; + const resolved_promise = Promise.resolve(); + let update_scheduled = false; + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + function add_render_callback(fn) { + render_callbacks.push(fn); + } + function add_flush_callback(fn) { + flush_callbacks.push(fn); + } + let flushing = false; + const seen_callbacks = new Set(); + function flush() { + if (flushing) + return; + flushing = true; + do { + // first, call beforeUpdate functions + // and update components + for (let i = 0; i < dirty_components.length; i += 1) { + const component = dirty_components[i]; + set_current_component(component); + update(component.$$); + } + set_current_component(null); + dirty_components.length = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + flushing = false; + seen_callbacks.clear(); + } + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + const outroing = new Set(); + let outros; + function group_outros() { + outros = { + r: 0, + c: [], + p: outros // parent group + }; + } + function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; + } + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + function transition_out(block, local, detach, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach) + block.d(1); + callback(); + } + }); + block.o(local); + } + } + + function handle_promise(promise, info) { + const token = info.token = {}; + function update(type, index, key, value) { + if (info.token !== token) + return; + info.resolved = value; + let child_ctx = info.ctx; + if (key !== undefined) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } + const block = type && (info.current = type)(child_ctx); + let needs_flush = false; + if (info.block) { + if (info.blocks) { + info.blocks.forEach((block, i) => { + if (i !== index && block) { + group_outros(); + transition_out(block, 1, 1, () => { + info.blocks[i] = null; + }); + check_outros(); + } + }); + } + else { + info.block.d(1); + } + block.c(); + transition_in(block, 1); + block.m(info.mount(), info.anchor); + needs_flush = true; + } + info.block = block; + if (info.blocks) + info.blocks[index] = block; + if (needs_flush) { + flush(); + } + } + if (is_promise(promise)) { + const current_component = get_current_component(); + promise.then(value => { + set_current_component(current_component); + update(info.then, 1, info.value, value); + set_current_component(null); + }, error => { + set_current_component(current_component); + update(info.catch, 2, info.error, error); + set_current_component(null); + if (!info.hasCatch) { + throw error; + } + }); + // if we previously had a then/catch block, destroy it + if (info.current !== info.pending) { + update(info.pending, 0); + return true; + } + } + else { + if (info.current !== info.then) { + update(info.then, 1, info.value, promise); + return true; + } + info.resolved = promise; + } + } + + const globals = (typeof window !== 'undefined' + ? window + : typeof globalThis !== 'undefined' + ? globalThis + : global); + + function bind(component, name, callback) { + const index = component.$$.props[name]; + if (index !== undefined) { + component.$$.bound[index] = callback; + callback(component.$$.ctx[index]); + } + } + function create_component(block) { + block && block.c(); + } + function mount_component(component, target, anchor) { + const { fragment, on_mount, on_destroy, after_update } = component.$$; + fragment && fragment.m(target, anchor); + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = on_mount.map(run).filter(is_function); + if (on_destroy) { + on_destroy.push(...new_on_destroy); + } + else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + after_update.forEach(add_render_callback); + } + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); + } + function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const prop_values = options.props || {}; + const $$ = component.$$ = { + fragment: null, + ctx: null, + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + before_update: [], + after_update: [], + context: new Map(parent_component ? parent_component.$$.context : []), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false + }; + let ready = false; + $$.ctx = instance + ? instance(component, prop_values, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children(options.target); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } + else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor); + flush(); + } + set_current_component(parent_component); + } + /** + * Base class for Svelte components. Used when dev=false. + */ + class SvelteComponent { + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } + } + + function dispatch_dev(type, detail) { + document.dispatchEvent(custom_event(type, Object.assign({ version: '3.31.0' }, detail))); + } + function append_dev(target, node) { + dispatch_dev('SvelteDOMInsert', { target, node }); + append(target, node); + } + function insert_dev(target, node, anchor) { + dispatch_dev('SvelteDOMInsert', { target, node, anchor }); + insert(target, node, anchor); + } + function detach_dev(node) { + dispatch_dev('SvelteDOMRemove', { node }); + detach(node); + } + function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { + const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : []; + if (has_prevent_default) + modifiers.push('preventDefault'); + if (has_stop_propagation) + modifiers.push('stopPropagation'); + dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers }); + const dispose = listen(node, event, handler, options); + return () => { + dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers }); + dispose(); + }; + } + function attr_dev(node, attribute, value) { + attr(node, attribute, value); + if (value == null) + dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute }); + else + dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value }); + } + function set_data_dev(text, data) { + data = '' + data; + if (text.wholeText === data) + return; + dispatch_dev('SvelteDOMSetData', { node: text, data }); + text.data = data; + } + function validate_each_argument(arg) { + if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { + let msg = '{#each} only iterates over array-like objects.'; + if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { + msg += ' You can use a spread to convert this iterable into an array.'; + } + throw new Error(msg); + } + } + function validate_slots(name, slot, keys) { + for (const slot_key of Object.keys(slot)) { + if (!~keys.indexOf(slot_key)) { + console.warn(`<${name}> received an unexpected slot "${slot_key}".`); + } + } + } + /** + * Base class for Svelte components with some minor dev-enhancements. Used when dev=true. + */ + class SvelteComponentDev extends SvelteComponent { + constructor(options) { + if (!options || (!options.target && !options.$$inline)) { + throw new Error("'target' is a required option"); + } + super(); + } + $destroy() { + super.$destroy(); + this.$destroy = () => { + console.warn('Component was already destroyed'); // eslint-disable-line no-console + }; + } + $capture_state() { } + $inject_state() { } + } + + /* test/src/BasicTree/Component.svelte generated by Svelte v3.31.0 */ + + const file = "test/src/BasicTree/Component.svelte"; + + function create_fragment(ctx) { + let div; + let t0; + let t1; + + const block = { + c: function create() { + div = element("div"); + t0 = text("A component with string, number, array, and object attributes. The value is\n "); + t1 = text(/*value*/ ctx[0]); + add_location(div, file, 11, 0, 184); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, t0); + append_dev(div, t1); + }, + p: function update(ctx, [dirty]) { + if (dirty & /*value*/ 1) set_data_dev(t1, /*value*/ ctx[0]); + }, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Component", slots, []); + let { string } = $$props; + let { number } = $$props; + let { array } = $$props; + let { object } = $$props; + let { boolean } = $$props; + let value = 0; + Promise.resolve().then(() => $$invalidate(0, value = 1), 0); + const writable_props = ["string", "number", "array", "object", "boolean"]; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$$set = $$props => { + if ("string" in $$props) $$invalidate(1, string = $$props.string); + if ("number" in $$props) $$invalidate(2, number = $$props.number); + if ("array" in $$props) $$invalidate(3, array = $$props.array); + if ("object" in $$props) $$invalidate(4, object = $$props.object); + if ("boolean" in $$props) $$invalidate(5, boolean = $$props.boolean); + }; + + $$self.$capture_state = () => ({ + string, + number, + array, + object, + boolean, + value + }); + + $$self.$inject_state = $$props => { + if ("string" in $$props) $$invalidate(1, string = $$props.string); + if ("number" in $$props) $$invalidate(2, number = $$props.number); + if ("array" in $$props) $$invalidate(3, array = $$props.array); + if ("object" in $$props) $$invalidate(4, object = $$props.object); + if ("boolean" in $$props) $$invalidate(5, boolean = $$props.boolean); + if ("value" in $$props) $$invalidate(0, value = $$props.value); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [value, string, number, array, object, boolean]; + } + + class Component extends SvelteComponentDev { + constructor(options) { + super(options); + + init(this, options, instance, create_fragment, safe_not_equal, { + string: 1, + number: 2, + array: 3, + object: 4, + boolean: 5 + }); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Component", + options, + id: create_fragment.name + }); + + const { ctx } = this.$$; + const props = options.props || {}; + + if (/*string*/ ctx[1] === undefined && !("string" in props)) { + console.warn(" was created without expected prop 'string'"); + } + + if (/*number*/ ctx[2] === undefined && !("number" in props)) { + console.warn(" was created without expected prop 'number'"); + } + + if (/*array*/ ctx[3] === undefined && !("array" in props)) { + console.warn(" was created without expected prop 'array'"); + } + + if (/*object*/ ctx[4] === undefined && !("object" in props)) { + console.warn(" was created without expected prop 'object'"); + } + + if (/*boolean*/ ctx[5] === undefined && !("boolean" in props)) { + console.warn(" was created without expected prop 'boolean'"); + } + } + + get string() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set string(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get number() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set number(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get array() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set array(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get object() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set object(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get boolean() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set boolean(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + } + + /* test/src/BasicTree/BasicTree.svelte generated by Svelte v3.31.0 */ + const file$1 = "test/src/BasicTree/BasicTree.svelte"; + + function create_fragment$1(ctx) { + let div; + let ol; + let li0; + let t1; + let li1; + let t3; + let li2; + let t5; + let component; + let t6; + let span; + let current; + + component = new Component({ + props: { + object: { + one: {}, + two: "a", + three: [0, NaN], + four: null, + five: undefined + }, + string: "value", + number: 0, + boolean: false, + array: [] + }, + $$inline: true + }); + + const block = { + c: function create() { + div = element("div"); + ol = element("ol"); + li0 = element("li"); + li0.textContent = "Basic tree rendering"; + t1 = space(); + li1 = element("li"); + li1.textContent = "Element attributes, component properties and state"; + t3 = space(); + li2 = element("li"); + li2.textContent = "Text nodes / anchors"; + t5 = space(); + create_component(component.$$.fragment); + t6 = space(); + span = element("span"); + add_location(li0, file$1, 9, 4, 151); + add_location(li1, file$1, 10, 4, 185); + add_location(li2, file$1, 11, 4, 249); + add_location(ol, file$1, 8, 2, 142); + attr_dev(span, "title", /*title*/ ctx[0]); + add_location(span, file$1, 19, 2, 455); + add_location(div, file$1, 7, 0, 134); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, ol); + append_dev(ol, li0); + append_dev(ol, t1); + append_dev(ol, li1); + append_dev(ol, t3); + append_dev(ol, li2); + append_dev(div, t5); + mount_component(component, div, null); + append_dev(div, t6); + append_dev(div, span); + current = true; + }, + p: function update(ctx, [dirty]) { + if (!current || dirty & /*title*/ 1) { + attr_dev(span, "title", /*title*/ ctx[0]); + } + }, + i: function intro(local) { + if (current) return; + transition_in(component.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(component.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + destroy_component(component); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$1.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$1($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("BasicTree", slots, []); + let title = "one"; + Promise.resolve().then(() => $$invalidate(0, title = "two")); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$capture_state = () => ({ Component, title }); + + $$self.$inject_state = $$props => { + if ("title" in $$props) $$invalidate(0, title = $$props.title); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [title]; + } + + class BasicTree extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$1, create_fragment$1, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "BasicTree", + options, + id: create_fragment$1.name + }); + } + } + + /* test/src/Detach/DetachComponent.svelte generated by Svelte v3.31.0 */ + + function create_fragment$2(ctx) { + let t; + + const block = { + c: function create() { + t = text("Element renders above both element and button"); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + p: noop, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$2.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$2($$self, $$props) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("DetachComponent", slots, []); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + return []; + } + + class DetachComponent extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$2, create_fragment$2, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "DetachComponent", + options, + id: create_fragment$2.name + }); + } + } + + /* test/src/Detach/Detach.svelte generated by Svelte v3.31.0 */ + const file$2 = "test/src/Detach/Detach.svelte"; + + // (14:2) {#if isShown} + function create_if_block(ctx) { + let detachcomponent; + let t0; + let div; + let current; + detachcomponent = new DetachComponent({ $$inline: true }); + + const block = { + c: function create() { + create_component(detachcomponent.$$.fragment); + t0 = space(); + div = element("div"); + div.textContent = "Element renders below component and above button"; + add_location(div, file$2, 15, 4, 306); + }, + m: function mount(target, anchor) { + mount_component(detachcomponent, target, anchor); + insert_dev(target, t0, anchor); + insert_dev(target, div, anchor); + current = true; + }, + i: function intro(local) { + if (current) return; + transition_in(detachcomponent.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(detachcomponent.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(detachcomponent, detaching); + if (detaching) detach_dev(t0); + if (detaching) detach_dev(div); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block.name, + type: "if", + source: "(14:2) {#if isShown}", + ctx + }); + + return block; + } + + function create_fragment$3(ctx) { + let div; + let p; + let t1; + let ol; + let li0; + let t3; + let li1; + let t5; + let t6; + let button; + let current; + let mounted; + let dispose; + let if_block = /*isShown*/ ctx[0] && create_if_block(ctx); + + const block = { + c: function create() { + div = element("div"); + p = element("p"); + p.textContent = "Component / element nodes are"; + t1 = space(); + ol = element("ol"); + li0 = element("li"); + li0.textContent = "positioned correctly when mounted after first render"; + t3 = space(); + li1 = element("li"); + li1.textContent = "removed when detached"; + t5 = space(); + if (if_block) if_block.c(); + t6 = space(); + button = element("button"); + button.textContent = "Toggle"; + add_location(p, file$2, 7, 2, 108); + add_location(li0, file$2, 9, 4, 156); + add_location(li1, file$2, 10, 4, 222); + add_location(ol, file$2, 8, 2, 147); + add_location(button, file$2, 18, 2, 377); + add_location(div, file$2, 6, 0, 100); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, p); + append_dev(div, t1); + append_dev(div, ol); + append_dev(ol, li0); + append_dev(ol, t3); + append_dev(ol, li1); + append_dev(div, t5); + if (if_block) if_block.m(div, null); + append_dev(div, t6); + append_dev(div, button); + current = true; + + if (!mounted) { + dispose = listen_dev(button, "click", /*click_handler*/ ctx[1], false, false, false); + mounted = true; + } + }, + p: function update(ctx, [dirty]) { + if (/*isShown*/ ctx[0]) { + if (if_block) { + if (dirty & /*isShown*/ 1) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block(ctx); + if_block.c(); + transition_in(if_block, 1); + if_block.m(div, t6); + } + } else if (if_block) { + group_outros(); + + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + + check_outros(); + } + }, + i: function intro(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + if (if_block) if_block.d(); + mounted = false; + dispose(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$3.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$3($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Detach", slots, []); + let isShown = false; + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + const click_handler = e => $$invalidate(0, isShown = !isShown); + $$self.$capture_state = () => ({ DetachComponent, isShown }); + + $$self.$inject_state = $$props => { + if ("isShown" in $$props) $$invalidate(0, isShown = $$props.isShown); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [isShown, click_handler]; + } + + class Detach extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$3, create_fragment$3, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Detach", + options, + id: create_fragment$3.name + }); + } + } + + /* test/src/Blocks.svelte generated by Svelte v3.31.0 */ + + const file$3 = "test/src/Blocks.svelte"; + + function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[0] = list[i]; + return child_ctx; + } + + // (18:2) {#each valueList as value} + function create_each_block(ctx) { + let span; + let t_value = /*value*/ ctx[0] + ""; + let t; + + const block = { + c: function create() { + span = element("span"); + t = text(t_value); + add_location(span, file$3, 17, 28, 354); + }, + m: function mount(target, anchor) { + insert_dev(target, span, anchor); + append_dev(span, t); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(span); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block.name, + type: "each", + source: "(18:2) {#each valueList as value}", + ctx + }); + + return block; + } + + // (23:39) {:else} + function create_else_block(ctx) { + let t; + + const block = { + c: function create() { + t = text("Value is under 5"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block.name, + type: "else", + source: "(23:39) {:else}", + ctx + }); + + return block; + } + + // (23:24) + function create_if_block_1(ctx) { + let t; + + const block = { + c: function create() { + t = text("Value is over 5"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_1.name, + type: "if", + source: "(23:24) ", + ctx + }); + + return block; + } + + // (21:4) {#if value > 10} + function create_if_block$1(ctx) { + let t; + + const block = { + c: function create() { + t = text("Value is over 10"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block$1.name, + type: "if", + source: "(21:4) {#if value > 10}", + ctx + }); + + return block; + } + + // (32:4) {:catch error} + function create_catch_block_3(ctx) { + let t0; + let t1_value = /*error*/ ctx[3].message + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Something went wrong\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_catch_block_3.name, + type: "catch", + source: "(32:4) {:catch error}", + ctx + }); + + return block; + } + + // (29:4) {:then value} + function create_then_block_3(ctx) { + let t0; + let t1_value = /*value*/ ctx[0] + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Promise resolved to\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_then_block_3.name, + type: "then", + source: "(29:4) {:then value}", + ctx + }); + + return block; + } + + // (27:20) waiting for the promise to resolve... {:then value} + function create_pending_block_3(ctx) { + let t; + + const block = { + c: function create() { + t = text("waiting for the promise to resolve..."); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_pending_block_3.name, + type: "pending", + source: "(27:20) waiting for the promise to resolve... {:then value}", + ctx + }); + + return block; + } + + // (43:4) {:catch error} + function create_catch_block_2(ctx) { + let t0; + let t1_value = /*error*/ ctx[3].message + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Something went wrong\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_catch_block_2.name, + type: "catch", + source: "(43:4) {:catch error}", + ctx + }); + + return block; + } + + // (40:4) {:then value} + function create_then_block_2(ctx) { + let t0; + let t1_value = /*value*/ ctx[0] + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Something went wrong\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_then_block_2.name, + type: "then", + source: "(40:4) {:then value}", + ctx + }); + + return block; + } + + // (38:34) Pending forever {:then value} + function create_pending_block_2(ctx) { + let t; + + const block = { + c: function create() { + t = text("Pending forever"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_pending_block_2.name, + type: "pending", + source: "(38:34) Pending forever {:then value}", + ctx + }); + + return block; + } + + // (55:4) {:catch error} + function create_catch_block_1(ctx) { + let t0; + let t1_value = /*error*/ ctx[3].message + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Something went wrong\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_catch_block_1.name, + type: "catch", + source: "(55:4) {:catch error}", + ctx + }); + + return block; + } + + // (52:4) {:then value} + function create_then_block_1(ctx) { + let t0; + let t1_value = /*value*/ ctx[0] + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Promise resolved to\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_then_block_1.name, + type: "then", + source: "(52:4) {:then value}", + ctx + }); + + return block; + } + + // (50:31) Something went wrong {:then value} + function create_pending_block_1(ctx) { + let t; + + const block = { + c: function create() { + t = text("Something went wrong"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_pending_block_1.name, + type: "pending", + source: "(50:31) Something went wrong {:then value}", + ctx + }); + + return block; + } + + // (66:4) {:catch error} + function create_catch_block(ctx) { + let t0; + let t1_value = /*error*/ ctx[3] + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Should reject\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_catch_block.name, + type: "catch", + source: "(66:4) {:catch error}", + ctx + }); + + return block; + } + + // (63:4) {:then value} + function create_then_block(ctx) { + let t0; + let t1_value = /*value*/ ctx[0] + ""; + let t1; + + const block = { + c: function create() { + t0 = text("Something went wrong\n "); + t1 = text(t1_value); + }, + m: function mount(target, anchor) { + insert_dev(target, t0, anchor); + insert_dev(target, t1, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t0); + if (detaching) detach_dev(t1); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_then_block.name, + type: "then", + source: "(63:4) {:then value}", + ctx + }); + + return block; + } + + // (61:39) Something went wrong {:then value} + function create_pending_block(ctx) { + let t; + + const block = { + c: function create() { + t = text("Something went wrong"); + }, + m: function mount(target, anchor) { + insert_dev(target, t, anchor); + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(t); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_pending_block.name, + type: "pending", + source: "(61:39) Something went wrong {:then value}", + ctx + }); + + return block; + } + + function create_fragment$4(ctx) { + let div5; + let p; + let t1; + let t2; + let div0; + let t3; + let div1; + let promise_1; + let t4; + let div2; + let promise_2; + let t5; + let div3; + let promise_3; + let t6; + let div4; + let promise_4; + let each_value = /*valueList*/ ctx[1]; + validate_each_argument(each_value); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + + function select_block_type(ctx, dirty) { + if (/*value*/ ctx[0] > 10) return create_if_block$1; + if (/*value*/ ctx[0] > 5) return create_if_block_1; + return create_else_block; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + let info = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block_3, + then: create_then_block_3, + catch: create_catch_block_3, + value: 0, + error: 3 + }; + + handle_promise(promise_1 = /*promise*/ ctx[2], info); + + let info_1 = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block_2, + then: create_then_block_2, + catch: create_catch_block_2, + value: 0, + error: 3 + }; + + handle_promise(promise_2 = new Promise(func), info_1); + + let info_2 = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block_1, + then: create_then_block_1, + catch: create_catch_block_1, + value: 0, + error: 3 + }; + + handle_promise(promise_3 = Promise.resolve(5), info_2); + + let info_3 = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block, + then: create_then_block, + catch: create_catch_block, + value: 0, + error: 3 + }; + + handle_promise(promise_4 = Promise.reject("rejected"), info_3); + + const block = { + c: function create() { + div5 = element("div"); + p = element("p"); + p.textContent = "Renders {#each} and {#if} blocks with original\n source line"; + t1 = space(); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + t2 = space(); + div0 = element("div"); + if_block.c(); + t3 = space(); + div1 = element("div"); + info.block.c(); + t4 = space(); + div2 = element("div"); + info_1.block.c(); + t5 = space(); + div3 = element("div"); + info_2.block.c(); + t6 = space(); + div4 = element("div"); + info_3.block.c(); + add_location(p, file$3, 12, 2, 219); + add_location(div0, file$3, 19, 2, 385); + add_location(div1, file$3, 25, 2, 515); + add_location(div2, file$3, 36, 2, 736); + add_location(div3, file$3, 48, 2, 951); + add_location(div4, file$3, 59, 2, 1166); + add_location(div5, file$3, 11, 0, 211); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div5, anchor); + append_dev(div5, p); + append_dev(div5, t1); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div5, null); + } + + append_dev(div5, t2); + append_dev(div5, div0); + if_block.m(div0, null); + append_dev(div5, t3); + append_dev(div5, div1); + info.block.m(div1, info.anchor = null); + info.mount = () => div1; + info.anchor = null; + append_dev(div5, t4); + append_dev(div5, div2); + info_1.block.m(div2, info_1.anchor = null); + info_1.mount = () => div2; + info_1.anchor = null; + append_dev(div5, t5); + append_dev(div5, div3); + info_2.block.m(div3, info_2.anchor = null); + info_2.mount = () => div3; + info_2.anchor = null; + append_dev(div5, t6); + append_dev(div5, div4); + info_3.block.m(div4, info_3.anchor = null); + info_3.mount = () => div4; + info_3.anchor = null; + }, + p: function update(new_ctx, [dirty]) { + ctx = new_ctx; + + if (dirty & /*valueList*/ 2) { + each_value = /*valueList*/ ctx[1]; + validate_each_argument(each_value); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(div5, t2); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + + if (current_block_type !== (current_block_type = select_block_type(ctx))) { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(div0, null); + } + } + + { + const child_ctx = ctx.slice(); + child_ctx[0] = child_ctx[3] = info.resolved; + info.block.p(child_ctx, dirty); + } + + { + const child_ctx = ctx.slice(); + child_ctx[0] = child_ctx[3] = info_1.resolved; + info_1.block.p(child_ctx, dirty); + } + + { + const child_ctx = ctx.slice(); + child_ctx[0] = child_ctx[3] = info_2.resolved; + info_2.block.p(child_ctx, dirty); + } + + { + const child_ctx = ctx.slice(); + child_ctx[0] = child_ctx[3] = info_3.resolved; + info_3.block.p(child_ctx, dirty); + } + }, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(div5); + destroy_each(each_blocks, detaching); + if_block.d(); + info.block.d(); + info.token = null; + info = null; + info_1.block.d(); + info_1.token = null; + info_1 = null; + info_2.block.d(); + info_2.token = null; + info_2 = null; + info_3.block.d(); + info_3.token = null; + info_3 = null; + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$4.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + const func = () => { + + }; + + function instance$4($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Blocks", slots, []); + let valueList = ["a", "b", "c"]; + let value = 0; + Promise.resolve().then(() => $$invalidate(0, value = 1), 0); + let promise = new Promise((resolve, reject) => setTimeout(() => resolve(5), 2000)); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$capture_state = () => ({ valueList, value, promise }); + + $$self.$inject_state = $$props => { + if ("valueList" in $$props) $$invalidate(1, valueList = $$props.valueList); + if ("value" in $$props) $$invalidate(0, value = $$props.value); + if ("promise" in $$props) $$invalidate(2, promise = $$props.promise); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [value, valueList, promise]; + } + + class Blocks extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$4, create_fragment$4, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Blocks", + options, + id: create_fragment$4.name + }); + } + } + + /* test/src/Bind/BindComponent.svelte generated by Svelte v3.31.0 */ + + function create_fragment$5(ctx) { + const block = { + c: noop, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$5.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$5($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("BindComponent", slots, []); + let { value = Date.now() } = $$props; + const writable_props = ["value"]; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$$set = $$props => { + if ("value" in $$props) $$invalidate(0, value = $$props.value); + }; + + $$self.$capture_state = () => ({ value }); + + $$self.$inject_state = $$props => { + if ("value" in $$props) $$invalidate(0, value = $$props.value); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [value]; + } + + class BindComponent extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$5, create_fragment$5, safe_not_equal, { value: 0 }); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "BindComponent", + options, + id: create_fragment$5.name + }); + } + + get value() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set value(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + } + + /* test/src/Bind/Bind.svelte generated by Svelte v3.31.0 */ + + const { console: console_1 } = globals; + const file$4 = "test/src/Bind/Bind.svelte"; + + function create_fragment$6(ctx) { + let div; + let p; + let t1; + let bindcomponent; + let updating_value; + let t2; + let input; + let current; + let mounted; + let dispose; + + function bindcomponent_value_binding(value) { + /*bindcomponent_value_binding*/ ctx[1].call(null, value); + } + + let bindcomponent_props = {}; + + if (/*value*/ ctx[0] !== void 0) { + bindcomponent_props.value = /*value*/ ctx[0]; + } + + bindcomponent = new BindComponent({ + props: bindcomponent_props, + $$inline: true + }); + + binding_callbacks.push(() => bind(bindcomponent, "value", bindcomponent_value_binding)); + + const block = { + c: function create() { + div = element("div"); + p = element("p"); + p.textContent = "Prepend 'bind' for bound Component binding. Note: element binds are simple\n implicit event handlers"; + t1 = space(); + create_component(bindcomponent.$$.fragment); + t2 = space(); + input = element("input"); + add_location(p, file$4, 7, 2, 94); + add_location(input, file$4, 12, 2, 245); + add_location(div, file$4, 6, 0, 86); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, p); + append_dev(div, t1); + mount_component(bindcomponent, div, null); + append_dev(div, t2); + append_dev(div, input); + current = true; + + if (!mounted) { + dispose = listen_dev(input, "change", /*change_handler*/ ctx[2], false, false, false); + mounted = true; + } + }, + p: function update(ctx, [dirty]) { + const bindcomponent_changes = {}; + + if (!updating_value && dirty & /*value*/ 1) { + updating_value = true; + bindcomponent_changes.value = /*value*/ ctx[0]; + add_flush_callback(() => updating_value = false); + } + + bindcomponent.$set(bindcomponent_changes); + }, + i: function intro(local) { + if (current) return; + transition_in(bindcomponent.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(bindcomponent.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + destroy_component(bindcomponent); + mounted = false; + dispose(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$6.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$6($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Bind", slots, []); + let value; + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(` was created with unknown prop '${key}'`); + }); + + function bindcomponent_value_binding(value$1) { + value = value$1; + $$invalidate(0, value); + } + + const change_handler = e => console.log(e); + $$self.$capture_state = () => ({ BindComponent, value }); + + $$self.$inject_state = $$props => { + if ("value" in $$props) $$invalidate(0, value = $$props.value); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [value, bindcomponent_value_binding, change_handler]; + } + + class Bind extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$6, create_fragment$6, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Bind", + options, + id: create_fragment$6.name + }); + } + } + + /* test/src/Events/EventsComponent.svelte generated by Svelte v3.31.0 */ + const file$5 = "test/src/Events/EventsComponent.svelte"; + + function create_fragment$7(ctx) { + let button; + let mounted; + let dispose; + + const block = { + c: function create() { + button = element("button"); + button.textContent = "Click me!"; + attr_dev(button, "type", "button"); + add_location(button, file$5, 7, 0, 173); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, button, anchor); + + if (!mounted) { + dispose = listen_dev(button, "click", stop_propagation(prevent_default(/*handler*/ ctx[0])), { once: true }, true, true); + mounted = true; + } + }, + p: noop, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(button); + mounted = false; + dispose(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$7.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$7($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("EventsComponent", slots, []); + const dispatch = createEventDispatcher(); + const handler = () => dispatch("click", "I was clicked!"); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$capture_state = () => ({ createEventDispatcher, dispatch, handler }); + return [handler]; + } + + class EventsComponent extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$7, create_fragment$7, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "EventsComponent", + options, + id: create_fragment$7.name + }); + } + } + + /* test/src/Events/Events.svelte generated by Svelte v3.31.0 */ + + const { console: console_1$1 } = globals; + const file$6 = "test/src/Events/Events.svelte"; + + function create_fragment$8(ctx) { + let div; + let p; + let t1; + let eventscomponent; + let current; + let mounted; + let dispose; + eventscomponent = new EventsComponent({ $$inline: true }); + eventscomponent.$on("click", /*click_handler*/ ctx[0]); + + const block = { + c: function create() { + div = element("div"); + p = element("p"); + p.textContent = "Render event listeners on elements and components."; + t1 = space(); + create_component(eventscomponent.$$.fragment); + add_location(p, file$6, 5, 2, 145); + add_location(div, file$6, 4, 0, 77); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, p); + append_dev(div, t1); + mount_component(eventscomponent, div, null); + current = true; + + if (!mounted) { + dispose = listen_dev(div, "keypress", /*keypress_handler*/ ctx[1], true, false, false); + mounted = true; + } + }, + p: noop, + i: function intro(local) { + if (current) return; + transition_in(eventscomponent.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(eventscomponent.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + destroy_component(eventscomponent); + mounted = false; + dispose(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$8.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$8($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Events", slots, []); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1$1.warn(` was created with unknown prop '${key}'`); + }); + + const click_handler = e => console.log(e.detail); + const keypress_handler = e => console.log("Captured a key", e); + $$self.$capture_state = () => ({ EventsComponent }); + return [click_handler, keypress_handler]; + } + + class Events extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$8, create_fragment$8, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Events", + options, + id: create_fragment$8.name + }); + } + } + + /* test/src/Slots/SlotComponent.svelte generated by Svelte v3.31.0 */ + + function create_fragment$9(ctx) { + let current; + const default_slot_template = /*#slots*/ ctx[1].default; + const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[0], null); + + const block = { + c: function create() { + if (default_slot) default_slot.c(); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + if (default_slot) { + default_slot.m(target, anchor); + } + + current = true; + }, + p: function update(ctx, [dirty]) { + if (default_slot) { + if (default_slot.p && dirty & /*$$scope*/ 1) { + update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[0], dirty, null, null); + } + } + }, + i: function intro(local) { + if (current) return; + transition_in(default_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (default_slot) default_slot.d(detaching); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$9.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$9($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("SlotComponent", slots, ['default']); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$$set = $$props => { + if ("$$scope" in $$props) $$invalidate(0, $$scope = $$props.$$scope); + }; + + return [$$scope, slots]; + } + + class SlotComponent extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$9, create_fragment$9, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "SlotComponent", + options, + id: create_fragment$9.name + }); + } + } + + /* test/src/Slots/Slots.svelte generated by Svelte v3.31.0 */ + const file$7 = "test/src/Slots/Slots.svelte"; + + // (7:2) + function create_default_slot(ctx) { + let span; + + const block = { + c: function create() { + span = element("span"); + span.textContent = "Slot content"; + add_location(span, file$7, 6, 17, 119); + }, + m: function mount(target, anchor) { + insert_dev(target, span, anchor); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(span); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_default_slot.name, + type: "slot", + source: "(7:2) ", + ctx + }); + + return block; + } + + function create_fragment$a(ctx) { + let div; + let p; + let t1; + let slotcomponent; + let current; + + slotcomponent = new SlotComponent({ + props: { + $$slots: { default: [create_default_slot] }, + $$scope: { ctx } + }, + $$inline: true + }); + + const block = { + c: function create() { + div = element("div"); + p = element("p"); + p.textContent = "Render slots."; + t1 = space(); + create_component(slotcomponent.$$.fragment); + add_location(p, file$7, 5, 2, 81); + add_location(div, file$7, 4, 0, 73); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, p); + append_dev(div, t1); + mount_component(slotcomponent, div, null); + current = true; + }, + p: function update(ctx, [dirty]) { + const slotcomponent_changes = {}; + + if (dirty & /*$$scope*/ 1) { + slotcomponent_changes.$$scope = { dirty, ctx }; + } + + slotcomponent.$set(slotcomponent_changes); + }, + i: function intro(local) { + if (current) return; + transition_in(slotcomponent.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(slotcomponent.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + destroy_component(slotcomponent); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$a.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$a($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Slots", slots, []); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$capture_state = () => ({ SlotComponent }); + return []; + } + + class Slots extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$a, create_fragment$a, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Slots", + options, + id: create_fragment$a.name + }); + } + } + + /* test/src/App.svelte generated by Svelte v3.31.0 */ + const file$8 = "test/src/App.svelte"; + + function create_fragment$b(ctx) { + let div; + let basictree; + let t0; + let detach_1; + let t1; + let blocks; + let t2; + let bind_1; + let t3; + let events; + let t4; + let slots; + let current; + basictree = new BasicTree({ $$inline: true }); + detach_1 = new Detach({ $$inline: true }); + blocks = new Blocks({ $$inline: true }); + bind_1 = new Bind({ $$inline: true }); + events = new Events({ $$inline: true }); + slots = new Slots({ $$inline: true }); + + const block = { + c: function create() { + div = element("div"); + create_component(basictree.$$.fragment); + t0 = space(); + create_component(detach_1.$$.fragment); + t1 = space(); + create_component(blocks.$$.fragment); + t2 = space(); + create_component(bind_1.$$.fragment); + t3 = space(); + create_component(events.$$.fragment); + t4 = space(); + create_component(slots.$$.fragment); + attr_dev(div, "class", "svelte-aep82n"); + add_location(div, file$8, 34, 0, 872); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + mount_component(basictree, div, null); + append_dev(div, t0); + mount_component(detach_1, div, null); + append_dev(div, t1); + mount_component(blocks, div, null); + append_dev(div, t2); + mount_component(bind_1, div, null); + append_dev(div, t3); + mount_component(events, div, null); + append_dev(div, t4); + mount_component(slots, div, null); + current = true; + }, + p: noop, + i: function intro(local) { + if (current) return; + transition_in(basictree.$$.fragment, local); + transition_in(detach_1.$$.fragment, local); + transition_in(blocks.$$.fragment, local); + transition_in(bind_1.$$.fragment, local); + transition_in(events.$$.fragment, local); + transition_in(slots.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(basictree.$$.fragment, local); + transition_out(detach_1.$$.fragment, local); + transition_out(blocks.$$.fragment, local); + transition_out(bind_1.$$.fragment, local); + transition_out(events.$$.fragment, local); + transition_out(slots.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + destroy_component(basictree); + destroy_component(detach_1); + destroy_component(blocks); + destroy_component(bind_1); + destroy_component(events); + destroy_component(slots); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$b.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$b($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("App", slots, []); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + $$self.$capture_state = () => ({ + BasicTree, + Detach, + Blocks, + Bind, + Events, + Slots + }); + + return []; + } + + class App extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$b, create_fragment$b, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "App", + options, + id: create_fragment$b.name + }); + } + } + + new App({ target: document.body }); + +}()); diff --git a/index.html b/index.html new file mode 100644 index 0000000..df93b4e --- /dev/null +++ b/index.html @@ -0,0 +1,11 @@ + + + + + Svelte Devtools test + + + + + + diff --git a/package.json b/package.json deleted file mode 100644 index 8642808..0000000 --- a/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "private": true, - "type": "module", - "scripts": { - "clean": "git add * && git clean -dfx -e node_modules", - "check": "pnpm --filter \"./workspace/*\" check", - "format": "pnpm --filter \"./workspace/*\" format" - }, - "packageManager": "pnpm@8.15.6", - "devDependencies": { - "@sveltejs/vite-plugin-svelte": "next", - "@types/node": "^20.16.6", - "prettier": "^3.3.3", - "prettier-plugin-sort-package-json": "^0.2.0", - "prettier-plugin-svelte": "^3.2.6", - "svelte": "5.0.0-next.141", - "svelte-check": "^4.0.2", - "typescript": "^5.6.2", - "vite": "^5.4.7" - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 88cde3b..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,901 +0,0 @@ -lockfileVersion: '6.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@sveltejs/vite-plugin-svelte': - specifier: next - version: 4.0.0-next.7(svelte@5.0.0-next.141)(vite@5.4.7) - '@types/node': - specifier: ^20.16.6 - version: 20.16.6 - prettier: - specifier: ^3.3.3 - version: 3.3.3 - prettier-plugin-sort-package-json: - specifier: ^0.2.0 - version: 0.2.0(prettier@3.3.3) - prettier-plugin-svelte: - specifier: ^3.2.6 - version: 3.2.6(prettier@3.3.3)(svelte@5.0.0-next.141) - svelte: - specifier: 5.0.0-next.141 - version: 5.0.0-next.141 - svelte-check: - specifier: ^4.0.2 - version: 4.0.2(svelte@5.0.0-next.141)(typescript@5.6.2) - typescript: - specifier: ^5.6.2 - version: 5.6.2 - vite: - specifier: ^5.4.7 - version: 5.4.7(@types/node@20.16.6) - - workspace/extension: - devDependencies: - '@types/chrome': - specifier: ^0.0.266 - version: 0.0.266 - rollup: - specifier: ^4.22.4 - version: 4.22.4 - -packages: - - /@ampproject/remapping@2.3.0: - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@esbuild/aix-ppc64@0.21.5: - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm64@0.21.5: - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm@0.21.5: - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-x64@0.21.5: - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-arm64@0.21.5: - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-x64@0.21.5: - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-arm64@0.21.5: - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64@0.21.5: - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64@0.21.5: - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm@0.21.5: - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ia32@0.21.5: - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-loong64@0.21.5: - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-mips64el@0.21.5: - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ppc64@0.21.5: - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64@0.21.5: - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-s390x@0.21.5: - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64@0.21.5: - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/netbsd-x64@0.21.5: - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/openbsd-x64@0.21.5: - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/sunos-x64@0.21.5: - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-arm64@0.21.5: - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32@0.21.5: - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-x64@0.21.5: - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@jridgewell/gen-mapping@0.3.5: - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@jridgewell/resolve-uri@3.1.2: - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/set-array@1.2.1: - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec@1.5.0: - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - dev: true - - /@jridgewell/trace-mapping@0.3.25: - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - dev: true - - /@rollup/rollup-android-arm-eabi@4.22.4: - resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-android-arm64@4.22.4: - resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-darwin-arm64@4.22.4: - resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-darwin-x64@4.22.4: - resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm-gnueabihf@4.22.4: - resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm-musleabihf@4.22.4: - resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm64-gnu@4.22.4: - resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm64-musl@4.22.4: - resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-powerpc64le-gnu@4.22.4: - resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-riscv64-gnu@4.22.4: - resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-s390x-gnu@4.22.4: - resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-x64-gnu@4.22.4: - resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-x64-musl@4.22.4: - resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-win32-arm64-msvc@4.22.4: - resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-win32-ia32-msvc@4.22.4: - resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-win32-x64-msvc@4.22.4: - resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@sveltejs/vite-plugin-svelte-inspector@3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.7)(svelte@5.0.0-next.141)(vite@5.4.7): - resolution: {integrity: sha512-kuGJ2CZ5lAw3gKF8Kw0AfKtUJWbwdlDHY14K413B0MCyrzvQvsKTorwmwZcky0+QqY6RnVIZ/5FttB9bQmkLXg==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22} - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^4.0.0-next.0||^4.0.0 - svelte: ^5.0.0-next.96 || ^5.0.0 - vite: ^5.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte': 4.0.0-next.7(svelte@5.0.0-next.141)(vite@5.4.7) - debug: 4.3.7 - svelte: 5.0.0-next.141 - vite: 5.4.7(@types/node@20.16.6) - transitivePeerDependencies: - - supports-color - dev: true - - /@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.141)(vite@5.4.7): - resolution: {integrity: sha512-yMUnAqquoayvBDztk1rWUgdtvjv7YcHgopCAB7sWl9SQht8U/7lqwTlJU0ZTAY09pFFRe6bbakd7YoiyyIvJiA==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22} - peerDependencies: - svelte: ^5.0.0-next.96 || ^5.0.0 - vite: ^5.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.7)(svelte@5.0.0-next.141)(vite@5.4.7) - debug: 4.3.7 - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.11 - svelte: 5.0.0-next.141 - vite: 5.4.7(@types/node@20.16.6) - vitefu: 1.0.2(vite@5.4.7) - transitivePeerDependencies: - - supports-color - dev: true - - /@types/chrome@0.0.266: - resolution: {integrity: sha512-QSQWJTL7NjZElvq/6/E5C1+pHgEP8UAJzwoz7M4vSJ7AECt6NNehJ+tU6snnvuTqZOBjFCivvitYo5+8tNPmhg==} - dependencies: - '@types/filesystem': 0.0.36 - '@types/har-format': 1.2.15 - dev: true - - /@types/estree@1.0.5: - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - dev: true - - /@types/estree@1.0.6: - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - dev: true - - /@types/filesystem@0.0.36: - resolution: {integrity: sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA==} - dependencies: - '@types/filewriter': 0.0.33 - dev: true - - /@types/filewriter@0.0.33: - resolution: {integrity: sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g==} - dev: true - - /@types/har-format@1.2.15: - resolution: {integrity: sha512-RpQH4rXLuvTXKR0zqHq3go0RVXYv/YVqv4TnPH95VbwUxZdQlK1EtcMvQvMpDngHbt13Csh9Z4qT9AbkiQH5BA==} - dev: true - - /@types/node@20.16.6: - resolution: {integrity: sha512-T7PpxM/6yeDE+AdlVysT62BX6/bECZOmQAgiFg5NoBd5MQheZ3tzal7f1wvzfiEcmrcJNRi2zRr2nY2zF+0uqw==} - dependencies: - undici-types: 6.19.8 - dev: true - - /acorn-typescript@1.4.13(acorn@8.12.1): - resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==} - peerDependencies: - acorn: '>=8.9.0' - dependencies: - acorn: 8.12.1 - dev: true - - /acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /aria-query@5.3.2: - resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} - engines: {node: '>= 0.4'} - dev: true - - /axobject-query@4.1.0: - resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} - engines: {node: '>= 0.4'} - dev: true - - /binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - dev: true - - /braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.1.1 - dev: true - - /chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 - dev: true - - /deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - dev: true - - /esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 - dev: true - - /esm-env@1.0.0: - resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} - dev: true - - /esrap@1.2.2: - resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==} - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.6 - dev: true - - /fdir@6.3.0: - resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - dev: true - - /fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.3.0 - dev: true - - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: true - - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-reference@3.0.2: - resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} - dependencies: - '@types/estree': 1.0.6 - dev: true - - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - dev: true - - /locate-character@3.0.0: - resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} - dev: true - - /magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - dev: true - - /mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - dev: true - - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - - /nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /picocolors@1.1.0: - resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} - dev: true - - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /postcss@8.4.47: - resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.7 - picocolors: 1.1.0 - source-map-js: 1.2.1 - dev: true - - /prettier-plugin-sort-package-json@0.2.0(prettier@3.3.3): - resolution: {integrity: sha512-jg+CfEHpmXyMJxoBSQh+IObmCxqt7KyHOuXGQm9D4heeyipEhlTJZfiS9SlfhBKrtf/yA8WZwHmynUG9xfF/rA==} - peerDependencies: - prettier: ^3.0.0 - dependencies: - prettier: 3.3.3 - dev: true - - /prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@5.0.0-next.141): - resolution: {integrity: sha512-Y1XWLw7vXUQQZmgv1JAEiLcErqUniAF2wO7QJsw8BVMvpLET2dI5WpEIEJx1r11iHVdSMzQxivyfrH9On9t2IQ==} - peerDependencies: - prettier: ^3.0.0 - svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 - dependencies: - prettier: 3.3.3 - svelte: 5.0.0-next.141 - dev: true - - /prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - dev: true - - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /rollup@4.22.4: - resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - dependencies: - '@types/estree': 1.0.5 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.4 - '@rollup/rollup-android-arm64': 4.22.4 - '@rollup/rollup-darwin-arm64': 4.22.4 - '@rollup/rollup-darwin-x64': 4.22.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 - '@rollup/rollup-linux-arm-musleabihf': 4.22.4 - '@rollup/rollup-linux-arm64-gnu': 4.22.4 - '@rollup/rollup-linux-arm64-musl': 4.22.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 - '@rollup/rollup-linux-riscv64-gnu': 4.22.4 - '@rollup/rollup-linux-s390x-gnu': 4.22.4 - '@rollup/rollup-linux-x64-gnu': 4.22.4 - '@rollup/rollup-linux-x64-musl': 4.22.4 - '@rollup/rollup-win32-arm64-msvc': 4.22.4 - '@rollup/rollup-win32-ia32-msvc': 4.22.4 - '@rollup/rollup-win32-x64-msvc': 4.22.4 - fsevents: 2.3.3 - dev: true - - /sade@1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} - dependencies: - mri: 1.2.0 - dev: true - - /source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} - engines: {node: '>=0.10.0'} - dev: true - - /svelte-check@4.0.2(svelte@5.0.0-next.141)(typescript@5.6.2): - resolution: {integrity: sha512-w2yqcG9ELJe2RJCnAvB7v0OgkHhL3czzz/tVoxGFfO6y4mOrF6QHCDhXijeXzsU7LVKEwWS3Qd9tza4JBuDxqA==} - engines: {node: '>= 18.0.0'} - hasBin: true - peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.0 - typescript: '>=5.0.0' - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - chokidar: 3.6.0 - fdir: 6.3.0 - picocolors: 1.1.0 - sade: 1.8.1 - svelte: 5.0.0-next.141 - typescript: 5.6.2 - transitivePeerDependencies: - - picomatch - dev: true - - /svelte@5.0.0-next.141: - resolution: {integrity: sha512-zT74TUo0vOOrbxRfdlWXu+ac4O9lqPFG0YoZB3uOfrOewT1GKxKm0qwG/jo9bGvgZ++TSHjR7AtV091LY2FhBA==} - engines: {node: '>=18'} - dependencies: - '@ampproject/remapping': 2.3.0 - '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.6 - acorn: 8.12.1 - acorn-typescript: 1.4.13(acorn@8.12.1) - aria-query: 5.3.2 - axobject-query: 4.1.0 - esm-env: 1.0.0 - esrap: 1.2.2 - is-reference: 3.0.2 - locate-character: 3.0.0 - magic-string: 0.30.11 - zimmerframe: 1.1.2 - dev: true - - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - /typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} - engines: {node: '>=14.17'} - hasBin: true - dev: true - - /undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - dev: true - - /vite@5.4.7(@types/node@20.16.6): - resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 20.16.6 - esbuild: 0.21.5 - postcss: 8.4.47 - rollup: 4.22.4 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /vitefu@1.0.2(vite@5.4.7): - resolution: {integrity: sha512-0/iAvbXyM3RiPPJ4lyD4w6Mjgtf4ejTK6TPvTNG3H32PLwuT0N/ZjJLiXug7ETE/LWtTeHw9WRv7uX/tIKYyKg==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - vite: 5.4.7(@types/node@20.16.6) - dev: true - - /zimmerframe@1.1.2: - resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} - dev: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index 2c52ad5..0000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,2 +0,0 @@ -packages: - - 'workspace/*' diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..aa0ce06 --- /dev/null +++ b/styles.css @@ -0,0 +1 @@ +div.svelte-aep82n>div{margin-bottom:1.667rem /* 20px */;padding-bottom:1.667rem /* 20px */;border-bottom:0.083rem /* 1px */ solid lightgray}div.svelte-aep82n p{margin:1.667rem /* 20px */;padding:0.833rem /* 10px */;background-color:beige}div.svelte-aep82n ol{margin:-1.667rem /* -20px */ 1.667rem /* 20px */ 1.667rem /* 20px */;padding-bottom:0.833rem /* 10px */;background-color:beige}div.svelte-aep82n ol:first-child{margin-top:1.667rem /* 20px */;padding-top:0.833rem /* 10px */} \ No newline at end of file diff --git a/workspace/extension/.gitignore b/workspace/extension/.gitignore deleted file mode 100644 index ef49293..0000000 --- a/workspace/extension/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/build - -# generated files -static/courier.js diff --git a/workspace/extension/index.html b/workspace/extension/index.html deleted file mode 100644 index 396be6e..0000000 --- a/workspace/extension/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - -
- - - diff --git a/workspace/extension/package.json b/workspace/extension/package.json deleted file mode 100644 index 971a2fa..0000000 --- a/workspace/extension/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "private": true, - "type": "module", - "scripts": { - "dev": "pnpm run --parallel \"/^dev:.*/\"", - "dev:app": "vite build -wd --minify=false --sourcemap=inline", - "dev:scripts": "rollup -cw", - "build": "rollup -c && vite build", - "bundle:zip": "cd build && zip -r svelte-devtools.zip *", - "bundle:tar": "cd build && tar -czf svelte-devtools.tar.gz *", - "format": "prettier -w .", - "check": "pnpm run --parallel \"/^check:.*/\"", - "check:style": "prettier -c .", - "check:svelte": "svelte-check --tsconfig ./tsconfig.json" - }, - "devDependencies": { - "@types/chrome": "^0.0.266", - "rollup": "^4.22.4" - } -} diff --git a/workspace/extension/rollup.config.js b/workspace/extension/rollup.config.js deleted file mode 100644 index 3368c80..0000000 --- a/workspace/extension/rollup.config.js +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'rollup'; - -export default defineConfig([ - { - input: 'static/background.js', - output: { - file: 'build/background.js', - }, - }, - { - input: 'src/client/core.js', - output: [ - { file: 'static/courier.js', format: 'iife' }, - { file: 'build/courier.js', format: 'iife' }, - ], - }, -]); diff --git a/workspace/extension/src/App.svelte b/workspace/extension/src/App.svelte deleted file mode 100644 index eb9d75f..0000000 --- a/workspace/extension/src/App.svelte +++ /dev/null @@ -1,194 +0,0 @@ - - - { - const { target, key } = event; - if (target !== document.body || !app.selected) return; - - if (key === 'Enter') { - app.selected.expanded = !app.selected.expanded; - } else if (key === 'ArrowRight') { - event.preventDefault(); - if (!app.selected) app.selected = app.root[0]; - app.selected.expanded = true; - } else if (key === 'ArrowLeft') { - event.preventDefault(); - if (app.selected.expanded) { - app.selected.expanded = false; - return; - } - do app.selected = app.selected.parent ?? app.selected; - while (!visibility[app.selected.type]); - } else if (key === 'ArrowUp') { - event.preventDefault(); - let nodes = (app.selected.parent?.children || app.root).filter((n) => visibility[n.type]); - let sibling = nodes[nodes.findIndex((o) => o.id === app.selected?.id) - 1]; - while (sibling?.expanded) { - nodes = sibling.children.filter((n) => visibility[n.type]); - sibling = nodes[nodes.length - 1]; - } - app.selected = sibling ?? app.selected.parent ?? app.selected; - } else if (key === 'ArrowDown') { - event.preventDefault(); - const children = app.selected.children.filter((n) => visibility[n.type]); - - if (!app.selected.expanded || children.length === 0) { - let next = app.selected; - let current = app.selected; - do { - const nodes = current.parent ? current.parent.children : app.root; - const siblings = nodes.filter((n) => visibility[n.type]); - const index = siblings.findIndex((o) => o.id === current.id); - next = siblings[index + 1]; - current = current.parent; - } while (!next && current); - - app.selected = next ?? app.selected; - } else { - app.selected = children[0]; - } - } - }} -/> - -{#if app.root.length} -
- - - - - - - - - - - - - - - - -
    event.currentTarget === event.target && reset()} - onmouseleave={reset} - > - {#each app.root as node (node.id)} - - {/each} -
- - -
- - - - {@const events = app.selected?.detail.listeners?.map((l) => { - const suffix = l.modifiers?.length ? `|${l.modifiers.join('|')}` : ''; - const value = { __is: 'function', source: l.handler }; - return { key: l.event + suffix, value }; - })} - - {#if app.selected?.type === 'component'} -

Props

- - - - -

Events

- - - - -

State

- - {:else if app.selected?.type === 'block' || app.selected?.type === 'iteration'} -

State

- - {:else if app.selected?.type === 'element'} -

Attributes

- - - - -

Events

- - {/if} -
-{:else} - -{/if} - - diff --git a/workspace/extension/src/app.css b/workspace/extension/src/app.css deleted file mode 100644 index 6472580..0000000 --- a/workspace/extension/src/app.css +++ /dev/null @@ -1,108 +0,0 @@ -:root { - tab-size: 2; - - --background: rgb(255, 255, 255); - --color: rgb(74, 74, 79); - - --t-duration: 240ms; -} - -*, -*::before, -*::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - display: flex; - margin: 0; - height: 100%; - background: var(--background); - color: var(--color); - font-family: monospace; -} -body.dark { - --color: rgb(177, 177, 179); - --background: rgb(36, 36, 36); - scrollbar-color: rgb(115, 115, 115) rgb(60, 60, 61); -} - -/* dark mode scrollbar */ -body.dark ::-webkit-scrollbar { - width: 0.75rem; - height: 0.5rem; - background-color: transparent; -} -body.dark ::-webkit-scrollbar-thumb { - background-color: rgb(51, 51, 51); - border: 1px solid rgba(255, 255, 255, 0.2); - border-radius: 0.25rem; -} - -/* basic resets */ -ul { - margin: 0; - padding: 0; - list-style: none; -} - -/* expandable arrows */ -.expandable::before { - content: ''; - position: absolute; - top: 0; - left: calc(var(--indent, 6px) - 6px); - - border-top: 0.375rem solid rgba(135, 135, 137, 0.9); - border-right: 0.25rem solid transparent; - border-left: 0.25rem solid transparent; - transition-duration: var(--t-duration); - transform: translate3d(0%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(-90deg); - /* transform: translate3d(-150%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(-90deg); */ -} -.expandable.expanded::before { - transform: translate3d(0%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(0deg); - /* transform: translate3d(-150%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(0deg); */ -} - -/* tooltip pseudo-elements */ -[data-tooltip]:hover::after, -[data-tooltip]:hover::before { - opacity: 1; - pointer-events: auto; -} -[data-tooltip]::before { - content: ''; - opacity: 0; - pointer-events: none; - - position: absolute; - bottom: -0.2rem; - left: 2.5rem; - border-right: 0.5rem solid transparent; - border-bottom: 0.5rem solid rgb(48, 64, 81); - border-left: 0.5rem solid transparent; - transition: opacity 0.2s; -} -[data-tooltip]::after { - content: attr(data-tooltip); - opacity: 0; - pointer-events: none; - z-index: 1; - position: absolute; - bottom: 0; - left: 0; - - display: flex; - padding: 0.25rem 0.375rem; - border-radius: 0.25rem; - transition: opacity 0.2s; - transform: translateY(100%); - - background-color: rgb(48, 64, 81); - color: white; -} diff --git a/workspace/extension/src/app.d.ts b/workspace/extension/src/app.d.ts deleted file mode 100644 index 11f5926..0000000 --- a/workspace/extension/src/app.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/// -/// - -interface SvelteDevInternal { - version: string; -} - -declare global { - type SvelteComponentDetail = { - id: string; - options: { - $$inline?: boolean; - hydrate?: boolean; - target?: Element; - props?: Record; - }; - tagName: string; - component: { - $$: { - fragment: { - c(): void; - d(detaching: boolean): void; - h(): void; - l(nodes: any[]): void; - m(target: Node, anchor: Node): void; - p(changed: boolean, ctx: any): void; - }; - }; - $$events_def?: {}; - $$prop_def?: {}; - $$slot_def?: {}; - $capture_state(): any; - }; - }; - - type SvelteBlockDetail = { - id: string; // crypto.randomUUID(); - source: string; - type: - | 'anchor' - | 'block' - | 'catch' - | 'component' - | 'each' - | 'element' - | 'else' - | 'if' - | 'iteration' - | 'key' - | 'pending' - | 'slot' - | 'text' - | 'then'; - - detail?: any; - tagName?: string; - - children: SvelteBlockDetail[]; - /** `type: 'element' | 'component'` */ - parent?: SvelteBlockDetail; - /** like `parent` but `type: 'component'` */ - container?: SvelteBlockDetail; - - block: SvelteComponentDetail['component']['$$']['fragment']; - ctx: Array; // TODO: do we need this typed? - }; - - type SvelteListenerDetail = { - node: Node & { - __listeners?: Omit[]; - }; - event: string; - handler: EventListenerOrEventListenerObject; - modifiers: Array<'capture' | 'preventDefault' | 'stopPropagation' | 'stopImmediatePropagation'>; - }; - - interface DocumentEventMap { - SvelteRegisterComponent: CustomEvent; - - SvelteRegisterBlock: CustomEvent; - - SvelteDOMInsert: CustomEvent; - SvelteDOMRemove: CustomEvent; - - SvelteDOMAddEventListener: CustomEvent; - SvelteDOMRemoveEventListener: CustomEvent; - - SvelteDOMSetAttribute: CustomEvent< - SvelteDevInternal & { - node: Element; - attribute: string; - value?: string; - } - >; - SvelteDOMRemoveAttribute: CustomEvent< - SvelteDevInternal & { - node: Element; - attribute: string; - } - >; - SvelteDOMSetProperty: CustomEvent< - SvelteDevInternal & { - node: Element; - property: string; - value?: any; - } - >; - SvelteDOMSetDataset: CustomEvent< - SvelteDevInternal & { - node: HTMLElement; - property: string; - value?: any; - } - >; - SvelteDOMSetData: CustomEvent< - SvelteDevInternal & { - node: Text; - data: unknown; - } - >; - - SvelteDevTools: CustomEvent<{ - type: string; - payload: string; - }>; - } -} - -export {}; diff --git a/workspace/extension/src/client/core.js b/workspace/extension/src/client/core.js deleted file mode 100644 index 6b874c1..0000000 --- a/workspace/extension/src/client/core.js +++ /dev/null @@ -1,108 +0,0 @@ -import { highlight } from './highlight.js'; -import { send } from './runtime.js'; -import { index as v4 } from './svelte-4.js'; -import { serialize } from './utils.js'; - -// @ts-ignore - https://developer.chrome.com/docs/extensions/how-to/devtools/extend-devtools#selected-element -window['#SvelteDevTools'] = { - /** - * @param {string} id - * @param {string[]} keys - * @param {any} value - */ - inject(id, keys, value) { - const { detail: component } = v4.map.get(id) || {}; - if (component) { - const [prop, ...rest] = keys; - const original = component.$capture_state()[prop]; - if (typeof original === 'object') { - let ref = original; - for (let i = 0; i < rest.length - 1; i += 1) { - ref = ref[rest[i]]; - } - ref[rest[rest.length - 1]] = value; - component.$inject_state({ [prop]: original }); - } else { - component.$inject_state({ [prop]: value }); - } - } - }, -}; - -const previous = { - /** @type {HTMLElement | null} */ - target: null, - style: { - cursor: '', - background: '', - outline: '', - }, - - clear() { - if (this.target) { - for (const key in this.style) { - // @ts-expect-error - trust me TS - this.target.style[key] = this.style[key]; - } - } - this.target = null; - }, -}; - -const inspect = { - /** @param {MouseEvent} event */ - handle({ target }) { - const same = previous.target && previous.target === target; - const html = target instanceof HTMLElement; - if (same || !html) return; - - if (previous.target) previous.clear(); - previous.target = target; - previous.style = { - cursor: target.style.cursor, - background: target.style.background, - outline: target.style.outline, - }; - target.style.cursor = 'pointer'; - target.style.background = 'rgba(0, 136, 204, 0.2)'; - target.style.outline = '1px dashed rgb(0, 136, 204)'; - }, - /** @param {MouseEvent} event */ - click(event) { - event.preventDefault(); - document.removeEventListener('mousemove', inspect.handle, true); - const node = v4.map.get(/** @type {Node} */ (event.target)); - if (node) send('bridge::ext/inspect', { node: serialize(node) }); - previous.clear(); - }, -}; - -window.addEventListener('message', ({ data, source }) => { - // only accept messages from our application or script - if (source !== window || data?.source !== 'svelte-devtools') return; - - if (data.type === 'bridge::ext/select') { - const node = v4.map.get(data.payload); - // @ts-expect-error - saved for `devtools.inspect()` - if (node) window.$n = node.detail; - } else if (data.type === 'bridge::ext/highlight') { - const node = v4.map.get(data.payload); - return highlight(node); - } else if (data.type === 'bridge::ext/inspect') { - switch (data.payload) { - case 'start': { - document.addEventListener('mousemove', inspect.handle, true); - document.addEventListener('click', inspect.click, { - capture: true, - once: true, - }); - break; - } - default: { - document.removeEventListener('mousemove', inspect.handle, true); - document.removeEventListener('click', inspect.click, true); - previous.clear(); - } - } - } -}); diff --git a/workspace/extension/src/client/highlight.js b/workspace/extension/src/client/highlight.js deleted file mode 100644 index fde12ef..0000000 --- a/workspace/extension/src/client/highlight.js +++ /dev/null @@ -1,51 +0,0 @@ -const dom = { - area: document.createElement('div'), - x: document.createElement('div'), - y: document.createElement('div'), -}; - -/** @param {Pick} [node] */ -export function highlight(node) { - if (!node || node.type !== 'element' || !node.detail) { - dom.area.remove(); - dom.x.remove(); - dom.y.remove(); - return; - } - - const { clientWidth, scrollHeight } = document.documentElement; - const style = window.getComputedStyle(node.detail); - const rect = node.detail.getBoundingClientRect(); - - // TODO: handle sticky position - const position = style.position === 'fixed' ? 'fixed' : 'absolute'; - const offset = style.position !== 'fixed' ? window.scrollY : 0; - - dom.area.style.setProperty('z-index', '65536'); - dom.area.style.setProperty('background-color', 'rgba(0, 136, 204, 0.2)'); - dom.area.style.setProperty('position', position); - dom.area.style.setProperty('top', `${offset + rect.top}px`); - dom.area.style.setProperty('left', `${rect.left}px`); - dom.area.style.setProperty('width', `${rect.width}px`); - dom.area.style.setProperty('height', `${rect.height}px`); - - dom.x.style.setProperty('z-index', '65536'); - dom.x.style.setProperty('border', '0px dashed rgb(0, 136, 204)'); - dom.x.style.setProperty('border-width', '1px 0px'); - dom.x.style.setProperty('position', position); - dom.x.style.setProperty('top', `${offset + rect.top}px`); - dom.x.style.setProperty('width', `${clientWidth}px`); - dom.x.style.setProperty('height', `${rect.height}px`); - - dom.y.style.setProperty('z-index', '65536'); - dom.y.style.setProperty('border', '0px dashed rgb(0, 136, 204)'); - dom.y.style.setProperty('border-width', '0px 1px'); - dom.y.style.setProperty('position', 'absolute'); - dom.y.style.setProperty('left', `${rect.left}px`); - dom.y.style.setProperty('width', `${rect.width}px`); - dom.y.style.setProperty('height', `${scrollHeight}px`); - - document.body.appendChild(dom.area); - document.body.appendChild(dom.x); - document.body.appendChild(dom.y); -} diff --git a/workspace/extension/src/client/runtime.js b/workspace/extension/src/client/runtime.js deleted file mode 100644 index fd5a24e..0000000 --- a/workspace/extension/src/client/runtime.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @param {string} type - * @param {Record} [payload] - */ -export function send(type, payload) { - window.postMessage({ source: 'svelte-devtools', type, payload }); -} diff --git a/workspace/extension/src/client/svelte-4.js b/workspace/extension/src/client/svelte-4.js deleted file mode 100644 index 7f85143..0000000 --- a/workspace/extension/src/client/svelte-4.js +++ /dev/null @@ -1,276 +0,0 @@ -import { send } from './runtime.js'; -import { serialize } from './utils.js'; - -/** @type {undefined | SvelteBlockDetail} */ -let current_block; - -export const index = { - /** @type {Map} */ - map: new Map(), - - /** @param {{ node: SvelteBlockDetail; target?: Node; anchor?: Node }} opts */ - add({ node, target: source, anchor }) { - this.map.set(node.id, node); - this.map.set(node.detail, node); - - let target = source && this.map.get(source); - if (!target || target.container != node.container) { - target = node.container; - } - node.parent = target; - - const sibling = anchor && this.map.get(anchor); - if (target) { - const idx = target.children.findIndex((n) => n === sibling); - if (idx === -1) target.children.push(node); - else target.children.splice(idx, 0, node); - } - - send('bridge::courier/node->add', { - node: serialize(node), - target: node.parent?.id, - anchor: sibling?.id, - }); - }, - - /** @param {{ node: SvelteBlockDetail; target?: Node; anchor?: Node }} opts */ - update({ node }) { - send('bridge::courier/node->update', { - node: serialize(node), - }); - }, - - /** @param {SvelteBlockDetail} node */ - remove(node) { - if (!node) return; - - this.map.delete(node.id); - this.map.delete(node.detail); - - if (node.parent) { - node.parent.children = node.parent.children.filter((n) => n !== node); - node.parent = undefined; - } - - send('bridge::courier/node->remove', { - node: serialize(node), - }); - }, -}; - -document.addEventListener('SvelteRegisterComponent', ({ detail }) => { - const { component, tagName } = detail; - - const node = index.map.get(component.$$.fragment); - if (node) { - index.map.delete(component.$$.fragment); - - node.detail = component; - node.tagName = tagName; - - index.update({ node }); - } else { - // @ts-expect-error - component special case - index.map.set(component.$$.fragment, { - type: 'component', - detail: component, - tagName, - }); - } -}); - -/** @type {any} */ -let last_promise; -document.addEventListener('SvelteRegisterBlock', ({ detail }) => { - const { type, id, block, ...rest } = detail; - const current_node_id = crypto.randomUUID(); - - if (block.m) { - const original = block.m; - block.m = (target, anchor) => { - const parent = current_block; - - // @ts-expect-error - only the necessities - const node = /** @type {SvelteBlockDetail} */ ({ - id: current_node_id, - type: 'block', - detail: rest, - tagName: type === 'pending' ? 'await' : type, - container: parent, - children: [], - }); - - switch (type) { - case 'then': - case 'catch': - if (!node.container) node.container = last_promise; - break; - - case 'slot': - node.type = 'slot'; - break; - - case 'component': { - const component = index.map.get(block); - if (component) { - index.map.delete(block); - Object.assign(node, component); - } else { - node.type = 'component'; - node.tagName = 'Unknown'; - node.detail = {}; - index.map.set(block, node); - } - - Promise.resolve().then(() => { - const invalidate = node.detail.$$?.bound || {}; - Object.keys(invalidate).length && index.update({ node }); - }); - break; - } - } - - if (type === 'each') { - let group = parent && index.map.get(parent.id + id); - if (!group) { - // @ts-expect-error - each block fallback - group = /** @type {SvelteBlockDetail} */ ({ - version: '', - id: crypto.randomUUID(), - type: 'block', - tagName: 'each', - container: parent, - children: [], - detail: { - ctx: {}, - source: detail.source, - }, - }); - parent && index.map.set(parent.id + id, group); - index.add({ node: group, target, anchor }); - } - - node.container = group; - node.type = 'iteration'; - - // @ts-expect-error - overloaded nodes - index.add({ node, target: group, anchor }); - } else { - index.add({ node, target, anchor }); - } - - current_block = node; - - original(target, anchor); - - current_block = parent; - }; - } - - if (block.p) { - const original = block.p; - block.p = (changed, ctx) => { - const parent = current_block; - current_block = index.map.get(current_node_id); - current_block && index.update({ node: current_block }); - - original(changed, ctx); - - current_block = parent; - }; - } - - if (block.d) { - const original = block.d; - block.d = (detaching) => { - const node = index.map.get(current_node_id); - if (node) { - if (node.tagName === 'await') { - last_promise = node.container; - } - index.remove(node); - } - - original(detaching); - }; - } -}); - -document.addEventListener('SvelteDOMInsert', ({ detail }) => { - deep_insert(detail); // { node, target, anchor } - - /** @param {Omit} opts */ - function deep_insert({ node: element, target, anchor }) { - const type = - element.nodeType === Node.ELEMENT_NODE - ? 'element' - : element.nodeValue && element.nodeValue !== ' ' - ? 'text' - : 'anchor'; - - index.add({ - anchor, - target, - // @ts-expect-error - missing properties are irrelevant - node: { - id: crypto.randomUUID(), - type, - detail: element, - tagName: element.nodeName.toLowerCase(), - container: current_block, - children: [], - }, - }); - - element.childNodes.forEach((child) => { - !index.map.has(child) && deep_insert({ node: child, target: element }); - }); - } -}); - -document.addEventListener('SvelteDOMRemove', ({ detail }) => { - const node = index.map.get(detail.node); - if (node) index.remove(node); -}); - -document.addEventListener('SvelteDOMAddEventListener', ({ detail }) => { - const { node, ...rest } = detail; - node.__listeners = node.__listeners || []; - node.__listeners.push(rest); -}); - -document.addEventListener('SvelteDOMRemoveEventListener', ({ detail }) => { - const { node, event, handler, modifiers } = detail; - if (!node.__listeners || node.__listeners.length) return; - node.__listeners = node.__listeners.filter( - (l) => l.event !== event || l.handler !== handler || l.modifiers !== modifiers, - ); -}); - -document.addEventListener('SvelteDOMSetData', ({ detail }) => { - const node = index.map.get(detail.node); - if (!node) return; - if (node.type === 'anchor') node.type = 'text'; - index.update({ node }); -}); - -document.addEventListener('SvelteDOMSetProperty', ({ detail }) => { - const node = index.map.get(detail.node); - if (!node) return; - if (node.type === 'anchor') node.type = 'text'; - index.update({ node }); -}); - -document.addEventListener('SvelteDOMSetAttribute', ({ detail }) => { - const node = index.map.get(detail.node); - if (!node) return; - if (node.type === 'anchor') node.type = 'text'; - index.update({ node }); -}); - -document.addEventListener('SvelteDOMRemoveAttribute', ({ detail }) => { - const node = index.map.get(detail.node); - if (!node) return; - if (node.type === 'anchor') node.type = 'text'; - index.update({ node }); -}); diff --git a/workspace/extension/src/client/utils.js b/workspace/extension/src/client/utils.js deleted file mode 100644 index 6137ab2..0000000 --- a/workspace/extension/src/client/utils.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @param {unknown} value - * @returns {any} - */ -function clone(value, seen = new Map()) { - switch (typeof value) { - case 'function': - return { __is: 'function', source: value.toString(), name: value.name }; - case 'symbol': - return { __is: 'symbol', name: value.toString() }; - case 'object': { - if (value === window || value === null) return null; - if (Array.isArray(value)) return value.map((o) => clone(o, seen)); - if (seen.has(value)) return {}; - - /** @type {Record} */ - const o = {}; - seen.set(value, o); - - const descriptors = Object.getOwnPropertyDescriptors(value); - for (const [key, v] of Object.entries(value)) { - const { get, writable } = descriptors[key]; - const readonly = !writable || get !== undefined; - o[key] = { key, value: clone(v, seen), readonly }; - } - return o; - } - default: - return value; - } -} - -/** @param {SvelteBlockDetail} node */ -export function serialize(node) { - const res = /** @type {SvelteBlockDetail} */ ({ - id: node.id, - type: node.type, - tagName: node.tagName, - detail: {}, - }); - switch (node.type) { - case 'component': { - const { $$: internal = {} } = node.detail; - const captured = node.detail.$capture_state?.() || {}; - const bindings = Object.values(internal.bound || {}).map( - /** @param {Function} f */ (f) => f.name, - ); - const props = Object.keys(internal.props || {}).flatMap((key) => { - const value = clone(captured[key]); - delete captured[key]; // deduplicate for ctx - if (value === undefined) return []; - - const bounded = bindings.some((f) => f.includes(key)); - return { key, value, bounded }; - }); - - res.detail = { - attributes: props, - listeners: Object.entries(internal.callbacks || {}).flatMap(([event, value]) => - value.map(/** @param {Function} f */ (f) => ({ event, handler: f.toString() })), - ), - ctx: Object.entries(captured).map(([key, v]) => ({ key, value: clone(v) })), - }; - break; - } - - case 'element': { - /** @type {Attr[]} from {NamedNodeMap} */ - const attributes = Array.from(node.detail.attributes || []); - - /** @type {NonNullable} */ - const listeners = node.detail.__listeners || []; - - res.detail = { - attributes: attributes.map(({ name: key, value }) => ({ key, value, readonly: true })), - listeners: listeners.map((o) => ({ ...o, handler: o.handler.toString() })), - }; - break; - } - - case 'text': { - res.detail = { - nodeValue: node.detail.nodeValue, - }; - break; - } - - case 'iteration': - case 'block': { - const { ctx, source } = node.detail; - const cloned = Object.entries(clone(ctx)); - res.detail = { - ctx: cloned.map(([key, value]) => ({ key, value, readonly: true })), - source: source.slice(source.indexOf('{'), source.indexOf('}') + 1), - }; - break; - } - } - - return res; -} diff --git a/workspace/extension/src/entry.ts b/workspace/extension/src/entry.ts deleted file mode 100644 index 54dd677..0000000 --- a/workspace/extension/src/entry.ts +++ /dev/null @@ -1,13 +0,0 @@ -import './app.css'; -import App from './App.svelte'; -import { mount } from 'svelte'; - -if (chrome.devtools.panels.themeName === 'dark') { - document.body.classList.add('dark'); -} else { - document.body.classList.remove('dark'); -} - -export default mount(App, { - target: document.querySelector('#app')!, -}); diff --git a/workspace/extension/src/lib/components/Button.svelte b/workspace/extension/src/lib/components/Button.svelte deleted file mode 100644 index 1883286..0000000 --- a/workspace/extension/src/lib/components/Button.svelte +++ /dev/null @@ -1,83 +0,0 @@ - - - - - diff --git a/workspace/extension/src/lib/components/Divider.svelte b/workspace/extension/src/lib/components/Divider.svelte deleted file mode 100644 index a44166d..0000000 --- a/workspace/extension/src/lib/components/Divider.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -
- - diff --git a/workspace/extension/src/lib/components/Indexer.svelte b/workspace/extension/src/lib/components/Indexer.svelte deleted file mode 100644 index d966b46..0000000 --- a/workspace/extension/src/lib/components/Indexer.svelte +++ /dev/null @@ -1,31 +0,0 @@ - - -

- {#if i === -1 || app.query.length < 2} - {text} - {:else} - {#if i !== 0}{text.slice(0, i)}{/if} - {text.slice(i, i + app.query.length)} - {#if i + app.query.length < text.length} - {text.slice(i + app.query.length)} - {/if} - {/if} -

- - diff --git a/workspace/extension/src/lib/components/Relative.svelte b/workspace/extension/src/lib/components/Relative.svelte deleted file mode 100644 index 1e63383..0000000 --- a/workspace/extension/src/lib/components/Relative.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
- {@render children()} -
- - diff --git a/workspace/extension/src/lib/components/Resizable.svelte b/workspace/extension/src/lib/components/Resizable.svelte deleted file mode 100644 index 8439766..0000000 --- a/workspace/extension/src/lib/components/Resizable.svelte +++ /dev/null @@ -1,93 +0,0 @@ - - - (resizing = false)} - onmousemove={({ pageX: x, pageY: y }) => { - if (!resizing) return; - size = axis === 'x' ? window.innerWidth - x : window.innerHeight - y; - }} -/> - - - - diff --git a/workspace/extension/src/lib/components/Toolbar.svelte b/workspace/extension/src/lib/components/Toolbar.svelte deleted file mode 100644 index 8f73a8e..0000000 --- a/workspace/extension/src/lib/components/Toolbar.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/workspace/extension/src/lib/nodes/Block.svelte b/workspace/extension/src/lib/nodes/Block.svelte deleted file mode 100644 index 564f8f6..0000000 --- a/workspace/extension/src/lib/nodes/Block.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - - - -{#if expanded} - {@render children()} - -
- -
-{/if} - - diff --git a/workspace/extension/src/lib/nodes/Element.svelte b/workspace/extension/src/lib/nodes/Element.svelte deleted file mode 100644 index a6e6171..0000000 --- a/workspace/extension/src/lib/nodes/Element.svelte +++ /dev/null @@ -1,96 +0,0 @@ - - -{#snippet close()} - </ - - - - > -{/snippet} - -
(expanded = !empty && !expanded)} -> - < - - - - - - {#if empty} -  /> - {:else} - > - {#if !expanded} - (expanded = true)} /> - - {@render close()} - {/if} - {/if} -
- -{#if expanded} - {@render children()} - -
- {@render close()} -
-{/if} - - diff --git a/workspace/extension/src/lib/nodes/ElementAttributes.svelte b/workspace/extension/src/lib/nodes/ElementAttributes.svelte deleted file mode 100644 index d989fbc..0000000 --- a/workspace/extension/src/lib/nodes/ElementAttributes.svelte +++ /dev/null @@ -1,67 +0,0 @@ - - -{#each attributes as { key, value, bounded } (key)} - {@const prefix = bounded ? 'bind:' : ''} - -   - - - - - = - - - - -{/each} - -{#each listeners as { event, handler, modifiers }} - {@const suffix = modifiers?.length ? `|${modifiers.join('|')}` : ''} - -   - - - -{/each} - - diff --git a/workspace/extension/src/lib/nodes/Ellipsis.svelte b/workspace/extension/src/lib/nodes/Ellipsis.svelte deleted file mode 100644 index 466e591..0000000 --- a/workspace/extension/src/lib/nodes/Ellipsis.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/workspace/extension/src/lib/nodes/Iteration.svelte b/workspace/extension/src/lib/nodes/Iteration.svelte deleted file mode 100644 index dff58c2..0000000 --- a/workspace/extension/src/lib/nodes/Iteration.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - - - -{#if expanded} - {@render children()} -{/if} diff --git a/workspace/extension/src/lib/nodes/Node.svelte b/workspace/extension/src/lib/nodes/Node.svelte deleted file mode 100644 index aac0b82..0000000 --- a/workspace/extension/src/lib/nodes/Node.svelte +++ /dev/null @@ -1,161 +0,0 @@ - - -{#snippet expand(children: (typeof node)['children'], level: number)} - {#each children as child (child.id)} - - {/each} -{/snippet} - -{#if visibility[node.type]} - -
  • Object.assign(prev, node)} - onclick={(event) => { - event.stopPropagation(); - app.selected = node; - }} - onmousemove={(event) => { - event.stopPropagation(); - if (app.hovered?.id === node.id) return; - background.send('bridge::ext/highlight', node.id); - app.hovered = node; - }} - > - {#if node.type === 'component' || node.type === 'element'} - -
      {@render expand(node.children, depth + 1)}
    -
    - {:else if node.type === 'block'} - -
      {@render expand(node.children, depth + 1)}
    -
    - {:else if node.type === 'iteration'} - -
      {@render expand(node.children, depth + 1)}
    -
    - {:else if node.type === 'slot'} - -
      {@render expand(node.children, depth + 1)}
    -
    - {:else if node.type === 'text'} -
    - -
    - {:else if node.type === 'anchor'} -
    #anchor
    - {/if} -
  • -{:else} - {@render expand(node.children, depth)} -{/if} - - diff --git a/workspace/extension/src/lib/nodes/Slot.svelte b/workspace/extension/src/lib/nodes/Slot.svelte deleted file mode 100644 index efa65e7..0000000 --- a/workspace/extension/src/lib/nodes/Slot.svelte +++ /dev/null @@ -1,29 +0,0 @@ - - - - -{#if expanded} - {@render children()} - -
    - -
    -{/if} diff --git a/workspace/extension/src/lib/panel/Editable.svelte b/workspace/extension/src/lib/panel/Editable.svelte deleted file mode 100644 index 8a08bc0..0000000 --- a/workspace/extension/src/lib/panel/Editable.svelte +++ /dev/null @@ -1,105 +0,0 @@ - - -{#if editing} - - { - // @ts-expect-error - target and value exists - update(target.value); - }} - onkeydown={(event) => { - const { key, target } = event; - if (key === 'Escape') { - event.preventDefault(); - editing = false; - return; - } - if (key !== 'Enter') return; - // @ts-expect-error - target and value exists - update(target.value); - }} - /> -{:else} - - (editing = !readonly)}> - {type === 'string' ? `"${value}"` : `${value}`} - -{/if} - - diff --git a/workspace/extension/src/lib/panel/PropertyList.svelte b/workspace/extension/src/lib/panel/PropertyList.svelte deleted file mode 100644 index f6188aa..0000000 --- a/workspace/extension/src/lib/panel/PropertyList.svelte +++ /dev/null @@ -1,140 +0,0 @@ - - -{#if entries.length} -
      - {#each entries as { key, value, readonly = false } (key)} - {@const keys = [...parents, key]} - {@const type = typeof value} - - -
    • { - event.stopPropagation(); - expanded[key] = !expanded[key]; - }} - > - {key}: -   - - {#if type === 'string'} - inject(keys, updated)} - /> - {:else if value == null || value !== value} - inject(keys, updated)} - /> - {:else if type === 'number' || type === 'boolean'} - inject(keys, updated)} - /> - {:else if Array.isArray(value)} - Array [{value.length || ''}] - - {#if value.length && expanded[key]} - {@const entries = value.map((v, i) => ({ key: `${i}`, value: v, readonly }))} - - - {/if} - {:else if type === 'object'} - {#if value.__is === 'function'} - function {value.name || ''}() - {#if expanded[key]}
      {value.source}
      {/if} - {:else if value.__is === 'symbol'} - {value.name || 'Symbol()'} - {:else if Object.keys(value).length} - Object {…} - - {#if expanded[key]} - - {/if} - {:else} - Object { } - {/if} - {/if} -
    • - {/each} -
    -{:else} -
    None
    -{/if} - - diff --git a/workspace/extension/src/lib/panel/core.svelte.ts b/workspace/extension/src/lib/panel/core.svelte.ts deleted file mode 100644 index 3865e1a..0000000 --- a/workspace/extension/src/lib/panel/core.svelte.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { app } from '$lib/state.svelte'; - -export const errors = $state<{ [keys: string]: string | false }>({}); - -export function inject(keys: string[], value: any) { - const uuid = app.selected?.id; - if (!uuid) return; - - const accessors = `[${keys.map((k) => `'${k}'`).join(', ')}]`; - chrome.devtools.inspectedWindow.eval( - `window['#SvelteDevTools'].inject('${uuid}', ${accessors}, ${value})`, - (_, error) => { - const id = `${uuid}+${keys.join('.')}`; - errors[id] = error?.isException && error.value.slice(0, error.value.indexOf('\n')); - }, - ); -} diff --git a/workspace/extension/src/lib/runtime.svelte.ts b/workspace/extension/src/lib/runtime.svelte.ts deleted file mode 100644 index d8cd54c..0000000 --- a/workspace/extension/src/lib/runtime.svelte.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { type DebugNode, app } from './state.svelte'; - -const tabId = chrome.devtools.inspectedWindow.tabId; -let port = chrome.runtime.connect({ name: `${tabId}` }); - -port.postMessage({ source: 'svelte-devtools', tabId, type: 'bypass::ext/init' }); - -export const background = { - send(type: `bridge::${'ext' | 'page'}/${string}` | 'bypass::ext/page->refresh', payload?: any) { - try { - port.postMessage({ source: 'svelte-devtools', tabId, type, payload }); - } catch { - // https://developer.chrome.com/docs/extensions/develop/concepts/messaging#port-lifetime - // chrome aggressively disconnects the port, not much we can do other than to reconnect - port = chrome.runtime.connect({ name: `${tabId}` }); - background.send(type, payload); // retry immediately - } - }, -}; - -function resolveEventBubble(node: any) { - if (!node.detail || !node.detail.listeners) return; - - for (const listener of node.detail.listeners) { - if (!listener.handler.includes('bubble($$self, event)')) continue; - - listener.handler = () => { - let target = node; - while ((target = target.parent)) if (target.type === 'component') break; - - const listeners = target.detail.listeners; - if (!listeners) return null; - - const parentListener = listeners.find((o: any) => o.event === listener.event); - if (!parentListener) return null; - - const handler = parentListener.handler; - if (!handler) return null; - - return `// From parent\n${handler}`; - }; - } -} - -port.onMessage.addListener(({ type, payload }) => { - switch (type) { - case 'bridge::ext/clear': { - app.nodes = {}; - app.selected = undefined; - app.hovered = undefined; - break; - } - - case 'bridge::ext/inspect': { - if (typeof payload === 'string') break; - app.selected = app.nodes[payload.node.id]; - app.inspecting = false; - break; - } - - case 'bridge::courier/node->add': { - const { node, target, anchor } = payload as { - node: DebugNode; - target: string; - anchor: string; - }; - - node.parent = app.nodes[target]; - node.children = []; - node.expanded = false; - resolveEventBubble(node); - - app.nodes[node.id] = node; - if (!node.parent) break; - - const siblings = node.parent.children; - const index = siblings.findIndex((n) => n.id === anchor); - if (index === -1) siblings.push(node); - else siblings.splice(index, 0, node); - - break; - } - - case 'bridge::courier/node->remove': { - const node = payload.node as SvelteBlockDetail; - const current = app.nodes[node.id]; - if (current) delete app.nodes[current.id]; - if (!current?.parent) break; - - const index = current.parent.children.findIndex((o) => o.id === current.id); - current.parent.children.splice(index, 1); - break; - } - - case 'bridge::courier/node->update': { - const node = payload.node as SvelteBlockDetail; - const current = app.nodes[node.id]; - if (!current) break; - Object.assign(current, node); - resolveEventBubble(current); - break; - } - - // case 'bridge::courier/profile->update': { - // resolveFrame(frame); - // profileFrame.set(frame); - // break; - - // function resolveFrame(frame) { - // frame.children.forEach(resolveFrame); - - // if (!frame.node) return; - - // frame.node = app.nodes.get(frame.node) || { - // type: 'Unknown', - // tagName: 'Unknown', - // }; - // } - // } - } -}); diff --git a/workspace/extension/src/lib/state.svelte.ts b/workspace/extension/src/lib/state.svelte.ts deleted file mode 100644 index f192277..0000000 --- a/workspace/extension/src/lib/state.svelte.ts +++ /dev/null @@ -1,53 +0,0 @@ -type Overwrite = Omit & B; - -export type DebugNode = Overwrite< - SvelteBlockDetail, - { - expanded: boolean; - detail: { - attributes?: Array<{ - key: string; - value: string; - bounded?: boolean; - flash?: boolean; - }>; - listeners?: Array<{ - event: any; - handler: any; - modifiers: any; - }>; - ctx: any; - source: string; - nodeValue: string; - }; - - tagName: string; - parent: DebugNode; - children: DebugNode[]; - dom?: HTMLLIElement; - } ->; - -export const app = $state({ - nodes: {} as { [key: string]: DebugNode }, - get root() { - const nodes = Object.values(this.nodes); - return nodes.filter((node) => !node.parent); - }, - - selected: undefined as undefined | DebugNode, - hovered: undefined as undefined | DebugNode, - - inspecting: false, - query: '', -}); - -export const visibility = $state<{ [key: string]: boolean }>({ - component: true, - element: true, - block: true, - iteration: true, - slot: true, - text: true, - anchor: false, -}); diff --git a/workspace/extension/src/routes/Breadcrumbs.svelte b/workspace/extension/src/routes/Breadcrumbs.svelte deleted file mode 100644 index 3cf1c56..0000000 --- a/workspace/extension/src/routes/Breadcrumbs.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - -{#if breadcrumbs.length} -
      - {#each breadcrumbs as node} - {#if visibility[node.type]} - - {/if} - {/each} -
    -{/if} - - diff --git a/workspace/extension/src/routes/ConnectMessage.svelte b/workspace/extension/src/routes/ConnectMessage.svelte deleted file mode 100644 index 4815049..0000000 --- a/workspace/extension/src/routes/ConnectMessage.svelte +++ /dev/null @@ -1,66 +0,0 @@ - - -
    -

    Svelte DevTools

    -

    - No Svelte app detected - - -

    - -
    -

    Not working? Did you...

    -
      -
    • Build with dev mode enabled?
    • -
    • Use Svelte version ^4.0.0?
    • -
    -
    -
    - - diff --git a/workspace/extension/src/routes/Inspector.svelte b/workspace/extension/src/routes/Inspector.svelte deleted file mode 100644 index ff7ca08..0000000 --- a/workspace/extension/src/routes/Inspector.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/workspace/extension/src/routes/ProfileButton.svelte b/workspace/extension/src/routes/ProfileButton.svelte deleted file mode 100644 index 75951f1..0000000 --- a/workspace/extension/src/routes/ProfileButton.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/workspace/extension/src/routes/Profiler.svelte b/workspace/extension/src/routes/Profiler.svelte deleted file mode 100644 index 5b99c4b..0000000 --- a/workspace/extension/src/routes/Profiler.svelte +++ /dev/null @@ -1,133 +0,0 @@ - - - - {#if top} - - {:else} - - {/if} - - -
    - {#if children.length} - { - if (selected === frame) top = frame; - else selected = frame; - }} - /> - {:else} -

    Nothing to display. Perform an action or refresh the page.

    - {/if} -
    -{#if selected} - -
    -
    - Tag name - {selected.node.tagName} - (#{selected.node.id}) -
    -
    - Start - {round(selected.start)}ms -
    -
    - Operation - {selected.type} -
    -
    - Block type - {selected.node.type} -
    -
    - End - {round(selected.end)}ms -
    -
    - Duration - - {round(selected.children.reduce((acc, o) => acc - o.duration, selected.duration))}ms - - of - {round(selected.duration)}ms -
    -
    -
    -{/if} - - diff --git a/workspace/extension/src/routes/ProfilerFrame.svelte b/workspace/extension/src/routes/ProfilerFrame.svelte deleted file mode 100644 index c102163..0000000 --- a/workspace/extension/src/routes/ProfilerFrame.svelte +++ /dev/null @@ -1,72 +0,0 @@ - - -{#if children?.length} -
      - {#each children as frame} -
    • - - - onclick(frame)} /> -
    • - {/each} -
    -{/if} - - diff --git a/workspace/extension/src/routes/SearchBox.svelte b/workspace/extension/src/routes/SearchBox.svelte deleted file mode 100644 index e305db3..0000000 --- a/workspace/extension/src/routes/SearchBox.svelte +++ /dev/null @@ -1,98 +0,0 @@ - - -
    event.preventDefault()}> - - - - - - { - if (key === 'Enter') submit[shiftKey ? 'prev' : 'next'](); - }} - /> - - {#if results.length && position > -1} - {position + 1} of {results.length} - {/if} - - - -
    - - diff --git a/workspace/extension/src/routes/VisibilitySelection.svelte b/workspace/extension/src/routes/VisibilitySelection.svelte deleted file mode 100644 index d126ff9..0000000 --- a/workspace/extension/src/routes/VisibilitySelection.svelte +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - {#if opened} -
    - {#each Object.keys(visibility) as key} - - {/each} -
    - {/if} -
    - - diff --git a/workspace/extension/static/background.js b/workspace/extension/static/background.js deleted file mode 100644 index ce2d67a..0000000 --- a/workspace/extension/static/background.js +++ /dev/null @@ -1,131 +0,0 @@ -/** @type {Map} */ -const ports = new Map(); - -chrome.runtime.onConnect.addListener((port) => { - if (port.sender?.url !== chrome.runtime.getURL('/index.html')) { - console.error(`Unexpected connection from ${port.sender?.url || ''}`); - return port.disconnect(); - } - - // messages are from the devtools page and not content script (courier.js) - port.onMessage.addListener((message, sender) => { - switch (message.type) { - case 'bypass::ext/init': { - ports.set(message.tabId, sender); - if (!chrome.tabs.onUpdated.hasListener(courier)) { - chrome.tabs.onUpdated.addListener(courier); - } - break; - } - case 'bypass::ext/page->refresh': { - chrome.tabs.reload(message.tabId, { bypassCache: true }); - break; - } - - default: // relay messages from devtools to tab - chrome.tabs.sendMessage(message.tabId, message); - } - }); - - port.onDisconnect.addListener((disconnected) => { - ports.delete(+disconnected.name); - - if (ports.size === 0) { - chrome.tabs.onUpdated.removeListener(courier); - } - }); -}); - -// relay messages from `chrome.scripting` to devtools page -chrome.runtime.onMessage.addListener((message, sender) => { - if (sender.id !== chrome.runtime.id) return; // unexpected sender - - if (message.type === 'bypass::ext/icon:set') { - const selected = message.payload ? 'default' : 'disabled'; - const icons = [16, 24, 48, 96, 128].map((s) => [s, `icons/${selected}-${s}.png`]); - return chrome.action.setIcon({ path: Object.fromEntries(icons) }); - } - - const port = sender.tab?.id && ports.get(sender.tab.id); - if (port) return port.postMessage(message); -}); - -/** @type {Parameters[0]} */ -function courier(tabId, changed) { - if (!ports.has(tabId) || changed.status !== 'loading') return; - - chrome.scripting.executeScript({ - target: { tabId }, - - // ensures we're listening to the events before they're dispatched - injectImmediately: true, - - // no lexical context, `func` is serialized and deserialized. - // a limbo world where both `chrome` and `window` are defined - // with many unexpected and out of the ordinary behaviors, do - // minimal work here and delegate to `courier.js` in the page. - // only a subset of APIs are available in this `chrome` limbo - // - chrome.csi->f() - // - chrome.dom.{openOrClosedShadowRoot->f()} - // - chrome.extension.{ViewType, inIncognitoContext} - // - chrome.i18n - // - chrome.runtime - func: () => { - chrome.runtime.onMessage.addListener((message, sender) => { - if (sender.id !== chrome.runtime.id) return; // unexpected sender - window.postMessage(message); // relay to content script (courier.js) - }); - - window.addEventListener('message', ({ source, data }) => { - // only accept messages from our application or script - if (source === window && data?.source === 'svelte-devtools') { - chrome.runtime.sendMessage(data); - } - }); - - window.addEventListener('unload', () => { - chrome.runtime.sendMessage({ type: 'bridge::ext/clear' }); - }); - }, - }); -} - -chrome.tabs.onActivated.addListener(({ tabId }) => sensor(tabId)); -chrome.tabs.onUpdated.addListener( - (tabId, changed) => changed.status === 'complete' && sensor(tabId), -); - -/** @param {number} tabId */ -async function sensor(tabId) { - try { - // add SvelteDevTools event listener - await chrome.scripting.executeScript({ - target: { tabId }, - func: () => { - document.addEventListener('SvelteDevTools', ({ detail }) => { - chrome.runtime.sendMessage(detail); - }); - }, - }); - // capture data to send to listener - await chrome.scripting.executeScript({ - target: { tabId }, - world: 'MAIN', - func: () => { - // @ts-ignore - injected if the website is using svelte - const [major] = [...(window.__svelte?.v ?? [])]; - - document.dispatchEvent( - new CustomEvent('SvelteDevTools', { - detail: { type: 'bypass::ext/icon:set', payload: major }, - }), - ); - }, - }); - } catch { - // for internal URLs like `chrome://` or `edge://` and extension gallery - // https://chromium.googlesource.com/chromium/src/+/ee77a52baa1f8a98d15f9749996f90e9d3200f2d/chrome/common/extensions/chrome_extensions_client.cc#131 - const icons = [16, 24, 48, 96, 128].map((s) => [s, `icons/disabled-${s}.png`]); - chrome.action.setIcon({ path: Object.fromEntries(icons) }); - } -} diff --git a/workspace/extension/static/icons/default-128.png b/workspace/extension/static/icons/default-128.png deleted file mode 100644 index e6ee090..0000000 Binary files a/workspace/extension/static/icons/default-128.png and /dev/null differ diff --git a/workspace/extension/static/icons/default-16.png b/workspace/extension/static/icons/default-16.png deleted file mode 100644 index 9b7bb76..0000000 Binary files a/workspace/extension/static/icons/default-16.png and /dev/null differ diff --git a/workspace/extension/static/icons/default-24.png b/workspace/extension/static/icons/default-24.png deleted file mode 100644 index b5eb83c..0000000 Binary files a/workspace/extension/static/icons/default-24.png and /dev/null differ diff --git a/workspace/extension/static/icons/default-48.png b/workspace/extension/static/icons/default-48.png deleted file mode 100644 index 543a150..0000000 Binary files a/workspace/extension/static/icons/default-48.png and /dev/null differ diff --git a/workspace/extension/static/icons/default-96.png b/workspace/extension/static/icons/default-96.png deleted file mode 100644 index 903efd5..0000000 Binary files a/workspace/extension/static/icons/default-96.png and /dev/null differ diff --git a/workspace/extension/static/icons/disabled-128.png b/workspace/extension/static/icons/disabled-128.png deleted file mode 100644 index 8df184a..0000000 Binary files a/workspace/extension/static/icons/disabled-128.png and /dev/null differ diff --git a/workspace/extension/static/icons/disabled-16.png b/workspace/extension/static/icons/disabled-16.png deleted file mode 100644 index a3b737f..0000000 Binary files a/workspace/extension/static/icons/disabled-16.png and /dev/null differ diff --git a/workspace/extension/static/icons/disabled-24.png b/workspace/extension/static/icons/disabled-24.png deleted file mode 100644 index d75f5a2..0000000 Binary files a/workspace/extension/static/icons/disabled-24.png and /dev/null differ diff --git a/workspace/extension/static/icons/disabled-48.png b/workspace/extension/static/icons/disabled-48.png deleted file mode 100644 index 602426f..0000000 Binary files a/workspace/extension/static/icons/disabled-48.png and /dev/null differ diff --git a/workspace/extension/static/icons/disabled-96.png b/workspace/extension/static/icons/disabled-96.png deleted file mode 100644 index 906eccb..0000000 Binary files a/workspace/extension/static/icons/disabled-96.png and /dev/null differ diff --git a/workspace/extension/static/icons/svelte-dark.svg b/workspace/extension/static/icons/svelte-dark.svg deleted file mode 100644 index 3c4debb..0000000 --- a/workspace/extension/static/icons/svelte-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/workspace/extension/static/icons/svelte-default.svg b/workspace/extension/static/icons/svelte-default.svg deleted file mode 100644 index 409f039..0000000 --- a/workspace/extension/static/icons/svelte-default.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/workspace/extension/static/icons/svelte-disabled.svg b/workspace/extension/static/icons/svelte-disabled.svg deleted file mode 100644 index 43dc3fb..0000000 --- a/workspace/extension/static/icons/svelte-disabled.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/workspace/extension/static/icons/svelte.svg b/workspace/extension/static/icons/svelte.svg deleted file mode 100644 index e743d96..0000000 --- a/workspace/extension/static/icons/svelte.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/workspace/extension/static/manifest.json b/workspace/extension/static/manifest.json deleted file mode 100644 index 55e14ed..0000000 --- a/workspace/extension/static/manifest.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "manifest_version": 3, - "name": "Svelte DevTools", - "version": "2.2.2", - "description": "Browser DevTools extension for debugging Svelte applications.", - "icons": { - "16": "icons/default-16.png", - "24": "icons/default-24.png", - "48": "icons/default-48.png", - "96": "icons/default-96.png", - "128": "icons/default-128.png" - }, - - "action": { - "default_icon": { - "16": "icons/disabled-16.png", - "24": "icons/disabled-24.png", - "48": "icons/disabled-48.png", - "96": "icons/disabled-96.png", - "128": "icons/disabled-128.png" - } - }, - "background": { - "scripts": ["background.js"], - "service_worker": "background.js" - }, - "content_scripts": [ - { - "matches": [""], - "js": ["courier.js"], - "run_at": "document_start", - "world": "MAIN" - } - ], - "devtools_page": "register.html", - "host_permissions": ["*://*/*"], - "permissions": ["activeTab", "scripting"], - "web_accessible_resources": [{ "matches": ["*://*/*"], "resources": ["courier.js"] }], - - "minimum_chrome_version": "121", - "browser_specific_settings": { - "gecko": { - "id": "firefox-devtools@svelte.dev", - "strict_min_version": "121.0", - "update_url": "https://svelte.dev/devtools/updates.json" - } - } -} diff --git a/workspace/extension/static/register.html b/workspace/extension/static/register.html deleted file mode 100644 index 1b02225..0000000 --- a/workspace/extension/static/register.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/workspace/extension/static/register.js b/workspace/extension/static/register.js deleted file mode 100644 index a33bdbc..0000000 --- a/workspace/extension/static/register.js +++ /dev/null @@ -1,12 +0,0 @@ -chrome.devtools.panels.create( - 'Svelte', - `icons/svelte-${chrome.devtools.panels.themeName}.svg`, - 'index.html', - // (panel) => { - // panel.onShown.addListener((win) => - // chrome.devtools.inspectedWindow.eval('$0', (payload) => - // win.postMessage({ source: 'svelte-devtools', type: 'bridge::ext/inspect', payload }), - // ), - // ); - // }, -); diff --git a/workspace/extension/svelte.config.js b/workspace/extension/svelte.config.js deleted file mode 100644 index 58e94ac..0000000 --- a/workspace/extension/svelte.config.js +++ /dev/null @@ -1,14 +0,0 @@ -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; - -export default { - compilerOptions: { - runes: true, - }, - - preprocess: vitePreprocess(), - - onwarn(warning, handler) { - if (warning.message.includes('A11y')) return; - !warning.message.includes('chrome') && handler(warning); - }, -}; diff --git a/workspace/extension/tsconfig.json b/workspace/extension/tsconfig.json deleted file mode 100644 index 10ae081..0000000 --- a/workspace/extension/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - - "checkJs": true, - "strict": true, - "composite": true, - "noEmit": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - - "skipLibCheck": true, - "isolatedModules": true, - "useDefineForClassFields": true, - "forceConsistentCasingInFileNames": true, - - "paths": { - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } - }, - "include": [ - "vite.config.ts", - "src/**/*.d.ts", - "src/**/*.ts", - "src/**/*.js", - "src/**/*.svelte", - "static/**/*.js" - ], - "exclude": ["static/courier.js"] -} diff --git a/workspace/extension/vite.config.ts b/workspace/extension/vite.config.ts deleted file mode 100644 index fde691d..0000000 --- a/workspace/extension/vite.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { resolve } from 'node:path'; -import { svelte } from '@sveltejs/vite-plugin-svelte'; -import { defineConfig } from 'vite'; - -export default defineConfig(() => { - return { - plugins: [svelte()], - - build: { - cssTarget: 'chrome111', - outDir: 'build', - }, - - publicDir: 'static', - - resolve: { - alias: { - $lib: resolve(__dirname, 'src/lib'), - }, - }, - }; -});