Home Page
20 |Welcome to the View Transition API demo for MPA.
23 |Click the navigation links to see cross-document transitions.
24 |├── js ├── loader │ ├── .gitignore │ ├── src │ │ └── router │ │ │ └── index.ts │ └── package.json ├── luna │ ├── .gitignore │ ├── examples_preact │ │ ├── .gitignore │ │ ├── vite.config.ts │ │ ├── tsconfig.json │ │ ├── index.html │ │ ├── package.json │ │ └── app.tsx │ ├── src │ │ └── jsx-dev-runtime.ts │ ├── examples │ │ ├── vite.config.ts │ │ ├── tsconfig.json │ │ ├── index.html │ │ ├── package.json │ │ └── app.tsx │ ├── tsconfig.json │ ├── tsdown.config.ts │ └── package.json ├── astra │ ├── bin │ │ └── astra.mjs │ ├── src │ │ ├── index.ts │ │ ├── worker.ts │ │ └── cli.ts │ ├── tsconfig.json │ ├── tsdown.config.ts │ ├── assets │ │ └── scripts │ │ │ ├── theme.js │ │ │ ├── sidebar.js │ │ │ ├── toc.js │ │ │ └── wc-loader.js │ └── package.json └── wcssr │ ├── vitest.bench.config.ts │ ├── src │ ├── server-entry.ts │ ├── index.ts │ └── client-entry.ts │ ├── vitest.browser.config.ts │ └── tsconfig.json ├── sol.config.json ├── src ├── core │ ├── ssg │ │ ├── moon.pkg.json │ │ └── renderer_type.mbt │ ├── config │ │ └── moon.pkg.json │ ├── env │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ ├── routes │ │ └── moon.pkg.json │ └── parser │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti ├── internal │ ├── json_utils │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ ├── utils │ │ ├── moon.pkg.json │ │ ├── pkg.generated.mbti │ │ └── wc_name.mbt │ └── node_fs_adapter │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti ├── tests │ ├── json_renderer │ │ ├── README.mb │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ ├── ssr_test_component │ │ ├── moon.pkg.json │ │ ├── pkg.generated.mbti │ │ └── ssr_test_component.mbt │ ├── router_csr │ │ ├── pkg.generated.mbti │ │ └── moon.pkg.json │ ├── e2e_server │ │ ├── pkg.generated.mbti │ │ └── moon.pkg.json │ ├── counter_client │ │ ├── pkg.generated.mbti │ │ └── moon.pkg.json │ ├── counter_component │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ └── browser_components │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti ├── astra │ ├── cli │ │ ├── cli_utils.mbt │ │ └── pkg.generated.mbti │ ├── shiki │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ ├── assets │ │ ├── moon.pkg.json │ │ ├── pkg.generated.mbti │ │ └── scripts │ │ │ ├── theme.js │ │ │ ├── sidebar.js │ │ │ ├── toc.js │ │ │ └── wc-loader.js │ ├── markdown │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ ├── astra_worker │ │ ├── pkg.generated.mbti │ │ ├── main.mbt │ │ └── moon.pkg.json │ ├── moon.pkg.json │ ├── tree │ │ ├── moon.pkg.json │ │ ├── pkg.generated.mbti │ │ └── sitemap.mbt │ ├── builder_pool │ │ └── moon.pkg.json │ ├── routes │ │ └── moon.pkg.json │ ├── docs │ │ ├── ja │ │ │ ├── index.md │ │ │ └── guide │ │ │ │ └── index.md │ │ ├── index.md │ │ └── guide │ │ │ └── index.md │ ├── sol.config.json │ ├── generator │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ └── README.md ├── luna │ ├── signal │ │ └── moon.pkg.json │ ├── serialize │ │ └── moon.pkg.json │ ├── moon.pkg.json │ ├── routes │ │ ├── moon.pkg.json │ │ ├── routes_match.mbt │ │ └── pkg.generated.mbti │ ├── render │ │ ├── moon.pkg.json │ │ └── pkg.generated.mbti │ └── _check.mbt ├── sol │ ├── cli │ │ ├── cli_utils.mbt │ │ └── moon.pkg.json │ ├── isr │ │ ├── moon.pkg.json │ │ ├── pkg.generated.mbti │ │ └── memory_cache.mbt │ ├── middleware │ │ └── moon.pkg.json │ ├── action │ │ └── moon.pkg.json │ ├── moon.pkg.json │ └── router │ │ └── moon.pkg.json ├── moon.pkg.json ├── platform │ ├── dom │ │ ├── router │ │ │ ├── moon.pkg.json │ │ │ └── pkg.generated.mbti │ │ ├── portal │ │ │ ├── moon.pkg.json │ │ │ └── pkg.generated.mbti │ │ ├── element │ │ │ └── moon.pkg.json │ │ ├── moon.pkg.json │ │ ├── client │ │ │ ├── repair │ │ │ │ ├── moon.pkg.json │ │ │ │ └── experimental_hydrate_wbtest.mbt │ │ │ ├── moon.pkg.json │ │ │ └── pkg.generated.mbti │ │ └── debounced.mbt │ ├── js │ │ ├── cache │ │ │ ├── moon.pkg.json │ │ │ └── pkg.generated.mbti │ │ ├── fs_adapter │ │ │ ├── moon.pkg.json │ │ │ └── pkg.generated.mbti │ │ └── stream_renderer │ │ │ ├── moon.pkg.json │ │ │ └── pkg.generated.mbti │ ├── server_dom │ │ ├── moon.pkg.json │ │ ├── element │ │ │ ├── moon.pkg.json │ │ │ ├── sol_link.mbt │ │ │ └── outlet.mbt │ │ ├── wc_island.mbt │ │ ├── island.mbt │ │ ├── pkg.generated.mbti │ │ └── types.mbt │ └── README.md ├── _bench │ ├── pkg.generated.mbti │ └── moon.pkg.json ├── examples │ ├── wc │ │ ├── pkg.generated.mbti │ │ └── moon.pkg.json │ ├── game │ │ ├── pkg.generated.mbti │ │ ├── moon.pkg.json │ │ └── index.html │ ├── spa │ │ ├── pkg.generated.mbti │ │ └── moon.pkg.json │ ├── hello_luna │ │ ├── pkg.generated.mbti │ │ ├── moon.pkg.json │ │ ├── index.html │ │ └── main.mbt │ ├── browser_router │ │ ├── pkg.generated.mbti │ │ └── moon.pkg.json │ ├── todomvc │ │ ├── pkg.generated.mbti │ │ ├── moon.pkg.json │ │ └── storage.mbt │ └── wiki │ │ └── moon.pkg.json └── stella │ ├── moon.pkg.json │ └── README.md ├── .claude └── skills │ └── mooncheat │ ├── moon.mod.json │ └── SKILL.md ├── .vscode └── settings.json ├── examples ├── astra_app │ ├── moon.pkg.json │ ├── docs │ │ ├── ssr_test_component │ │ │ ├── page.json │ │ │ ├── moon.pkg.json │ │ │ └── ssr_test_component.mbt │ │ ├── tsx_demo │ │ │ ├── page.json │ │ │ └── tsx_demo.tsx │ │ ├── posts │ │ │ ├── _slug_ │ │ │ │ ├── page.json │ │ │ │ └── index.md │ │ │ ├── hello-world │ │ │ │ └── index.md │ │ │ └── index.md │ │ ├── foo.html │ │ ├── wiki │ │ │ └── index.md │ │ ├── about │ │ │ └── index.md │ │ ├── index.md │ │ └── guide │ │ │ └── index.md │ ├── moon.mod.json │ └── astra.json ├── sol_app │ ├── sol.config.json │ ├── app │ │ ├── client │ │ │ ├── _using.mbt │ │ │ ├── moon.pkg.json │ │ │ └── counter.mbt │ │ ├── server │ │ │ ├── _using.mbt │ │ │ ├── about.mbt │ │ │ └── moon.pkg.json │ │ └── __gen__ │ │ │ └── types │ │ │ ├── moon.pkg.json │ │ │ └── types.mbt │ ├── .gitignore │ ├── moon.mod.json │ ├── playwright.config.ts │ ├── package.json │ ├── scripts │ │ └── patch-for-cloudflare.js │ └── static │ │ └── loader.js └── ssg_test │ ├── sol.config.json │ └── package.json ├── fixtures └── astra_files │ ├── basic │ └── docs │ │ ├── 01_guide │ │ ├── 02_usage.md │ │ ├── index.md │ │ └── 01_installation.md │ │ ├── index.md │ │ └── 00_overview │ │ ├── 01_features.md │ │ └── index.md │ ├── mixed_prefix │ └── docs │ │ └── tutorial │ │ ├── 01_basics.md │ │ ├── advanced.md │ │ ├── index.md │ │ └── flow_control.md │ └── nested_tutorial │ └── docs │ └── 20_moonbit │ ├── 01_tutorial │ ├── 01_basics.md │ ├── index.md │ └── 02_signals.md │ ├── 02_api │ ├── 01_signals.md │ └── index.md │ └── index.md ├── e2e ├── visual-snapshots.test.ts-snapshots │ ├── wc-style.png │ ├── wc-todo.png │ ├── spa-style.png │ ├── wc-counter.png │ ├── spa-counter.png │ ├── spa-full-page.png │ ├── todomvc-empty.png │ ├── wc-full-page.png │ ├── todomvc-footer.png │ ├── spa-modal-closed.png │ ├── todomvc-with-todos.png │ └── wc-nested-parent.png ├── astra │ ├── dark-theme.test.ts-snapshots │ │ ├── code-block-dark-darwin.png │ │ └── code-block-light-darwin.png │ └── playwright.config.ts ├── browser-router │ └── browser-router.test.ts-snapshots │ │ ├── users-page-layout.txt │ │ └── home-page-structure.txt ├── sol-app │ └── playwright.config.mts ├── playwright.config-sol.mts ├── template-app │ └── playwright.config.mts ├── wc_counter_csr.test.ts ├── coverage-fixture.mjs └── playwright.config.mts ├── demo-src ├── game_react │ ├── vite.config.ts │ ├── src │ │ ├── main.tsx │ │ └── index.css │ ├── index.html │ ├── package.json │ └── tsconfig.json ├── browser_router │ └── index.html ├── game │ └── index.html └── wc │ └── index.html ├── pnpm-workspace.yaml ├── tests └── cloudflare │ └── wrangler.toml ├── .gitignore ├── docs ├── 00_introduction │ ├── index.md │ ├── 02_getting-started │ │ └── index.md │ └── 03_faq │ │ └── index.md ├── ja │ ├── 04_stella │ │ └── index.md │ ├── 01_luna │ │ └── index.md │ ├── 03_sol │ │ └── index.md │ ├── 05_tutorial-moonbit │ │ └── index.md │ └── 06_tutorial-js │ │ └── index.md ├── 04_stella │ └── index.md ├── 01_luna │ ├── 02_api-js │ │ └── index.md │ ├── index.md │ ├── 03_api-moonbit │ │ └── index.md │ └── 04_tutorial-js │ │ └── index.md ├── internal │ └── ja │ │ └── introduce-luna-mbt.md └── components │ └── my-counter.js ├── vitest.config.cloudflare.ts ├── tsconfig.json ├── moon.mod.json ├── experiments ├── webcomponents_ssr │ └── demo-component.css ├── css-minify │ └── README.md └── view_transition │ ├── index.html │ ├── bar.html │ └── foo.html ├── vitest.config.ts ├── vitest.browser.config.ts └── scripts └── lib └── cov-reporter ├── reporters └── console.ts ├── sourcemap.ts ├── parsers └── moonbit.ts └── types.ts /js/loader/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ -------------------------------------------------------------------------------- /js/luna/.gitignore: -------------------------------------------------------------------------------- 1 | __screenshots__ 2 | dist/ -------------------------------------------------------------------------------- /sol.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "islands": [] 3 | } 4 | -------------------------------------------------------------------------------- /src/core/ssg/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [] 3 | } 4 | -------------------------------------------------------------------------------- /js/luna/examples_preact/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | -------------------------------------------------------------------------------- /.claude/skills/mooncheat/moon.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mizchi/mooncheat" 3 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.experimental.useTsgo": false 3 | } -------------------------------------------------------------------------------- /js/astra/bin/astra.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import "../dist/cli.js"; 3 | -------------------------------------------------------------------------------- /examples/astra_app/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "is-main": false, 3 | "import": [] 4 | } 5 | -------------------------------------------------------------------------------- /js/astra/src/index.ts: -------------------------------------------------------------------------------- 1 | // @luna_ui/astra - MoonBit Island Architecture SSG Framework 2 | export {}; 3 | -------------------------------------------------------------------------------- /src/core/config/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [ 3 | "mizchi/luna/internal/json_utils" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/internal/json_utils/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": [ 3 | "js", 4 | "native" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /fixtures/astra_files/basic/docs/01_guide/02_usage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Usage 3 | --- 4 | 5 | # Usage 6 | 7 | How to use. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/basic/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Home 3 | --- 4 | 5 | # Welcome 6 | 7 | This is the home page. 8 | -------------------------------------------------------------------------------- /src/tests/json_renderer/README.mb: -------------------------------------------------------------------------------- 1 | ## json diff patch renderer 2 | 3 | pre-reference implementation for any platforms 4 | -------------------------------------------------------------------------------- /src/core/env/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": [ 3 | "js", 4 | "wasm-gc", 5 | "native" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/basic/docs/01_guide/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Guide 3 | --- 4 | 5 | # Guide 6 | 7 | Getting started guide. 8 | -------------------------------------------------------------------------------- /src/internal/utils/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": [ 3 | "js", 4 | "wasm-gc", 5 | "native" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/basic/docs/00_overview/01_features.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Features 3 | --- 4 | 5 | # Features 6 | 7 | List of features. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/mixed_prefix/docs/tutorial/01_basics.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Basics 3 | --- 4 | 5 | # Basics 6 | 7 | Learn the basics. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/mixed_prefix/docs/tutorial/advanced.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Advanced 3 | --- 4 | 5 | # Advanced 6 | 7 | Advanced topics. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/basic/docs/00_overview/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Overview 3 | --- 4 | 5 | # Overview 6 | 7 | This is the overview section. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/basic/docs/01_guide/01_installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation 3 | --- 4 | 5 | # Installation 6 | 7 | How to install. 8 | -------------------------------------------------------------------------------- /src/astra/cli/cli_utils.mbt: -------------------------------------------------------------------------------- 1 | // CLI utilities 2 | 3 | ///| 4 | fn console_error(msg : String) -> Unit { 5 | @console.error(@js.any(msg)) 6 | } 7 | -------------------------------------------------------------------------------- /src/luna/signal/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [], 3 | "test-import": [ 4 | { "path": "mizchi/luna/luna", "alias": "luna" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/sol/cli/cli_utils.mbt: -------------------------------------------------------------------------------- 1 | // CLI utilities 2 | 3 | ///| 4 | fn console_error(msg : String) -> Unit { 5 | @console.error(@js.any(msg)) 6 | } 7 | -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/wc-style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/wc-style.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/wc-todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/wc-todo.png -------------------------------------------------------------------------------- /fixtures/astra_files/mixed_prefix/docs/tutorial/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tutorial 3 | --- 4 | 5 | # Tutorial 6 | 7 | Introduction to the tutorial. 8 | -------------------------------------------------------------------------------- /src/sol/isr/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": ["js"], 3 | "import": [ 4 | { "path": "mizchi/js/core", "alias": "js" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/spa-style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/spa-style.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/wc-counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/wc-counter.png -------------------------------------------------------------------------------- /fixtures/astra_files/mixed_prefix/docs/tutorial/flow_control.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Flow Control 3 | --- 4 | 5 | # Flow Control 6 | 7 | About flow control. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/nested_tutorial/docs/20_moonbit/01_tutorial/01_basics.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Basics 3 | --- 4 | 5 | # Basics 6 | 7 | Learn the basics. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/nested_tutorial/docs/20_moonbit/01_tutorial/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tutorial 3 | --- 4 | 5 | # Tutorial 6 | 7 | Step by step guide. 8 | -------------------------------------------------------------------------------- /src/astra/shiki/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": ["js"], 3 | "import": [ 4 | { "path": "mizchi/js/core", "alias": "core" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/spa-counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/spa-counter.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/spa-full-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/spa-full-page.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/todomvc-empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/todomvc-empty.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/wc-full-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/wc-full-page.png -------------------------------------------------------------------------------- /fixtures/astra_files/nested_tutorial/docs/20_moonbit/01_tutorial/02_signals.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Signals 3 | --- 4 | 5 | # Signals 6 | 7 | Reactive signals. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/nested_tutorial/docs/20_moonbit/02_api/01_signals.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Signal API 3 | --- 4 | 5 | # Signal API 6 | 7 | Signal functions. 8 | -------------------------------------------------------------------------------- /fixtures/astra_files/nested_tutorial/docs/20_moonbit/02_api/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: API Reference 3 | --- 4 | 5 | # API Reference 6 | 7 | API documentation. 8 | -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/todomvc-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/todomvc-footer.png -------------------------------------------------------------------------------- /js/luna/src/jsx-dev-runtime.ts: -------------------------------------------------------------------------------- 1 | // JSX Dev Runtime - re-exports jsx-runtime for development mode 2 | export { jsx, jsxs, Fragment, jsxDEV } from "./jsx-runtime"; 3 | -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/spa-modal-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/spa-modal-closed.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/todomvc-with-todos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/todomvc-with-todos.png -------------------------------------------------------------------------------- /e2e/visual-snapshots.test.ts-snapshots/wc-nested-parent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/visual-snapshots.test.ts-snapshots/wc-nested-parent.png -------------------------------------------------------------------------------- /examples/astra_app/docs/ssr_test_component/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "SSR Test Component", 3 | "description": "Demo component page with SSR", 4 | "ssr": true 5 | } 6 | -------------------------------------------------------------------------------- /fixtures/astra_files/nested_tutorial/docs/20_moonbit/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tutorial (MoonBit) 3 | --- 4 | 5 | # MoonBit Tutorial 6 | 7 | Learn Luna with MoonBit. 8 | -------------------------------------------------------------------------------- /src/luna/serialize/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [ 3 | "mizchi/luna/luna/signal", 4 | { "path": "mizchi/luna/internal/utils", "alias": "utils" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /examples/astra_app/docs/tsx_demo/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "TSX Demo", 3 | "description": "Demo of TSX component SSR", 4 | "ssr": true, 5 | "renderer": "react" 6 | } 7 | -------------------------------------------------------------------------------- /src/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [ 3 | { "path": "mizchi/luna/luna", "alias": "core" }, 4 | { "path": "mizchi/luna/luna/signal", "alias": "signal" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /e2e/astra/dark-theme.test.ts-snapshots/code-block-dark-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/astra/dark-theme.test.ts-snapshots/code-block-dark-darwin.png -------------------------------------------------------------------------------- /e2e/astra/dark-theme.test.ts-snapshots/code-block-light-darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mizchi/luna.mbt/HEAD/e2e/astra/dark-theme.test.ts-snapshots/code-block-light-darwin.png -------------------------------------------------------------------------------- /js/luna/examples/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | 3 | export default defineConfig({ 4 | root: './', 5 | build: { 6 | outDir: 'dist', 7 | }, 8 | }); -------------------------------------------------------------------------------- /src/luna/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [ 3 | "mizchi/luna/luna/signal" 4 | ], 5 | "supported-targets": [ 6 | "js", 7 | "wasm-gc", 8 | "native" 9 | ] 10 | } -------------------------------------------------------------------------------- /demo-src/game_react/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | export default defineConfig({ 5 | plugins: [react()], 6 | }) 7 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "js/*" 3 | - "js/luna/examples" 4 | - "js/luna/examples_preact" 5 | 6 | onlyBuiltDependencies: 7 | - esbuild 8 | - sharp 9 | - workerd 10 | -------------------------------------------------------------------------------- /src/tests/json_renderer/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [ 3 | { "path": "mizchi/luna/luna", "alias": "luna" } 4 | ], 5 | "test-import": [ 6 | "mizchi/luna/luna/signal" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /examples/astra_app/docs/posts/_slug_/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "staticParams": [ 3 | { "slug": "hello-world" }, 4 | { "slug": "getting-started" }, 5 | { "slug": "advanced-topics" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /examples/sol_app/sol.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "islands": ["app/client"], 3 | "routes": "app/server", 4 | "runtime": "cloudflare", 5 | "output": "app/__gen__", 6 | "client_auto_exports": false 7 | } 8 | -------------------------------------------------------------------------------- /js/astra/src/worker.ts: -------------------------------------------------------------------------------- 1 | // Astra Worker Entry Point 2 | // This file bundles the MoonBit worker for npm distribution 3 | 4 | import "../../../target/js/release/build/astra/astra_worker/astra_worker.js"; 5 | -------------------------------------------------------------------------------- /src/platform/dom/router/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": ["js"], 3 | "import": [ 4 | { "path": "mizchi/luna/luna/routes", "alias": "routes" }, 5 | "mizchi/luna/luna/signal" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/astra/assets/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "supported-targets": ["js"], 3 | "import": [ 4 | { "path": "mizchi/luna/astra", "alias": "astra" }, 5 | { "path": "mizchi/js/node/fs", "alias": "fs" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /examples/sol_app/app/client/_using.mbt: -------------------------------------------------------------------------------- 1 | ///| 2 | /// Hydration functions are auto-generated by `sol generate`. 3 | using @element {type DomNode, div, span, button, input, form, label, text, text_of, events, use_style} 4 | -------------------------------------------------------------------------------- /tests/cloudflare/wrangler.toml: -------------------------------------------------------------------------------- 1 | # Wrangler config for Cloudflare Workers Vitest tests 2 | name = "luna-test-worker" 3 | main = "./worker.ts" 4 | compatibility_date = "2025-01-01" 5 | 6 | [vars] 7 | TEST_MODE = "true" 8 | -------------------------------------------------------------------------------- /src/luna/routes/moon.pkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": [ 3 | { "path": "mizchi/luna/internal/utils", "alias": "utils" } 4 | ], 5 | "supported-targets": [ 6 | "js", 7 | "wasm-gc", 8 | "native" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /examples/astra_app/docs/foo.html: -------------------------------------------------------------------------------- 1 |
This is a raw HTML page served at /foo/
This component is rendered from a .tsx file!
8 |Count: {count}
10 |Doubled: {doubled}
11 | 12 | 13 | 14 |Count: {count}
11 |Doubled: {doubled}
12 | 13 | 14 | 15 |This is a layout wrapper for all /users/* routes
This is an example of the new Routes-based routing system.
Count: 0
Current path: /demo/browser_router
Welcome to the View Transition API demo for MPA.
23 |Click the navigation links to see cross-document transitions.
24 |