├── scripts ├── imported │ ├── config.js │ ├── package.json │ └── index.js ├── example.js ├── log-version.js ├── nop │ ├── package.json │ └── index.js ├── correct-import-extensions.js └── post-build.js ├── src ├── index.ts ├── trying-to-write-documentation │ ├── index.ts │ ├── accessors-how.tsx │ └── readme-generator.ts ├── tests │ ├── index.tsx │ ├── siblings.2.ts │ └── siblings.1.tsx ├── types │ ├── jsx.d.ts │ ├── dom-lite.d.ts │ └── deno-dom.d.ts ├── is.ts ├── like.ts └── siblings.ts ├── .npmignore ├── .env.example ├── .gitignore ├── .prettierignore ├── .nycrc ├── CONTRIBUTING.md ├── tsconfig.json ├── README.md ├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .github └── workflows │ ├── test-actions.yml │ ├── release-actions.yml │ └── codeql-analysis.yml ├── LICENSE.md ├── CODE-OF-CONDUCT.md ├── package.json └── import-map-deno.json /scripts/imported/config.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./siblings"; -------------------------------------------------------------------------------- /scripts/example.js: -------------------------------------------------------------------------------- 1 | import "../esnext/example/index.js"; 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea 3 | node_modules 4 | coverage 5 | .env -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | PROMPT_NAME=test name 2 | PROMPT_EMAIL=test+email@example.com -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea 3 | node_modules 4 | esnext 5 | coverage 6 | .env -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea 3 | node_modules 4 | esnext 5 | coverage 6 | *.md 7 | .env -------------------------------------------------------------------------------- /src/trying-to-write-documentation/index.ts: -------------------------------------------------------------------------------- 1 | await import("./accessors-how"); 2 | 3 | export default 1; 4 | -------------------------------------------------------------------------------- /src/tests/index.tsx: -------------------------------------------------------------------------------- 1 | await import("./siblings.1"); 2 | await import("./siblings.2"); 3 | 4 | export default 1; 5 | -------------------------------------------------------------------------------- /src/trying-to-write-documentation/accessors-how.tsx: -------------------------------------------------------------------------------- 1 | import { ok, h } from "@virtualstate/focus"; 2 | 3 | 4 | export default 1; 5 | -------------------------------------------------------------------------------- /src/types/jsx.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace JSX { 2 | interface IntrinsicElements 3 | extends Record> {} 4 | } 5 | -------------------------------------------------------------------------------- /scripts/log-version.js: -------------------------------------------------------------------------------- 1 | import("fs") 2 | .then(({ promises }) => promises.readFile("package.json")) 3 | .then(JSON.parse) 4 | .then(({ version }) => console.log(version)); 5 | -------------------------------------------------------------------------------- /scripts/nop/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "main": "./index.js", 4 | "type": "module", 5 | "exports": { 6 | ".": "./index.js", 7 | "./": "./index.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /scripts/imported/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "main": "./index.js", 4 | "type": "module", 5 | "exports": { 6 | ".": "./index.js", 7 | "./": "./index.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": [ 3 | 4 | ], 5 | "reporter": [ 6 | "clover", 7 | "json-summary", 8 | "html", 9 | "text-summary" 10 | ], 11 | "branches": 80, 12 | "lines": 80, 13 | "functions": 80, 14 | "statements": 80 15 | } 16 | -------------------------------------------------------------------------------- /scripts/nop/index.js: -------------------------------------------------------------------------------- 1 | export const listenAndServe = undefined; 2 | export const createServer = undefined; 3 | 4 | /** 5 | * @type {any} 6 | */ 7 | const on = () => {}; 8 | /** 9 | * @type {any} 10 | */ 11 | const env = {}; 12 | 13 | /*** 14 | * @type {any} 15 | */ 16 | export default { 17 | env, 18 | on, 19 | exit(arg) {}, 20 | }; 21 | -------------------------------------------------------------------------------- /src/tests/siblings.2.ts: -------------------------------------------------------------------------------- 1 | 2 | import {change, replace} from "./siblings.1"; 3 | 4 | // do some async task 5 | await new Promise(queueMicrotask); 6 | 7 | // Then modify the node again! 8 | await change(); 9 | 10 | // do some async task 11 | await new Promise(queueMicrotask); 12 | 13 | // Then modify the node again! 14 | await replace(); 15 | 16 | 17 | export default 1; -------------------------------------------------------------------------------- /src/types/dom-lite.d.ts: -------------------------------------------------------------------------------- 1 | declare module "dom-lite" { 2 | namespace Default { 3 | export const document: Document; 4 | 5 | export const HTMLElement: { 6 | prototype: HTMLElement; 7 | new (): HTMLElement; 8 | }; 9 | export const Node: { 10 | prototype: Node; 11 | new (): Node; 12 | }; 13 | } 14 | 15 | export type DOMNamespace = typeof Default; 16 | 17 | export default Default; 18 | } 19 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make by way of an issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | We are open to all ideas big or small, and are greatly appreciative of any and all contributions. 7 | 8 | Please note we have a code of conduct, please follow it in all your interactions with the project. 9 | -------------------------------------------------------------------------------- /src/types/deno-dom.d.ts: -------------------------------------------------------------------------------- 1 | declare module "https://deno.land/x/deno_dom/deno-dom-wasm.ts" { 2 | export class DOMParser { 3 | parseFromString(string: string, type: string): Document; 4 | } 5 | 6 | class ElementImpl extends Element {} 7 | class NodeImpl extends Node {} 8 | class HTMLElementImpl extends HTMLElement {} 9 | class DocumentImpl extends Document {} 10 | 11 | export { 12 | ElementImpl as Element, 13 | NodeImpl as Node, 14 | HTMLElementImpl as HTMLElement, 15 | DocumentImpl as Document, 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /scripts/imported/index.js: -------------------------------------------------------------------------------- 1 | /* c8 ignore start */ 2 | 3 | const initialImportPath = 4 | getConfig()["@virtualstate/app-history/test/imported/path"] ?? 5 | "@virtualstate/app-history"; 6 | 7 | if (typeof initialImportPath !== "string") 8 | throw new Error("Expected string import path"); 9 | 10 | export const { AppHistory } = await import(initialImportPath); 11 | 12 | export function getConfig() { 13 | return { 14 | ...getNodeConfig(), 15 | }; 16 | } 17 | 18 | function getNodeConfig() { 19 | if (typeof process === "undefined") return {}; 20 | return JSON.parse(process.env.TEST_CONFIG ?? "{}"); 21 | } 22 | /* c8 ignore end */ 23 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "esnext", 4 | "lib": ["es2018", "esnext", "dom"], 5 | "types": ["jest", "node", ], 6 | "esModuleInterop": true, 7 | "target": "esnext", 8 | "noImplicitAny": true, 9 | "downlevelIteration": true, 10 | "moduleResolution": "node", 11 | "declaration": true, 12 | "sourceMap": true, 13 | "outDir": "esnext", 14 | "baseUrl": "./src", 15 | "jsx": "react", 16 | "jsxFactory": "h", 17 | "jsxFragmentFactory": "createFragment", 18 | "allowJs": true, 19 | "paths": { 20 | "@virtualstate/ore": ["./"] 21 | } 22 | }, 23 | "include": ["src/**/*"], 24 | "typeRoots": ["./node_modules/@types", "src/types"], 25 | "exclude": ["node_modules/@opennetwork/vdom"] 26 | } 27 | -------------------------------------------------------------------------------- /src/is.ts: -------------------------------------------------------------------------------- 1 | export function isIterable(value: unknown): value is Iterable { 2 | function isIterableInstance(value: unknown): value is Iterable { 3 | return !!value; 4 | } 5 | return !!( 6 | isIterableInstance(value) && value[Symbol.iterator] instanceof Function 7 | ); 8 | } 9 | 10 | export function isAsyncIterable(value: unknown): value is AsyncIterable { 11 | function isAsyncIterableInstance(value: unknown): value is AsyncIterable { 12 | return !!value; 13 | } 14 | return !!( 15 | isAsyncIterableInstance(value) && 16 | value[Symbol.asyncIterator] instanceof Function 17 | ); 18 | } 19 | 20 | export function isArray(value: unknown): value is T[]; 21 | export function isArray(value: unknown): value is unknown[]; 22 | export function isArray(value: unknown): boolean { 23 | return Array.isArray(value); 24 | } 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `@virtualstate/ore` 2 | 3 | WIP implementation of [@virtualstate/fringe](https://github.com/virtualstate/x/blob/main/packages/fringe) 4 | 5 | This project is in semver alpha stage 6 | 7 | [//]: # (badges) 8 | 9 | ### Support 10 | 11 | ![Node.js supported](https://img.shields.io/badge/node-%3E%3D16.0.0-blue) ![Deno supported](https://img.shields.io/badge/deno-%3E%3D1.17.0-blue) 12 | 13 | ### Test Coverage 14 | 15 | ![100%25 lines covered](https://img.shields.io/badge/lines-100%25-brightgreen) ![100%25 statements covered](https://img.shields.io/badge/statements-100%25-brightgreen) ![100%25 functions covered](https://img.shields.io/badge/functions-100%25-brightgreen) ![100%25 branches covered](https://img.shields.io/badge/branches-100%25-brightgreen) 16 | 17 | [//]: # (badges) 18 | 19 | [//]: # (src/trying-to-write-documentation/accessors-how.tsx) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/typescript-node/.devcontainer/base.Dockerfile 2 | 3 | # [Choice] Node.js version: 16, 14, 12 4 | ARG VARIANT="16-buster" 5 | FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT} 6 | 7 | # [Optional] Uncomment this section to install additional OS packages. 8 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 9 | # && apt-get -y install --no-install-recommends 10 | 11 | # [Optional] Uncomment if you want to install an additional version of node using nvm 12 | # ARG EXTRA_NODE_VERSION=10 13 | # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" 14 | 15 | # [Optional] Uncomment if you want to install more global node packages 16 | # RUN su node -c "npm install -g " 17 | -------------------------------------------------------------------------------- /.github/workflows/test-actions.yml: -------------------------------------------------------------------------------- 1 | name: test-actions 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | test: 6 | runs-on: ubuntu-latest 7 | env: 8 | NO_COVERAGE_BADGE_UPDATE: 1 9 | FLAGS: FETCH_SERVICE_DISABLE,POST_CONFIGURE_TEST,PLAYWRIGHT,CONTINUE_ON_ERROR 10 | PROMPT_NAME: test name 11 | PROMPT_EMAIL: test+email@example.com 12 | steps: 13 | - uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 0 16 | - uses: actions/setup-node@v2 17 | with: 18 | node-version: "16.x" 19 | registry-url: "https://registry.npmjs.org" 20 | - uses: denoland/setup-deno@v1 21 | with: 22 | deno-version: "v1.x" 23 | - run: | 24 | yarn install 25 | npx playwright install-deps 26 | - run: yarn build 27 | # yarn coverage === c8 + yarn test 28 | - run: yarn coverage 29 | - run: yarn test:deno 30 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/typescript-node 3 | { 4 | "name": "Node.js & TypeScript", 5 | "build": { 6 | "dockerfile": "Dockerfile", 7 | // Update 'VARIANT' to pick a Node version: 12, 14, 16 8 | "args": { 9 | "VARIANT": "16" 10 | } 11 | }, 12 | 13 | // Set *default* container specific settings.json values on container create. 14 | "settings": {}, 15 | 16 | // Add the IDs of extensions you want installed when the container is created. 17 | "extensions": ["dbaeumer.vscode-eslint"], 18 | 19 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 20 | // "forwardPorts": [], 21 | 22 | // Use 'postCreateCommand' to run commands after the container is created. 23 | // "postCreateCommand": "yarn install", 24 | 25 | // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. 26 | "remoteUser": "node" 27 | } 28 | -------------------------------------------------------------------------------- /src/like.ts: -------------------------------------------------------------------------------- 1 | // assert based functions 2 | /* c8 ignore start */ 3 | 4 | export function isLike(value: unknown, ...and: unknown[]): value is T { 5 | if (!and.length) return !!value; 6 | return !!value && and.every((value) => !!value); 7 | } 8 | 9 | export function ok( 10 | value: unknown, 11 | message?: string, 12 | ...conditions: unknown[] 13 | ): asserts value; 14 | export function ok( 15 | value: unknown, 16 | message?: string, 17 | ...conditions: unknown[] 18 | ): asserts value is T; 19 | export function ok( 20 | value: unknown, 21 | message?: string, 22 | ...conditions: unknown[] 23 | ): asserts value { 24 | if (conditions.length ? !conditions.every((value) => value) : !value) { 25 | // console.log({ conditions, value }) 26 | throw new Error(message ?? "Expected value"); 27 | } 28 | } 29 | 30 | export function isRejected( 31 | value: PromiseSettledResult 32 | ): value is R { 33 | return value?.status === "rejected"; 34 | } 35 | 36 | export function isFulfilled( 37 | value: PromiseSettledResult 38 | ): value is PromiseFulfilledResult { 39 | return value?.status === "fulfilled"; 40 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Axiom Applied Technologies and Development Limited 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/tests/siblings.1.tsx: -------------------------------------------------------------------------------- 1 | import {createSiblings, SiblingMap} from "@virtualstate/ore"; 2 | import { toKDLString } from "@virtualstate/kdl"; 3 | import {toJSON} from "@virtualstate/focus"; 4 | 5 | const node = createSiblings({ 6 | referenceProperty: "id" 7 | }); 8 | const { h, remove, clear, [SiblingMap]: map } = node; 9 | 10 | // void shows that we don't need to read the return value from the expression 11 | // we could use brackets () or {}, semicolons, or expressions to split up jsx blocks 12 | void ( 13 |

Hello

14 | ) 15 | 16 | console.log("This is a log!"); 17 | 18 |
19 |

Whats up

20 |
21 | 22 | console.log(await toKDLString(node)); 23 | 24 | // We can re-use this later 25 | const Footer =
Original footer
26 | 27 | console.log(await toKDLString(node)); 28 | 29 | remove(Footer); 30 | 31 | console.log("after"); 32 | 33 |
Different footer????
34 | 35 | console.log(await toKDLString(node)); 36 | 37 | 38 | clear(); 39 | console.log("cleared"); 40 | 41 | { 42 |
43 |

Start again

44 |

Whats up

45 |
46 | This is in a section 47 |
48 |
49 | } 50 | 51 | { 52 | 55 | } 56 | 57 | console.log(map); 58 | 59 | console.log(await toKDLString(node)); 60 | 61 | export async function change() { 62 | const random = Math.random(); 63 | ( 64 | 67 | ) 68 | console.log(`Added link ${random}`); 69 | console.log(await toKDLString(node)); 70 | } 71 | 72 | export async function replace() { 73 | const random = Math.random(); 74 | ( 75 |
76 |

Replaced {random}

77 |
78 | ) 79 | console.log(`Replaced main with ${random}`); 80 | console.log(await toKDLString(node)); 81 | } 82 | -------------------------------------------------------------------------------- /.github/workflows/release-actions.yml: -------------------------------------------------------------------------------- 1 | name: release-actions 2 | on: 3 | push: 4 | branches: 5 | - main 6 | release: 7 | types: 8 | - created 9 | jobs: 10 | publish: 11 | runs-on: ubuntu-latest 12 | env: 13 | NO_COVERAGE_BADGE_UPDATE: 1 14 | PROMPT_NAME: test name 15 | PROMPT_EMAIL: test+email@example.com 16 | steps: 17 | - uses: actions/checkout@v2 18 | with: 19 | fetch-depth: 0 20 | - uses: actions/setup-node@v2 21 | with: 22 | node-version: "16.x" 23 | registry-url: "https://registry.npmjs.org" 24 | - uses: denoland/setup-deno@v1 25 | with: 26 | deno-version: "v1.x" 27 | - run: | 28 | yarn install 29 | - run: yarn build 30 | # yarn coverage === c8 + yarn test 31 | - run: yarn coverage 32 | - run: yarn test:deno 33 | - name: Package Registry Publish - npm 34 | run: | 35 | git config user.name "${{ github.actor }}" 36 | git config user.email "${{ github.actor}}@users.noreply.github.com" 37 | npm set "registry=https://registry.npmjs.org/" 38 | npm set "@virtualstate:registry=https://registry.npmjs.org/" 39 | npm set "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" 40 | npm publish --access=public 41 | continue-on-error: true 42 | env: 43 | YARN_TOKEN: ${{ secrets.YARN_TOKEN }} 44 | NPM_TOKEN: ${{ secrets.YARN_TOKEN }} 45 | NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }} 46 | - uses: actions/setup-node@v2 47 | with: 48 | node-version: "16.x" 49 | registry-url: "https://npm.pkg.github.com" 50 | - name: Package Registry Publish - GitHub 51 | run: | 52 | git config user.name "${{ github.actor }}" 53 | git config user.email "${{ github.actor}}@users.noreply.github.com" 54 | npm set "registry=https://npm.pkg.github.com/" 55 | npm set "@virtualstate:registry=https://npm.pkg.github.com/virtualstate" 56 | npm set "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" 57 | npm publish --access=public 58 | env: 59 | YARN_TOKEN: ${{ secrets.GITHUB_TOKEN }} 60 | NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} 61 | NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 62 | continue-on-error: true 63 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [main] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [main] 20 | schedule: 21 | - cron: "15 10 * * 5" 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: ["javascript"] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v2 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v1 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 52 | 53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 54 | # If this step fails, then you should remove it and run the build manually (see below) 55 | - name: Autobuild 56 | uses: github/codeql-action/autobuild@v1 57 | 58 | # ℹ️ Command-line programs to run using the OS shell. 59 | # 📚 https://git.io/JvXDl 60 | 61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 62 | # and modify them (or add more) to build your code if your project 63 | # uses a compiled language 64 | 65 | #- run: | 66 | # make bootstrap 67 | # make release 68 | 69 | - name: Perform CodeQL Analysis 70 | uses: github/codeql-action/analyze@v1 71 | -------------------------------------------------------------------------------- /src/trying-to-write-documentation/readme-generator.ts: -------------------------------------------------------------------------------- 1 | import { promises as fs } from "fs"; 2 | import { extname } from "path"; 3 | 4 | const readme = await fs.readFile("README.md", "utf-8"); 5 | let lines = readme.split("\n"); 6 | 7 | const badgeMatch = /^\[\/\/]:\s+#\s+\(([^)]+)\)\s*$/; 8 | 9 | const badges = lines.filter((line) => badgeMatch.test(line)); 10 | 11 | const replacedNames = new Set(); 12 | 13 | for (const badge of badges) { 14 | const [, name] = badge.match(badgeMatch); 15 | if (replacedNames.has(name)) continue; 16 | if (!/\.[tj]sx?$/.test(name)) continue; 17 | replacedNames.add(name); 18 | 19 | const contents = await fs.readFile(name, "utf-8").catch(() => ""); 20 | if (!contents) continue; 21 | 22 | const extension = extname(name).replace(/^\./, ""); 23 | const codeType = 24 | { 25 | tsx: "typescript jsx", 26 | ts: "typescript", 27 | jsx: "javascript jsx", 28 | js: "javascript", 29 | }[extension] || "typescript"; 30 | 31 | const markdown = splitAndJoin(contents, codeType); 32 | 33 | const startIndex = lines.indexOf(badge) + 1; 34 | const remaining = lines.slice(startIndex); 35 | const endIndex = remaining.indexOf(badge); 36 | lines = [ 37 | ...lines.slice(0, startIndex), 38 | `\n${markdown}\n`, 39 | ...remaining.slice(endIndex), 40 | ]; 41 | } 42 | 43 | await fs.writeFile("README.md", lines.join("\n"), "utf-8"); 44 | 45 | function splitAndJoin(code: string, codeType: string) { 46 | const lines = code.split("\n"); 47 | const indexed = Object.entries(lines); 48 | const commentStart = indexed 49 | .filter(([, line]) => /^\s*\/\*/.test(line) && !/^\s*\/\*{2}/.test(line)) 50 | .map(([index]) => +index); 51 | 52 | const blocks = []; 53 | 54 | // Start at the first comment 55 | for (let index = commentStart[0]; index < lines.length; index += 1) { 56 | if (commentStart[0] === index) { 57 | commentStart.shift(); 58 | const endIndex = lines.findIndex( 59 | (line, lineIndex) => lineIndex > index && /\*\/\s*$/.test(line) 60 | ); 61 | if (endIndex === -1) { 62 | throw new Error("Expected to find end of comment"); 63 | } 64 | const comment = lines.slice(index + 1, endIndex).join("\n"); 65 | blocks.push(comment.trim()); 66 | index = endIndex; 67 | } else { 68 | const block = lines 69 | .slice(index, commentStart[0] ?? lines.length + 1) 70 | .join("\n") 71 | .replace(/^\s*export default 1;?\s*$/m, "") 72 | .trim(); 73 | 74 | if (!block) continue; 75 | blocks.push(`\`\`\`${codeType}\n${block}\n\`\`\``); 76 | index = commentStart[0] - 1; 77 | } 78 | } 79 | 80 | return blocks.join("\n\n"); 81 | } 82 | -------------------------------------------------------------------------------- /src/siblings.ts: -------------------------------------------------------------------------------- 1 | import * as jsx from "@virtualstate/focus"; 2 | import {ok} from "./like"; 3 | import {isUnknownJSXNode} from "@virtualstate/focus"; 4 | 5 | export const SiblingMap = Symbol.for("Sibling Map"); 6 | 7 | export interface SiblingsNode { 8 | /** 9 | * @internal use at your own risk 10 | */ 11 | [SiblingMap]: Map; 12 | h: typeof jsx.h; 13 | remove(node: unknown): boolean; 14 | clear(): void; 15 | children: AsyncIterable; 16 | } 17 | 18 | export interface SiblingsOptions { 19 | referenceProperty?: string; 20 | } 21 | 22 | export function createSiblings({ referenceProperty }: SiblingsOptions = {}): SiblingsNode { 23 | let counter = -1; 24 | const siblings = new Map(); 25 | const node = jsx.h(Siblings); 26 | const api: Record = { 27 | h, 28 | remove, 29 | clear, 30 | /** 31 | * @internal use at your own risk 32 | */ 33 | [SiblingMap]: siblings 34 | } 35 | const proxied = new Proxy(node, { 36 | get(t, key) { 37 | if (api[key]) { 38 | return api[key]; 39 | } 40 | return node[key]; 41 | } 42 | }); 43 | ok(proxied); 44 | return proxied; 45 | 46 | function Siblings() { 47 | return [...siblings.entries()] 48 | .sort(([,a], [,b]) => a < b ? -1 : 1) 49 | .map(([node]) => node); 50 | } 51 | function h(source: unknown, options?: Record, ...children: unknown[]) { 52 | const flatChildren = children.flatMap(value => value); 53 | const node = jsx.h(source, options, ...flatChildren); 54 | for (const child of flatChildren) { 55 | if (isUnknownJSXNode(child)) { 56 | siblings.delete(child); 57 | } 58 | } 59 | if (referenceProperty) { 60 | const reference = jsx.properties(node)?.[referenceProperty]; 61 | if (typeof reference === "string" && reference) { 62 | const existing = existingNode(reference); 63 | if (existing) { 64 | const index = siblings.get(existing); 65 | siblings.set(node, index); 66 | remove(existing); 67 | return node; 68 | } 69 | } 70 | } 71 | const index = counter += 1; 72 | siblings.set(node, index); 73 | return node; 74 | } 75 | 76 | function existingNode(reference: string) { 77 | return [...siblings.keys()].find(node => { 78 | return jsx.properties(node)?.[referenceProperty] === reference; 79 | }); 80 | } 81 | 82 | function remove(node: object) { 83 | return siblings.delete(node); 84 | } 85 | function clear() { 86 | siblings.clear(); 87 | } 88 | } -------------------------------------------------------------------------------- /scripts/correct-import-extensions.js: -------------------------------------------------------------------------------- 1 | import FileHound from "filehound"; 2 | import { promises as fs } from "fs"; 3 | import path from "path"; 4 | import { promisify } from "util"; 5 | // 6 | // const packages = await FileHound.create() 7 | // .paths(`packages`) 8 | // .directory() 9 | // .depth(1) 10 | // .find(); 11 | 12 | const buildPaths = ["esnext"]; 13 | 14 | for (const buildPath of buildPaths) { 15 | const filePaths = await FileHound.create() 16 | .paths(buildPath) 17 | .discard("node_modules") 18 | .ext("js") 19 | .find(); 20 | 21 | await Promise.all( 22 | filePaths.map(async (filePath) => { 23 | const initialContents = await fs.readFile(filePath, "utf-8"); 24 | 25 | const statements = initialContents.match( 26 | /(?:(?:import|export)(?: .+ from)? ".+";|(?:import\(".+"\)))/g 27 | ); 28 | 29 | if (!statements) { 30 | return; 31 | } 32 | 33 | const importMap = process.env.IMPORT_MAP 34 | ? JSON.parse(await fs.readFile(process.env.IMPORT_MAP, "utf-8")) 35 | : undefined; 36 | const contents = await statements.reduce( 37 | async (contentsPromise, statement) => { 38 | const contents = await contentsPromise; 39 | const url = statement.match(/"(.+)"/)[1]; 40 | if (importMap?.imports?.[url]) { 41 | const replacement = importMap.imports[url]; 42 | if (!replacement.includes("./src")) { 43 | return contents.replace( 44 | statement, 45 | statement.replace(url, replacement) 46 | ); 47 | } 48 | const shift = filePath 49 | .split("/") 50 | // Skip top folder + file 51 | .slice(2) 52 | // Replace with shift up directory 53 | .map(() => "..") 54 | .join("/"); 55 | return contents.replace( 56 | statement, 57 | statement.replace( 58 | url, 59 | replacement.replace("./src", shift).replace(/\.tsx?$/, ".js") 60 | ) 61 | ); 62 | } else { 63 | return contents.replace(statement, await getReplacement(url)); 64 | } 65 | 66 | async function getReplacement(url) { 67 | const [stat, indexStat] = await Promise.all([ 68 | fs 69 | .stat(path.resolve(path.dirname(filePath), url + ".js")) 70 | .catch(() => {}), 71 | fs 72 | .stat(path.resolve(path.dirname(filePath), url + "/index.js")) 73 | .catch(() => {}), 74 | ]); 75 | 76 | if (stat && stat.isFile()) { 77 | return statement.replace(url, url + ".js"); 78 | } else if (indexStat && indexStat.isFile()) { 79 | return statement.replace(url, url + "/index.js"); 80 | } 81 | return statement; 82 | } 83 | }, 84 | Promise.resolve(initialContents) 85 | ); 86 | 87 | await fs.writeFile(filePath, contents, "utf-8"); 88 | }) 89 | ); 90 | } 91 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at [conduct+axiom@fabiancook.dev](mailto:conduct+axiom@fabiancook.dev). All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@virtualstate/ore", 3 | "version": "1.0.1-alpha.9", 4 | "main": "./esnext/index.js", 5 | "module": "./esnext/index.js", 6 | "types": "./esnext/index.d.ts", 7 | "typesVersions": { 8 | "*": { 9 | "*": [ 10 | "./esnext/index.d.ts" 11 | ], 12 | "tests": [ 13 | "./esnext/tests/index.d.ts" 14 | ] 15 | } 16 | }, 17 | "type": "module", 18 | "sideEffects": false, 19 | "keywords": [], 20 | "exports": { 21 | ".": "./esnext/index.js", 22 | "./tests": "./esnext/tests/index.js" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "git+https://github.com/virtualstate/ore.git" 27 | }, 28 | "bugs": { 29 | "url": "https://github.com/virtualstate/ore/issues" 30 | }, 31 | "homepage": "https://github.com/virtualstate/ore#readme", 32 | "author": "Fabian Cook ", 33 | "license": "MIT", 34 | "dependencies": { 35 | "@virtualstate/focus": "^1.0.1-alpha.85", 36 | "@virtualstate/promise": "^1.1.2", 37 | "abort-controller": "^3.0.0", 38 | "uuid": "^8.3.2", 39 | "whatwg-url": "^9.1.0" 40 | }, 41 | "devDependencies": { 42 | "@babel/cli": "^7.15.4", 43 | "@babel/core": "^7.15.4", 44 | "@babel/preset-env": "^7.15.4", 45 | "@opennetwork/http-representation": "^3.0.0", 46 | "@rollup/plugin-node-resolve": "^13.1.1", 47 | "@rollup/plugin-typescript": "^8.3.0", 48 | "@types/chance": "^1.1.3", 49 | "@types/jest": "^27.0.1", 50 | "@types/mkdirp": "^1.0.2", 51 | "@types/node": "^17.0.1", 52 | "@types/rimraf": "^3.0.2", 53 | "@types/uuid": "^8.3.3", 54 | "@types/whatwg-url": "^8.2.1", 55 | "@virtualstate/dom": "^2.46.0", 56 | "@virtualstate/examples": "^2.46.0", 57 | "@virtualstate/fringe": "^2.46.1", 58 | "@virtualstate/hooks": "^2.46.0", 59 | "@virtualstate/hooks-extended": "^2.46.0", 60 | "@virtualstate/kdl": "^1.0.1-alpha.29", 61 | "@virtualstate/union": "^2.46.0", 62 | "@virtualstate/x": "^2.46.0", 63 | "c8": "^7.10.0", 64 | "chance": "^1.1.8", 65 | "change-case": "^4.1.2", 66 | "cheerio": "^1.0.0-rc.10", 67 | "core-js": "^3.17.2", 68 | "dom-lite": "^20.2.0", 69 | "dotenv": "^16.0.0", 70 | "filehound": "^1.17.4", 71 | "jest": "^27.1.0", 72 | "jest-playwright-preset": "^1.7.0", 73 | "mkdirp": "^1.0.4", 74 | "playwright": "^1.17.1", 75 | "rimraf": "^3.0.2", 76 | "rollup": "^2.61.1", 77 | "rollup-plugin-babel": "^4.4.0", 78 | "rollup-plugin-ignore": "^1.0.10", 79 | "source-map-support": "^0.5.21", 80 | "ts-jest": "^27.0.5", 81 | "ts-node": "^10.2.1", 82 | "typescript": "^4.4.3", 83 | "urlpattern-polyfill": "^1.0.0-rc2", 84 | "v8-to-istanbul": "^8.1.0" 85 | }, 86 | "scripts": { 87 | "build": "rm -rf esnext && tsc", 88 | "postbuild": "mkdir -p coverage && node scripts/post-build.js", 89 | "generate": "yarn build && node esnext/generate.js", 90 | "prepublishOnly": "npm run build", 91 | "test": "yarn build && export $(cat .env | xargs) && node --enable-source-maps esnext/tests/index.js", 92 | "test:deno": "yarn build && export $(cat .env | xargs) && deno run --allow-write --allow-env --allow-read --allow-net --import-map=import-map-deno.json esnext/tests/index.js", 93 | "test:deno:r": "yarn build && export $(cat .env | xargs) && deno run -r --allow-write --allow-env --allow-read --allow-net --import-map=import-map-deno.json esnext/tests/index.js", 94 | "test:inspect": "yarn build && export $(cat .env | xargs) && node --enable-source-maps --inspect-brk esnext/tests/index.js", 95 | "coverage": "yarn build && export $(cat .env | xargs) && c8 node esnext/tests/index.js && yarn postbuild" 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /scripts/post-build.js: -------------------------------------------------------------------------------- 1 | import "./correct-import-extensions.js"; 2 | import { promises as fs } from "fs"; 3 | import { rollup } from "rollup"; 4 | import { nodeResolve } from "@rollup/plugin-node-resolve"; 5 | import ignore from "rollup-plugin-ignore"; 6 | import babel from "rollup-plugin-babel"; 7 | import { dirname, resolve } from "path"; 8 | 9 | await import("../esnext/trying-to-write-documentation/readme-generator.js"); 10 | 11 | const { pathname } = new URL(import.meta.url); 12 | const cwd = resolve(dirname(pathname), ".."); 13 | 14 | { 15 | // /Volumes/Extreme/Users/fabian/src/virtualstate/esnext/tests/app-history.playwright.wpt.js 16 | // /Volumes/Extreme/Users/fabian/src/virtualstate/app-history/esnext/tests/app-history.playwright.wpt.js 17 | 18 | console.log({ 19 | cwd, 20 | path: 21 | `/Volumes/Extreme/Users/fabian/src/virtualstate/app-history/esnext/tests/app-history.playwright.wpt.js` === 22 | `${cwd}/esnext/tests/app-history.playwright.wpt.js`, 23 | p: `${cwd}/esnext/tests/app-history.playwright.wpt.js`, 24 | }); 25 | 26 | const bundle = await rollup({ 27 | input: "./esnext/tests/index.js", 28 | plugins: [ 29 | ignore([ 30 | "playwright", 31 | "fs", 32 | "path", 33 | "uuid", 34 | "cheerio", 35 | "@virtualstate/app-history", 36 | "@virtualstate/app-history-imported", 37 | `${cwd}/esnext/tests/app-history.playwright.js`, 38 | `${cwd}/esnext/tests/app-history.playwright.wpt.js`, 39 | `${cwd}/esnext/tests/dependencies-input.js`, 40 | `${cwd}/esnext/tests/dependencies.js`, 41 | "./app-history.playwright.js", 42 | "./app-history.playwright.wpt.js", 43 | ]), 44 | nodeResolve(), 45 | ], 46 | inlineDynamicImports: true, 47 | treeshake: { 48 | preset: "smallest", 49 | moduleSideEffects: "no-external", 50 | }, 51 | }); 52 | await bundle.write({ 53 | sourcemap: true, 54 | output: { 55 | file: "./esnext/tests/rollup.js", 56 | }, 57 | inlineDynamicImports: true, 58 | format: "cjs", 59 | interop: "auto", 60 | globals: { 61 | "esnext/tests/app-history.playwright.js": "globalThis", 62 | }, 63 | }); 64 | } 65 | 66 | if (!process.env.NO_COVERAGE_BADGE_UPDATE) { 67 | const badges = []; 68 | 69 | const { name } = await fs.readFile("package.json", "utf-8").then(JSON.parse); 70 | 71 | badges.push( 72 | "### Support\n\n", 73 | "![Node.js supported](https://img.shields.io/badge/node-%3E%3D16.0.0-blue)", 74 | "![Deno supported](https://img.shields.io/badge/deno-%3E%3D1.17.0-blue)" 75 | // "![Chromium supported](https://img.shields.io/badge/chromium-%3E%3D98.0.4695.0-blue)", 76 | // "![Webkit supported](https://img.shields.io/badge/webkit-%3E%3D15.4-blue)", 77 | // "![Firefox supported](https://img.shields.io/badge/firefox-%3E%3D94.0.1-blue)" 78 | ); 79 | 80 | badges.push( 81 | "\n\n### Test Coverage\n\n" 82 | // `![nycrc config on GitHub](https://img.shields.io/nycrc/${name.replace(/^@/, "")})` 83 | ); 84 | 85 | // const wptResults = await fs 86 | // .readFile("coverage/wpt.results.json", "utf8") 87 | // .then(JSON.parse) 88 | // .catch(() => ({})); 89 | // if (wptResults?.total) { 90 | // const message = `${wptResults.pass}/${wptResults.total}`; 91 | // const name = "Web Platform Tests"; 92 | // badges.push( 93 | // `![${name} ${message}](https://img.shields.io/badge/${encodeURIComponent( 94 | // name 95 | // )}-${encodeURIComponent(message)}-brightgreen)` 96 | // ); 97 | // } 98 | 99 | const coverage = await fs 100 | .readFile("coverage/coverage-summary.json", "utf8") 101 | .then(JSON.parse) 102 | .catch(() => ({})); 103 | const coverageConfig = await fs.readFile(".nycrc", "utf8").then(JSON.parse); 104 | for (const [name, { pct }] of Object.entries(coverage?.total ?? {})) { 105 | const good = coverageConfig[name]; 106 | if (!good) continue; // not configured 107 | const color = pct >= good ? "brightgreen" : "yellow"; 108 | const message = `${pct}%25`; 109 | badges.push( 110 | `![${message} ${name} covered](https://img.shields.io/badge/${name}-${message}-${color})` 111 | ); 112 | } 113 | 114 | const tag = "[//]: # (badges)"; 115 | 116 | const readMe = await fs.readFile("README.md", "utf8"); 117 | const badgeStart = readMe.indexOf(tag); 118 | const badgeStartAfter = badgeStart + tag.length; 119 | if (badgeStart === -1) { 120 | throw new Error(`Expected to find "${tag}" in README.md`); 121 | } 122 | const badgeEnd = badgeStartAfter + readMe.slice(badgeStartAfter).indexOf(tag); 123 | const badgeEndAfter = badgeEnd + tag.length; 124 | const readMeBefore = readMe.slice(0, badgeStart); 125 | const readMeAfter = readMe.slice(badgeEndAfter); 126 | 127 | const readMeNext = `${readMeBefore}${tag}\n\n${badges.join( 128 | " " 129 | )}\n\n${tag}${readMeAfter}`; 130 | await fs.writeFile("README.md", readMeNext); 131 | console.log("Wrote coverage badges!"); 132 | } 133 | -------------------------------------------------------------------------------- /import-map-deno.json: -------------------------------------------------------------------------------- 1 | { 2 | "imports": { 3 | "@opennetwork/http-representation": "https://cdn.skypack.dev/@opennetwork/http-representation", 4 | "@virtualstate/astro-renderer": "https://cdn.skypack.dev/@virtualstate/astro-renderer", 5 | "@virtualstate/dom": "https://cdn.skypack.dev/@virtualstate/dom", 6 | "@virtualstate/examples": "https://cdn.skypack.dev/@virtualstate/examples", 7 | "@virtualstate/fringe": "https://cdn.skypack.dev/@virtualstate/fringe", 8 | "@virtualstate/hooks": "https://cdn.skypack.dev/@virtualstate/hooks", 9 | "@virtualstate/hooks-extended": "https://cdn.skypack.dev/@virtualstate/hooks-extended", 10 | "@virtualstate/union": "https://cdn.skypack.dev/@virtualstate/union", 11 | "@virtualstate/x": "https://cdn.skypack.dev/@virtualstate/x", 12 | "@virtualstate/kdl": "https://cdn.skypack.dev/@virtualstate/kdl", 13 | "@virtualstate/promise": "https://cdn.skypack.dev/@virtualstate/promise", 14 | "@virtualstate/promise/the-thing": "https://cdn.skypack.dev/@virtualstate/promise/the-thing", 15 | "@virtualstate/focus": "https://cdn.skypack.dev/@virtualstate/focus", 16 | "@virtualstate/app-history": "./src/app-history.ts", 17 | "@virtualstate/app-history/polyfill": "./src/polyfill.ts", 18 | "@virtualstate/app-history/event-target/sync": "./src/event-target/sync-event-target.ts", 19 | "@virtualstate/app-history/event-target/async": "./src/event-target/async-event-target.ts", 20 | "@virtualstate/app-history/event-target": "./src/event-target/sync-event-target.ts", 21 | "@virtualstate/app-history-imported": "./src/app-history.ts", 22 | "@virtualstate/app-history-imported/polyfill": "./src/polyfill.ts", 23 | "@virtualstate/app-history-imported/event-target/sync": "./src/event-target/sync-event-target.ts", 24 | "@virtualstate/app-history-imported/event-target/async": "./src/event-target/async-event-target.ts", 25 | "@virtualstate/app-history-imported/event-target": "./src/event-target/sync-event-target.ts", 26 | "dom-lite": "https://cdn.skypack.dev/dom-lite", 27 | "iterable": "https://cdn.skypack.dev/iterable@6.0.1-beta.5", 28 | "https://cdn.skypack.dev/-/iterable@v5.7.0-CNtyuMJo9f2zFu6CuB1D/dist=es2019,mode=imports/optimized/iterable.js": "https://cdn.skypack.dev/iterable@6.0.1-beta.5", 29 | "uuid": "./src/util/deno-uuid.ts", 30 | "whatwg-url": "https://cdn.skypack.dev/whatwg-url", 31 | "change-case": "https://cdn.skypack.dev/change-case", 32 | "abort-controller": "https://cdn.skypack.dev/abort-controller", 33 | "deno:std/uuid/mod": "https://deno.land/std@0.113.0/uuid/mod.ts", 34 | "deno:std/uuid/v4": "https://deno.land/std@0.113.0/uuid/v4.ts", 35 | "deno:deno_dom/deno-dom-wasm.ts": "https://deno.land/x/deno_dom/deno-dom-wasm.ts", 36 | "urlpattern-polyfill": "https://cdn.skypack.dev/urlpattern-polyfill", 37 | "./src/tests/examples": "./src/tests/examples/index.ts", 38 | "./src/tests/examples/jsx": "./src/tests/examples/jsx.tsx", 39 | "./src/tests/examples/fetch": "./src/tests/examples/fetch.ts", 40 | "./src/tests/examples/readme-detailed": "./src/tests/examples/readme-detailed.tsx", 41 | "./src/tests/app-history.class": "./src/tests/app-history.class.ts", 42 | "./src/tests/app-history.imported": "./src/tests/app-history.imported.ts", 43 | "./src/tests/app-history.scope": "./src/tests/app-history.scope.ts", 44 | "./src/tests/app-history": "./src/tests/app-history.tsx", 45 | "./src/tests/node-process": "./src/tests/default-process.ts", 46 | "./src/tests/imported": "./src/tests/imported.ts", 47 | "./src/tests/config": "./src/tests/config.ts", 48 | "./src/tests/util": "./src/tests/util.ts", 49 | "./src/app-history": "./src/app-history.ts", 50 | "./src/app-history-entry": "./src/app-history-entry.ts", 51 | "./src/spec/app-history": "./src/spec/app-history.ts", 52 | "./src/app-history-errors": "./src/app-history-errors.ts", 53 | "./src/app-history-event-target": "./src/app-history-event-target.ts", 54 | "./src/app-history-transition": "./src/app-history-transition.ts", 55 | "./src/create-app-history-transition": "./src/create-app-history-transition.ts", 56 | "./src/util/deferred": "./src/util/deferred.ts", 57 | "./src/util/deno-uuid": "./src/util/deno-uuid.ts", 58 | "./src/util/uuid-or-random": "./src/util/uuid-or-random.ts", 59 | "./src/util/parse-dom-deno": "./src/util/parse-dom-deno.ts", 60 | "./src/util/parse-dom": "./src/util/parse-dom-deno.ts", 61 | "./src/index": "./src/index.ts", 62 | "./src/util/writable": "./src/util/writable.ts", 63 | "./src": "./src/index.ts", 64 | "./src/event-target": "./src/event-target/index.ts", 65 | "./src/event-target/callback": "./src/event-target/callback.ts", 66 | "./src/event-target/context": "./src/event-target/context.ts", 67 | "./src/event-target/global": "./src/event-target/global.ts", 68 | "./src/event-target/descriptor": "./src/event-target/descriptor.ts", 69 | "./src/event-target/event": "./src/event-target/event.ts", 70 | "./src/event-target/create-event": "./src/event-target/create-event.ts", 71 | "./src/event-target/event-target": "./src/event-target/event-target.ts", 72 | "./src/event-target/async-event-target": "./src/event-target/async-event-target.ts", 73 | "./src/event-target/sync-event-target": "./src/event-target/sync-event-target.ts", 74 | "./src/event-target/event-target-options": "./src/event-target/event-target-options.ts", 75 | "./src/event-target/event-target-listeners": "./src/event-target/event-target-listeners.ts", 76 | "./src/event-target/index": "./src/event-target/index.ts", 77 | "./src/event-target/parallel-event": "./src/event-target/parallel-event.ts", 78 | "./src/event-target/respond-event": "./src/event-target/respond-event.ts", 79 | "./src/event-target/signal-event": "./src/event-target/signal-event.ts", 80 | "./src/event-target/transition-event": "./src/event-target/transition-event.ts", 81 | "./src/util/import-types": "./src/util/import-types.ts", 82 | "./src/polyfill": "./src/polyfill.ts", 83 | "./src/location": "./src/location.ts", 84 | "./src/history": "./src/history.ts", 85 | "./esnext/util/parse-dom-deno.js": "./esnext/util/parse-dom-deno.ts", 86 | "./esnext/util/parse-dom.js": "./esnext/util/parse-dom-deno.ts", 87 | "@virtualstate/ore": "./esnext/index.js", 88 | "cheerio": "./scripts/nop/index.js" 89 | } 90 | } 91 | --------------------------------------------------------------------------------