acrylblends 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -74,7 +74,7 @@ var packages = {
74
74
  },
75
75
  "acryl-blends-frame": {
76
76
  "name": "blends-frame",
77
- "version": "0.1.0"
77
+ "version": "0.1.1"
78
78
  }
79
79
  };
80
80
  //#endregion
@@ -1209,8 +1209,10 @@ function appPluginsRow(prefix) {
1209
1209
  "",
1210
1210
  "export async function apply(ctx, config) {",
1211
1211
  ` const prefix = typeof config?.appPrefix === 'string' ? config.appPrefix : ${JSON.stringify(prefix)}`,
1212
- " // The rows read ctx.router as the app's own router: the same paths as on their own server, under the frame's prefix.",
1213
- " const appScope = ctx.extend({ router: appRouter(ctx.router, prefix) })",
1212
+ " // The rows read ctx.router as the app's own router: the same paths as on their own server, under the frame's prefix. A getter, read by each plugin",
1213
+ " // from its own context: it gets the host router traced for that context, so a route it mounts is its own and goes when the plugin is removed",
1214
+ " // (a router taken once here would make every route this row's, served until the whole app reloads).",
1215
+ " const appScope = ctx.extend({ get router() { return appRouter(this.get('router'), prefix) } })",
1214
1216
  " const fibers = await composeInto(appScope, ctx.appInstance, { host: true })",
1215
1217
  " ctx.effect(() => () => { for (const fiber of [...fibers].reverse()) void fiber.dispose() }, 'app-plugins: dispose')",
1216
1218
  "}",