├── packages ├── .gitkeep ├── react │ ├── use-strict-lifecycle │ │ ├── README.md │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ └── index.ts │ ├── react │ │ ├── src │ │ │ ├── modifiers │ │ │ │ └── README.md │ │ │ ├── polyfill.ts │ │ │ ├── debug │ │ │ │ └── warnings.ts │ │ │ └── starbeam │ │ │ │ └── instance.ts │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── data-demo.spec.ts │ │ │ ├── tsconfig.json │ │ │ ├── support │ │ │ │ └── render.ts │ │ │ ├── service.spec.ts │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── BRIDGING.md │ │ ├── index.ts │ │ ├── tsconfig.json │ │ └── GLOSSARY.md │ ├── .gitignore │ └── test-utils │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ ├── tsconfig.json │ │ └── src │ │ └── act.ts ├── universal │ ├── interfaces │ │ ├── .gitkeep │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── src │ │ │ ├── utils.ts │ │ │ ├── timestamp.ts │ │ │ └── debug │ │ │ │ └── call-stack.ts │ │ ├── tsconfig.json │ │ ├── index.ts │ │ └── package.json │ ├── tags │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ ├── tsconfig.json │ │ └── src │ │ │ └── tagged.ts │ ├── collections │ │ ├── src │ │ │ └── mapper.ts │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── CHANGELOG.md │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ └── tsconfig.json │ ├── universal │ │ ├── src │ │ │ ├── reactive-core │ │ │ │ ├── value-entry.ts │ │ │ │ └── higher-level │ │ │ │ │ └── formula-list.ts │ │ │ └── debug-renderer.ts │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── CHANGELOG.md │ │ │ ├── tsconfig.json │ │ │ ├── package.json │ │ │ └── cell.spec.ts │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ └── index.ts │ ├── core │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ ├── tsconfig.json │ │ └── package.json │ ├── debug │ │ ├── .npmrc │ │ ├── .npmcheckrc.json │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── CHANGELOG.md │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ ├── package.json │ │ │ ├── description.spec.ts │ │ │ └── stack.spec.ts │ │ ├── src │ │ │ ├── call-stack │ │ │ │ ├── debug │ │ │ │ │ └── index.ts │ │ │ │ └── prod.ts │ │ │ ├── description │ │ │ │ ├── prod.ts │ │ │ │ └── debug │ │ │ │ │ └── index.ts │ │ │ ├── setup.ts │ │ │ └── logger.ts │ │ ├── stacktracey.tgz │ │ ├── rollup.config.mjs │ │ ├── .eslintrc.json │ │ ├── index.ts │ │ └── tsconfig.json │ ├── core-utils │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tests │ │ │ ├── .eslintrc.json │ │ │ ├── object.spec.ts │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── README.md │ │ ├── src │ │ │ ├── function.ts │ │ │ ├── value.ts │ │ │ ├── array.tst.ts │ │ │ ├── json.ts │ │ │ └── iterable.tst.ts │ │ ├── tsconfig.json │ │ └── package.json │ ├── modifier │ │ ├── .npmrc │ │ ├── index.ts │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ └── tsconfig.json │ ├── reactive │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── cell.spec.ts │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ ├── src │ │ │ └── primitives │ │ │ │ └── marker.ts │ │ └── index.ts │ ├── renderer │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── CHANGELOG.md │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ ├── src │ │ │ └── resource.ts │ │ └── index.ts │ ├── resource │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ ├── index.ts │ │ └── README2.md │ ├── runtime │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── CHANGELOG.md │ │ │ ├── tsconfig.json │ │ │ ├── package.json │ │ │ └── support │ │ │ │ └── testing.ts │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ ├── src │ │ │ └── timeline │ │ │ │ └── utils.ts │ │ └── index.ts │ ├── service │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── index.ts │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ └── tsconfig.json │ ├── shared │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── CHANGELOG.md │ │ │ ├── now.spec.ts │ │ │ ├── tsconfig.json │ │ │ ├── package.json │ │ │ └── stack.spec.ts │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── src │ │ │ ├── types.ts │ │ │ ├── testing.ts │ │ │ ├── stack.ts │ │ │ ├── id.ts │ │ │ ├── constants.ts │ │ │ └── now.ts │ │ ├── tsconfig.json │ │ └── index.ts │ ├── verify │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── CHANGELOG.md │ │ │ ├── tsconfig.json │ │ │ ├── basic.spec.ts │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ ├── src │ │ │ └── assertions │ │ │ │ ├── type-utils.ts │ │ │ │ └── multi.ts │ │ └── package.json │ └── .gitignore ├── x │ ├── headless-form │ │ ├── index.ts │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── CHANGELOG.md │ │ ├── tsconfig.json │ │ └── package.json │ ├── vanilla │ │ ├── .eslintignore │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── env.ts │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ ├── bench │ │ │ ├── .babelrc │ │ │ ├── README.md │ │ │ ├── vite.config.js │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ ├── index.js │ │ │ ├── src │ │ │ │ ├── env.js │ │ │ │ ├── react-non-reactive.jsx │ │ │ │ ├── vanilla-starbeam.js │ │ │ │ ├── react-starbeam.jsx │ │ │ │ └── glimmer-non-reactive.js │ │ │ ├── index.html │ │ │ └── package.json │ │ ├── tsconfig.json │ │ ├── README.md │ │ └── src │ │ │ └── cursor.ts │ └── store │ │ ├── .npmrc │ │ ├── tests │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── CHANGELOG.md │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── data.ts │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ └── tsconfig.json ├── vue │ ├── vue │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ ├── src │ │ │ ├── setup.ts │ │ │ └── resource.ts │ │ └── tsconfig.json │ └── vue-testing-utils │ │ ├── .npmrc │ │ ├── tests │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── tsconfig.json │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ └── tsconfig.json ├── preact │ ├── preact │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── src │ │ │ ├── setup.ts │ │ │ └── create.ts │ │ ├── index.ts │ │ └── tsconfig.json │ ├── preact-utils │ │ ├── .npmrc │ │ ├── tests │ │ │ ├── .npmrc │ │ │ ├── .eslintrc.json │ │ │ ├── reactive.spec.ts │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── tsconfig.json │ │ └── index.ts │ └── preact-testing-utils │ │ ├── .npmrc │ │ ├── tests │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── tsconfig.json │ │ ├── testing.spec.ts │ │ └── package.json │ │ ├── .eslintrc.json │ │ ├── rollup.config.mjs │ │ ├── index.ts │ │ └── tsconfig.json ├── tsconfig.specs.json ├── tsconfig.packages.json ├── tsconfig.rollup.json └── env.d.ts ├── CHANGELOG.md ├── .npmrc ├── .prettierrc ├── .vscode ├── tasks.json └── extensions.json ├── @types ├── .gitignore ├── fsify │ ├── .npmrc │ ├── .eslintrc.json │ ├── tsconfig.json │ └── package.json ├── ansicolor │ ├── .npmrc │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── package.json │ └── index.d.ts ├── shell-split │ ├── .npmrc │ ├── index.d.ts │ ├── .eslintrc.json │ ├── tsconfig.json │ └── package.json ├── vite-env │ ├── .npmrc │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── index.d.ts │ └── package.json ├── lines-and-columns │ ├── .npmrc │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── index.d.ts │ └── package.json ├── plugin-commonjs │ ├── .npmrc │ ├── .eslintrc.json │ ├── index.d.ts │ ├── tsconfig.json │ └── package.json ├── shell-escape-tag │ ├── .npmrc │ ├── .eslintrc.json │ ├── index.d.ts │ ├── tsconfig.json │ └── package.json ├── tsconfig.json ├── plugin-node-resolve │ ├── .npmrc │ ├── .eslintrc.json │ ├── index.d.ts │ ├── tsconfig.json │ └── package.json └── rollup-plugin-polyfill-node │ ├── .npmrc │ ├── .eslintrc.json │ ├── index.d.ts │ ├── tsconfig.json │ └── package.json ├── workspace ├── @domtree │ ├── any │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── CHANGELOG.md │ ├── browser │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── tsconfig.json │ │ ├── CHANGELOG.md │ │ └── package.json │ ├── flavors │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── index.ts │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── CHANGELOG.md │ ├── interface │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── tsconfig.json │ │ ├── CHANGELOG.md │ │ ├── index.ts │ │ └── package.json │ └── minimal │ │ ├── .npmrc │ │ ├── .eslintrc.json │ │ ├── tsconfig.json │ │ ├── CHANGELOG.md │ │ └── package.json ├── test-utils │ ├── .npmrc │ ├── .eslintrc.json │ ├── rollup.config.mjs │ ├── src │ │ ├── utils.ts │ │ └── index.ts │ └── tsconfig.json ├── dev-compile │ ├── pnpm-workspace.yaml │ ├── .gitignore │ ├── .eslintrc.json │ ├── src │ │ ├── rollup │ │ │ ├── ts.ts │ │ │ └── utils.ts │ │ ├── index.ts │ │ └── constants.ts │ ├── README.md │ ├── .editorconfig │ ├── tsconfig.json │ └── .release-plan.json ├── unstable-release │ ├── .npmrc │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── src │ │ ├── read-package-json.js │ │ └── workspaces.js │ └── package.json ├── scripts │ └── package.json └── tsconfig.json ├── .npmcheckrc.json ├── rollup.config.mjs ├── coverage └── lcov-report │ ├── favicon.png │ ├── sort-arrow-sprite.png │ └── prettify.css ├── .config ├── tsconfig │ ├── tsconfig.react-demo.json │ ├── tsconfig.preact-demo.json │ ├── tsconfig.vite.json │ ├── tsconfig.demo.json │ ├── tsconfig.packages.json │ └── tsconfig.shared.json ├── tsconfig.json └── eslintrc.json ├── .scratch ├── todo.md ├── paths.js └── stylize.js ├── .eslintignore ├── HOUSEKEEPING.md ├── .gitignore ├── vitest.config.mts ├── .editorconfig ├── FRICTION.md ├── .quokka ├── pnpm-workspace.yaml ├── tsconfig.json ├── .knip.json ├── .eslintrc.json ├── turbo.json └── .github └── workflows └── publish-unstable.yml /packages/.gitkeep: -------------------------------------------------------------------------------- 1 | env.d.ts -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/universal/interfaces/.gitkeep: -------------------------------------------------------------------------------- 1 | *.d.ts -------------------------------------------------------------------------------- /packages/x/headless-form/index.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /packages/x/vanilla/.eslintignore: -------------------------------------------------------------------------------- 1 | /bench/ 2 | -------------------------------------------------------------------------------- /packages/universal/tags/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/universal/collections/src/mapper.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/tags/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .turbo 3 | dist -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [], 3 | "version": "2.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /@types/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.js.map 3 | *.d.ts.map 4 | @domtree/**/*.d.ts 5 | -------------------------------------------------------------------------------- /packages/universal/universal/src/reactive-core/value-entry.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /@types/fsify/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/react/react/src/modifiers/README.md: -------------------------------------------------------------------------------- 1 | Modifiers are under construction. 2 | -------------------------------------------------------------------------------- /@types/ansicolor/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/shell-split/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/vite-env/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/vue/vue/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/x/store/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/x/vanilla/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/lines-and-columns/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/plugin-commonjs/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/shell-escape-tag/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.config/tsconfig/tsconfig.shared.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/preact/preact/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/react/react/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/core/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/debug/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/tags/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/vue/vue/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/x/headless-form/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/x/store/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/x/vanilla/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/@domtree/any/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/test-utils/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/plugin-node-resolve/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/preact/preact/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/react/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.js.map 3 | *.jsx 4 | *.jsx.map 5 | *.d.ts 6 | *.d.ts.map 7 | -------------------------------------------------------------------------------- /packages/react/react/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/react/test-utils/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/core-utils/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/interfaces/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/modifier/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/modifier/index.ts: -------------------------------------------------------------------------------- 1 | export { ElementPlaceholder } from "./src/modifier.js"; 2 | -------------------------------------------------------------------------------- /packages/universal/reactive/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/renderer/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/resource/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/runtime/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/service/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/shared/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/universal/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/verify/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/@domtree/browser/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/@domtree/flavors/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/@domtree/interface/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/@domtree/minimal/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/dev-compile/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: [".", "@types/*", ".yalc/*", ".yalc/@*/*"] 2 | -------------------------------------------------------------------------------- /workspace/unstable-release/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /@types/rollup-plugin-polyfill-node/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/collections/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/debug/.npmcheckrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "depcheck": { "ignoreMatches": ["buffer"] } 3 | } 4 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/reactive/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/renderer/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/resource/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/runtime/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/service/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/universal/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/verify/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /workspace/dev-compile/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.tsbuildinfo 3 | dist 4 | .yalc 5 | yalc.lock 6 | -------------------------------------------------------------------------------- /.npmcheckrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "depcheck": { 3 | "parsers": { 4 | "*.css": "css" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/collections/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/tests/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=true 3 | -------------------------------------------------------------------------------- /packages/universal/service/index.ts: -------------------------------------------------------------------------------- 1 | export { getServiceFormula, Service, service } from "./src/service.js"; 2 | -------------------------------------------------------------------------------- /@types/shell-split/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const DEFAULT: (command: string) => string[]; 2 | export default DEFAULT; 3 | -------------------------------------------------------------------------------- /rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /@types/fsify/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /coverage/lcov-report/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starbeamjs/starbeam/HEAD/coverage/lcov-report/favicon.png -------------------------------------------------------------------------------- /@types/ansicolor/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/shell-split/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/vite-env/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/vue/vue/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/store/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/vanilla/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/lines-and-columns/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/plugin-commonjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/preact/preact/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/react/react/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/core/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/tags/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/vue/vue/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/vue/vue/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/headless-form/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/store/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/x/store/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/vanilla/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/@domtree/any/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/dev-compile/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/test-utils/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/plugin-node-resolve/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/preact/preact/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/react/react/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/react/react/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/react/test-utils/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/core-utils/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/debug/src/call-stack/debug/index.ts: -------------------------------------------------------------------------------- 1 | import { callerStack } from "./stack.js"; 2 | 3 | export default callerStack; 4 | -------------------------------------------------------------------------------- /packages/universal/debug/stacktracey.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starbeamjs/starbeam/HEAD/packages/universal/debug/stacktracey.tgz -------------------------------------------------------------------------------- /packages/universal/interfaces/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/modifier/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/reactive/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/renderer/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/resource/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/runtime/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/service/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/shared/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/universal/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/verify/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/vanilla/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /workspace/@domtree/browser/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/@domtree/flavors/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/@domtree/interface/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/@domtree/minimal/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /workspace/test-utils/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /workspace/unstable-release/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/rollup-plugin-polyfill-node/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /coverage/lcov-report/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starbeamjs/starbeam/HEAD/coverage/lcov-report/sort-arrow-sprite.png -------------------------------------------------------------------------------- /packages/preact/preact-utils/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/preact/preact/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/react/test-utils/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.js.map 3 | *.jsx 4 | *.jsx.map 5 | *.d.ts 6 | *.d.ts.map 7 | !env.d.ts 8 | !interfaces/**/*.d.ts 9 | -------------------------------------------------------------------------------- /packages/universal/collections/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/core/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/debug/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/reactive/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/renderer/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/resource/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/runtime/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/runtime/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/service/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/service/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/shared/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/tags/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/universal/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/verify/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/verify/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/headless-form/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/react/react/src/polyfill.ts: -------------------------------------------------------------------------------- 1 | if (typeof process === "undefined") { 2 | globalThis.process = {} as never; 3 | } 4 | 5 | export {}; 6 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/collections/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/collections/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/core-utils/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/core-utils/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/universal/modifier/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/reactive/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/renderer/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/resource/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/universal/universal/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/x/vanilla/index.ts: -------------------------------------------------------------------------------- 1 | export { Cursor } from "./src/cursor.js"; 2 | export { Attr, Element as El, Fragment, Text } from "./src/dom.js"; 3 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/preact/preact/src/setup.ts: -------------------------------------------------------------------------------- 1 | import { options } from "preact"; 2 | 3 | import { install } from "./options.js"; 4 | 5 | install(options); 6 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/rollup.config.mjs: -------------------------------------------------------------------------------- 1 | import { compile } from "@starbeam-dev/compile"; 2 | 3 | export default compile(import.meta); 4 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"] 4 | } 5 | -------------------------------------------------------------------------------- /@types/rollup-plugin-polyfill-node/index.d.ts: -------------------------------------------------------------------------------- 1 | import type Plugin from "rollup"; 2 | 3 | declare const plugin: () => Plugin; 4 | 5 | export default plugin; 6 | -------------------------------------------------------------------------------- /packages/react/react/BRIDGING.md: -------------------------------------------------------------------------------- 1 | # Bridging Starbeam Reactivity and React Reactivity 2 | 3 | ## Both are Pull-Based 4 | 5 | ## We Still Need to Notify React 6 | -------------------------------------------------------------------------------- /packages/universal/core-utils/README.md: -------------------------------------------------------------------------------- 1 | This package contains basic JavaScript utilities. It should not have any dependencies on other 2 | Starbeam packages. 3 | -------------------------------------------------------------------------------- /.config/tsconfig/tsconfig.react-demo.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.shared.json", 3 | "compilerOptions": { "composite": false, "jsx": "react-jsx" } 4 | } 5 | -------------------------------------------------------------------------------- /@types/plugin-commonjs/index.d.ts: -------------------------------------------------------------------------------- 1 | import type Plugin from "@rollup/plugin-commonjs"; 2 | 3 | declare const plugin: () => Plugin; 4 | 5 | export default plugin; 6 | -------------------------------------------------------------------------------- /packages/universal/debug/src/description/prod.ts: -------------------------------------------------------------------------------- 1 | import type { DescFn } from "@starbeam/interfaces"; 2 | 3 | export default (() => undefined) satisfies DescFn; 4 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@glimmer/babel-preset", { "isDebug": true }], 4 | ["@babel/preset-react", {}] 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.scratch/todo.md: -------------------------------------------------------------------------------- 1 | When running a query command, provide some progress indication as the commands 2 | go by. 3 | 4 | Invesitgate why `vitest` doesn't exist on import.meta. -------------------------------------------------------------------------------- /@types/plugin-node-resolve/index.d.ts: -------------------------------------------------------------------------------- 1 | import type Plugin from "@rollup/plugin-node-resolve"; 2 | 3 | declare const plugin: () => Plugin; 4 | 5 | export default plugin; 6 | -------------------------------------------------------------------------------- /packages/vue/vue/index.ts: -------------------------------------------------------------------------------- 1 | export { setupReactive, setupResource, setupService } from "./src/resource.js"; 2 | export { Starbeam, useReactive } from "./src/setup.js"; 3 | -------------------------------------------------------------------------------- /packages/universal/core-utils/src/function.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 2 | export type UnknownFn = (...args: readonly any[]) => unknown; 3 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/index.ts: -------------------------------------------------------------------------------- 1 | export type { EventMap, IfAny } from "./src/testing.js"; 2 | export { App, Define, HTML as HTML, renderApp } from "./src/testing.js"; 3 | -------------------------------------------------------------------------------- /workspace/@domtree/flavors/index.ts: -------------------------------------------------------------------------------- 1 | export * as anydom from "@domtree/any"; 2 | export * as browser from "@domtree/browser"; 3 | export * as minimal from "@domtree/minimal"; 4 | -------------------------------------------------------------------------------- /packages/universal/core-utils/src/value.ts: -------------------------------------------------------------------------------- 1 | export function isPresent(value: T | null | undefined | void): value is T { 2 | return value !== null && value !== undefined; 3 | } 4 | -------------------------------------------------------------------------------- /workspace/dev-compile/src/rollup/ts.ts: -------------------------------------------------------------------------------- 1 | import type { TsConfigJsonResolved } from "get-tsconfig"; 2 | 3 | export type CompilerOptionsJson = TsConfigJsonResolved["compilerOptions"]; 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /packages/ 2 | /workspace/ 3 | /@types/ 4 | /demos/ 5 | /patches/ 6 | !.eslintrc.json 7 | !tsconfig.json 8 | !package.json 9 | !.vscode/settings.json 10 | !vitest.*.mts -------------------------------------------------------------------------------- /packages/preact/preact-utils/tests/reactive.spec.ts: -------------------------------------------------------------------------------- 1 | // @vitest-environment jsdom 2 | 3 | import { describe } from "@starbeam-workspace/test-utils"; 4 | 5 | describe.todo("util tests"); 6 | -------------------------------------------------------------------------------- /packages/universal/debug/src/call-stack/prod.ts: -------------------------------------------------------------------------------- 1 | import type { DebugRuntime } from "@starbeam/interfaces"; 2 | 3 | export default (() => undefined) satisfies DebugRuntime["callerStack"]; 4 | -------------------------------------------------------------------------------- /workspace/dev-compile/src/rollup/utils.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin as RollupPlugin } from "rollup"; 2 | 3 | export type { RollupPlugin }; 4 | export type InlinePlugin = () => RollupPlugin; 5 | -------------------------------------------------------------------------------- /@types/shell-escape-tag/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"], 4 | "rules": { "@typescript-eslint/prefer-readonly": "off" } 5 | } 6 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/index.ts: -------------------------------------------------------------------------------- 1 | export type { HtmlNode } from "./src/testing.js"; 2 | export { Root } from "./src/testing.js"; 3 | export { html, render } from "./src/testing.js"; 4 | -------------------------------------------------------------------------------- /workspace/scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-workspace/scripts", 4 | "type": "module", 5 | "devDependencies": { 6 | "globby": "^13.2.2" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/universal/debug/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"], 4 | "rules": { 5 | "etc/no-commented-out-code": "off" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/debug 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/debug@0.5.1 8 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/peer 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/shared@1.0.1 8 | -------------------------------------------------------------------------------- /packages/universal/core-utils/tests/object.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "vitest"; 2 | 3 | describe("now", () => { 4 | test("ok", () => { 5 | expect(true).toBe(true); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/universal/verify/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/verify 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/verify@0.5.1 8 | -------------------------------------------------------------------------------- /packages/universal/debug/src/description/debug/index.ts: -------------------------------------------------------------------------------- 1 | import type { DescFn } from "@starbeam/interfaces"; 2 | 3 | import { Desc as desc } from "./description.js"; 4 | 5 | export default desc satisfies DescFn; 6 | -------------------------------------------------------------------------------- /packages/universal/runtime/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/timeline 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/timeline@0.5.1 8 | -------------------------------------------------------------------------------- /packages/universal/renderer/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/core-utils 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/core-utils@0.5.1 8 | -------------------------------------------------------------------------------- /packages/universal/shared/src/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A registration function takes a handler function and returns a function 3 | * that, when called, removes the handler. 4 | */ 5 | export type Unregister = () => void; 6 | -------------------------------------------------------------------------------- /.config/tsconfig/tsconfig.preact-demo.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": false, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "preact" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/universal/debug/index.ts: -------------------------------------------------------------------------------- 1 | import "./src/setup.js"; 2 | 3 | export { default as DEBUG } from "./src/debug.js"; 4 | export { debugReactive, logReactive } from "./src/tag.js"; 5 | export { Tree } from "./src/tree.js"; 6 | -------------------------------------------------------------------------------- /workspace/dev-compile/README.md: -------------------------------------------------------------------------------- 1 | Because rollup doesn't (yet?) have good support for .ts files as config files, all of the 2 | `rollup.config` files in the repo, as well as the in-repo code that they use, are written in `.js`. 3 | -------------------------------------------------------------------------------- /workspace/dev-compile/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as importMeta } from "./rollup/plugins/import-meta.js"; 2 | export { default as inline } from "./rollup/plugins/inline.js"; 3 | export { compile } from "./rollup/rollup.js"; 4 | -------------------------------------------------------------------------------- /HOUSEKEEPING.md: -------------------------------------------------------------------------------- 1 | # Upgrade outdated packages 2 | 3 | - `pnpm outdated` 4 | - `pnpm update` 5 | 6 | # Remove unused dependencies 7 | 8 | - `pnpm dev unused` 9 | 10 | # Final step 11 | 12 | - `pnpm i` 13 | - `pnpm test` 14 | -------------------------------------------------------------------------------- /packages/universal/collections/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/js 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/core@0.5.1 8 | - @starbeam/js@0.5.1 9 | -------------------------------------------------------------------------------- /packages/universal/universal/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/core 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/core@0.5.1 8 | - @starbeam/js@0.5.1 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/node_modules 3 | **/dist 4 | dist 5 | .DS_Store 6 | coverage 7 | *.tsbuildinfo 8 | **/*.tsbuildinfo 9 | pack 10 | .pnpm-debug.log 11 | .eslintcache 12 | .ignore 13 | .turbo 14 | html 15 | **/CHANGELOG.md -------------------------------------------------------------------------------- /packages/react/react/tests/data-demo.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "@starbeam-workspace/test-utils"; 2 | 3 | describe("the data demo", () => { 4 | test("it works", () => { 5 | expect(true).toBe(true); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["plugin:@starbeam-dev/library:recommended"], 4 | "rules": { 5 | "@typescript-eslint/prefer-readonly": "off", 6 | "etc/no-commented-out-code": "off" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/x/store/index.ts: -------------------------------------------------------------------------------- 1 | export { type Aggregator, Average, Sum } from "./src/aggregate.js"; 2 | export { Filter } from "./src/filter.js"; 3 | export { Query, type TableRows } from "./src/flat.js"; 4 | export { type RowTypeFor, Table } from "./src/table.js"; 5 | -------------------------------------------------------------------------------- /packages/x/store/tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeam-tests/x-store 2 | 3 | ### Patch Changes 4 | 5 | - Updated dependencies [2a957e5] 6 | - Updated dependencies [e03c2a0] 7 | - @starbeam/core@0.5.1 8 | - @starbeam/js@0.5.1 9 | - @starbeamx/store@0.5.1 10 | -------------------------------------------------------------------------------- /packages/react/test-utils/index.ts: -------------------------------------------------------------------------------- 1 | export { act } from "./src/act.js"; 2 | export { html, react } from "./src/dom.js"; 3 | export { 4 | type RenderResult, 5 | RenderState, 6 | type SetupTestRoot as SetupTestRender, 7 | testReact, 8 | } from "./src/modes.js"; 9 | -------------------------------------------------------------------------------- /packages/universal/core/index.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-console 2 | console.warn( 3 | "WARNING: @starbeam/core has been renamed to @starbeam/universal. Please update your imports to refer to @starbeam/universal.", 4 | ); 5 | export * from "@starbeam/universal"; 6 | -------------------------------------------------------------------------------- /packages/universal/interfaces/src/utils.ts: -------------------------------------------------------------------------------- 1 | export type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never; 2 | export type Unsubscribe = undefined | (() => void); 3 | 4 | export interface Diff { 5 | readonly add: Set; 6 | readonly remove: Set; 7 | } 8 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "foxundermoon.shell-format", 4 | "rohit-gohri.format-code-action", 5 | "esbenp.prettier-vscode", 6 | "dbaeumer.vscode-eslint", 7 | "editorconfig.editorconfig", 8 | "stkb.rewrap" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /packages/universal/tags/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | createCellTag, 3 | createFormulaTag, 4 | initializeFormulaTag, 5 | } from "./src/tag.js"; 6 | export { getDependencies, getTag, lastUpdated } from "./src/tagged.js"; 7 | export { NOW, type Timestamp, zero } from "./src/timestamp.js"; 8 | -------------------------------------------------------------------------------- /vitest.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | const env = process.env["STARBEAM_TRACE"] ? { STARBEAM_TRACE: "true" } : {}; 4 | 5 | export default defineConfig({ 6 | root: "./", 7 | test: { 8 | name: "Starbeam", 9 | 10 | env, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /packages/x/vanilla/bench/README.md: -------------------------------------------------------------------------------- 1 | # Vanilla Bench 2 | 3 | Note: we currently only have a development build, and we're prioritizing DX over raw performance in development. 4 | 5 | We will have production benchmarks later, but please do not take these benchmarks seriously, as we're still pre 1.0 6 | -------------------------------------------------------------------------------- /packages/universal/interfaces/src/timestamp.ts: -------------------------------------------------------------------------------- 1 | export interface Timestamp { 2 | readonly at: number; 3 | 4 | gt: (other: Timestamp) => boolean; 5 | eq: (other: Timestamp) => boolean; 6 | 7 | next: () => Timestamp; 8 | 9 | toString: (options?: { format?: "timestamp" }) => string; 10 | } 11 | -------------------------------------------------------------------------------- /workspace/dev-compile/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /packages/preact/preact/index.ts: -------------------------------------------------------------------------------- 1 | export { createCell } from "./src/create.js"; 2 | export { install } from "./src/options.js"; 3 | export { 4 | setup, 5 | setupReactive, 6 | setupResource, 7 | setupService, 8 | setupSync, 9 | useReactive, 10 | useResource, 11 | useService, 12 | } from "./src/resource.js"; 13 | -------------------------------------------------------------------------------- /packages/tsconfig.specs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "../dist/packages", 6 | "types": ["./env"] 7 | }, 8 | "exclude": ["**/node_modules/**/*", "**/dist/**/*"], 9 | "include": ["*/*/tests/**/*"] 10 | } 11 | -------------------------------------------------------------------------------- /.config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "allowJs": true, 5 | "checkJs": true, 6 | "noEmit": true, 7 | "strict": true, 8 | "allowSyntheticDefaultImports": true, 9 | "module": "NodeNext", 10 | "moduleResolution": "NodeNext" 11 | }, 12 | "files": ["./depcheck.js"] 13 | } 14 | -------------------------------------------------------------------------------- /FRICTION.md: -------------------------------------------------------------------------------- 1 | ## Inability to easily use a record as an extends bound 2 | 3 | TBD: 4 | 5 | ```ts 6 | function X>(t: T) { 7 | return t; 8 | } 9 | 10 | X({ a: 1, b: 2 }); 11 | // 12 | ``` 13 | 14 | ## History 15 | 16 | [2022-10-25 to 2022-11-4](https://gist.github.com/wycats/f8d86917ca53dbe80fcf2b25f59e351f) 17 | -------------------------------------------------------------------------------- /.quokka: -------------------------------------------------------------------------------- 1 | { 2 | "stdEsm": false, 3 | "nativeEsm": true, 4 | "ts": { 5 | "compilerOptions": { 6 | "noEmitOnError": false 7 | } 8 | }, 9 | "node": "/home/wycats/.volta/bin/node", 10 | "autoLog": false, 11 | "env": { 12 | "params": { 13 | "runner": "--experimental-vm-modules --no-warnings" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/universal/shared/src/testing.ts: -------------------------------------------------------------------------------- 1 | import type { Testing } from "./env.js"; 2 | import { getCoordination } from "./env.js"; 3 | 4 | const coordination = getCoordination(); 5 | 6 | export function testing(options: Partial): void { 7 | coordination.testing = coordination.testing ?? {}; 8 | Object.assign(coordination.testing, options); 9 | } 10 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | [ 3 | "@types/@*/*", 4 | "@types/*", 5 | packages/*/*, 6 | packages/*/*/tests, 7 | packages/*/*/bench, 8 | demos/*, 9 | demos/*/tests, 10 | "workspace/@*/*", 11 | "workspace/@*/*/tests", 12 | "workspace/*", 13 | "workspace/*/tests", 14 | ".yalc/*", 15 | ".yalc/@*/*" 16 | ] 17 | -------------------------------------------------------------------------------- /packages/x/headless-form/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @starbeamx/store 2 | 3 | ## 0.5.1 4 | 5 | ### Patch Changes 6 | 7 | - 2a957e5: Try to fix types 8 | - e03c2a0: Initial publish 9 | - Updated dependencies [2a957e5] 10 | - Updated dependencies [e03c2a0] 11 | - @starbeam/core@0.5.1 12 | - @starbeam/debug@0.5.1 13 | - @starbeam/js@0.5.1 14 | - @starbeam/verify@0.5.1 15 | -------------------------------------------------------------------------------- /.config/tsconfig/tsconfig.vite.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "declaration": true, 6 | "outDir": "../dist", 7 | "target": "ESNext", 8 | "module": "NodeNext", 9 | "moduleResolution": "NodeNext", 10 | "allowJs": true, 11 | "checkJs": true, 12 | "types": ["node"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /@types/shell-escape-tag/index.d.ts: -------------------------------------------------------------------------------- 1 | declare class Escaped { 2 | // eslint-disable-next-line no-unused-private-class-members 3 | #value: unknown; 4 | } 5 | 6 | interface Escape { 7 | (strings: readonly string[], ...interpolated: readonly unknown[]): string; 8 | escape: (...args: unknown[]) => Escaped; 9 | } 10 | 11 | declare const DEFAULT: Escape; 12 | export default DEFAULT; 13 | -------------------------------------------------------------------------------- /packages/vue/vue/src/setup.ts: -------------------------------------------------------------------------------- 1 | import type { App, Plugin } from "vue"; 2 | 3 | import { useApp } from "./app.js"; 4 | import { VueComponent } from "./component.js"; 5 | 6 | export function useReactive(): VueComponent { 7 | return VueComponent.current(); 8 | } 9 | 10 | export const Starbeam = { 11 | install: (app: App) => { 12 | useApp(app); 13 | }, 14 | } satisfies Plugin; 15 | -------------------------------------------------------------------------------- /packages/vue/vue/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/store/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/vanilla/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["node", "./packages/env.d.ts", "vite"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "outDir": "../../../dist/packages" 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /@types/fsify/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env.d.ts", "node"], 6 | "declaration": true, 7 | "declarationDir": "../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/preact/preact/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/react/test-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/debug/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/tags/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/verify/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/headless-form/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import babel from 'vite-plugin-babel'; 3 | 4 | export default defineConfig({ 5 | build: { 6 | watch: true, 7 | target: 'esnext', 8 | sourcemap: true, 9 | }, 10 | plugins: [ 11 | // Babel will try to pick up Babel config files (.babelrc or .babelrc.json) 12 | babel(), 13 | ], 14 | }) 15 | -------------------------------------------------------------------------------- /@types/ansicolor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env.d.ts", "node"], 6 | "declaration": true, 7 | "declarationDir": "../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /@types/shell-split/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env.d.ts", "node"], 6 | "declaration": true, 7 | "declarationDir": "../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/collections/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/core-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/modifier/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/reactive/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/renderer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/resource/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/runtime/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/service/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "overrides": [ 4 | { 5 | "extends": ["plugin:@starbeam/tight"], 6 | "files": ["**/*.ts"], 7 | "parserOptions": { 8 | "project": "tsconfig.json" 9 | } 10 | }, 11 | { 12 | "extends": ["plugin:@starbeam/json:recommended"], 13 | "files": ["*.json"] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /workspace/test-utils/src/utils.ts: -------------------------------------------------------------------------------- 1 | // Avoid needing an extra import 2 | export const UNINITIALIZED = Symbol.for("@starbeam/uninitialized"); 3 | export type UNINITIALIZED = typeof UNINITIALIZED; 4 | 5 | export function assert( 6 | condition: unknown, 7 | message?: string 8 | ): asserts condition { 9 | if (!condition) { 10 | throw new Error(message ?? "Assertion failed"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /@types/lines-and-columns/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env.d.ts", "node"], 6 | "declaration": true, 7 | "declarationDir": "../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /@types/shell-escape-tag/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env.d.ts", "node"], 6 | "declaration": true, 7 | "declarationDir": "../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/react/react/index.ts: -------------------------------------------------------------------------------- 1 | import "./src/debug/warnings.js"; 2 | 3 | export { type ReactApp, Starbeam, useStarbeamApp } from "./src/app.js"; 4 | export { 5 | setup, 6 | setupReactive, 7 | setupResource, 8 | setupService, 9 | } from "./src/hooks/setup.js"; 10 | export { useReactive, useResource, useService } from "./src/hooks/use.js"; 11 | export { useDeps, useProp } from "./src/utils.js"; 12 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /workspace/@domtree/any/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../../packages/env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /@types/rollup-plugin-polyfill-node/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/universal/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["node", "../../env.d.ts", "vite"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "declaration": true, 6 | "declarationDir": "../../../../dist/types", 7 | "declarationMap": true, 8 | "outDir": "../../../../dist/packages", 9 | "types": ["../../../env"] 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /workspace/@domtree/browser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../../packages/env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /workspace/@domtree/flavors/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../../packages/env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /workspace/@domtree/interface/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../../packages/env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /workspace/@domtree/minimal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../../packages/env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "exclude": ["dist/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/x/vanilla/tests/env.ts: -------------------------------------------------------------------------------- 1 | import { Body } from "./vanilla.spec"; 2 | 3 | interface Env { 4 | global: typeof globalThis; 5 | document: Document; 6 | body: Body; 7 | owner: object; 8 | } 9 | 10 | export function env(): Env { 11 | return { 12 | global: globalThis, 13 | document: globalThis.document, 14 | body: new Body(globalThis.document.body), 15 | owner: {}, 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /workspace/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../packages/env"], 6 | "outDir": "../dist/workspace" 7 | }, 8 | "exclude": ["**/node_modules/**"], 9 | "include": ["*/*/index.*", "*/*/src/**/*", "*/index.*", "*/src/**/*"], 10 | "references": [{ "path": "./scripts/tsconfig.json" }] 11 | } 12 | -------------------------------------------------------------------------------- /packages/universal/reactive/tests/cell.spec.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-magic-numbers */ 2 | import { Cell } from "@starbeam/reactive"; 3 | import { describe, expect, test } from "@starbeam-workspace/test-utils"; 4 | 5 | describe("Cell", () => { 6 | test("its current property works like a normal property", () => { 7 | const cell = Cell(1); 8 | expect(cell.read()).toBe(1); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /workspace/unstable-release/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "checkJs": true, 6 | "types": ["../../packages/env.d.ts"], 7 | "declaration": true, 8 | "declarationDir": "../../dist/types", 9 | "declarationMap": true, 10 | "emitDeclarationOnly": true 11 | }, 12 | "exclude": ["dist/**/*"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/tsconfig.packages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "outDir": "../dist/packages", 6 | "types": ["./env"] 7 | }, 8 | "exclude": [ 9 | "x/devtool/**/*", 10 | "x/devtools-extension/**/*", 11 | "**/dist/**/*", 12 | "**/node_modules/**" 13 | ], 14 | "include": ["*/*/index.ts", "*/*/src/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /@types/lines-and-columns/index.d.ts: -------------------------------------------------------------------------------- 1 | export interface SourceLocation { 2 | line: number; 3 | column: number; 4 | } 5 | 6 | export declare class LinesAndColumns { 7 | private readonly length; 8 | private readonly offsets; 9 | constructor(string: string); 10 | locationForIndex(index: number): SourceLocation | null; 11 | indexForLocation(location: SourceLocation): number | null; 12 | private readonly lengthOfLine; 13 | } 14 | -------------------------------------------------------------------------------- /packages/universal/universal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "experimentalDecorators": true, 6 | "types": ["../../env.d.ts"], 7 | "declaration": true, 8 | "declarationDir": "../../../dist/types", 9 | "declarationMap": true, 10 | "emitDeclarationOnly": true 11 | }, 12 | "exclude": ["dist/**/*"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/tsconfig.rollup.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "composite": true, 7 | "declaration": true, 8 | "module": "NodeNext", 9 | "moduleResolution": "NodeNext", 10 | "outDir": "../dist", 11 | "target": "ESNext", 12 | "types": ["node"] 13 | }, 14 | "include": ["*/*/rollup.config.mjs"] 15 | } 16 | -------------------------------------------------------------------------------- /.scratch/paths.js: -------------------------------------------------------------------------------- 1 | import { relative } from "node:path"; 2 | 3 | const CASES = [ 4 | ["/a/b", "/a/b/c"], // "c" 5 | ["/a/b/c", "/a/b/c"], // "" 6 | ["/a/b/c", "/a/b"], // ".." 7 | ["/a/b/c", "/d/e/f"], // "../../../d/e/f" 8 | ["/a/b/c", "/a/b/d"], // "../d" 9 | ["/a/b/c", "/a/b/d/e/f"], // "../d/e/f" 10 | ]; 11 | 12 | for (const [a, b] of CASES) { 13 | console.log(`relative(${a}, ${b}): ${JSON.stringify(relative(a, b))}`); 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/verify/src/assertions/type-utils.ts: -------------------------------------------------------------------------------- 1 | export type FixedArray< 2 | T, 3 | N extends number, 4 | SoFar extends unknown[] = [] 5 | > = SoFar["length"] extends N ? SoFar : FixedArray; 6 | 7 | export type ReadonlyFixedArray< 8 | T, 9 | N extends number, 10 | SoFar extends readonly unknown[] = [] 11 | > = SoFar["length"] extends N 12 | ? SoFar 13 | : ReadonlyFixedArray; 14 | -------------------------------------------------------------------------------- /packages/react/react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/core-utils/src/array.tst.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "tstyche"; 2 | 3 | import { isPresentArray } from "./array.js"; 4 | 5 | describe("type checks", () => { 6 | describe("isPresentArray", () => { 7 | test("empty array", () => { 8 | const array = ["hello"] as const; 9 | if (isPresentArray(array)) { 10 | expect(array).type.toEqual(); 11 | } 12 | }); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/now.spec.ts: -------------------------------------------------------------------------------- 1 | import { bump, now } from "@starbeam/shared"; 2 | import { describe, expect, test } from "vitest"; 3 | 4 | describe("now", () => { 5 | test("now is a number", () => { 6 | expect(typeof now()).toBe("number"); 7 | }); 8 | 9 | test("bumping the number makes it bigger", () => { 10 | const first = now(); 11 | const second = bump(); 12 | expect(second).toBeGreaterThan(first); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/universal/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "include": ["index.ts", "src/**/*.ts", "rollup.config.mjs"], 12 | "exclude": ["dist/**/*"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/universal/interfaces/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../env.d.ts"], 6 | "declaration": true, 7 | "declarationDir": "../../../dist/types", 8 | "declarationMap": true, 9 | "emitDeclarationOnly": true 10 | }, 11 | "include": ["index.ts", "./src/**/*.ts", "./src/**/*.d.ts"], 12 | "exclude": ["dist/**/*"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/universal/runtime/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["vite-env"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/x/store/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/x/vanilla/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/react/react/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/renderer/src/resource.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | ResourceBlueprint, 3 | ResourceConstructor, 4 | } from "@starbeam/resource"; 5 | 6 | export type IntoResourceBlueprint = 7 | | ResourceBlueprint 8 | | ResourceConstructor; 9 | 10 | export function intoResourceBlueprint( 11 | intoBlueprint: IntoResourceBlueprint, 12 | ): ResourceBlueprint { 13 | return typeof intoBlueprint === "function" ? intoBlueprint() : intoBlueprint; 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/shared/index.ts: -------------------------------------------------------------------------------- 1 | export { TAG, UNINITIALIZED } from "./src/constants.js"; 2 | export { getID } from "./src/id.js"; 3 | export { 4 | finalize, 5 | isFinalized, 6 | linkToFinalizationScope, 7 | mountFinalizationScope, 8 | onFinalize, 9 | pushFinalizationScope, 10 | } from "./src/lifetimes.js"; 11 | export { bump, now } from "./src/now.js"; 12 | export { consume, start } from "./src/stack.js"; 13 | export { testing } from "./src/testing.js"; 14 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/reactive/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/renderer/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/verify/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/collections/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/universal/resource/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | IntoResourceBlueprint, 3 | ResourceBlueprint, 4 | ResourceConstructor, 5 | } from "./src/resource.js"; 6 | export { Resource, use as setupResource } from "./src/resource.js"; 7 | export { ResourceList } from "./src/resource-list.js"; 8 | export { SyncTo } from "./src/sync/high-level.js"; 9 | export type { Sync, SyncFn, SyncResult } from "./src/sync/primitive.js"; 10 | export { PrimitiveSyncTo } from "./src/sync/primitive.js"; 11 | -------------------------------------------------------------------------------- /packages/universal/resource/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "include": ["**/*.ts"], 14 | "exclude": ["dist/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/universal/service/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "include": ["**/*.ts"], 14 | "exclude": ["dist/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/universal/universal/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "include": ["**/*.ts"], 14 | "exclude": ["dist/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /packages/universal/core-utils/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "include": ["**/*.ts"], 14 | "exclude": ["dist/**/*"] 15 | } 16 | -------------------------------------------------------------------------------- /.knip.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/knip@2/schema.json", 3 | "ignoreExportsUsedInFile": { 4 | "type": true, 5 | "interface": true 6 | }, 7 | "vite": false, 8 | "workspaces": { 9 | ".": { 10 | "entry": [] 11 | }, 12 | "demos/*": { 13 | "entry": [], 14 | "vite": false 15 | }, 16 | "packages/*/*": { 17 | "entry": ["index.{js,ts,tsx}"] 18 | }, 19 | "packages/*/*/tests": { 20 | "entry": ["*.spec.{js,ts,tsx}"] 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /workspace/@domtree/interface/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @domtree/interface 2 | 3 | ## 0.9.3 4 | 5 | ### Patch Changes 6 | 7 | - 3bf1221: Prepare for Starbeam 0.8.4 8 | 9 | ## 0.9.2 10 | 11 | ### Patch Changes 12 | 13 | - 1a553c5: Prepare for 0.8 14 | 15 | ## 0.9.1 16 | 17 | ### Patch Changes 18 | 19 | - 40844fd: Try to fix the build 20 | 21 | ## 0.9.1 22 | 23 | ### Patch Changes 24 | 25 | - 50f7a8f: Publish @domtree 26 | 27 | ## 0.9.0 28 | 29 | ### Patch Changes 30 | 31 | - 4501b1f: Publish the @domtree packages 32 | -------------------------------------------------------------------------------- /packages/universal/core-utils/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/core-utils", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/core-utils": "workspace:^" 16 | }, 17 | "devDependencies": { 18 | "@starbeam-dev/eslint-plugin": "^1.0.6" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /workspace/dev-compile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "incremental": true, 4 | "skipLibCheck": true, 5 | "target": "ESNext", 6 | "module": "es2022", 7 | "moduleResolution": "bundler", 8 | "types": ["node"], 9 | "strict": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noUncheckedIndexedAccess": true, 12 | "noImplicitAny": true, 13 | "noEmit": true, 14 | "declaration": true, 15 | "outDir": "dist", 16 | "verbatimModuleSyntax": true 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/index.js: -------------------------------------------------------------------------------- 1 | import { setup as manual } from './src/manual'; 2 | 3 | async function boot() { 4 | console.log('booting'); 5 | 6 | manual(); 7 | 8 | console.log('ready'); 9 | } 10 | 11 | const readiness = ['interactive', 'complete', 'ready']; 12 | 13 | console.log('waiting for boot'); 14 | if (readiness.includes(document.readyState)) { 15 | boot(); 16 | } else { 17 | window.addEventListener('DOMContentLoaded', () => { 18 | console.info(`DOMContentLoaded`); 19 | boot(); 20 | }); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | Builder, 3 | RegisterLifecycleHandlers, 4 | UseLifecycleBuilder, 5 | } from "./src/lifecycle.js"; 6 | export { useLifecycle } from "./src/lifecycle.js"; 7 | export { isRestrictedRead as isRendering } from "./src/react.js"; 8 | export { 9 | beginReadonly as maskRendering, 10 | setupFunction, 11 | endReadonly as unmaskRendering, 12 | unsafeTrackedElsewhere, 13 | } from "./src/react.js"; 14 | export { type Ref, useInstance, useLastRenderRef } from "./src/refs.js"; 15 | -------------------------------------------------------------------------------- /packages/universal/renderer/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | Scheduler as ComponentScheduler, 3 | Handler, 4 | Lifecycle, 5 | ReactiveBlueprint, 6 | RendererManager, 7 | SetupBlueprint, 8 | UseReactive, 9 | } from "./src/renderer.js"; 10 | export { 11 | managerCreateLifecycle, 12 | managerSetupReactive, 13 | managerSetupResource, 14 | managerSetupService, 15 | runHandlers, 16 | } from "./src/renderer.js"; 17 | export type { IntoResourceBlueprint } from "./src/resource.js"; 18 | export { intoResourceBlueprint } from "./src/resource.js"; 19 | -------------------------------------------------------------------------------- /@types/plugin-commonjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "incremental": true, 5 | "skipLibCheck": true, 6 | "target": "ESNext", 7 | "module": "es2022", 8 | "moduleResolution": "bundler", 9 | "types": ["node"], 10 | "strict": true, 11 | "noPropertyAccessFromIndexSignature": true, 12 | "noUncheckedIndexedAccess": true, 13 | "noImplicitAny": true, 14 | "noEmit": true, 15 | "declaration": true, 16 | "outDir": "dist", 17 | "verbatimModuleSyntax": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.scratch/stylize.js: -------------------------------------------------------------------------------- 1 | class Format { 2 | #type; 3 | 4 | constructor(type) { 5 | this.#type = type; 6 | } 7 | 8 | [Symbol.for("nodejs.util.inspect.custom")](_, { stylize }) { 9 | return stylize("testing", this.#type); 10 | } 11 | } 12 | 13 | const STYLES = [ 14 | "special", 15 | "number", 16 | "bigint", 17 | "boolean", 18 | "undefined", 19 | "null", 20 | "string", 21 | "symbol", 22 | "date", 23 | "regexp", 24 | "module", 25 | ]; 26 | 27 | for (const style of STYLES) { 28 | console.log(new Format(style), style); 29 | } 30 | -------------------------------------------------------------------------------- /@types/plugin-node-resolve/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "incremental": true, 5 | "skipLibCheck": true, 6 | "target": "ESNext", 7 | "module": "es2022", 8 | "moduleResolution": "bundler", 9 | "types": ["node"], 10 | "strict": true, 11 | "noPropertyAccessFromIndexSignature": true, 12 | "noUncheckedIndexedAccess": true, 13 | "noImplicitAny": true, 14 | "noEmit": true, 15 | "declaration": true, 16 | "outDir": "dist", 17 | "verbatimModuleSyntax": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /@types/vite-env/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "skipLibCheck": true, 4 | "forceConsistentCasingInFileNames": true, 5 | "strict": true, 6 | "exactOptionalPropertyTypes": true, 7 | "noImplicitOverride": true, 8 | "noPropertyAccessFromIndexSignature": true, 9 | "noUncheckedIndexedAccess": true, 10 | "declaration": true, 11 | "declarationDir": "dist/types", 12 | "declarationMap": true, 13 | "emitDeclarationOnly": true, 14 | "verbatimModuleSyntax": true 15 | }, 16 | "exclude": ["dist/**/*"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/env.d.ts: -------------------------------------------------------------------------------- 1 | import "vitest/importMeta.js"; 2 | import "vite/client"; 3 | 4 | interface ImportMeta { 5 | env: { 6 | PROD: boolean | ""; 7 | DEV: boolean | ""; 8 | STARBEAM_TRACE: boolean; 9 | }; 10 | assert: (condition: unknown, message: string) => asserts condition; 11 | } 12 | 13 | declare module "*.scss" { 14 | const DEFAULT: Record; 15 | export default DEFAULT; 16 | } 17 | declare module "*.svg"; 18 | 19 | declare module "*?inline" { 20 | const content: string; 21 | export default content; 22 | } 23 | -------------------------------------------------------------------------------- /.config/tsconfig/tsconfig.demo.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | 5 | "target": "ESNext", 6 | "module": "ESNext", 7 | "moduleResolution": "bundler", 8 | 9 | "strict": true, 10 | "noUncheckedIndexedAccess": true, 11 | "exactOptionalPropertyTypes": true, 12 | "noPropertyAccessFromIndexSignature": true, 13 | "forceConsistentCasingInFileNames": true, 14 | "noImplicitOverride": true, 15 | 16 | "skipLibCheck": true, 17 | "verbatimModuleSyntax": true, 18 | 19 | "types": ["vite/client"] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /@types/vite-env/index.d.ts: -------------------------------------------------------------------------------- 1 | import "vitest/importMeta.js"; 2 | import "vite/client"; 3 | 4 | interface ImportMeta { 5 | env: { 6 | PROD: boolean | ""; 7 | DEV: boolean | ""; 8 | STARBEAM_TRACE: boolean; 9 | }; 10 | assert: (condition: unknown, message: string) => asserts condition; 11 | } 12 | 13 | declare module "*.scss" { 14 | const DEFAULT: Record; 15 | export default DEFAULT; 16 | } 17 | declare module "*.svg"; 18 | 19 | declare module "*?inline" { 20 | const content: string; 21 | export default content; 22 | } 23 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/debug", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam-workspace/test-utils": "workspace:^" 17 | }, 18 | "devDependencies": { 19 | "@starbeam-dev/eslint-plugin": "^1.0.6" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/vue/vue/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"], 14 | "references": [ 15 | { 16 | "path": "../../vue-testing-utils/tsconfig.json" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/preact/preact/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../.config/tsconfig/tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "react", 7 | "types": ["../../../env.d.ts"], 8 | "declaration": true, 9 | "declarationDir": "../../../../dist/types", 10 | "declarationMap": true, 11 | "emitDeclarationOnly": true 12 | }, 13 | "exclude": ["dist/**/*"], 14 | "references": [ 15 | { 16 | "path": "../../preact-testing-utils/tsconfig.json" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/universal/renderer/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/renderer", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/renderer": "workspace:^", 16 | "@starbeam-workspace/test-utils": "workspace:^" 17 | }, 18 | "devDependencies": { 19 | "@starbeam-dev/eslint-plugin": "^1.0.6" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/react/test-utils/src/act.ts: -------------------------------------------------------------------------------- 1 | import { act as reactAct } from "@testing-library/react"; 2 | import { unstable_next } from "scheduler"; 3 | 4 | export async function act(callback: () => undefined): Promise; 5 | export async function act(callback: () => T): Promise; 6 | export async function act(callback: () => T): Promise { 7 | let value: unknown; 8 | 9 | reactAct(() => { 10 | value = callback(); 11 | }); 12 | 13 | await new Promise((fulfill) => { 14 | unstable_next(() => void fulfill()); 15 | }); 16 | 17 | return value; 18 | } 19 | -------------------------------------------------------------------------------- /packages/x/vanilla/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/x-vanilla", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/shared": "workspace:^", 16 | "@starbeam/universal": "workspace:^", 17 | "@starbeamx/vanilla": "workspace:^" 18 | }, 19 | "devDependencies": { 20 | "@starbeam-dev/eslint-plugin": "^1.0.6" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/index.ts: -------------------------------------------------------------------------------- 1 | export { implementInspect } from "./src/debug.js"; 2 | export { 3 | CATCH_ERROR, 4 | DIFF, 5 | HOOK, 6 | type RawPreactOptions, 7 | RENDER, 8 | ROOT, 9 | } from "./src/interfaces.js"; 10 | export type { HookName } from "./src/internals.js"; 11 | export { InternalComponent } from "./src/internals/component.js"; 12 | export type { InternalPreactElement } from "./src/internals/elements.js"; 13 | export { InternalElement } from "./src/internals/elements.js"; 14 | export { InternalVNode } from "./src/internals/vnode.js"; 15 | export { AugmentPreact, Plugin } from "./src/plugin.js"; 16 | -------------------------------------------------------------------------------- /packages/universal/core-utils/src/json.ts: -------------------------------------------------------------------------------- 1 | const SPACING = 2; 2 | 3 | export function stringifyJSON(obj: unknown): string { 4 | return JSON.stringify(obj, null, SPACING); 5 | } 6 | 7 | export type JsonPrimitive = string | number | boolean | null; 8 | export type JsonArray = JsonValue[]; 9 | export type JsonObject = Record; 10 | 11 | export type JsonValue = 12 | | JsonPrimitive 13 | | JsonArray 14 | | { [key: string]: JsonValue }; 15 | 16 | export function isJSONObject( 17 | value: JsonValue | undefined 18 | ): value is JsonObject { 19 | return typeof value === "object" && value !== null; 20 | } 21 | -------------------------------------------------------------------------------- /packages/universal/collections/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/collections", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/collections": "workspace:^", 16 | "@starbeam/universal": "workspace:^", 17 | "@starbeam-workspace/test-utils": "workspace:^" 18 | }, 19 | "devDependencies": { 20 | "@starbeam-dev/eslint-plugin": "^1.0.6" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/universal/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export type * from "./src/debug/call-stack.js"; 2 | export type * from "./src/debug/debug-runtime.js"; 3 | export type * from "./src/debug/description.js"; 4 | export type { 5 | NotifyReady, 6 | Runtime, 7 | RuntimeFrame, 8 | UpdateOptions, 9 | } from "./src/runtime.js"; 10 | export type { CellTag, FormulaTag, Tag, TagSnapshot } from "./src/tag.js"; 11 | export type { HasTag, Reactive, Tagged, TaggedReactive } from "./src/tagged.js"; 12 | export type { Timestamp as CoreTimestamp, Timestamp } from "./src/timestamp.js"; 13 | export type { Diff, Expand, Unsubscribe } from "./src/utils.js"; 14 | -------------------------------------------------------------------------------- /packages/x/store/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/x-store", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@faker-js/faker": "^8.0.2", 16 | "@starbeam/universal": "workspace:^", 17 | "@starbeam/verify": "workspace:^", 18 | "@starbeamx/store": "workspace:^" 19 | }, 20 | "devDependencies": { 21 | "@starbeam-dev/eslint-plugin": "^1.0.6" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /@types/lines-and-columns/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/lines-and-columns", 4 | "types": "index.d.ts", 5 | "exports": { 6 | ".": { 7 | "types": "./index.d.ts" 8 | } 9 | }, 10 | "publishConfig": { 11 | "exports": "./dist/index.d.ts", 12 | "types": "dist/index.d.ts" 13 | }, 14 | "starbeam": { 15 | "source": "d.ts", 16 | "type": "library:upstream-types" 17 | }, 18 | "scripts": { 19 | "test:lint": "eslint . --max-warnings 0", 20 | "test:types": "tsc -b" 21 | }, 22 | "devDependencies": { 23 | "@starbeam-dev/eslint-plugin": "^1.0.6", 24 | "@types/node": "18.16.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /@types/shell-escape-tag/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/shell-escape-tag", 4 | "types": "index.d.ts", 5 | "exports": { 6 | ".": { 7 | "types": "./index.d.ts" 8 | } 9 | }, 10 | "publishConfig": { 11 | "exports": "./dist/index.d.ts", 12 | "types": "dist/index.d.ts" 13 | }, 14 | "starbeam": { 15 | "source": "d.ts", 16 | "type": "library:upstream-types" 17 | }, 18 | "scripts": { 19 | "test:lint": "eslint . --max-warnings 0", 20 | "test:types": "tsc -b" 21 | }, 22 | "devDependencies": { 23 | "@starbeam-dev/eslint-plugin": "^1.0.6", 24 | "@types/node": "18.16.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /@types/fsify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/fsify", 4 | "version": "1.0.0", 5 | "types": "index.d.ts", 6 | "exports": { 7 | ".": { 8 | "types": "./index.d.ts" 9 | } 10 | }, 11 | "publishConfig": { 12 | "exports": "./dist/index.d.ts", 13 | "types": "dist/index.d.ts" 14 | }, 15 | "starbeam": { 16 | "source": "d.ts", 17 | "type": "library:upstream-types" 18 | }, 19 | "scripts": { 20 | "test:lint": "eslint . --max-warnings 0", 21 | "test:types": "tsc -b" 22 | }, 23 | "devDependencies": { 24 | "@starbeam-dev/eslint-plugin": "^1.0.6", 25 | "@types/node": "18.16.1" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /@types/shell-split/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/shell-split", 4 | "version": "1.0.0", 5 | "types": "index.d.ts", 6 | "exports": { 7 | ".": { 8 | "types": "./index.d.ts" 9 | } 10 | }, 11 | "publishConfig": { 12 | "exports": "./dist/index.d.ts", 13 | "types": "dist/index.d.ts" 14 | }, 15 | "starbeam": { 16 | "source": "d.ts", 17 | "type": "library:upstream-types" 18 | }, 19 | "scripts": { 20 | "test:lint": "eslint . --max-warnings 0", 21 | "test:types": "tsc -b" 22 | }, 23 | "devDependencies": { 24 | "@starbeam-dev/eslint-plugin": "^1.0.6", 25 | "@types/node": "18.16.1" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/universal/verify/tests/basic.spec.ts: -------------------------------------------------------------------------------- 1 | import "./support.js"; 2 | 3 | import { expected, isEqual, isPresent, verify } from "@starbeam/verify"; 4 | import { describe, expect, test } from "vitest"; 5 | 6 | const isProd = import.meta.env.PROD; 7 | 8 | describe.skipIf(isProd)("basic verification", () => { 9 | test("isPresent", () => { 10 | expect((value: unknown) => { 11 | verify(value, isPresent); 12 | }).toFail(null, expected.toBe("present")); 13 | }); 14 | 15 | test("isEqual", () => { 16 | expect((value: unknown) => { 17 | verify(value, isEqual(null)); 18 | }).toFail(undefined, expected.toBe("null").butGot("undefined")); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /coverage/lcov-report/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /packages/preact/preact/src/create.ts: -------------------------------------------------------------------------------- 1 | import type { Description } from "@starbeam/interfaces"; 2 | import { DEBUG } from "@starbeam/reactive"; 3 | import { Cell } from "@starbeam/universal"; 4 | // eslint-disable-next-line file-extension-in-import-ts/file-extension-in-import-ts -- @todo 5 | import { useMemo } from "preact/hooks"; 6 | 7 | export function create(Reactive: () => T): T { 8 | return useMemo(Reactive, []); 9 | } 10 | 11 | export function createCell( 12 | value: T, 13 | description?: string | Description | undefined, 14 | ): Cell { 15 | const desc = DEBUG?.Desc("cell", description, "createCell"); 16 | return create(() => Cell(value, { description: desc })); 17 | } 18 | -------------------------------------------------------------------------------- /packages/universal/runtime/src/timeline/utils.ts: -------------------------------------------------------------------------------- 1 | import type { Diff } from "@starbeam/interfaces"; 2 | 3 | export function diff( 4 | prev: Set | ReadonlySet, 5 | next: Set | ReadonlySet 6 | ): Diff { 7 | const add = new Set(); 8 | const remove = new Set(); 9 | 10 | for (const internal of prev) { 11 | if (!next.has(internal)) { 12 | remove.add(internal); 13 | } 14 | } 15 | 16 | for (const internal of next) { 17 | if (!prev.has(internal)) { 18 | add.add(internal); 19 | } 20 | } 21 | 22 | return { add, remove }; 23 | } 24 | 25 | const EMPTY = { add: new Set(), remove: new Set() }; 26 | diff.empty = () => EMPTY as Diff; 27 | -------------------------------------------------------------------------------- /@types/ansicolor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/ansicolor", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "types": "index.d.ts", 7 | "exports": { 8 | ".": { 9 | "types": "./index.d.ts" 10 | } 11 | }, 12 | "publishConfig": { 13 | "exports": "./dist/index.d.ts", 14 | "types": "dist/index.d.ts" 15 | }, 16 | "starbeam": { 17 | "source": "d.ts", 18 | "type": "library:upstream-types" 19 | }, 20 | "scripts": { 21 | "test:lint": "eslint . --max-warnings 0", 22 | "test:types": "tsc -b" 23 | }, 24 | "devDependencies": { 25 | "@starbeam-dev/eslint-plugin": "^1.0.6", 26 | "@types/node": "18.16.18" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /@types/vite-env/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-env", 3 | "version": "1.0.0", 4 | "types": "index.d.ts", 5 | "exports": { 6 | ".": { 7 | "types": "./index.d.ts" 8 | } 9 | }, 10 | "publishConfig": { 11 | "exports": "./dist/index.d.ts", 12 | "types": "dist/index.d.ts" 13 | }, 14 | "starbeam": { 15 | "source": "d.ts", 16 | "type": "extracting:library" 17 | }, 18 | "scripts": { 19 | "test:lint": "eslint . --max-warnings 0", 20 | "test:types": "tsc -b" 21 | }, 22 | "dependencies": { 23 | "vite": "^4.4.11", 24 | "vitest": "^1.0.0-beta.2" 25 | }, 26 | "devDependencies": { 27 | "@starbeam-dev/eslint-plugin": "^1.0.6" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/universal/interfaces/src/debug/call-stack.ts: -------------------------------------------------------------------------------- 1 | export type CallerStackFn = (internal?: number) => CallStack | undefined; 2 | 3 | export interface CallStack { 4 | readonly header: string; 5 | readonly frames: readonly [StackFrame, ...StackFrame[]]; 6 | slice: (n: number) => CallStack | undefined; 7 | } 8 | 9 | export interface StackFrame { 10 | readonly action: string; 11 | readonly module: ParsedModule; 12 | 13 | readonly loc: Loc | undefined; 14 | } 15 | 16 | export interface Loc { 17 | readonly line: number; 18 | readonly column: number | undefined; 19 | } 20 | 21 | export interface ParsedModule { 22 | root?: string | { package: string } | undefined; 23 | path: string; 24 | } 25 | -------------------------------------------------------------------------------- /workspace/@domtree/browser/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @domtree/browser 2 | 3 | ## 0.9.3 4 | 5 | ### Patch Changes 6 | 7 | - 3bf1221: Prepare for Starbeam 0.8.4 8 | - Updated dependencies [3bf1221] 9 | - @domtree/interface@0.9.3 10 | 11 | ## 0.9.2 12 | 13 | ### Patch Changes 14 | 15 | - 1a553c5: Prepare for 0.8 16 | - Updated dependencies [1a553c5] 17 | - @domtree/interface@0.9.2 18 | 19 | ## 0.9.1 20 | 21 | ### Patch Changes 22 | 23 | - 40844fd: Try to fix the build 24 | - Updated dependencies [40844fd] 25 | - @domtree/interface@0.9.1 26 | 27 | ## 0.9.0 28 | 29 | ### Patch Changes 30 | 31 | - 4501b1f: Publish the @domtree packages 32 | - Updated dependencies [4501b1f] 33 | - @domtree/interface@0.9.1 34 | -------------------------------------------------------------------------------- /packages/universal/runtime/index.ts: -------------------------------------------------------------------------------- 1 | export { type AppContext, CONTEXT } from "./src/context/context.js"; 2 | export { 3 | createMountScope, 4 | createPushScope, 5 | type FinalizationScope, 6 | link, 7 | pushingScope, 8 | RUNTIME, 9 | scoped, 10 | withinScope, 11 | } from "./src/define.js"; 12 | export type { Unsubscribe } from "./src/lifetime/object-lifetime.js"; 13 | export { ReactiveError, render } from "./src/timeline/render.js"; 14 | export { Subscriptions } from "./src/timeline/subscriptions.js"; 15 | export { diff } from "./src/timeline/utils.js"; 16 | export type { Tagged } from "@starbeam/interfaces"; 17 | export { TAG } from "@starbeam/shared"; 18 | export { getTag } from "@starbeam/tags"; 19 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/shared", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/shared": "workspace:^", 16 | "@starbeam-workspace/test-utils": "workspace:^", 17 | "@types/stack-utils": "^2.0.1", 18 | "@vitest/utils": "^0.34.4", 19 | "stack-utils": "^2.0.6", 20 | "strip-ansi": "^7.1.0" 21 | }, 22 | "devDependencies": { 23 | "@starbeam-dev/eslint-plugin": "^1.0.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/universal/resource/README2.md: -------------------------------------------------------------------------------- 1 | # Resource Lifecycle 2 | 3 | ## A Resource Blueprint 4 | 5 | ```ts 6 | const Stopwatch = Resource(({ on }) => { 7 | const now = Cell(Date.now()); 8 | 9 | on.setup(() => { 10 | const timer = setInterval(() => { 11 | now.set(Date.now()); 12 | }); 13 | 14 | return () => { 15 | clearInterval(timer); 16 | }; 17 | }); 18 | 19 | return now; 20 | }); 21 | 22 | const FormattedNow = Resource.withArgs((locale: Reactive) => { 23 | const now = use(Stopwatch); 24 | const formatter = CachedFormula( 25 | () => new Intl.DateTimeFormat(locale.current) 26 | ); 27 | 28 | return Formula(() => formatter().format(now())); 29 | }); 30 | ``` 31 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/description.spec.ts: -------------------------------------------------------------------------------- 1 | import { DEBUG }/*#__PURE__*/ from "@starbeam/debug"; 2 | import { expect, test } from "@starbeam-workspace/test-utils"; 3 | 4 | test("inferred api", () => { 5 | if (import.meta.env.DEV) { 6 | expect(SomeAPI()?.api).toMatchObject({ 7 | type: "simple", 8 | name: "SomeAPI", 9 | }); 10 | 11 | expect(ArrowFn()?.api).toMatchObject({ 12 | type: "simple", 13 | name: "ArrowFn", 14 | }); 15 | } else { 16 | expect(SomeAPI()?.api).toBe(undefined); 17 | expect(ArrowFn()?.api).toBe(undefined); 18 | } 19 | }); 20 | 21 | function SomeAPI() { 22 | return DEBUG.Desc("cell"); 23 | } 24 | 25 | const ArrowFn = () => DEBUG.Desc("cell"); 26 | -------------------------------------------------------------------------------- /workspace/test-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "target": "esnext", 6 | "module": "esnext", 7 | "moduleResolution": "bundler", 8 | "forceConsistentCasingInFileNames": true, 9 | "types": ["vite-env"], 10 | "strict": true, 11 | "exactOptionalPropertyTypes": true, 12 | "noImplicitOverride": true, 13 | "noPropertyAccessFromIndexSignature": true, 14 | "noUncheckedIndexedAccess": true, 15 | "declaration": true, 16 | "declarationDir": "../../dist/types", 17 | "declarationMap": true, 18 | "emitDeclarationOnly": true, 19 | "verbatimModuleSyntax": true 20 | }, 21 | "exclude": ["dist/**/*"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/src/env.js: -------------------------------------------------------------------------------- 1 | import { Cursor } from '@starbeamx/vanilla'; 2 | 3 | export function env() { 4 | return { 5 | global: globalThis, 6 | document: globalThis.document, 7 | body: new Body(document.querySelector('#bench-container')), 8 | owner: {}, 9 | }; 10 | } 11 | 12 | export class Body { 13 | #body; 14 | #snapshot; 15 | 16 | constructor(body) { 17 | this.#body = body; 18 | this.#snapshot = [...body.childNodes]; 19 | } 20 | 21 | get cursor() { 22 | return Cursor.appendTo(this.#body); 23 | } 24 | 25 | get innerHTML() { 26 | return this.#body.innerHTML; 27 | } 28 | 29 | snapshot() { 30 | this.#snapshot = [...this.#body.childNodes]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/react/react/src/debug/warnings.ts: -------------------------------------------------------------------------------- 1 | import { isPresent } from "@starbeam/core-utils"; 2 | import { DEBUG } from "@starbeam/universal"; 3 | import { isRendering } from "@starbeam/use-strict-lifecycle"; 4 | import { verified } from "@starbeam/verify"; 5 | 6 | let WARNED = false; 7 | 8 | if (import.meta.env.DEV) { 9 | const debug = verified(DEBUG, isPresent); 10 | debug.untrackedReadBarrier((_tag, _caller) => { 11 | if (isRendering()) { 12 | if (!WARNED) { 13 | WARNED = true; 14 | 15 | // @todo restore this warning 16 | } 17 | 18 | throw Error( 19 | `You read from a reactive value, but you were not inside the \`useReactive\` hook.`, 20 | ); 21 | } 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /.config/tsconfig/tsconfig.packages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.shared.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "types": ["../../packages/env"], 6 | "outDir": "../../dist/packages" 7 | }, 8 | "exclude": [ 9 | "../../packages/x-devtool/**", 10 | "../../packages/x-devtools-extension/**", 11 | "../../packages/*/*.config.ts", 12 | "../../framework/*/*.config.ts", 13 | "../../packages/*/*.config.mjs", 14 | "../../framework/*/*/*.config.mjs" 15 | ], 16 | "include": [ 17 | "../../packages/**/*", 18 | "../../framework/*/**/*", 19 | "../../@types/**/*" 20 | ], 21 | "references": [ 22 | { 23 | "path": "./tsconfig.rollup.json" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /@types/rollup-plugin-polyfill-node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/rollup-plugin-polyfill-node", 4 | "version": "1.0.0", 5 | "types": "index.d.ts", 6 | "exports": { 7 | ".": { 8 | "types": "./index.d.ts" 9 | } 10 | }, 11 | "publishConfig": { 12 | "exports": "./dist/index.d.ts", 13 | "types": "dist/index.d.ts" 14 | }, 15 | "starbeam": { 16 | "source": "d.ts", 17 | "type": "library:upstream-types" 18 | }, 19 | "scripts": { 20 | "test:lint": "eslint . --max-warnings 0", 21 | "test:types": "tsc -b" 22 | }, 23 | "dependencies": { 24 | "rollup": "^4.0.2" 25 | }, 26 | "devDependencies": { 27 | "@starbeam-dev/eslint-plugin": "^1.0.6" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/react/react/tests/support/render.ts: -------------------------------------------------------------------------------- 1 | import { Starbeam } from "@starbeam/react"; 2 | import { react } from "@starbeam-workspace/react-test-utils"; 3 | import type { FunctionComponent, ReactElement } from "react"; 4 | import { createElement } from "react"; 5 | 6 | export function usingStarbeam(component: FunctionComponent): ReactElement; 7 | export function usingStarbeam

( 8 | component: FunctionComponent

, 9 | props: P, 10 | ): ReactElement; 11 | export function usingStarbeam( 12 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 13 | component: FunctionComponent, 14 | props?: unknown, 15 | ): ReactElement { 16 | return createElement(Starbeam, null, react.render(component, props)); 17 | } 18 | -------------------------------------------------------------------------------- /packages/x/vanilla/README.md: -------------------------------------------------------------------------------- 1 | # The Vanilla Renderer 2 | 3 | The Vanilla Renderer is a minimal, experimental renderer for reactive Starbeam data. It doesn't 4 | depend on any specific framework, and is capable of rendering HTML constructs. 5 | 6 | It is intentionally minimal, and in its current form, is not intended to be used as a full-featured 7 | framework. 8 | 9 | Rather, it is **a useful demonstration** of how to build a Starbeam renderer, and useful in its own 10 | right for situations where existing frameworks aren't appropriate. 11 | 12 | The Vanilla Renderer intentionally does not include any kind of JSX or SFC-like syntax, but instead focuses 13 | on use-cases where a compiler or other framework structure would get in the way. 14 | -------------------------------------------------------------------------------- /@types/plugin-commonjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/rollup__plugin-commonjs", 4 | "version": "1.0.0", 5 | "types": "index.d.ts", 6 | "exports": { 7 | ".": { 8 | "types": "./index.d.ts" 9 | } 10 | }, 11 | "publishConfig": { 12 | "exports": "./dist/index.d.ts", 13 | "types": "dist/index.d.ts" 14 | }, 15 | "starbeam": { 16 | "source": "d.ts", 17 | "type": "library:upstream-types" 18 | }, 19 | "scripts": { 20 | "test:lint": "eslint . --max-warnings 0", 21 | "test:types": "tsc -b" 22 | }, 23 | "dependencies": { 24 | "@rollup/plugin-commonjs": "25.0.5" 25 | }, 26 | "devDependencies": { 27 | "@starbeam-dev/eslint-plugin": "^1.0.6" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /@types/plugin-node-resolve/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@types/rollup__plugin-node-resolve", 4 | "version": "1.0.0", 5 | "types": "index.d.ts", 6 | "exports": { 7 | ".": { 8 | "types": "./index.d.ts" 9 | } 10 | }, 11 | "publishConfig": { 12 | "exports": "./dist/index.d.ts", 13 | "types": "dist/index.d.ts" 14 | }, 15 | "starbeam": { 16 | "source": "d.ts", 17 | "type": "library:upstream-types" 18 | }, 19 | "scripts": { 20 | "test:lint": "eslint . --max-warnings 0", 21 | "test:types": "tsc -b" 22 | }, 23 | "dependencies": { 24 | "@rollup/plugin-node-resolve": "^15.2.3" 25 | }, 26 | "devDependencies": { 27 | "@starbeam-dev/eslint-plugin": "^1.0.6" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/universal/runtime/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/runtime", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/interfaces": "workspace:^", 17 | "@starbeam/reactive": "workspace:^", 18 | "@starbeam/runtime": "workspace:^", 19 | "@starbeam/shared": "workspace:^", 20 | "@starbeam-workspace/test-utils": "workspace:^" 21 | }, 22 | "devDependencies": { 23 | "@starbeam-dev/eslint-plugin": "^1.0.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/react/use-strict-lifecycle/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/react-use-strict-lifecycle", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/use-strict-lifecycle": "workspace:^", 17 | "@starbeam-workspace/react-test-utils": "workspace:^", 18 | "react": "18.2.0" 19 | }, 20 | "devDependencies": { 21 | "@starbeam-dev/eslint-plugin": "^1.0.6", 22 | "@types/react": "^18.2.22", 23 | "jsdom": "^22.1.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/universal/reactive/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/reactive", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/interfaces": "workspace:^", 17 | "@starbeam/reactive": "workspace:^", 18 | "@starbeam/runtime": "workspace:^", 19 | "@starbeam/shared": "workspace:^", 20 | "@starbeam-workspace/test-utils": "workspace:^" 21 | }, 22 | "devDependencies": { 23 | "@starbeam-dev/eslint-plugin": "^1.0.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/universal/universal/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/universal", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/collections": "workspace:^", 16 | "@starbeam/debug": "workspace:^", 17 | "@starbeam/resource": "workspace:^", 18 | "@starbeam/runtime": "workspace:^", 19 | "@starbeam/universal": "workspace:^" 20 | }, 21 | "devDependencies": { 22 | "@starbeam-dev/eslint-plugin": "^1.0.6", 23 | "@starbeam-workspace/test-utils": "workspace:^" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/universal/debug/src/setup.ts: -------------------------------------------------------------------------------- 1 | import { defineDebug } from "@starbeam/reactive"; 2 | 3 | import debug from "./debug.js"; 4 | 5 | if (import.meta.env.DEV) { 6 | if ( 7 | (globalThis.Buffer as BufferConstructor | undefined) === undefined && 8 | typeof require === "function" 9 | ) { 10 | try { 11 | // this is for CJS only, so require is the only option here 12 | // eslint-disable-next-line @typescript-eslint/no-var-requires 13 | const buffer = require("node:buffer") as { Buffer: BufferConstructor }; 14 | globalThis.Buffer = buffer.Buffer; 15 | } catch { 16 | // ignore 17 | } 18 | } else { 19 | const buffer = await import("node:buffer"); 20 | globalThis.Buffer = buffer.Buffer; 21 | } 22 | 23 | defineDebug(debug); 24 | } 25 | -------------------------------------------------------------------------------- /packages/universal/shared/src/stack.ts: -------------------------------------------------------------------------------- 1 | import { getCoordination } from "./env.js"; 2 | 3 | const coordination = getCoordination(); 4 | 5 | let stack = coordination.stack; 6 | 7 | if (!stack) { 8 | let current = new Set(); 9 | 10 | stack = coordination.stack = { 11 | start: () => { 12 | const prev = current; 13 | current = new Set(); 14 | 15 | return () => { 16 | const result = current; 17 | current = prev; 18 | return result; 19 | }; 20 | }, 21 | consume: (tag: object) => void current.add(tag), 22 | }; 23 | } 24 | 25 | const STACK = stack; 26 | 27 | export function start(): () => Set { 28 | return STACK.start(); 29 | } 30 | 31 | export function consume(tag: object): void { 32 | STACK.consume(tag); 33 | } 34 | -------------------------------------------------------------------------------- /workspace/dev-compile/.release-plan.json: -------------------------------------------------------------------------------- 1 | { 2 | "solution": { 3 | "@starbeam-dev/compile": { 4 | "impact": "minor", 5 | "oldVersion": "1.1.0", 6 | "newVersion": "1.2.0", 7 | "constraints": [ 8 | { 9 | "impact": "minor", 10 | "reason": "Appears in changelog section :rocket: Enhancement" 11 | } 12 | ], 13 | "pkgJSONPath": "./package.json" 14 | } 15 | }, 16 | "description": "## Release (2024-01-12)\n\n@starbeam-dev/compile 1.2.0 (minor)\n\n#### :rocket: Enhancement\n* `@starbeam-dev/compile`\n * [#5](https://github.com/starbeamjs/dev-compile/pull/5) Make starbeam smaller / faster ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n" 17 | } 18 | -------------------------------------------------------------------------------- /workspace/@domtree/interface/index.ts: -------------------------------------------------------------------------------- 1 | export interface DomTree { 2 | Document: unknown; 3 | DocumentFragment: unknown; 4 | DocumentType: unknown; 5 | Text: unknown; 6 | Comment: unknown; 7 | Element: unknown; 8 | TemplateElement: unknown; 9 | Attr: unknown; 10 | StaticRange: unknown; 11 | LiveRange: unknown; 12 | } 13 | 14 | export type Impl = T; 15 | 16 | export type CharacterData = T["Text"] | T["Comment"]; 17 | export type ParentNode = 18 | | T["Document"] 19 | | T["DocumentFragment"] 20 | | T["Element"]; 21 | 22 | export type ChildNode = 23 | | T["DocumentType"] 24 | | T["Element"] 25 | | CharacterData; 26 | 27 | export type Node = ParentNode | ChildNode | T["Attr"]; 28 | -------------------------------------------------------------------------------- /packages/universal/verify/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/verify", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "publishConfig": { 7 | "exports": { 8 | ".": { 9 | "types": "./dist/index.d.ts", 10 | "import": "./dist/index.js", 11 | "default": "./dist/index.cjs" 12 | } 13 | }, 14 | "main": "dist/index.cjs", 15 | "types": "dist/index.d.ts" 16 | }, 17 | "starbeam": { 18 | "source": "tsx", 19 | "type": "tests" 20 | }, 21 | "scripts": { 22 | "test:lint": "eslint . --max-warnings 0", 23 | "test:types": "tsc -b" 24 | }, 25 | "dependencies": { 26 | "@starbeam/verify": "workspace:^" 27 | }, 28 | "devDependencies": { 29 | "@starbeam-dev/eslint-plugin": "^1.0.6" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/x/store/tests/data.ts: -------------------------------------------------------------------------------- 1 | import { faker } from "@faker-js/faker"; 2 | 3 | export interface Person { 4 | id: string; 5 | name: string; 6 | age: number; 7 | visits: number; 8 | status: "active" | "inactive"; 9 | } 10 | 11 | function CreatePerson(): () => Person { 12 | let id = 1; 13 | 14 | return (): Person => { 15 | return { 16 | id: String(id++), 17 | name: faker.name.fullName(), 18 | age: faker.datatype.number({ min: 18, max: 65 }), 19 | visits: faker.datatype.number({ min: 0, max: 1000 }), 20 | status: faker.helpers.arrayElement(["active", "inactive"]), 21 | }; 22 | }; 23 | } 24 | 25 | export const People = (): Person[] => { 26 | return Array.from({ length: 100 }, CreatePerson()); 27 | }; 28 | 29 | Array.from({ length: 5 }, CreatePerson()); //? 30 | -------------------------------------------------------------------------------- /packages/universal/shared/src/id.ts: -------------------------------------------------------------------------------- 1 | import { getCoordination } from "./env.js"; 2 | 3 | const COORDINATION = getCoordination(); 4 | 5 | /** 6 | * This code provides a guaranteed-unique ID, even if there are multiple copies 7 | * of `@starbeam/shared`. 8 | * 9 | * This code intentionally does not use a UUID to make it easier to use these 10 | * IDs in debugging context, which is their primary purpose. 11 | */ 12 | let idGenerator = COORDINATION.id; 13 | 14 | if (!idGenerator) { 15 | let CURRENT_ID = 1; 16 | 17 | idGenerator = COORDINATION.id = { 18 | get() { 19 | return CURRENT_ID++; 20 | }, 21 | }; 22 | } 23 | 24 | const ID_GENERATOR = idGenerator; 25 | 26 | /** 27 | * Get a fresh unique ID. 28 | */ 29 | export function getID(): string | number { 30 | return ID_GENERATOR.get(); 31 | } 32 | -------------------------------------------------------------------------------- /workspace/unstable-release/src/read-package-json.js: -------------------------------------------------------------------------------- 1 | import fse from "fs-extra"; 2 | 3 | /** 4 | * @typedef {{private?: boolean; version?: string; name?: string; dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; optionalDependencies?: Record;}} PackageJson 5 | */ 6 | 7 | /** 8 | * 9 | * @param {string} path 10 | * @returns {Promise} 11 | */ 12 | export async function readPackageJson(path) { 13 | // eslint-disable-next-line @typescript-eslint/no-unsafe-return 14 | return fse.readJSON(path); 15 | } 16 | 17 | /** 18 | * @param {string} path 19 | * @param {PackageJson} packageJson 20 | */ 21 | export async function writePackageJson(path, packageJson) { 22 | await fse.writeJSON(path, packageJson, { spaces: 2 }); 23 | } 24 | -------------------------------------------------------------------------------- /workspace/@domtree/interface/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@domtree/interface", 3 | "type": "module", 4 | "version": "0.9.3", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "source": "ts", 21 | "type": "library:interfaces" 22 | }, 23 | "scripts": { 24 | "test:lint": "eslint . --max-warnings 0", 25 | "test:types": "tsc -b" 26 | }, 27 | "devDependencies": { 28 | "@starbeam-dev/compile": "workspace:*", 29 | "@starbeam-dev/eslint-plugin": "^1.0.6" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/universal/core-utils/src/iterable.tst.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "tstyche"; 2 | 3 | import type { PresentArray } from "./array.js"; 4 | import { iterableHasItems, reverse } from "./iterable.js"; 5 | 6 | describe("type checks", () => { 7 | describe("reverse", () => { 8 | test("PresentArray", () => { 9 | const array = ["a", "b", "c"] as const; 10 | expect(reverse(array)).type.toEqual>(); 11 | }); 12 | 13 | test("Set", () => { 14 | const set = new Set(["a", "b", "c"]); 15 | expect(reverse(set)).type.toEqual(); 16 | }); 17 | }); 18 | 19 | describe("iterableHasItems", () => { 20 | test("PresentArray", () => { 21 | const array = ["a", "b", "c"] as const; 22 | expect(iterableHasItems(array)).type.toEqual(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /workspace/@domtree/minimal/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @domtree/minimal 2 | 3 | ## 0.9.3 4 | 5 | ### Patch Changes 6 | 7 | - 3bf1221: Prepare for Starbeam 0.8.4 8 | - Updated dependencies [3bf1221] 9 | - @domtree/interface@0.9.3 10 | 11 | ## 0.9.2 12 | 13 | ### Patch Changes 14 | 15 | - 1a553c5: Prepare for 0.8 16 | - Updated dependencies [1a553c5] 17 | - @domtree/interface@0.9.2 18 | 19 | ## 0.9.1 20 | 21 | ### Patch Changes 22 | 23 | - 40844fd: Try to fix the build 24 | - Updated dependencies [40844fd] 25 | - @domtree/interface@0.9.1 26 | 27 | ## 0.9.1 28 | 29 | ### Patch Changes 30 | 31 | - 50f7a8f: Publish @domtree 32 | - Updated dependencies [50f7a8f] 33 | - @domtree/interface@0.9.1 34 | 35 | ## 0.9.0 36 | 37 | ### Patch Changes 38 | 39 | - 4501b1f: Publish the @domtree packages 40 | - Updated dependencies [4501b1f] 41 | - @domtree/interface@0.9.1 42 | -------------------------------------------------------------------------------- /packages/react/react/src/starbeam/instance.ts: -------------------------------------------------------------------------------- 1 | import type { Reactive } from "@starbeam/interfaces"; 2 | import type { IntoResourceBlueprint, Resource } from "@starbeam/resource"; 3 | 4 | import type { Handlers, RegisterHandlers } from "./handlers.js"; 5 | 6 | export interface StarbeamInstance { 7 | readonly on: RegisterHandlers; 8 | readonly use: UseFn; 9 | readonly service: (resource: IntoResourceBlueprint) => Resource; 10 | } 11 | 12 | export interface InternalStarbeamInstance extends StarbeamInstance { 13 | readonly deactivate: () => void; 14 | readonly reactivate: (lifecycle: Handlers) => void; 15 | } 16 | 17 | type PropagateUndefined = O extends undefined ? undefined : never; 18 | 19 | type UseFn = ( 20 | resource: IntoResourceBlueprint, 21 | options?: O, 22 | ) => Reactive>; 23 | -------------------------------------------------------------------------------- /packages/react/react/tests/service.spec.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-magic-numbers */ 2 | // @vitest-environment jsdom 3 | 4 | import { Cell, Resource } from "@starbeam/universal"; 5 | import { describeInDev } from "@starbeam-workspace/test-utils"; 6 | 7 | import { testService } from "./test-use.js"; 8 | 9 | describeInDev("services", () => { 10 | testService("CountResource", async (test) => { 11 | await test((service) => service(CountResource)); 12 | }); 13 | }); 14 | 15 | const CountResource = Resource(({ on }) => { 16 | const counter = Cell(0); 17 | let isActive = true; 18 | 19 | on.sync(() => () => (isActive = false)); 20 | 21 | return { 22 | get isActive() { 23 | return isActive; 24 | }, 25 | 26 | get current() { 27 | return counter.current; 28 | }, 29 | increment: () => counter.current++, 30 | }; 31 | }); 32 | -------------------------------------------------------------------------------- /packages/universal/universal/index.ts: -------------------------------------------------------------------------------- 1 | import "@starbeam/debug"; 2 | 3 | export { DEBUG_RENDERER } from "./src/debug-renderer.js"; 4 | export { FormulaList } from "./src/reactive-core/higher-level/formula-list.js"; 5 | export { Freshness } from "./src/reactive-core/higher-level/freshness.js"; 6 | export { 7 | type Variant, 8 | type VariantEntry, 9 | Variants, 10 | type VariantType, 11 | } from "./src/reactive-core/variants.js"; 12 | export type { Reactive } from "@starbeam/interfaces"; 13 | export { 14 | CachedFormula, 15 | Cell, 16 | DEBUG, 17 | type Equality, 18 | Formula, 19 | type FormulaFn, 20 | Marker, 21 | read, 22 | Static, 23 | } from "@starbeam/reactive"; 24 | export { 25 | type IntoResourceBlueprint, 26 | Resource, 27 | type ResourceBlueprint, 28 | } from "@starbeam/resource"; 29 | export { CONTEXT, RUNTIME, TAG } from "@starbeam/runtime"; 30 | -------------------------------------------------------------------------------- /workspace/unstable-release/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-workspace/unstable-release", 4 | "type": "module", 5 | "version": "0.0.0", 6 | "publishConfig": { 7 | "exports": "./dist/index.d.ts", 8 | "main": "dist/index.cjs", 9 | "types": "dist/index.d.ts" 10 | }, 11 | "starbeam": { 12 | "source": "js:typed", 13 | "type": "library:build-support" 14 | }, 15 | "scripts": { 16 | "test:lint": "eslint . --max-warnings 0", 17 | "test:types": "tsc -b" 18 | }, 19 | "dependencies": { 20 | "execa": "^8.0.1", 21 | "fs-extra": "^11.1.1", 22 | "globby": "^13.2.2", 23 | "latest-version": "^7.0.0" 24 | }, 25 | "devDependencies": { 26 | "@starbeam-dev/eslint-plugin": "^1.0.6", 27 | "@types/fs-extra": "^11.0.2" 28 | }, 29 | "volta": { 30 | "extends": "../../package.json" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/react/react/GLOSSARY.md: -------------------------------------------------------------------------------- 1 | # Glossary 2 | 3 | ## React Concepts 4 | 5 | ### "Render Execution" 6 | 7 | ### "Unique Component Instance" 8 | 9 | ### "Unique Hook Instance" 10 | 11 | ### Stable State 12 | 13 | #### Stable Variables 14 | 15 | > Props and State 16 | 17 | #### Stable Refs 18 | 19 | ### "Mounting" and "Unmounting" 20 | 21 | ### "Activating" and "Deactivating" 22 | 23 | > As distinct from "mounting" and "unmounting" 24 | 25 | ### "Activation" (noun) 26 | 27 | ## React Challenges 28 | 29 | ### Stale Closures 30 | 31 | ## Starbeam Concepts 32 | 33 | ### Reactive Object 34 | 35 | #### Reactive Value 36 | 37 | #### Mutable Reactive Value 38 | 39 | ## Reactive Dependencies 40 | 41 | ### "Resource Instance" 42 | 43 | ## States 44 | 45 | ### "Activated" 46 | 47 | ### "Attached" 48 | 49 | ### "Ready" 50 | 51 | ### "Deactivated" 52 | 53 | > Reactivated 54 | -------------------------------------------------------------------------------- /packages/universal/resource/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/resource", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/collections": "workspace:^", 16 | "@starbeam/debug": "workspace:^", 17 | "@starbeam/interfaces": "workspace:^", 18 | "@starbeam/reactive": "workspace:^", 19 | "@starbeam/resource": "workspace:^", 20 | "@starbeam/runtime": "workspace:^", 21 | "@starbeam/shared": "workspace:^", 22 | "@starbeam-workspace/test-utils": "workspace:^", 23 | "inspect-utils": "^1.0.1" 24 | }, 25 | "devDependencies": { 26 | "@starbeam-dev/eslint-plugin": "^1.0.6" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/universal/service/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/service", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/collections": "workspace:^", 16 | "@starbeam/debug": "workspace:^", 17 | "@starbeam/interfaces": "workspace:^", 18 | "@starbeam/reactive": "workspace:^", 19 | "@starbeam/resource": "workspace:^", 20 | "@starbeam/runtime": "workspace:^", 21 | "@starbeam/service": "workspace:^", 22 | "@starbeam/shared": "workspace:^", 23 | "@starbeam-workspace/test-utils": "workspace:^" 24 | }, 25 | "devDependencies": { 26 | "@starbeam-dev/eslint-plugin": "^1.0.6" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/react/react/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/react", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/react": "workspace:^", 17 | "@starbeam/reactive": "workspace:^", 18 | "@starbeam/runtime": "workspace:^", 19 | "@starbeam/universal": "workspace:^", 20 | "@starbeam-workspace/react-test-utils": "workspace:^", 21 | "@starbeam-workspace/test-utils": "workspace:^", 22 | "jsdom": "^22.1.0", 23 | "react": "^18.2.0", 24 | "vitest": "^0.34.4" 25 | }, 26 | "devDependencies": { 27 | "@starbeam-dev/eslint-plugin": "^1.0.6" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/universal/universal/src/reactive-core/higher-level/formula-list.ts: -------------------------------------------------------------------------------- 1 | import type { Reactive } from "@starbeam/interfaces"; 2 | import { CachedFormula, Formula } from "@starbeam/reactive"; 3 | 4 | export function FormulaList( 5 | list: Iterable, 6 | { 7 | key, 8 | map, 9 | }: { 10 | key: (item: T) => unknown; 11 | map: (item: T) => U; 12 | } 13 | ): Reactive { 14 | const prev = new Map>(); 15 | 16 | return Formula(() => { 17 | const result: U[] = []; 18 | for (const item of list) { 19 | const k = key(item); 20 | const r = prev.get(k); 21 | if (r) { 22 | result.push(r.read()); 23 | } else { 24 | const newR = CachedFormula(() => map(item)); 25 | result.push(newR.read()); 26 | prev.set(k, newR); 27 | } 28 | } 29 | return result; 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /workspace/@domtree/browser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@domtree/browser", 3 | "type": "module", 4 | "version": "0.9.3", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "source": "ts", 21 | "type": "library:interfaces" 22 | }, 23 | "scripts": { 24 | "test:lint": "eslint . --max-warnings 0", 25 | "test:types": "tsc -b" 26 | }, 27 | "dependencies": { 28 | "@domtree/interface": "workspace:^" 29 | }, 30 | "devDependencies": { 31 | "@starbeam-dev/compile": "workspace:*", 32 | "@starbeam-dev/eslint-plugin": "^1.0.6" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /workspace/@domtree/minimal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@domtree/minimal", 3 | "type": "module", 4 | "version": "0.9.3", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "source": "ts", 21 | "type": "library:interfaces" 22 | }, 23 | "scripts": { 24 | "test:lint": "eslint . --max-warnings 0", 25 | "test:types": "tsc -b" 26 | }, 27 | "dependencies": { 28 | "@domtree/interface": "workspace:^" 29 | }, 30 | "devDependencies": { 31 | "@starbeam-dev/compile": "workspace:*", 32 | "@starbeam-dev/eslint-plugin": "^1.0.6" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/preact/preact-utils/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/preact-utils", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/preact": "workspace:^", 17 | "@starbeam/runtime": "workspace:^", 18 | "@starbeam/universal": "workspace:^", 19 | "@starbeam-workspace/test-utils": "workspace:^", 20 | "@testing-library/dom": "^9.2.0", 21 | "@testing-library/preact": "^3.2.3", 22 | "htm": "^3.1.1", 23 | "jsdom": "^22.1.0", 24 | "preact": "*" 25 | }, 26 | "devDependencies": { 27 | "@starbeam-dev/eslint-plugin": "^1.0.6", 28 | "preact-render-to-string": "^6.2.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /workspace/test-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | import type { SuiteAPI } from "@vitest/runner"; 2 | 3 | import { describe } from "./vitest.js"; 4 | 5 | export type { AssertionError } from "./actions.js"; 6 | export { 7 | type AnyFunction, 8 | buildCause, 9 | entryPoint, 10 | isAssertionError, 11 | RecordedEvents, 12 | removeAbstraction, 13 | withCause, 14 | } from "./actions.js"; 15 | export { TestResource } from "./test-resource.js"; 16 | export { assert, UNINITIALIZED } from "./utils.js"; 17 | export type { Assertion } from "./vitest.js"; 18 | export { 19 | afterAll, 20 | afterEach, 21 | beforeAll, 22 | beforeEach, 23 | custom, 24 | describe, 25 | expect, 26 | it, 27 | suite, 28 | test, 29 | vi, 30 | } from "./vitest.js"; 31 | export type { TestAPI } from "@vitest/runner"; 32 | 33 | export const describeInDev: ReturnType = describe.skipIf( 34 | () => !!import.meta.env.PROD, 35 | ); 36 | -------------------------------------------------------------------------------- /packages/universal/runtime/tests/support/testing.ts: -------------------------------------------------------------------------------- 1 | import { Overload } from "@starbeam/core-utils"; 2 | import { expect } from "vitest"; 3 | 4 | export class Staleness { 5 | #stale = false; 6 | 7 | expect(staleness: "stale" | "fresh"): void; 8 | expect(perform: () => T, staleness: "stale" | "fresh"): T; 9 | expect( 10 | ...args: 11 | | [staleness: "stale" | "fresh"] 12 | | [perform: () => T, staleness: "stale" | "fresh"] 13 | ): T | void { 14 | const [result, stale] = Overload<[T | undefined, "stale" | "fresh"]>() 15 | .of(args) 16 | .resolve({ 17 | [1]: (staleness) => [undefined, staleness], 18 | [2]: (perform, staleness) => [perform(), staleness], 19 | }); 20 | 21 | expect(this.#stale ? "stale" : "fresh").toBe(stale); 22 | this.#stale = false; 23 | return result; 24 | } 25 | 26 | invalidate(): void { 27 | this.#stale = true; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/universal/reactive/src/primitives/marker.ts: -------------------------------------------------------------------------------- 1 | import type { CellTag, Tagged } from "@starbeam/interfaces"; 2 | import { TAG } from "@starbeam/shared"; 3 | import { createCellTag } from "@starbeam/tags"; 4 | 5 | import { getDebug, getRuntime } from "../runtime.js"; 6 | import type { SugaryPrimitiveOptions } from "./utils.js"; 7 | import { toOptions } from "./utils.js"; 8 | 9 | export interface Marker extends Tagged { 10 | read: () => void; 11 | mark: () => void; 12 | freeze: () => void; 13 | } 14 | 15 | export function Marker(options?: SugaryPrimitiveOptions): Marker { 16 | const { description } = toOptions(options); 17 | const desc = getDebug()?.Desc("cell", description); 18 | const { tag, mark, freeze } = createCellTag(desc); 19 | 20 | return { 21 | [TAG]: tag, 22 | read: () => void getRuntime().consume(tag), 23 | mark: () => void getRuntime().mark(tag, mark), 24 | freeze, 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/src/react-non-reactive.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as ReactDOM from "react-dom/client"; 3 | 4 | export const oneK = () => { 5 | let items = []; 6 | 7 | function Loop() { 8 | return <> 9 | React (no Starbeam, {items.length}):
10 | {items.map((item, index) => ( 11 |
{item.a}{item.b}{item.c}
15 | ))} 16 | ; 17 | } 18 | 19 | return { 20 | setup: () => { 21 | for (let i = 0; i < 1000; i++) { 22 | items.push({ 23 | a: 'Hello World', 24 | b: ' - ', 25 | c: 'Goodbye World', 26 | }); 27 | } 28 | }, 29 | render: () => { 30 | let body = document.querySelector('#bench-container'); 31 | const root = ReactDOM.createRoot(body); 32 | root.render(); 33 | } 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /packages/universal/verify/src/assertions/multi.ts: -------------------------------------------------------------------------------- 1 | import { expected, toKind } from "../verify.js"; 2 | 3 | export function isOneOf( 4 | ...verifiers: ((value: In) => value is Out)[] 5 | ): (value: In) => value is Out { 6 | function verify(input: In): input is Out { 7 | for (const verifier of verifiers) { 8 | if (verifier(input)) { 9 | return true; 10 | } 11 | } 12 | 13 | return false; 14 | } 15 | 16 | const expectation = expected.updated(verify, { 17 | to: (to) => { 18 | if (to === undefined) { 19 | return ["to be one of", "any"]; 20 | } else { 21 | return `${toKind(to)} or any`; 22 | } 23 | }, 24 | actual: (actual) => { 25 | return (input: In) => { 26 | if (actual) { 27 | return actual(input); 28 | } 29 | }; 30 | }, 31 | }); 32 | 33 | return expected.associate(verify, expectation); 34 | } 35 | -------------------------------------------------------------------------------- /packages/universal/universal/src/debug-renderer.ts: -------------------------------------------------------------------------------- 1 | import type { Description, Unsubscribe } from "@starbeam/interfaces"; 2 | import { DEBUG, Formula } from "@starbeam/reactive"; 3 | import { render } from "@starbeam/runtime"; 4 | 5 | export const DEBUG_RENDERER = { 6 | render( 7 | { 8 | render: evaluate, 9 | debug, 10 | }: { 11 | render: () => T; 12 | debug: (value: T) => void; 13 | }, 14 | description?: Description | string 15 | ): Unsubscribe { 16 | const formula = Formula( 17 | evaluate, 18 | DEBUG?.Desc("formula", description ?? "DEBUG_RENDERER") 19 | ); 20 | 21 | debug(formula.read()); 22 | 23 | let dirty = false; 24 | return render(formula, () => { 25 | if (!dirty) { 26 | dirty = true; 27 | 28 | queueMicrotask(() => { 29 | dirty = false; 30 | debug(formula.read()); 31 | }); 32 | } 33 | }); 34 | }, 35 | }; 36 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": [ 4 | "*", 5 | "!.eslintrc.json", 6 | "!tsconfig.json", 7 | "!package.json", 8 | "!.vscode" 9 | ], 10 | 11 | "plugins": ["@starbeam-dev"], 12 | "overrides": [ 13 | { 14 | "extends": ["plugin:@starbeam-dev/tight"], 15 | "files": ["vitest.*.{mts,ts}"], 16 | "parserOptions": { 17 | "project": ["tsconfig.json"] 18 | } 19 | }, 20 | { 21 | "extends": ["plugin:@starbeam-dev/esm"], 22 | "files": ["rollup.config.{mjs,js}"], 23 | "parserOptions": { 24 | "project": ["tsconfig.json"] 25 | } 26 | }, 27 | { 28 | "extends": ["plugin:@starbeam-dev/json:recommended"], 29 | "files": [ 30 | ".eslintrc.json", 31 | ".eslintrc.*.json", 32 | ".knip.json", 33 | ".vscode/*.json", 34 | "tsconfig.json", 35 | "package.json" 36 | ] 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /packages/universal/debug/tests/stack.spec.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-magic-numbers */ 2 | import { DEBUG }/*#__PURE__*/ from "@starbeam/debug"; 3 | import type { CallStack } from "@starbeam/interfaces"; 4 | import { describe, expect, test } from "vitest"; 5 | 6 | describe("Error stacks", () => { 7 | test.skipIf(() => import.meta.env.PROD)("getting the caller", () => { 8 | const anArrow = (next: () => T): T => next(); 9 | 10 | function aFunction(): string | undefined { 11 | return anOuterFunction()?.frames[0].action; 12 | } 13 | 14 | expect(anArrow(aFunction)).toEqual("aFunction"); 15 | expect(anArrow(callerStackInArgs)).toEqual("anArrow"); 16 | }); 17 | }); 18 | 19 | function anOuterFunction(): CallStack | undefined { 20 | return void DEBUG.callerStack(); 21 | } 22 | 23 | function callerStackInArgs( 24 | desc = DEBUG.callerStack()?.frames[0].action, 25 | ): string | undefined { 26 | return desc; 27 | } 28 | -------------------------------------------------------------------------------- /packages/universal/universal/tests/cell.spec.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-magic-numbers */ 2 | import { Cell } from "@starbeam/universal"; 3 | import { describe, expect, test } from "vitest"; 4 | 5 | describe("Cell", () => { 6 | test("creates reactive storage", () => { 7 | const cell = Cell(0); 8 | expect(cell.current).toBe(0); 9 | }); 10 | 11 | test("updates reactive storage with set", () => { 12 | const cell = Cell(0); 13 | cell.set(1); 14 | expect(cell.current).toBe(1); 15 | }); 16 | 17 | test("updates reactive storage with update", () => { 18 | const cell = Cell(0); 19 | cell.update((prev) => prev + 1); 20 | expect(cell.current).toBe(1); 21 | 22 | cell.update((prev) => prev + 1); 23 | expect(cell.current).toBe(2); 24 | }); 25 | 26 | test("can be frozen", () => { 27 | const cell = Cell(0); 28 | cell.freeze(); 29 | expect(() => cell.set(1)).toThrow(TypeError); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/tests/testing.spec.ts: -------------------------------------------------------------------------------- 1 | // @vitest-environment jsdom 2 | 3 | import { install } from "@starbeam/preact"; 4 | import { html, render } from "@starbeam-workspace/preact-testing-utils"; 5 | import { describe, test } from "@starbeam-workspace/test-utils"; 6 | import { options } from "preact"; 7 | import { beforeAll } from "vitest"; 8 | 9 | describe("preact-testing-utils", () => { 10 | beforeAll(() => { 11 | install(options); 12 | }); 13 | 14 | function App({ name }: { name: string }) { 15 | return html`
hello ${name}
`; 16 | } 17 | 18 | test("render", () => { 19 | render(App, { name: "world" }).expect( 20 | ({ name }) => html`
hello ${name}
` 21 | ); 22 | }); 23 | 24 | test("rerender", () => { 25 | const result = render(App, { name: "world" }).expect( 26 | ({ name }) => html`
hello ${name}
` 27 | ); 28 | 29 | result.rerender({ name: "cruel world" }); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /packages/universal/core-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@starbeam/core-utils", 3 | "type": "module", 4 | "version": "0.8.9", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "type": "library:public" 21 | }, 22 | "scripts": { 23 | "build": "rollup -c", 24 | "prepack": "pnpm build", 25 | "test:lint": "eslint . --max-warnings 0", 26 | "test:specs": "vitest --run --pool forks", 27 | "test:types": "tsc -b" 28 | }, 29 | "dependencies": {}, 30 | "devDependencies": { 31 | "@starbeam-dev/compile": "workspace:*", 32 | "@starbeam-dev/eslint-plugin": "^1.0.6", 33 | "rollup": "^4.0.2" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/universal/debug/src/logger.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This API might gain additional features. For now, its primary purpose is to 3 | * provide a sanctioned way to log to the console that is overtly different 4 | * from explicit calls to `console.log` (which make it more difficult to 5 | * identify errant console.logs). 6 | */ 7 | export class Logger { 8 | static console(): Logger { 9 | return new Logger(console); 10 | } 11 | 12 | static of(logger: typeof console): Logger { 13 | return new Logger(logger); 14 | } 15 | 16 | readonly #logger: typeof console; 17 | 18 | private constructor(logger: typeof console) { 19 | this.#logger = logger; 20 | } 21 | 22 | group(...args: unknown[]): void { 23 | this.#logger.group(...args); 24 | } 25 | 26 | groupEnd(): void { 27 | this.#logger.groupEnd(); 28 | } 29 | 30 | info(...args: unknown[]): void { 31 | this.#logger.info(...args); 32 | } 33 | } 34 | 35 | export const LOGGER = Logger.console(); 36 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/src/vanilla-starbeam.js: -------------------------------------------------------------------------------- 1 | import { env } from "./env.js"; 2 | import { Cell } from '@starbeam/universal'; 3 | import { El, Text, Fragment } from "@starbeamx/vanilla"; 4 | 5 | export const oneK = () => { 6 | let renderer; 7 | 8 | return { 9 | setup: () => { 10 | const fragments = []; 11 | 12 | for (let i = 0; i < 1000; i++) { 13 | const a = Cell("Hello World"); 14 | const b = Cell(" - "); 15 | const c = Cell("Goodbye World"); 16 | 17 | const title = El.Attr("title", a); 18 | 19 | const el = El({ 20 | tag: "div", 21 | attributes: [title], 22 | body: [Text(a), Text(b), Text(c)], 23 | }); 24 | fragments.push(el); 25 | } 26 | 27 | let root = Fragment(fragments); 28 | 29 | renderer = root; 30 | }, 31 | render: () => { 32 | const { body, owner } = env(); 33 | renderer(body.cursor).create({ owner }); 34 | }, 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /workspace/@domtree/any/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@domtree/any", 3 | "type": "module", 4 | "version": "0.9.3", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "source": "ts", 21 | "type": "library:interfaces" 22 | }, 23 | "scripts": { 24 | "test:lint": "eslint . --max-warnings 0", 25 | "test:types": "tsc -b" 26 | }, 27 | "dependencies": { 28 | "@domtree/browser": "workspace:^", 29 | "@domtree/interface": "workspace:^", 30 | "@domtree/minimal": "workspace:^" 31 | }, 32 | "devDependencies": { 33 | "@starbeam-dev/compile": "workspace:*", 34 | "@starbeam-dev/eslint-plugin": "^1.0.6" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /workspace/@domtree/flavors/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@domtree/flavors", 3 | "type": "module", 4 | "version": "0.9.3", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "source": "ts", 21 | "type": "library:interfaces" 22 | }, 23 | "scripts": { 24 | "test:lint": "eslint . --max-warnings 0", 25 | "test:types": "tsc -b" 26 | }, 27 | "dependencies": { 28 | "@domtree/any": "workspace:^", 29 | "@domtree/browser": "workspace:^", 30 | "@domtree/minimal": "workspace:^" 31 | }, 32 | "devDependencies": { 33 | "@starbeam-dev/compile": "workspace:*", 34 | "@starbeam-dev/eslint-plugin": "^1.0.6" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vanilla Beanch 5 | 6 | 9 | 10 | 11 | Open the console to see the results. 12 | NOTE: this is slow atm. Also high iteration counts can indicate an error ocurred. 13 | 14 |
15 | 16 |

17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /packages/preact/preact-testing-utils/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/preact-testing-utils", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/preact": "workspace:^", 17 | "@starbeam/runtime": "workspace:^", 18 | "@starbeam/universal": "workspace:^", 19 | "@starbeam-workspace/preact-testing-utils": "workspace:^", 20 | "@starbeam-workspace/test-utils": "workspace:^", 21 | "@testing-library/dom": "^9.2.0", 22 | "@testing-library/preact": "^3.2.3", 23 | "htm": "^3.1.1", 24 | "jsdom": "^22.1.0", 25 | "preact": "*" 26 | }, 27 | "devDependencies": { 28 | "@starbeam-dev/eslint-plugin": "^1.0.6", 29 | "preact-render-to-string": "^6.2.1" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | // Additive to package.json and turbo.json 4 | // 5 | // https://turbo.build/repo/docs/core-concepts/caching/file-inputs#specifying-additional-inputs 6 | "globalDependencies": [ 7 | ".github/workflows/ci.yml", 8 | ".npmrc", 9 | ".eslintrc.json", 10 | ".eslintrc.repo.json", 11 | "pnpm-lock.yaml", 12 | "pnpm-workspace.yaml", 13 | "patches", 14 | "vitest.config.ts", 15 | "vitest.workspace.ts", 16 | "tsconfig.json", 17 | "tsconfig.root.json" 18 | ], 19 | "pipeline": { 20 | "build": { 21 | "outputs": ["dist"], 22 | "dependsOn": ["^build"] 23 | }, 24 | "lint": { 25 | "dependsOn": ["test:lint"], 26 | "outputs": [] 27 | }, 28 | "test:lint": { 29 | "outputs": [] 30 | }, 31 | "test:types": { 32 | "outputs": [] 33 | }, 34 | "typecheck": { 35 | "dependsOn": ["test:types"], 36 | "outputs": [] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/universal/interfaces/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@starbeam/interfaces", 3 | "type": "module", 4 | "version": "0.8.9", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "source": "ts", 21 | "template:package": "interfaces.package.json", 22 | "type": "library:interfaces" 23 | }, 24 | "scripts": { 25 | "test:lint": "eslint . --max-warnings 0", 26 | "test:types": "tsc -b" 27 | }, 28 | "dependencies": { 29 | "@domtree/any": "workspace:^", 30 | "@starbeam/shared": "workspace:^" 31 | }, 32 | "devDependencies": { 33 | "@starbeam-dev/compile": "workspace:*", 34 | "@starbeam-dev/eslint-plugin": "^1.0.6" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.config/tsconfig/tsconfig.shared.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": "../..", 4 | "allowJs": true, 5 | 6 | "target": "esnext", 7 | "module": "esnext", 8 | "moduleResolution": "bundler", 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | 13 | "strict": true, 14 | "noUncheckedIndexedAccess": true, 15 | "exactOptionalPropertyTypes": true, 16 | "noPropertyAccessFromIndexSignature": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "noImplicitOverride": true, 19 | 20 | "isolatedModules": true, 21 | "skipLibCheck": true, 22 | "skipDefaultLibCheck": true, 23 | 24 | "esModuleInterop": true, 25 | "allowSyntheticDefaultImports": true, 26 | 27 | "useDefineForClassFields": true, 28 | "verbatimModuleSyntax": true, 29 | 30 | "resolveJsonModule": true, 31 | 32 | "experimentalDecorators": true, 33 | "emitDecoratorMetadata": false, 34 | 35 | "types": ["vite/client", "vitest/importMeta"] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/x/vanilla/src/cursor.ts: -------------------------------------------------------------------------------- 1 | export class Cursor { 2 | static appendTo(node: ParentNode): Cursor { 3 | return new Cursor(node, null); 4 | } 5 | 6 | static insertBefore(parent: ParentNode, node: Node): Cursor { 7 | return new Cursor(parent, node); 8 | } 9 | 10 | readonly #parentNode: ParentNode; 11 | readonly #nextSibling: Node | null; 12 | readonly #document: Document; 13 | 14 | constructor(parentNode: ParentNode, nextSibling: Node | null) { 15 | this.#parentNode = parentNode; 16 | this.#nextSibling = nextSibling; 17 | 18 | if (parentNode.ownerDocument === null) { 19 | throw new Error( 20 | "Cursor must be created with a parent node that is part of a document", 21 | ); 22 | } 23 | this.#document = parentNode.ownerDocument; 24 | } 25 | 26 | insert(node: ChildNode): ChildNode { 27 | this.#parentNode.insertBefore(node, this.#nextSibling); 28 | return node; 29 | } 30 | 31 | get document(): Document { 32 | return this.#document; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/preact/preact/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/preact", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/preact": "workspace:^", 17 | "@starbeam/resource": "workspace:^", 18 | "@starbeam/runtime": "workspace:^", 19 | "@starbeam/service": "workspace:^", 20 | "@starbeam/universal": "workspace:^", 21 | "@starbeam-workspace/preact-testing-utils": "workspace:^", 22 | "@starbeam-workspace/test-utils": "workspace:^", 23 | "@testing-library/dom": "^9.2.0", 24 | "@testing-library/preact": "^3.2.3", 25 | "jsdom": "^22.1.0", 26 | "preact": "*" 27 | }, 28 | "devDependencies": { 29 | "@starbeam-dev/eslint-plugin": "^1.0.6", 30 | "preact-render-to-string": "^6.2.1" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/universal/reactive/index.ts: -------------------------------------------------------------------------------- 1 | export { CachedFormula } from "./src/primitives/cached.js"; 2 | export type { CellOptions, Equality } from "./src/primitives/cell.js"; 3 | export { Cell, Static } from "./src/primitives/cell.js"; 4 | export { Formula } from "./src/primitives/formula.js"; 5 | export type { 6 | FinalizedFormula, 7 | InitializingTrackingFrame, 8 | } from "./src/primitives/formula-lifecycle.js"; 9 | export { StartTrackingFrame } from "./src/primitives/formula-lifecycle.js"; 10 | export { 11 | type ActiveTrackingFrame, 12 | finishFrame, 13 | startFrame, 14 | type TrackingFrame, 15 | } from "./src/primitives/frame.js"; 16 | export { Marker } from "./src/primitives/marker.js"; 17 | export { type FormulaFn, isFormulaFn } from "./src/primitives/utils.js"; 18 | export { 19 | DEBUG, 20 | defineDebug, 21 | defineRuntime, 22 | UNKNOWN_REACTIVE_VALUE, 23 | } from "./src/runtime.js"; 24 | export { 25 | intoReactive, 26 | isReactive, 27 | isTagged, 28 | read, 29 | type ReadValue, 30 | } from "./src/utils.js"; 31 | -------------------------------------------------------------------------------- /packages/vue/vue/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/vue", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/resource": "workspace:^", 17 | "@starbeam/runtime": "workspace:^", 18 | "@starbeam/service": "workspace:^", 19 | "@starbeam/universal": "workspace:^", 20 | "@starbeam/vue": "workspace:^", 21 | "@starbeam-workspace/test-utils": "workspace:^", 22 | "@starbeam-workspace/vue-testing-utils": "workspace:^", 23 | "@testing-library/dom": "^9.2.0", 24 | "@testing-library/vue": "^7.0.0", 25 | "@vue/test-utils": "^2.4.1", 26 | "jsdom": "^22.1.0", 27 | "vue": ">=3.0.0" 28 | }, 29 | "devDependencies": { 30 | "@starbeam-dev/eslint-plugin": "^1.0.6", 31 | "vue": "^3.3.4" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.config/eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "overrides": [ 4 | { 5 | "extends": ["plugin:@starbeam-dev/json:parser"], 6 | "files": ["*.json", "workspace/build/*.json"] 7 | }, 8 | { 9 | "extends": ["plugin:@starbeam-dev/json:default"], 10 | "files": ["*.json", "workspace/build/*.json"], 11 | "excludedFiles": [ 12 | "tsconfig.*", 13 | ".eslintrc.json", 14 | "package.json", 15 | ".vscode/settings.json" 16 | ] 17 | }, 18 | { 19 | "extends": ["plugin:@starbeam-dev/json:vscode-settings"], 20 | "files": [".vscode/settings.json"] 21 | }, 22 | { 23 | "extends": ["plugin:@starbeam-dev/json:tsconfig"], 24 | "files": ["tsconfig.*.json", "tsconfig.json"] 25 | }, 26 | { 27 | "extends": ["plugin:@starbeam-dev/json:eslintrc"], 28 | "files": [".eslintrc.json", "**/eslintrc.json"] 29 | }, 30 | { 31 | "extends": ["plugin:@starbeam-dev/json:package"], 32 | "files": ["package.json"] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /@types/ansicolor/index.d.ts: -------------------------------------------------------------------------------- 1 | type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never; 2 | 3 | type Colors = 4 | | "Black" 5 | | "Red" 6 | | "Green" 7 | | "Yellow" 8 | | "Blue" 9 | | "Magenta" 10 | | "Cyan" 11 | | "White" 12 | | "Default"; 13 | 14 | type Styles = "bright" | "dim" | "italic" | "underline" | "inverse"; 15 | 16 | type Bg = `bg${"Bright" | ""}${Colors}`; 17 | 18 | type BgColor = Expand<{ 19 | [key in Colors]: Color; 20 | }>; 21 | 22 | type FgColor = Expand<{ 23 | bright: Color; 24 | dim: Color; 25 | italic: Color; 26 | underline: Color; 27 | inverse: Color; 28 | dim: Color; 29 | magenta: Color; 30 | black: Color; 31 | red: Color; 32 | green: Color; 33 | yellow: Color; 34 | blue: Color; 35 | magenta: Color; 36 | cyan: Color; 37 | white: Color; 38 | default: Color; 39 | }>; 40 | 41 | interface Methods { 42 | strip: Color; 43 | } 44 | 45 | export type Color = Methods & BgColor & FgColor & ((text: string) => string); 46 | 47 | const DEFAULT: Color; 48 | export default DEFAULT; 49 | -------------------------------------------------------------------------------- /packages/universal/shared/src/constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The `UNINITIALIZED` symbol represents a special internal value that can be 3 | * used to differentiate between any user-supplied value and the state of being 4 | * uninitialized. 5 | * 6 | * You do not **need** to import `@starbeam/shared` to get this symbol, as it 7 | * is specified using `Symbol.for`. 8 | */ 9 | const UNINITIALIZED = Symbol.for("starbeam.UNINITIALIZED"); 10 | type UNINITIALIZED = typeof UNINITIALIZED; 11 | 12 | /** 13 | * The `TAG` symbol is the protocol entry point for reactive values. 14 | * Implementations of the `Tagged` interface specify their reactive behavior 15 | * under this symbol. 16 | */ 17 | const TAG: unique symbol = Symbol.for("starbeam.TAG"); 18 | type TAG = typeof TAG; 19 | 20 | /** 21 | * The `NOW` symbol is the name on `globalThis` that is used to store the 22 | * current timestamp. 23 | */ 24 | const COORDINATION: unique symbol = Symbol.for("starbeam.COORDINATION"); 25 | type COORDINATION = typeof COORDINATION; 26 | 27 | export { COORDINATION, TAG, UNINITIALIZED }; 28 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/src/react-starbeam.jsx: -------------------------------------------------------------------------------- 1 | import { useReactive, setup } from "@starbeam/react"; 2 | import { Cell } from '@starbeam/universal'; 3 | import React from 'react'; 4 | import * as ReactDOM from "react-dom/client"; 5 | 6 | export const oneK = () => { 7 | let items = []; 8 | 9 | function Loop() { 10 | return useReactive(() => { 11 | return <> 12 | React:
13 | {items.map((item, index) => ( 14 |
{item.a.current}{item.b.current}{item.c.current}
16 | ))} 17 | ; 18 | }); 19 | } 20 | 21 | return { 22 | setup: () => { 23 | for (let i = 0; i < 1000; i++) { 24 | items.push({ 25 | a: Cell('Hello World'), 26 | b: Cell(' - '), 27 | c: Cell('Goodbye World'), 28 | }); 29 | } 30 | }, 31 | render: () => { 32 | let body = document.querySelector('#bench-container'); 33 | const root = ReactDOM.createRoot(body); 34 | root.render(); 35 | } 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /.github/workflows/publish-unstable.yml: -------------------------------------------------------------------------------- 1 | # For every push to the master branch, this publishes an NPM package to the 2 | # "unstable" NPM tag. 3 | 4 | name: Publish Unstable 5 | 6 | on: 7 | workflow_dispatch: 8 | push: 9 | branches: 10 | - main 11 | 12 | concurrency: 13 | group: publish-unstable-${{ github.head_ref || github.ref }} 14 | cancel-in-progress: true 15 | 16 | jobs: 17 | publish: 18 | name: "NPM Publish" 19 | runs-on: ubuntu-latest 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | - uses: NullVoxPopuli/action-setup-pnpm@v2 24 | with: 25 | # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable 26 | node-registry-url: 'https://registry.npmjs.org' 27 | 28 | - name: build 29 | run: pnpm build 30 | 31 | - name: set versions 32 | run: node ./workspace/unstable-release/src/version.js 33 | 34 | - name: npm publish 35 | run: node ./workspace/unstable-release/src/publish.js 36 | env: 37 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 38 | -------------------------------------------------------------------------------- /packages/universal/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@starbeam/core", 3 | "type": "module", 4 | "version": "0.8.9", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "type": "library:public" 21 | }, 22 | "scripts": { 23 | "build": "rollup -c", 24 | "prepack": "pnpm build", 25 | "test:lint": "eslint . --max-warnings 0", 26 | "test:types": "tsc -b" 27 | }, 28 | "dependencies": { 29 | "@starbeam/universal": "workspace:^" 30 | }, 31 | "devDependencies": { 32 | "@starbeam-dev/compile": "workspace:*", 33 | "@starbeam-dev/eslint-plugin": "^1.0.6", 34 | "rollup": "^4.0.2" 35 | }, 36 | "files": [ 37 | "dist", 38 | "README.md", 39 | "CHANGELOG.md", 40 | "LICENSE.md" 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/src/glimmer-non-reactive.js: -------------------------------------------------------------------------------- 1 | import { 2 | precompileTemplate, 3 | setComponentTemplate, 4 | templateOnlyComponent, 5 | renderComponent, 6 | } from '@glimmer/core'; 7 | 8 | export const oneK = () => { 9 | let items = []; 10 | const Loop = setComponentTemplate( 11 | precompileTemplate(` 12 | Glimmer (static):
13 | {{#each items as |item|}} 14 |
{{item.a}}{{item.b}}{{item.c}}
16 | {{/each}} 17 | `, 18 | { strictMode: true, scope: () => ({ items }) } 19 | ), 20 | templateOnlyComponent() 21 | ); 22 | 23 | return { 24 | setup: () => { 25 | for (let i = 0; i < 1000; i++) { 26 | items.push({ 27 | a: 'Hello World', 28 | b: ' - ', 29 | c: 'Goodbye World', 30 | }); 31 | } 32 | }, 33 | render: () => { 34 | const element = document.querySelector('#bench-container'); 35 | renderComponent(Loop, { 36 | element: element, 37 | owner: {}, 38 | }); 39 | }, 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /packages/universal/tags/src/tagged.ts: -------------------------------------------------------------------------------- 1 | import type { CellTag, CoreTimestamp, Tag, Tagged } from "@starbeam/interfaces"; 2 | import { TAG } from "@starbeam/shared"; 3 | 4 | import { zero } from "./timestamp.js"; 5 | 6 | export type HasTag = T | Tagged; 7 | 8 | export function getTag(tagged: HasTag): T { 9 | return TAG in tagged ? tagged[TAG] : tagged; 10 | } 11 | 12 | export function getDependencies( 13 | ...taggedList: readonly HasTag[] 14 | ): readonly CellTag[] { 15 | return taggedList.flatMap((tagged) => { 16 | const dependencies = getTag(tagged).dependencies; 17 | return typeof dependencies === "function" ? dependencies() : []; 18 | }); 19 | } 20 | 21 | export function lastUpdated(...taggedList: readonly HasTag[]): CoreTimestamp { 22 | let lastUpdatedTimestamp: CoreTimestamp = zero(); 23 | 24 | for (const child of getDependencies(...taggedList)) { 25 | if (child.lastUpdated.at > lastUpdatedTimestamp.at) { 26 | lastUpdatedTimestamp = child.lastUpdated; 27 | } 28 | } 29 | 30 | return lastUpdatedTimestamp; 31 | } 32 | -------------------------------------------------------------------------------- /workspace/@domtree/any/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @domtree/any 2 | 3 | ## 0.9.3 4 | 5 | ### Patch Changes 6 | 7 | - 3bf1221: Prepare for Starbeam 0.8.4 8 | - Updated dependencies [3bf1221] 9 | - @domtree/browser@0.9.3 10 | - @domtree/interface@0.9.3 11 | - @domtree/minimal@0.9.3 12 | 13 | ## 0.9.2 14 | 15 | ### Patch Changes 16 | 17 | - 1a553c5: Prepare for 0.8 18 | - Updated dependencies [1a553c5] 19 | - @domtree/browser@0.9.2 20 | - @domtree/interface@0.9.2 21 | - @domtree/minimal@0.9.2 22 | 23 | ## 0.9.1 24 | 25 | ### Patch Changes 26 | 27 | - 40844fd: Try to fix the build 28 | - Updated dependencies [40844fd] 29 | - @domtree/browser@0.9.1 30 | - @domtree/interface@0.9.1 31 | - @domtree/minimal@0.9.1 32 | 33 | ## 0.9.1 34 | 35 | ### Patch Changes 36 | 37 | - 50f7a8f: Publish @domtree 38 | - Updated dependencies [50f7a8f] 39 | - @domtree/browser@0.9.1 40 | - @domtree/interface@0.9.1 41 | 42 | ## 0.9.0 43 | 44 | ### Patch Changes 45 | 46 | - 4501b1f: Publish the @domtree packages 47 | - Updated dependencies [4501b1f] 48 | - @domtree/browser@0.9.1 49 | - @domtree/interface@0.9.1 50 | -------------------------------------------------------------------------------- /packages/universal/shared/tests/stack.spec.ts: -------------------------------------------------------------------------------- 1 | import { consume, start } from "@starbeam/shared"; 2 | import { describe, expect, test } from "@starbeam-workspace/test-utils"; 3 | 4 | describe("the autotracking stack", () => { 5 | test("consuming a lifetime", () => { 6 | const done = start(); 7 | const obj = {}; 8 | consume(obj); 9 | const items = done(); 10 | expect([...items]).toEqual([obj]); 11 | }); 12 | 13 | test("consuming the same lifetime twice", () => { 14 | const done = start(); 15 | const obj = {}; 16 | consume(obj); 17 | consume(obj); 18 | const items = done(); 19 | expect([...items]).toStrictEqual([obj]); 20 | }); 21 | 22 | test("consuming multiple lifetimes, multiple times", () => { 23 | const done = start(); 24 | const obj1 = {}; 25 | const obj2 = {}; 26 | const obj3 = {}; 27 | 28 | consume(obj1); 29 | consume(obj2); 30 | consume(obj1); 31 | consume(obj2); 32 | consume(obj2); 33 | consume(obj1); 34 | consume(obj3); 35 | 36 | const items = done(); 37 | expect([...items]).toStrictEqual([obj1, obj2, obj3]); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /packages/universal/verify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@starbeam/verify", 3 | "type": "module", 4 | "version": "0.8.9", 5 | "main": "index.ts", 6 | "types": "index.ts", 7 | "exports": { 8 | "default": "./index.ts" 9 | }, 10 | "publishConfig": { 11 | "exports": { 12 | "types": "./dist/index.d.ts", 13 | "import": "./dist/index.js", 14 | "default": "./dist/index.cjs" 15 | }, 16 | "main": "dist/index.cjs", 17 | "types": "dist/index.d.ts" 18 | }, 19 | "starbeam": { 20 | "type": "library:public" 21 | }, 22 | "scripts": { 23 | "build": "rollup -c", 24 | "prepack": "pnpm build", 25 | "test:lint": "eslint . --max-warnings 0", 26 | "test:specs": "vitest --run --pool forks", 27 | "test:types": "tsc -b" 28 | }, 29 | "dependencies": { 30 | "@starbeam/core-utils": "workspace:^" 31 | }, 32 | "devDependencies": { 33 | "@starbeam-dev/compile": "workspace:*", 34 | "@starbeam-dev/eslint-plugin": "^1.0.6", 35 | "rollup": "^4.0.2" 36 | }, 37 | "files": [ 38 | "dist", 39 | "README.md", 40 | "CHANGELOG.md", 41 | "LICENSE.md" 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /packages/x/vanilla/bench/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeamx/vanilla-bench", 4 | "type": "module", 5 | "scripts": { 6 | "start": "mkdir -p dist && concurrently 'npm:watch:prod' 'npm:start:prod' --restart-tries -1 --restart-after 3000 --names 'build,serve' --prefix-colors cyan,yellow", 7 | "start:dev": "vite", 8 | "start:prod": "vite preview", 9 | "watch:prod": "NODE_ENV=production vite build --watch" 10 | }, 11 | "devDependencies": { 12 | "@babel/preset-react": "^7.18.6", 13 | "@glimmer/babel-preset": "2.0.0-beta.21", 14 | "@glimmer/core": "2.0.0-beta.21", 15 | "@glimmer/tracking": "2.0.0-beta.21", 16 | "@starbeam/react": "workspace:^", 17 | "@starbeam/universal": "workspace:^", 18 | "@starbeam-dev/compile": "workspace:*", 19 | "@starbeamx/vanilla": "workspace:^", 20 | "concurrently": "^8.0.1", 21 | "eslint": "^8.38.0", 22 | "prettier": "^2.8.7", 23 | "react": "^18.2.0", 24 | "react-dom": "^18.2.0", 25 | "tinybench": "^2.4.0", 26 | "typescript": "^5.0.4", 27 | "vite": "4.4.11", 28 | "vite-plugin-babel": "^1.1.3" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /workspace/dev-compile/src/constants.ts: -------------------------------------------------------------------------------- 1 | import type { RollupExternal } from "@starbeam-dev/core"; 2 | import typescriptLibrary from "typescript"; 3 | 4 | /** 5 | * The package should be inlined into the output. In this situation, the 6 | * `external` function should return `false`. This is the default behavior. 7 | */ 8 | export const INLINE = false satisfies RollupExternal; 9 | 10 | /** 11 | * The package should be treated as an external dependency. In this situation, 12 | * the `external` function should return `true`. This is unusual and should be 13 | * used when: 14 | * 15 | * - The package is a "helper library" (such as tslib) that we don't want to 16 | * make a real dependency 17 | * of the published package. 18 | * - (for now) The package doesn't have good support for ESM (i.e. `type: 19 | * module` in package.json) 20 | * but rollup will handle it for us. 21 | */ 22 | export const EXTERNAL = true satisfies RollupExternal; 23 | 24 | export const { 25 | ImportsNotUsedAsValues, 26 | JsxEmit, 27 | ModuleKind, 28 | ModuleResolutionKind, 29 | ScriptTarget, 30 | ModuleDetectionKind, 31 | } = typescriptLibrary; 32 | -------------------------------------------------------------------------------- /packages/x/headless-form/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeamx/headless-form", 4 | "type": "module", 5 | "version": "0.8.9", 6 | "description": "A placeholder for a headless form library", 7 | "main": "index.ts", 8 | "types": "index.ts", 9 | "exports": { 10 | "default": "./index.ts" 11 | }, 12 | "publishConfig": { 13 | "exports": { 14 | "types": "./dist/index.d.ts", 15 | "import": "./dist/index.js", 16 | "default": "./dist/index.cjs" 17 | }, 18 | "main": "dist/index.cjs", 19 | "types": "dist/index.d.ts" 20 | }, 21 | "starbeam": { 22 | "type": "library:public" 23 | }, 24 | "scripts": { 25 | "test:lint": "eslint . --max-warnings 0", 26 | "test:types": "tsc -b" 27 | }, 28 | "dependencies": { 29 | "@starbeam/collections": "workspace:^", 30 | "@starbeam/debug": "workspace:^", 31 | "@starbeam/interfaces": "workspace:^", 32 | "@starbeam/reactive": "workspace:^" 33 | }, 34 | "devDependencies": { 35 | "@starbeam-dev/compile": "workspace:*", 36 | "@starbeam-dev/eslint-plugin": "^1.0.6", 37 | "rollup": "^4.0.2" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /workspace/@domtree/flavors/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @domtree/flavors 2 | 3 | ## 0.9.3 4 | 5 | ### Patch Changes 6 | 7 | - 3bf1221: Prepare for Starbeam 0.8.4 8 | - Updated dependencies [3bf1221] 9 | - @domtree/any@0.9.3 10 | - @domtree/browser@0.9.3 11 | - @domtree/minimal@0.9.3 12 | 13 | ## 0.9.2 14 | 15 | ### Patch Changes 16 | 17 | - 1a553c5: Prepare for 0.8 18 | - Updated dependencies [1a553c5] 19 | - @domtree/any@0.9.2 20 | - @domtree/browser@0.9.2 21 | - @domtree/minimal@0.9.2 22 | 23 | ## 0.9.1 24 | 25 | ### Patch Changes 26 | 27 | - 40844fd: Try to fix the build 28 | - Updated dependencies [40844fd] 29 | - @domtree/any@0.9.1 30 | - @domtree/browser@0.9.1 31 | - @domtree/minimal@0.9.1 32 | 33 | ## 0.9.1 34 | 35 | ### Patch Changes 36 | 37 | - 50f7a8f: Publish @domtree 38 | - Updated dependencies [50f7a8f] 39 | - @domtree/any@0.9.1 40 | - @domtree/browser@0.9.1 41 | - @domtree/minimal@0.9.1 42 | 43 | ## 0.9.0 44 | 45 | ### Patch Changes 46 | 47 | - 4501b1f: Publish the @domtree packages 48 | - Updated dependencies [4501b1f] 49 | - @domtree/any@0.9.1 50 | - @domtree/browser@0.9.1 51 | - @domtree/minimal@0.9.1 52 | -------------------------------------------------------------------------------- /packages/universal/shared/src/now.ts: -------------------------------------------------------------------------------- 1 | import { getCoordination } from "./env.js"; 2 | 3 | /** 4 | * The `CLOCK` constant is a universal monotonically increasing clock. The 5 | * `Timestamp` class is used in `@starbeam/timeline` and `@starbeam/universal`, 6 | * but `Timestamp` defers to this constant. This means that multiple copies of 7 | * `@starbeam/timeline` will still see the same monotonically increasing clock. 8 | * 9 | * The term "timestamp" is used in this context to refer to a monotonically 10 | * increasing number, where each number represents a different moment in time. 11 | */ 12 | const coordination = getCoordination(); 13 | 14 | let clock = coordination.now; 15 | 16 | if (!clock) { 17 | clock = coordination.now = { 18 | timestamp: 1, 19 | }; 20 | } 21 | 22 | const CLOCK = clock; 23 | const TICK = 1; 24 | 25 | /** 26 | * Get the current timestamp. 27 | */ 28 | export function now(): number { 29 | return CLOCK.timestamp; 30 | } 31 | 32 | /** 33 | * Increment the current timestamp, and return the new one. 34 | */ 35 | export function bump(): number { 36 | CLOCK.timestamp = CLOCK.timestamp + TICK; 37 | return now(); 38 | } 39 | -------------------------------------------------------------------------------- /packages/vue/vue/src/resource.ts: -------------------------------------------------------------------------------- 1 | import type { ReadValue } from "@starbeam/reactive"; 2 | import type { UseReactive } from "@starbeam/renderer"; 3 | import { 4 | managerSetupReactive, 5 | managerSetupResource, 6 | managerSetupService, 7 | } from "@starbeam/renderer"; 8 | import type { IntoResourceBlueprint } from "@starbeam/resource"; 9 | import type { Ref } from "vue"; 10 | 11 | import { MANAGER } from "./renderer.js"; 12 | import { useReactive } from "./setup.js"; 13 | 14 | export function setupReactive(blueprint: UseReactive): Ref> { 15 | const vueInstance = useReactive(); 16 | const reactive = managerSetupReactive(MANAGER, blueprint); 17 | 18 | // whenever the component is about to render, update the Vue ref from the 19 | // current value of the reactive. 20 | return vueInstance.copiedRef(reactive); 21 | } 22 | 23 | export function setupResource(intoBlueprint: IntoResourceBlueprint): T { 24 | return managerSetupResource(MANAGER, intoBlueprint); 25 | } 26 | 27 | export function setupService(blueprint: IntoResourceBlueprint): T { 28 | useReactive(); 29 | 30 | return managerSetupService(MANAGER, blueprint); 31 | } 32 | -------------------------------------------------------------------------------- /workspace/unstable-release/src/workspaces.js: -------------------------------------------------------------------------------- 1 | import { execaCommand } from "execa"; 2 | import { globby } from "globby"; 3 | 4 | import { readPackageJson } from "./read-package-json.js"; 5 | 6 | /** 7 | * All publishable packages are in packages/* 8 | * 9 | * We could read package.json#workspaces, but then we'd have more to filter 10 | * out. 11 | */ 12 | export async function listPublicWorkspaces() { 13 | let filePaths = await globby( 14 | [ 15 | "packages/**/package.json", 16 | "workspace/**/package.json", 17 | ], { 18 | gitignore: true, 19 | ignore: ["**/tests/**", "**/node_modules/**"], 20 | } 21 | ); 22 | 23 | // eslint-disable-next-line no-console 24 | console.log("filePaths", filePaths.length); 25 | 26 | let result = []; 27 | 28 | for (let filePath of filePaths) { 29 | let packageJson = await readPackageJson(filePath); 30 | 31 | if (packageJson.private) continue; 32 | 33 | result.push(filePath); 34 | } 35 | 36 | return result; 37 | } 38 | 39 | export async function currentSHA() { 40 | let { stdout } = await execaCommand(`git rev-parse --short HEAD`); 41 | 42 | return stdout.trim(); 43 | } 44 | -------------------------------------------------------------------------------- /packages/vue/vue-testing-utils/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@starbeam-tests/vue-testing-utils", 4 | "type": "module", 5 | "version": "1.0.0", 6 | "starbeam": { 7 | "source": "tsx", 8 | "type": "tests" 9 | }, 10 | "scripts": { 11 | "test:lint": "eslint . --max-warnings 0", 12 | "test:types": "tsc -b" 13 | }, 14 | "dependencies": { 15 | "@starbeam/debug": "workspace:^", 16 | "@starbeam/interfaces": "workspace:^", 17 | "@starbeam/preact": "workspace:^", 18 | "@starbeam/runtime": "workspace:^", 19 | "@starbeam/shared": "workspace:^", 20 | "@starbeam/universal": "workspace:^", 21 | "@starbeam/vue": "workspace:^", 22 | "@starbeam-workspace/test-utils": "workspace:^", 23 | "@starbeam-workspace/vue-testing-utils": "workspace:^", 24 | "@testing-library/dom": "^9.2.0", 25 | "@testing-library/vue": "^7.0.0", 26 | "htm": "^3.1.1", 27 | "jsdom": "^22.1.0", 28 | "vue": ">=3.0.0" 29 | }, 30 | "devDependencies": { 31 | "@starbeam-dev/eslint-plugin": "^1.0.6", 32 | "@vue/shared": "^3.3.4", 33 | "preact-render-to-string": "^6.2.1", 34 | "vue": "^3.3.4" 35 | } 36 | } 37 | --------------------------------------------------------------------------------