summaryrefslogtreecommitdiffhomepage
path: root/src/plugin-runtime
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-09-05 04:42:20 +0900
committerAdam Malczewski <[email protected]>2026-09-05 04:42:20 +0900
commit5e5f02c67d0c165dd93f8277a3815d51a540d996 (patch)
tree2b98579d25f3f16204feaf25ddac2746e4bbb934 /src/plugin-runtime
parent2f282f1a5c784dff97af7c936ccb43ca2b63f03f (diff)
downloaddispatch-web-5e5f02c67d0c165dd93f8277a3815d51a540d996.tar.gz
dispatch-web-5e5f02c67d0c165dd93f8277a3815d51a540d996.zip
feat(layout): plan 03 — frontend plugin ABI + handshake + load lifecycle
Diffstat (limited to 'src/plugin-runtime')
-rw-r--r--src/plugin-runtime/svelte-api.ts6
-rw-r--r--src/plugin-runtime/svelte-internal-client.ts12
2 files changed, 18 insertions, 0 deletions
diff --git a/src/plugin-runtime/svelte-api.ts b/src/plugin-runtime/svelte-api.ts
new file mode 100644
index 0000000..cfc1de5
--- /dev/null
+++ b/src/plugin-runtime/svelte-api.ts
@@ -0,0 +1,6 @@
+// The Svelte API surface exposed to dynamically-imported frontend plugins
+// (plan 03): the import map maps the bare `svelte` specifier to this module's
+// emitted chunk, whose star re-exports are the SAME module instances the app
+// bundles (one rollup graph → one runtime). Entry-module exports are
+// preserved in full, so plugins can import bindings the app never uses.
+export * from "svelte";
diff --git a/src/plugin-runtime/svelte-internal-client.ts b/src/plugin-runtime/svelte-internal-client.ts
new file mode 100644
index 0000000..cc6b4d6
--- /dev/null
+++ b/src/plugin-runtime/svelte-internal-client.ts
@@ -0,0 +1,12 @@
+// The compiled-runes runtime exposed to dynamically-imported frontend
+// plugins (plan 03): the import map maps the bare `svelte/internal/client`
+// specifier to this module's emitted chunk — the same runtime instance the
+// app's own compiled components use.
+//
+// `svelte/internal/client` is intentionally untyped (the compiled-runes
+// runtime — its API is compiler-private), so the re-export needs the
+// suppression below. Nothing in the app imports THROUGH this module — the
+// import map hands it to plugins; its entry exports are preserved in full.
+//
+// @ts-expect-error — svelte/internal/client ships no declaration file
+export * from "svelte/internal/client";