├── .gitignore ├── .liquidrc ├── .npmignore ├── .prettierignore ├── .vscode ├── defaults │ └── pages │ │ ├── page-a.md │ │ ├── page-b.md │ │ ├── page-c.md │ │ └── page-d.md ├── extensions.json ├── hooks │ ├── include │ │ └── counter.liquid │ ├── page-a.md │ └── page-b.md └── settings.json ├── LICENSE ├── docs ├── .eleventy.cjs ├── .eleventyignore ├── netlify.toml ├── package.json ├── pnpm-lock.yaml ├── postcss.config.cjs ├── readme.md ├── src │ ├── app │ │ ├── bundle.ts │ │ ├── components │ │ │ ├── drawer.ts │ │ │ ├── dropdown.ts │ │ │ ├── indicator.ts │ │ │ ├── scrollspy.ts │ │ │ ├── search.ts │ │ │ └── sidebar.ts │ │ ├── examples │ │ │ ├── alias.ts │ │ │ ├── counter.ts │ │ │ ├── hooks.ts │ │ │ └── iframe.ts │ │ ├── iframe.ts │ │ └── tutorial │ │ │ ├── counter.ts │ │ │ └── tabs.ts │ ├── assets │ │ ├── flow.svg │ │ ├── fonts │ │ │ ├── proxima-nova-bold.woff2 │ │ │ ├── proxima-nova-light.woff2 │ │ │ └── proxima-nova-regular.woff2 │ │ ├── img │ │ │ ├── 1.webp │ │ │ ├── 10.webp │ │ │ ├── 11.webp │ │ │ ├── 12.webp │ │ │ ├── 13.webp │ │ │ ├── 14.webp │ │ │ ├── 15.webp │ │ │ ├── 16.webp │ │ │ ├── 17.webp │ │ │ ├── 18.webp │ │ │ ├── 19.webp │ │ │ ├── 2.webp │ │ │ ├── 20.webp │ │ │ ├── 21.webp │ │ │ ├── 22.webp │ │ │ ├── 23.webp │ │ │ ├── 24.webp │ │ │ ├── 25.webp │ │ │ ├── 26.webp │ │ │ ├── 27.webp │ │ │ ├── 28.webp │ │ │ ├── 29.webp │ │ │ ├── 3.webp │ │ │ ├── 30.webp │ │ │ ├── 4.webp │ │ │ ├── 5.webp │ │ │ ├── 6.webp │ │ │ ├── 7.webp │ │ │ ├── 8.webp │ │ │ ├── 9.webp │ │ │ └── social-banner.png │ │ └── svg │ │ │ ├── anchor.svg │ │ │ ├── arrow-right.svg │ │ │ ├── check.svg │ │ │ ├── chevron-down.svg │ │ │ ├── chevron-left.svg │ │ │ ├── chevron-right.svg │ │ │ ├── clown.svg │ │ │ ├── copy.svg │ │ │ ├── discord.svg │ │ │ ├── github-avatar.svg │ │ │ ├── github.svg │ │ │ ├── home.svg │ │ │ ├── logo copy.svg │ │ │ ├── logo.svg │ │ │ ├── menu.svg │ │ │ ├── minus-square.svg │ │ │ ├── npm.svg │ │ │ ├── plus-square.svg │ │ │ ├── refresh.svg │ │ │ ├── search-code.svg │ │ │ ├── search-goto.svg │ │ │ ├── search-heading.svg │ │ │ ├── search-list.svg │ │ │ ├── search-quote.svg │ │ │ └── search-text.svg │ ├── sass │ │ ├── examples.scss │ │ ├── extend │ │ │ ├── anchors.scss │ │ │ ├── base.scss │ │ │ ├── blockquote.scss │ │ │ ├── iframes.scss │ │ │ ├── landing.scss │ │ │ ├── layout.scss │ │ │ ├── navbar.scss │ │ │ ├── patches.scss │ │ │ ├── search.scss │ │ │ ├── sidebar.scss │ │ │ ├── svg.scss │ │ │ └── tabs.scss │ │ ├── stylesheet.scss │ │ └── variables.scss │ └── views │ │ ├── base.liquid │ │ ├── data │ │ ├── comparison.json │ │ ├── events.json │ │ ├── iframes.json │ │ ├── lifecycles.json │ │ ├── meta.json │ │ └── navigation.json │ │ ├── docs │ │ ├── api │ │ │ ├── capture.md │ │ │ ├── clear.md │ │ │ ├── disconnect.md │ │ │ ├── dom.md │ │ │ ├── fetch.md │ │ │ ├── http.md │ │ │ ├── hydrate.md │ │ │ ├── live.md │ │ │ ├── methods.md │ │ │ ├── observe.md │ │ │ ├── off.md │ │ │ ├── on.md │ │ │ ├── prefetch.md │ │ │ ├── reload.md │ │ │ ├── render.md │ │ │ ├── session.md │ │ │ ├── store.md │ │ │ └── visit.md │ │ ├── components │ │ │ ├── algorithm.md │ │ │ ├── aliases.md │ │ │ ├── bindings.md │ │ │ ├── directives.md │ │ │ ├── events.md │ │ │ ├── extends.md │ │ │ ├── functions.md │ │ │ ├── hooks.md │ │ │ ├── nodes.md │ │ │ ├── register.md │ │ │ ├── state.md │ │ │ └── sugar.md │ │ ├── directives │ │ │ ├── attributes.md │ │ │ ├── spx-append.md │ │ │ ├── spx-bind.md │ │ │ ├── spx-cache.md │ │ │ ├── spx-component.md │ │ │ ├── spx-data.md │ │ │ ├── spx-disable.md │ │ │ ├── spx-eval.md │ │ │ ├── spx-fragment.md │ │ │ ├── spx-history.md │ │ │ ├── spx-hover.md │ │ │ ├── spx-hydrate.md │ │ │ ├── spx-intersect.md │ │ │ ├── spx-morph.md │ │ │ ├── spx-mount.md │ │ │ ├── spx-node.md │ │ │ ├── spx-position.md │ │ │ ├── spx-prepend.md │ │ │ ├── spx-progress.md │ │ │ ├── spx-promixity.md │ │ │ ├── spx-render.md │ │ │ ├── spx-replace.md │ │ │ ├── spx-scroll.md │ │ │ ├── spx-ssr.md │ │ │ ├── spx-target.md │ │ │ ├── spx-threshold.md │ │ │ ├── spx-track.md │ │ │ └── spx-watch.md │ │ ├── getting-started │ │ │ ├── getting-help.md │ │ │ ├── key-concepts.md │ │ │ ├── lifecycle.md │ │ │ ├── tutorial.md │ │ │ ├── using-spx.md │ │ │ └── what-is-spx.md │ │ ├── index.md │ │ ├── miscellaneous │ │ │ ├── acknowledgements.md │ │ │ ├── benchmarks.md │ │ │ ├── lexicon.md │ │ │ ├── methods.md │ │ │ ├── reference.md │ │ │ └── sessions.md │ │ └── usage │ │ │ ├── basic-example.md │ │ │ ├── components.md │ │ │ ├── connection.md │ │ │ ├── examples │ │ │ ├── hooks │ │ │ │ ├── component.liquid │ │ │ │ ├── component.ts │ │ │ │ ├── onmount.md │ │ │ │ └── unmount.md │ │ │ └── resource-evaluation │ │ │ │ ├── include │ │ │ │ └── scripts.liquid │ │ │ │ └── pages │ │ │ │ ├── page-a.md │ │ │ │ ├── page-b.md │ │ │ │ └── page-c.md │ │ │ ├── installation.md │ │ │ ├── lifecycle-events.md │ │ │ ├── methods-list.md │ │ │ ├── options.md │ │ │ ├── resource-evaluation.md │ │ │ ├── typescript.md │ │ │ └── vscode-extension.md │ │ ├── iframes │ │ └── code.liquid │ │ └── include │ │ ├── breadcrumb.liquid │ │ ├── comparison.liquid │ │ ├── event-attrs.liquid │ │ ├── event-options.liquid │ │ ├── flow.liquid │ │ ├── head.liquid │ │ ├── hooks-table.liquid │ │ ├── iframe.liquid │ │ ├── landing.liquid │ │ ├── lifecycle-events.liquid │ │ ├── navbar.liquid │ │ ├── paginate.liquid │ │ ├── search.liquid │ │ ├── sidebar-header.liquid │ │ └── sidebar.liquid └── tsup.config.ts ├── index.d.ts ├── index.js ├── package.json ├── pnpm-lock.yaml ├── readme.md ├── src ├── app │ ├── config.ts │ ├── controller.ts │ ├── events.ts │ ├── fetch.ts │ ├── location.ts │ ├── progress.ts │ ├── queries.ts │ ├── render.ts │ ├── session.ts │ └── snapshot.ts ├── components │ ├── class.ts │ ├── context.ts │ ├── instance.ts │ ├── listeners.ts │ ├── observe.ts │ ├── proxies.ts │ └── register.ts ├── index.ts ├── morph │ ├── attributes.ts │ ├── forms.ts │ ├── morph.ts │ ├── snapshot.ts │ └── walk.ts ├── observe │ ├── components.ts │ ├── fragment.ts │ ├── history.ts │ ├── hovers.ts │ ├── hrefs.ts │ ├── intersect.ts │ ├── mutations.ts │ └── proximity.ts └── shared │ ├── const.ts │ ├── enums.ts │ ├── links.ts │ ├── logs.ts │ ├── native.ts │ ├── patch.ts │ ├── regexp.ts │ └── utils.ts ├── test ├── .eleventy.cjs ├── .eleventyignore ├── asset │ ├── fonts │ │ ├── proxima-nova-bold.woff2 │ │ ├── proxima-nova-light.woff2 │ │ └── proxima-nova-regular.woff2 │ ├── style.scss │ ├── style │ │ ├── explorer.scss │ │ ├── extend.scss │ │ ├── json-tree.scss │ │ └── resize.scss │ ├── suite.ts │ ├── suite │ │ ├── cases.ts │ │ ├── console.ts │ │ ├── explorer.ts │ │ ├── explorer │ │ │ ├── components.ts │ │ │ └── state.ts │ │ ├── logger.ts │ │ ├── logs.ts │ │ ├── refs.ts │ │ └── resize.ts │ └── svg │ │ ├── chevron-left.svg │ │ ├── chevron-right.svg │ │ └── logo.svg ├── cases │ ├── component-aliases │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ ├── component-bindings │ │ ├── index.liquid │ │ ├── index.test.ts │ │ ├── pages │ │ │ ├── page-a.liquid │ │ │ ├── page-b.liquid │ │ │ └── page-c.liquid │ │ └── readme.md │ ├── component-hooks │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ ├── component-incremental │ │ ├── include │ │ │ ├── component.liquid │ │ │ ├── pages.liquid │ │ │ └── target.liquid │ │ ├── index.liquid │ │ ├── index.test.ts │ │ ├── pages │ │ │ ├── page-a.liquid │ │ │ ├── page-b.liquid │ │ │ └── page-c.liquid │ │ └── readme.md │ ├── component-lifecycle │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ ├── component-literal │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ ├── component-merge │ │ ├── include │ │ │ ├── pages.liquid │ │ │ └── shared.liquid │ │ ├── index.liquid │ │ ├── index.test.ts │ │ ├── pages │ │ │ ├── page-a.liquid │ │ │ ├── page-b.liquid │ │ │ └── page-c.liquid │ │ └── readme.md │ ├── component-multiple │ │ ├── index.liquid │ │ └── readme.md │ ├── component-nesting │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ ├── component-observer │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ ├── component-refs │ │ ├── include │ │ │ ├── demo.liquid │ │ │ └── pages.liquid │ │ ├── index.liquid │ │ ├── index.test.ts │ │ ├── pages │ │ │ ├── page-a.liquid │ │ │ └── page-b.liquid │ │ └── readme.md │ ├── component-types │ │ ├── include │ │ │ ├── legend.liquid │ │ │ └── pages.liquid │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── pages │ │ │ ├── defined.liquid │ │ │ ├── dom-defined.liquid │ │ │ └── overwrite.liquid │ ├── config-fragments │ │ ├── index.liquid │ │ └── tests │ │ │ ├── error.liquid │ │ │ ├── error.test.ts │ │ │ ├── valid.liquid │ │ │ └── valid.test.ts │ ├── directive-target │ │ ├── include │ │ │ └── pages.liquid │ │ ├── index.liquid │ │ ├── pages │ │ │ ├── page-a.liquid │ │ │ ├── page-b.liquid │ │ │ └── page-c.liquid │ │ └── readme.md │ ├── lifecycle-events │ │ ├── index.liquid │ │ ├── index.test.ts │ │ └── readme.md │ └── morph-nodes │ │ ├── include │ │ └── pages.liquid │ │ ├── index.liquid │ │ ├── index.test.ts │ │ ├── pages │ │ ├── page-a.liquid │ │ ├── page-b.liquid │ │ └── page-c.liquid │ │ └── readme.md ├── package.json ├── pnpm-lock.yaml ├── tsup.config.ts └── views │ ├── base.liquid │ ├── data │ └── cases.json │ └── include │ ├── cases.liquid │ ├── explorer.liquid │ ├── index.liquid │ └── logger.liquid ├── tsconfig.json ├── tsup.config.ts └── types ├── components.d.ts ├── config.d.ts ├── context.d.ts ├── events.d.ts ├── global.d.ts ├── http.d.ts ├── options.d.ts ├── page.d.ts ├── session.d.ts └── types.d.ts /.gitignore: -------------------------------------------------------------------------------- 1 | # DIRECTORIES 2 | node_modules 3 | public 4 | !types/public 5 | docs/.netlify 6 | docs/netlify/functions/search/** 7 | !docs/netlify/functions/search/index.js 8 | 9 | # FILES 10 | .pnpm-debug.log 11 | .vscode/settings.json 12 | .liquidrc 13 | -------------------------------------------------------------------------------- /.liquidrc: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "11ty", 3 | "files": { 4 | "includes": [ 5 | "./docs/src/views/include/*.liquid" 6 | ], 7 | "data": [ 8 | "./docs/src/data/*.json" 9 | ] 10 | }, 11 | "format": { 12 | "wrap": 125, 13 | "crlf": false, 14 | "indentSize": 2, 15 | "preserveLine": 1, 16 | "endNewline": false, 17 | "liquid": { 18 | "commentIndent": true, 19 | "commentNewline": true, 20 | "delimiterPlacement": "consistent", 21 | "delimiterTrims": "tags", 22 | "lineBreakSeparator": "before", 23 | "indentAttribute": true, 24 | "normalizeSpacing": true, 25 | "preserveComment": false, 26 | "quoteConvert": "single", 27 | "forceFilter": 2, 28 | "forceArgument": 3 29 | }, 30 | "markup": { 31 | "quoteConvert": "double", 32 | "lineBreakValue": "preserve", 33 | "commentNewline": true, 34 | "forceIndent": false, 35 | "ignoreJS": false, 36 | "forceAttribute": 2, 37 | "preserveText": true 38 | }, 39 | "json": { 40 | "braceAllman": true, 41 | "arrayFormat": "indent", 42 | "objectIndent": "indent" 43 | }, 44 | "style": { 45 | "correct": true, 46 | "commentNewline": true, 47 | "commentIndent": true, 48 | "noLeadZero": true, 49 | "quoteConvert": "single", 50 | "classPadding": true 51 | }, 52 | "script": { 53 | "correct": true, 54 | "arrayFormat": "indent", 55 | "objectIndent": "indent", 56 | "methodChain": 3, 57 | "caseSpace": true, 58 | "quoteConvert": "single", 59 | "elseNewline": true, 60 | "functionNameSpace": true, 61 | "functionSpace": true, 62 | "commentNewline": true, 63 | "noCaseIndent": true 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # DIRECTORIES 2 | .vscode/ 3 | .github/ 4 | node_modules/ 5 | docs/ 6 | test/ 7 | src/ 8 | 9 | # FILES 10 | tsup.config.ts 11 | tsconfig.json 12 | pnpm-lock.yaml 13 | 14 | # DOT FILES 15 | .gitignore 16 | .prettierignore 17 | .npmignore 18 | 19 | # MARKDOWN 20 | readme.md 21 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.ts 3 | *.mjs 4 | *.cjs 5 | *.html 6 | *.liquid 7 | 8 | -------------------------------------------------------------------------------- /.vscode/defaults/pages/page-a.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: iframe.liquid 3 | group: 'directive' 4 | permalink: '/iframe/using-defaults/page-a' 5 | data: 'using-defaults' 6 | --- 7 | 8 | # Page A 9 | 10 | This is an example of SPX using the default options. In our JavaScript file we called `spx.connect()` with no additional options. This instructed SPX to replace the entire `
` fragment of the page. 11 | -------------------------------------------------------------------------------- /.vscode/defaults/pages/page-b.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: iframe.liquid 3 | group: 'directive' 4 | permalink: '/iframe/using-defaults/page-b' 5 | data: 'using-defaults' 6 | --- 7 | 8 | # Page B 9 | 10 | This is Page B. SPX fetched this page when your cursor hovered the `` element. By default, SPX is morphing between pages, which means only content which differed has been swapped. 11 | -------------------------------------------------------------------------------- /.vscode/defaults/pages/page-c.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: iframe.liquid 3 | group: 'directive' 4 | permalink: '/iframe/using-defaults/page-c' 5 | data: 'using-defaults' 6 | --- 7 | 8 | # Page C 9 | 10 | This is **Page C** and unlike pages `A`, `B` and `D` this `` link element was annotated with `spx-disable` which resulted in a traditional navigation. Notice how there was a small flash when clicking this link. 11 | -------------------------------------------------------------------------------- /.vscode/defaults/pages/page-d.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: iframe.liquid 3 | group: 'directive' 4 | permalink: '/iframe/using-defaults/page-d' 5 | data: 'using-defaults' 6 | --- 7 | 8 | # Page D 9 | 10 | This is **Page D** and loaded the same as pages `A` and `B`. The SPX session has this page saved to its snapshot cache, however if you click `Page C` the snapshot cache will be reset. 11 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-vscode.vscode-typescript-next", 6 | "vscode-icons-team.vscode-icons", 7 | "streetsidesoftware.code-spell-checker" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/hooks/include/counter.liquid: -------------------------------------------------------------------------------- 1 |