@foxford/den 3.1.0 → 3.1.2

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.
Files changed (58) hide show
  1. package/README.mdx +66 -15
  2. package/adapter.cjs +1 -1
  3. package/adapter.d.cts +1 -1
  4. package/adapter.d.ts +1 -1
  5. package/adapter.js +1 -1
  6. package/bin/den.cjs +88 -0
  7. package/bin/den.d.cts +2 -0
  8. package/bin/den.d.ts +2 -0
  9. package/bin/den.js +88 -0
  10. package/builder/index.cjs +12 -0
  11. package/builder/index.d.cts +124 -0
  12. package/builder/index.d.ts +124 -0
  13. package/builder/index.js +12 -0
  14. package/{chunk-KJ6NDOOL.js → chunk-3RX2OSUL.js} +1 -25
  15. package/{chunk-HJO26HIQ.js → chunk-6FNC3XMI.js} +4 -0
  16. package/{chunk-CZVYVNLI.cjs → chunk-6QV4L6R2.cjs} +1 -25
  17. package/chunk-A6ZPAM6Z.cjs +26 -0
  18. package/chunk-LW7IN57F.cjs +358 -0
  19. package/chunk-MCMYOVGT.js +358 -0
  20. package/{chunk-PZVUKTZG.js → chunk-MCN4GFEQ.js} +4 -2
  21. package/{chunk-XHYR3SGG.cjs → chunk-T5QVCXVB.cjs} +5 -1
  22. package/chunk-TPBI6TOU.js +26 -0
  23. package/{chunk-7M5OAOQ4.js → chunk-TPHJUDHG.js} +20 -4
  24. package/{chunk-P4QJCHMM.cjs → chunk-Z5BL4DJA.cjs} +11 -9
  25. package/{chunk-6ZFVV3AV.cjs → chunk-ZOU6W6ZQ.cjs} +31 -15
  26. package/{define-repository-MDEWHqM7.d.cts → define-repository-CwAXed2X.d.cts} +1 -1
  27. package/{define-repository-Ca62_YCy.d.ts → define-repository-q_T4hqeP.d.ts} +1 -1
  28. package/{define-slot-Dil8Kr1A.d.ts → define-slot-Cngzae6i.d.ts} +1 -1
  29. package/{define-slot-BKvArA02.d.cts → define-slot-DYNCLDJY.d.cts} +1 -1
  30. package/define.cjs +6 -4
  31. package/define.d.cts +3 -3
  32. package/define.d.ts +3 -3
  33. package/define.js +6 -4
  34. package/den.js +60 -0
  35. package/{descriptor-DZDNH7R5.d.ts → descriptor-DQ6Gi7A_.d.ts} +31 -3
  36. package/{descriptor-h0JE9jFx.d.cts → descriptor-Dujg_1on.d.cts} +31 -3
  37. package/index.cjs +23 -22
  38. package/index.d.cts +7 -6
  39. package/index.d.ts +7 -6
  40. package/index.js +4 -3
  41. package/island/index.cjs +6 -5
  42. package/island/index.d.cts +13 -6
  43. package/island/index.d.ts +13 -6
  44. package/island/index.js +4 -3
  45. package/package.json +52 -26
  46. package/{routes-CWpIqVAM.d.ts → routes-0uXJ0fux.d.ts} +1 -1
  47. package/{routes-BqIoqbt1.d.cts → routes-B0hDrkiF.d.cts} +1 -1
  48. package/serve/index.cjs +11 -10
  49. package/serve/index.d.cts +4 -4
  50. package/serve/index.d.ts +4 -4
  51. package/serve/index.js +4 -3
  52. package/server-render-CocWXQKC.d.cts +48 -0
  53. package/server-render-CocWXQKC.d.ts +48 -0
  54. package/{types-COwVwgzE.d.cts → types-Dx5qGiwk.d.cts} +1 -1
  55. package/{types-COwVwgzE.d.ts → types-Dx5qGiwk.d.ts} +1 -1
  56. package/{view-adapter-CPI8056c.d.ts → view-adapter-B4gEb-ms.d.ts} +4 -50
  57. package/{view-adapter-D2597RJZ.d.cts → view-adapter-DJ7yB6Ml.d.cts} +4 -50
  58. package/den-serve.js +0 -146
@@ -1,4 +1,4 @@
1
- import { v as DefineServiceOptions, H as ServiceDefinition, w as DefineViewModelOptions, V as ViewModelDefinition, u as DefineRepositoryOptions, B as RepositoryDefinition } from './types-COwVwgzE.js';
1
+ import { a as DefineServiceOptions, S as ServiceDefinition, b as DefineViewModelOptions, V as ViewModelDefinition, D as DefineRepositoryOptions, d as RepositoryDefinition } from './types-Dx5qGiwk.js';
2
2
  import { Token } from '@foxford/ioc';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { x as Definition, q as LayerDefinition } from './types-COwVwgzE.js';
1
+ import { c as Definition, L as LayerDefinition } from './types-Dx5qGiwk.js';
2
2
  import { Container } from '@foxford/ioc';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { x as Definition, q as LayerDefinition } from './types-COwVwgzE.cjs';
1
+ import { c as Definition, L as LayerDefinition } from './types-Dx5qGiwk.cjs';
2
2
  import { Container } from '@foxford/ioc';
3
3
 
4
4
  /**
package/define.cjs CHANGED
@@ -4,16 +4,17 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkP4QJCHMMcjs = require('./chunk-P4QJCHMM.cjs');
7
+ var _chunkZ5BL4DJAcjs = require('./chunk-Z5BL4DJA.cjs');
8
8
  require('./chunk-C7BM4DGX.cjs');
9
9
 
10
10
 
11
+ var _chunk6QV4L6R2cjs = require('./chunk-6QV4L6R2.cjs');
11
12
 
12
13
 
13
14
 
14
- var _chunkCZVYVNLIcjs = require('./chunk-CZVYVNLI.cjs');
15
- require('./chunk-XHYR3SGG.cjs');
16
15
 
16
+ var _chunkA6ZPAM6Zcjs = require('./chunk-A6ZPAM6Z.cjs');
17
+ require('./chunk-T5QVCXVB.cjs');
17
18
 
18
19
 
19
20
 
@@ -23,4 +24,5 @@ require('./chunk-XHYR3SGG.cjs');
23
24
 
24
25
 
25
26
 
26
- exports.LoggerToken = _chunkCZVYVNLIcjs.LoggerToken; exports.SlotRegistry = _chunkP4QJCHMMcjs.SlotRegistry; exports.SlotRegistryToken = _chunkCZVYVNLIcjs.SlotRegistryToken; exports.defineRepository = _chunkP4QJCHMMcjs.defineRepository; exports.defineService = _chunkP4QJCHMMcjs.defineService; exports.defineSlot = _chunkP4QJCHMMcjs.defineSlot; exports.defineViewModel = _chunkP4QJCHMMcjs.defineViewModel; exports.logger = _chunkCZVYVNLIcjs.logger; exports.scopeLogger = _chunkCZVYVNLIcjs.scopeLogger;
27
+
28
+ exports.LoggerToken = _chunkA6ZPAM6Zcjs.LoggerToken; exports.SlotRegistry = _chunkZ5BL4DJAcjs.SlotRegistry; exports.SlotRegistryToken = _chunk6QV4L6R2cjs.SlotRegistryToken; exports.defineRepository = _chunkZ5BL4DJAcjs.defineRepository; exports.defineService = _chunkZ5BL4DJAcjs.defineService; exports.defineSlot = _chunkZ5BL4DJAcjs.defineSlot; exports.defineViewModel = _chunkZ5BL4DJAcjs.defineViewModel; exports.logger = _chunkA6ZPAM6Zcjs.logger; exports.scopeLogger = _chunkA6ZPAM6Zcjs.scopeLogger;
package/define.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-MDEWHqM7.cjs';
2
- export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-BKvArA02.cjs';
3
- export { u as DefineRepositoryOptions, v as DefineServiceOptions, w as DefineViewModelOptions, x as Definition, B as RepositoryDefinition, H as ServiceDefinition, I as SlotEntry, J as SlotRegistry, K as SlotRegistryToken, V as ViewModelDefinition } from './types-COwVwgzE.cjs';
1
+ export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-CwAXed2X.cjs';
2
+ export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-DYNCLDJY.cjs';
3
+ export { D as DefineRepositoryOptions, a as DefineServiceOptions, b as DefineViewModelOptions, c as Definition, d as RepositoryDefinition, S as ServiceDefinition, e as SlotEntry, f as SlotRegistry, g as SlotRegistryToken, V as ViewModelDefinition } from './types-Dx5qGiwk.cjs';
4
4
  import { Token, Container } from '@foxford/ioc';
5
5
  import { HierarchicalLogger } from '@foxford/logger';
6
6
 
package/define.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-Ca62_YCy.js';
2
- export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-Dil8Kr1A.js';
3
- export { u as DefineRepositoryOptions, v as DefineServiceOptions, w as DefineViewModelOptions, x as Definition, B as RepositoryDefinition, H as ServiceDefinition, I as SlotEntry, J as SlotRegistry, K as SlotRegistryToken, V as ViewModelDefinition } from './types-COwVwgzE.js';
1
+ export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-q_T4hqeP.js';
2
+ export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-Cngzae6i.js';
3
+ export { D as DefineRepositoryOptions, a as DefineServiceOptions, b as DefineViewModelOptions, c as Definition, d as RepositoryDefinition, S as ServiceDefinition, e as SlotEntry, f as SlotRegistry, g as SlotRegistryToken, V as ViewModelDefinition } from './types-Dx5qGiwk.js';
4
4
  import { Token, Container } from '@foxford/ioc';
5
5
  import { HierarchicalLogger } from '@foxford/logger';
6
6
 
package/define.js CHANGED
@@ -4,15 +4,17 @@ import {
4
4
  defineService,
5
5
  defineSlot,
6
6
  defineViewModel
7
- } from "./chunk-PZVUKTZG.js";
7
+ } from "./chunk-MCN4GFEQ.js";
8
8
  import "./chunk-WBHHHICS.js";
9
+ import {
10
+ SlotRegistryToken
11
+ } from "./chunk-3RX2OSUL.js";
9
12
  import {
10
13
  LoggerToken,
11
- SlotRegistryToken,
12
14
  logger,
13
15
  scopeLogger
14
- } from "./chunk-KJ6NDOOL.js";
15
- import "./chunk-HJO26HIQ.js";
16
+ } from "./chunk-TPBI6TOU.js";
17
+ import "./chunk-6FNC3XMI.js";
16
18
  export {
17
19
  LoggerToken,
18
20
  SlotRegistry,
package/den.js ADDED
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from 'node:child_process'
4
+ import { existsSync } from 'node:fs'
5
+ import { createRequire } from 'node:module'
6
+ import path from 'node:path'
7
+ import { fileURLToPath } from 'node:url'
8
+
9
+ // Запускатель команды: выбирает, что исполнять, и больше ничего не делает.
10
+ //
11
+ // Сама команда лежит в `src/bin/den.ts` и проходит гейты пакета — разбор аргументов это код,
12
+ // и типизироваться он обязан. Здесь только развилка, и нужна она потому, что пакет живёт в двух
13
+ // видах: в воркспейсе `exports` ведут на `src/*.ts`, и команде нужен TS-рантайм; в артефакте
14
+ // рядом лежит собранный модуль.
15
+ //
16
+ // Развилка по НАЛИЧИЮ исходника, а не по переменной окружения: спрашивать у человека, в каком
17
+ // виде стоит пакет, незачем — это видно.
18
+ //
19
+ // Шебанг один на оба вида (`node`), TS-рантайм подключается аргументом. Поэтому переписывать
20
+ // шебанг на сборке не нужно: файл уезжает в артефакт как есть.
21
+ //
22
+ // Сигналы пробрасываются вниз, и запуск асинхронный именно ради этого: `den dev` держит поднятым
23
+ // дочерний процесс приложения, а синхронный запуск обработчиков не пускает — сигнал убил бы
24
+ // запускатель, оставив команду и её процесс висеть на порту. В терминале это незаметно (Ctrl+C
25
+ // идёт всей группе), а супервизор шлёт сигнал по одному PID.
26
+
27
+ const dir = path.dirname(fileURLToPath(import.meta.url))
28
+ const source = path.join(dir, '..', 'src', 'bin', 'den.ts')
29
+
30
+ const target = existsSync(source)
31
+ ? ['--import', createRequire(import.meta.url).resolve('tsx'), source]
32
+ : [path.join(dir, 'bin', 'den.js')]
33
+
34
+ // `detached` — не для отвязки, а ради ГРУППЫ процессов: ребёнок становится её лидером, и сигнал
35
+ // уходит всей группе, включая внуков. Убивать одного прямого ребёнка недостаточно — между нами
36
+ // и командой может встать ещё один процесс (TS-рантайм), и тогда внук переживает сигнал,
37
+ // продолжая держать наблюдателей файловой системы.
38
+ const child = spawn(process.execPath, [...target, ...process.argv.slice(2)], {
39
+ detached: true,
40
+ stdio: 'inherit',
41
+ })
42
+
43
+ function killGroup(signal) {
44
+ try {
45
+ process.kill(-child.pid, signal)
46
+ } catch {
47
+ // Группы уже нет — значит и убивать некого
48
+ }
49
+ }
50
+
51
+ for (const signal of ['SIGINT', 'SIGTERM']) {
52
+ process.on(signal, () => killGroup(signal))
53
+ }
54
+
55
+ // Последняя сетка: выход не по сигналу тоже не должен оставлять группу висеть
56
+ process.on('exit', () => killGroup('SIGTERM'))
57
+
58
+ child.on('exit', (code, signal) => {
59
+ process.exit(signal === null ? code ?? 1 : 1)
60
+ })
@@ -1,5 +1,5 @@
1
- import { S as SlotDefinition } from './define-slot-Dil8Kr1A.js';
2
- import { q as LayerDefinition, x as Definition } from './types-COwVwgzE.js';
1
+ import { S as SlotDefinition } from './define-slot-Cngzae6i.js';
2
+ import { L as LayerDefinition, c as Definition } from './types-Dx5qGiwk.js';
3
3
  import { Token } from '@foxford/ioc';
4
4
 
5
5
  /**
@@ -65,6 +65,34 @@ interface IslandDescriptor {
65
65
  * не нужно. Единицы слотов регистрируются в контейнере острова вместе с его собственными.
66
66
  */
67
67
  slots?: Readonly<Record<string, SlotDefinition>>;
68
+ /**
69
+ * Настройка процесса перед первым рендером: разбор разметки, полифиллы, всё, что ставится
70
+ * один раз и нужно раньше приложения.
71
+ *
72
+ * В исходниках приложения этого поля нет — оно объявляется конфигом и вплавляется сборкой
73
+ * в СЕРВЕРНЫЙ выход, поэтому дескриптор остаётся декларацией. Гарантию даёт движок
74
+ * ({@link renderApp} зовёт настройку один раз на процесс и дожидается её), а не приложение:
75
+ * ждать её в активации VM пришлось бы каждому, а у приложения в процессе хоста и вовсе
76
+ * нет обвязки, которая могла бы дождаться.
77
+ */
78
+ setup?: () => void | Promise<void>;
79
+ /**
80
+ * Ссылки на клиентские артефакты приложения — их подключает к документу хост.
81
+ *
82
+ * Тоже вплавляются сборкой: адреса известны только ей. Байты приложение не отдаёт ни в
83
+ * одном транспорте — за доставку отвечает CDN.
84
+ */
85
+ assets?: AppAssets;
86
+ }
87
+ /**
88
+ * Клиентские артефакты приложения: только initial-чанки, в порядке подключения.
89
+ *
90
+ * Ленивые чанки сюда не попадают — их браузер дотянет сам по мере надобности, а хосту
91
+ * нужно ровно то, без чего страница не оживёт.
92
+ */
93
+ interface AppAssets {
94
+ css: string[];
95
+ js: string[];
68
96
  }
69
97
 
70
- export type { IslandDescriptor as I };
98
+ export type { AppAssets as A, IslandDescriptor as I };
@@ -1,5 +1,5 @@
1
- import { S as SlotDefinition } from './define-slot-BKvArA02.cjs';
2
- import { q as LayerDefinition, x as Definition } from './types-COwVwgzE.cjs';
1
+ import { S as SlotDefinition } from './define-slot-DYNCLDJY.cjs';
2
+ import { L as LayerDefinition, c as Definition } from './types-Dx5qGiwk.cjs';
3
3
  import { Token } from '@foxford/ioc';
4
4
 
5
5
  /**
@@ -65,6 +65,34 @@ interface IslandDescriptor {
65
65
  * не нужно. Единицы слотов регистрируются в контейнере острова вместе с его собственными.
66
66
  */
67
67
  slots?: Readonly<Record<string, SlotDefinition>>;
68
+ /**
69
+ * Настройка процесса перед первым рендером: разбор разметки, полифиллы, всё, что ставится
70
+ * один раз и нужно раньше приложения.
71
+ *
72
+ * В исходниках приложения этого поля нет — оно объявляется конфигом и вплавляется сборкой
73
+ * в СЕРВЕРНЫЙ выход, поэтому дескриптор остаётся декларацией. Гарантию даёт движок
74
+ * ({@link renderApp} зовёт настройку один раз на процесс и дожидается её), а не приложение:
75
+ * ждать её в активации VM пришлось бы каждому, а у приложения в процессе хоста и вовсе
76
+ * нет обвязки, которая могла бы дождаться.
77
+ */
78
+ setup?: () => void | Promise<void>;
79
+ /**
80
+ * Ссылки на клиентские артефакты приложения — их подключает к документу хост.
81
+ *
82
+ * Тоже вплавляются сборкой: адреса известны только ей. Байты приложение не отдаёт ни в
83
+ * одном транспорте — за доставку отвечает CDN.
84
+ */
85
+ assets?: AppAssets;
86
+ }
87
+ /**
88
+ * Клиентские артефакты приложения: только initial-чанки, в порядке подключения.
89
+ *
90
+ * Ленивые чанки сюда не попадают — их браузер дотянет сам по мере надобности, а хосту
91
+ * нужно ровно то, без чего страница не оживёт.
92
+ */
93
+ interface AppAssets {
94
+ css: string[];
95
+ js: string[];
68
96
  }
69
97
 
70
- export type { IslandDescriptor as I };
98
+ export type { AppAssets as A, IslandDescriptor as I };
package/index.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkP4QJCHMMcjs = require('./chunk-P4QJCHMM.cjs');
7
+ var _chunkZ5BL4DJAcjs = require('./chunk-Z5BL4DJA.cjs');
8
8
  require('./chunk-C7BM4DGX.cjs');
9
9
 
10
10
 
@@ -18,10 +18,11 @@ var _chunkXOJ2VWX4cjs = require('./chunk-XOJ2VWX4.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkCZVYVNLIcjs = require('./chunk-CZVYVNLI.cjs');
21
+ var _chunk6QV4L6R2cjs = require('./chunk-6QV4L6R2.cjs');
22
+ require('./chunk-A6ZPAM6Z.cjs');
22
23
 
23
24
 
24
- var _chunkXHYR3SGGcjs = require('./chunk-XHYR3SGG.cjs');
25
+ var _chunkT5QVCXVBcjs = require('./chunk-T5QVCXVB.cjs');
25
26
 
26
27
  // src/core/state-registry.ts
27
28
  var StateRegistry = class {
@@ -84,7 +85,7 @@ var ContainerManagerImpl = class {
84
85
  return existing;
85
86
  }
86
87
  const child = this.appContainer.createChild();
87
- child.bind(_chunkCZVYVNLIcjs.StateRegistryToken).toValue(new StateRegistry());
88
+ child.bind(_chunk6QV4L6R2cjs.StateRegistryToken).toValue(new StateRegistry());
88
89
  this.pageContainers.set(routeId, child);
89
90
  return child;
90
91
  }
@@ -94,7 +95,7 @@ var ContainerManagerImpl = class {
94
95
  * @param routeId - Идентификатор маршрута
95
96
  */
96
97
  destroyPageContainer(routeId) {
97
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
98
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
98
99
  const container = this.pageContainers.get(routeId);
99
100
  if (container === void 0) {
100
101
  return;
@@ -115,8 +116,8 @@ var ContainerManagerImpl = class {
115
116
  return existing;
116
117
  }
117
118
  const child = this.appContainer.createChild();
118
- child.bind(_chunkCZVYVNLIcjs.RequestContextToken).toValue(context);
119
- child.bind(_chunkCZVYVNLIcjs.StateRegistryToken).toValue(new StateRegistry());
119
+ child.bind(_chunk6QV4L6R2cjs.RequestContextToken).toValue(context);
120
+ child.bind(_chunk6QV4L6R2cjs.StateRegistryToken).toValue(new StateRegistry());
120
121
  this.requestContainers.set(requestId, child);
121
122
  return child;
122
123
  }
@@ -133,7 +134,7 @@ var ContainerManagerImpl = class {
133
134
  * @param requestId - Уникальный идентификатор запроса
134
135
  */
135
136
  destroyRequestContainer(requestId) {
136
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
137
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
137
138
  const container = this.requestContainers.get(requestId);
138
139
  if (container === void 0) {
139
140
  return;
@@ -155,7 +156,7 @@ var ContainerManagerImpl = class {
155
156
  return existing;
156
157
  }
157
158
  const child = parent.createChild();
158
- child.bind(_chunkCZVYVNLIcjs.StateRegistryToken).toValue(new StateRegistry());
159
+ child.bind(_chunk6QV4L6R2cjs.StateRegistryToken).toValue(new StateRegistry());
159
160
  this.ssrPageContainers.set(requestId, child);
160
161
  return child;
161
162
  }
@@ -166,7 +167,7 @@ var ContainerManagerImpl = class {
166
167
  * @param requestId - Уникальный идентификатор запроса
167
168
  */
168
169
  destroySsrPageContainer(requestId) {
169
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
170
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
170
171
  const container = this.ssrPageContainers.get(requestId);
171
172
  if (container === void 0) {
172
173
  return;
@@ -194,10 +195,10 @@ var GuardRunnerImpl = class {
194
195
  * @param container - Опциональный контейнер для резолвинга guards
195
196
  */
196
197
  runGuards(tokens, params, container) {
197
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
198
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
198
199
  const resolveFrom = container != null ? container : this.container;
199
200
  const results = yield Promise.all(
200
- tokens.map((token) => _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
201
+ tokens.map((token) => _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
201
202
  const guard = yield resolveFrom.resolve(token);
202
203
  return guard.check(params);
203
204
  }))
@@ -286,7 +287,7 @@ var NavigationManagerImpl = class {
286
287
  * Состояние считается актуальным если история и текущий элемент согласованы.
287
288
  */
288
289
  checkFreshness() {
289
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
290
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
290
291
  var _a;
291
292
  const lastEntry = (_a = this._history.at(-1)) != null ? _a : null;
292
293
  return lastEntry === this.current;
@@ -316,7 +317,7 @@ var NavigationManagerImpl = class {
316
317
  * @returns Результат проверки
317
318
  */
318
319
  runLeaveGuards(from, to) {
319
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
320
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
320
321
  for (const interceptor of this.interceptors) {
321
322
  const result = yield interceptor.beforeNavigate(from, to);
322
323
  if (!result.allow) {
@@ -415,10 +416,10 @@ var StateSerializerImpl = class {
415
416
  */
416
417
  // eslint-disable-next-line @typescript-eslint/class-methods-use-this
417
418
  getRegistry(container) {
418
- if (!container.has(_chunkCZVYVNLIcjs.StateRegistryToken)) {
419
+ if (!container.has(_chunk6QV4L6R2cjs.StateRegistryToken)) {
419
420
  return void 0;
420
421
  }
421
- const resolved = container.resolve(_chunkCZVYVNLIcjs.StateRegistryToken);
422
+ const resolved = container.resolve(_chunk6QV4L6R2cjs.StateRegistryToken);
422
423
  return resolved instanceof Promise ? void 0 : resolved;
423
424
  }
424
425
  /**
@@ -462,7 +463,7 @@ var StateSerializerImpl = class {
462
463
  * @param params - Параметры маршрута
463
464
  */
464
465
  activateAll(container, params) {
465
- return _chunkXHYR3SGGcjs.__async.call(void 0, this, null, function* () {
466
+ return _chunkT5QVCXVBcjs.__async.call(void 0, this, null, function* () {
466
467
  const registry = this.getRegistry(container);
467
468
  if (registry === void 0) {
468
469
  return;
@@ -532,10 +533,10 @@ function createCore(options = {}) {
532
533
  const navigationManager = new NavigationManagerImpl();
533
534
  const stateSerializer = new StateSerializerImpl();
534
535
  const stateCache = new StateCache();
535
- container.bind(_chunkCZVYVNLIcjs.ContainerManagerToken).toValue(containerManager);
536
- container.bind(_chunkCZVYVNLIcjs.GuardRunnerToken).toValue(guardRunner);
537
- container.bind(_chunkCZVYVNLIcjs.NavigationManagerToken).toValue(navigationManager);
538
- container.bind(_chunkCZVYVNLIcjs.StateSerializerToken).toValue(stateSerializer);
536
+ container.bind(_chunk6QV4L6R2cjs.ContainerManagerToken).toValue(containerManager);
537
+ container.bind(_chunk6QV4L6R2cjs.GuardRunnerToken).toValue(guardRunner);
538
+ container.bind(_chunk6QV4L6R2cjs.NavigationManagerToken).toValue(navigationManager);
539
+ container.bind(_chunk6QV4L6R2cjs.StateSerializerToken).toValue(stateSerializer);
539
540
  return {
540
541
  container,
541
542
  containerManager,
@@ -718,4 +719,4 @@ function defineLayer(token, options) {
718
719
 
719
720
 
720
721
 
721
- exports.ActivatableToken = _chunkCZVYVNLIcjs.ActivatableToken; exports.ContainerManagerImpl = ContainerManagerImpl; exports.ContainerManagerToken = _chunkCZVYVNLIcjs.ContainerManagerToken; exports.GuardRunnerImpl = GuardRunnerImpl; exports.GuardRunnerToken = _chunkCZVYVNLIcjs.GuardRunnerToken; exports.NavigationManagerImpl = NavigationManagerImpl; exports.NavigationManagerToken = _chunkCZVYVNLIcjs.NavigationManagerToken; exports.RequestContextToken = _chunkCZVYVNLIcjs.RequestContextToken; exports.SlotRegistry = _chunkP4QJCHMMcjs.SlotRegistry; exports.SlotRegistryToken = _chunkCZVYVNLIcjs.SlotRegistryToken; exports.StateCache = StateCache; exports.StateRegistry = StateRegistry; exports.StateRegistryToken = _chunkCZVYVNLIcjs.StateRegistryToken; exports.StateSerializerImpl = StateSerializerImpl; exports.StateSerializerToken = _chunkCZVYVNLIcjs.StateSerializerToken; exports.ViewLayerToken = _chunkXOJ2VWX4cjs.ViewLayerToken; exports.createCore = createCore; exports.defaultGlobalResolver = defaultGlobalResolver; exports.defineActionGuard = defineActionGuard; exports.defineExtension = defineExtension; exports.defineGuard = defineGuard; exports.defineLayer = defineLayer; exports.defineLayout = defineLayout; exports.defineRepository = _chunkP4QJCHMMcjs.defineRepository; exports.defineService = _chunkP4QJCHMMcjs.defineService; exports.defineSlot = _chunkP4QJCHMMcjs.defineSlot; exports.defineViewModel = _chunkP4QJCHMMcjs.defineViewModel;
722
+ exports.ActivatableToken = _chunk6QV4L6R2cjs.ActivatableToken; exports.ContainerManagerImpl = ContainerManagerImpl; exports.ContainerManagerToken = _chunk6QV4L6R2cjs.ContainerManagerToken; exports.GuardRunnerImpl = GuardRunnerImpl; exports.GuardRunnerToken = _chunk6QV4L6R2cjs.GuardRunnerToken; exports.NavigationManagerImpl = NavigationManagerImpl; exports.NavigationManagerToken = _chunk6QV4L6R2cjs.NavigationManagerToken; exports.RequestContextToken = _chunk6QV4L6R2cjs.RequestContextToken; exports.SlotRegistry = _chunkZ5BL4DJAcjs.SlotRegistry; exports.SlotRegistryToken = _chunk6QV4L6R2cjs.SlotRegistryToken; exports.StateCache = StateCache; exports.StateRegistry = StateRegistry; exports.StateRegistryToken = _chunk6QV4L6R2cjs.StateRegistryToken; exports.StateSerializerImpl = StateSerializerImpl; exports.StateSerializerToken = _chunk6QV4L6R2cjs.StateSerializerToken; exports.ViewLayerToken = _chunkXOJ2VWX4cjs.ViewLayerToken; exports.createCore = createCore; exports.defaultGlobalResolver = defaultGlobalResolver; exports.defineActionGuard = defineActionGuard; exports.defineExtension = defineExtension; exports.defineGuard = defineGuard; exports.defineLayer = defineLayer; exports.defineLayout = defineLayout; exports.defineRepository = _chunkZ5BL4DJAcjs.defineRepository; exports.defineService = _chunkZ5BL4DJAcjs.defineService; exports.defineSlot = _chunkZ5BL4DJAcjs.defineSlot; exports.defineViewModel = _chunkZ5BL4DJAcjs.defineViewModel;
package/index.d.cts CHANGED
@@ -1,11 +1,12 @@
1
- import { C as Core, a as ContainerManager, R as RequestContext, G as GuardRunner, b as Guard, c as GuardResult, N as NavigationManager, d as NavigationEntry, e as NavigationInterceptor, D as Disposable, L as LeaveGuardResult, S as StateSerializer, f as DefineGuardOptions, g as GuardDefinition, E as ExtensionConfig, h as DefineExtensionOptions, i as ExtensionDefinition, A as ActionGuard, j as DefineActionGuardOptions, k as ActionGuardDefinition, l as LayoutConfig, m as DefineLayoutOptions, n as LayoutDefinition, o as LayerConfig, p as DefineLayerOptions, q as LayerDefinition } from './types-COwVwgzE.cjs';
2
- export { r as Activatable, s as ActivatableToken, t as ContainerManagerToken, u as DefineRepositoryOptions, v as DefineServiceOptions, w as DefineViewModelOptions, x as Definition, y as GuardRunnerToken, z as NavigationManagerToken, B as RepositoryDefinition, F as RequestContextToken, H as ServiceDefinition, I as SlotEntry, J as SlotRegistry, K as SlotRegistryToken, M as StateCache, O as StateParticipant, P as StateRegistry, Q as StateRegistryToken, T as StateSerializerToken, V as ViewModelDefinition } from './types-COwVwgzE.cjs';
1
+ import { C as Core, i as ContainerManager, R as RequestContext, j as GuardRunner, k as Guard, l as GuardResult, N as NavigationManager, m as NavigationEntry, n as NavigationInterceptor, o as Disposable, p as LeaveGuardResult, q as StateSerializer, r as DefineGuardOptions, G as GuardDefinition, E as ExtensionConfig, s as DefineExtensionOptions, t as ExtensionDefinition, A as ActionGuard, u as DefineActionGuardOptions, v as ActionGuardDefinition, w as LayoutConfig, x as DefineLayoutOptions, y as LayoutDefinition, h as LayerConfig, z as DefineLayerOptions, L as LayerDefinition } from './types-Dx5qGiwk.cjs';
2
+ export { B as Activatable, F as ActivatableToken, H as ContainerManagerToken, D as DefineRepositoryOptions, a as DefineServiceOptions, b as DefineViewModelOptions, c as Definition, I as GuardRunnerToken, J as NavigationManagerToken, d as RepositoryDefinition, K as RequestContextToken, S as ServiceDefinition, e as SlotEntry, f as SlotRegistry, g as SlotRegistryToken, M as StateCache, O as StateParticipant, P as StateRegistry, Q as StateRegistryToken, T as StateSerializerToken, V as ViewModelDefinition } from './types-Dx5qGiwk.cjs';
3
3
  import { Container, Token } from '@foxford/ioc';
4
4
  import { DefinitionResolver } from './adapter.cjs';
5
- export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-MDEWHqM7.cjs';
6
- export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-BKvArA02.cjs';
7
- export { V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken } from './view-adapter-D2597RJZ.cjs';
8
- import './descriptor-h0JE9jFx.cjs';
5
+ export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-CwAXed2X.cjs';
6
+ export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-DYNCLDJY.cjs';
7
+ export { V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken } from './view-adapter-DJ7yB6Ml.cjs';
8
+ import './descriptor-Dujg_1on.cjs';
9
+ import './server-render-CocWXQKC.cjs';
9
10
 
10
11
  /**
11
12
  * Опции для создания Core Runtime.
package/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { C as Core, a as ContainerManager, R as RequestContext, G as GuardRunner, b as Guard, c as GuardResult, N as NavigationManager, d as NavigationEntry, e as NavigationInterceptor, D as Disposable, L as LeaveGuardResult, S as StateSerializer, f as DefineGuardOptions, g as GuardDefinition, E as ExtensionConfig, h as DefineExtensionOptions, i as ExtensionDefinition, A as ActionGuard, j as DefineActionGuardOptions, k as ActionGuardDefinition, l as LayoutConfig, m as DefineLayoutOptions, n as LayoutDefinition, o as LayerConfig, p as DefineLayerOptions, q as LayerDefinition } from './types-COwVwgzE.js';
2
- export { r as Activatable, s as ActivatableToken, t as ContainerManagerToken, u as DefineRepositoryOptions, v as DefineServiceOptions, w as DefineViewModelOptions, x as Definition, y as GuardRunnerToken, z as NavigationManagerToken, B as RepositoryDefinition, F as RequestContextToken, H as ServiceDefinition, I as SlotEntry, J as SlotRegistry, K as SlotRegistryToken, M as StateCache, O as StateParticipant, P as StateRegistry, Q as StateRegistryToken, T as StateSerializerToken, V as ViewModelDefinition } from './types-COwVwgzE.js';
1
+ import { C as Core, i as ContainerManager, R as RequestContext, j as GuardRunner, k as Guard, l as GuardResult, N as NavigationManager, m as NavigationEntry, n as NavigationInterceptor, o as Disposable, p as LeaveGuardResult, q as StateSerializer, r as DefineGuardOptions, G as GuardDefinition, E as ExtensionConfig, s as DefineExtensionOptions, t as ExtensionDefinition, A as ActionGuard, u as DefineActionGuardOptions, v as ActionGuardDefinition, w as LayoutConfig, x as DefineLayoutOptions, y as LayoutDefinition, h as LayerConfig, z as DefineLayerOptions, L as LayerDefinition } from './types-Dx5qGiwk.js';
2
+ export { B as Activatable, F as ActivatableToken, H as ContainerManagerToken, D as DefineRepositoryOptions, a as DefineServiceOptions, b as DefineViewModelOptions, c as Definition, I as GuardRunnerToken, J as NavigationManagerToken, d as RepositoryDefinition, K as RequestContextToken, S as ServiceDefinition, e as SlotEntry, f as SlotRegistry, g as SlotRegistryToken, M as StateCache, O as StateParticipant, P as StateRegistry, Q as StateRegistryToken, T as StateSerializerToken, V as ViewModelDefinition } from './types-Dx5qGiwk.js';
3
3
  import { Container, Token } from '@foxford/ioc';
4
4
  import { DefinitionResolver } from './adapter.js';
5
- export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-Ca62_YCy.js';
6
- export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-Dil8Kr1A.js';
7
- export { V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken } from './view-adapter-CPI8056c.js';
8
- import './descriptor-DZDNH7R5.js';
5
+ export { d as defineRepository, a as defineService, b as defineViewModel } from './define-repository-q_T4hqeP.js';
6
+ export { D as DefineSlotOptions, S as SlotDefinition, d as defineSlot } from './define-slot-Cngzae6i.js';
7
+ export { V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken } from './view-adapter-B4gEb-ms.js';
8
+ import './descriptor-DQ6Gi7A_.js';
9
+ import './server-render-CocWXQKC.js';
9
10
 
10
11
  /**
11
12
  * Опции для создания Core Runtime.
package/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  defineService,
5
5
  defineSlot,
6
6
  defineViewModel
7
- } from "./chunk-PZVUKTZG.js";
7
+ } from "./chunk-MCN4GFEQ.js";
8
8
  import "./chunk-WBHHHICS.js";
9
9
  import {
10
10
  ViewLayerToken
@@ -18,10 +18,11 @@ import {
18
18
  SlotRegistryToken,
19
19
  StateRegistryToken,
20
20
  StateSerializerToken
21
- } from "./chunk-KJ6NDOOL.js";
21
+ } from "./chunk-3RX2OSUL.js";
22
+ import "./chunk-TPBI6TOU.js";
22
23
  import {
23
24
  __async
24
- } from "./chunk-HJO26HIQ.js";
25
+ } from "./chunk-6FNC3XMI.js";
25
26
 
26
27
  // src/core/state-registry.ts
27
28
  var StateRegistry = class {
package/island/index.cjs CHANGED
@@ -11,16 +11,17 @@
11
11
 
12
12
 
13
13
 
14
- var _chunk6ZFVV3AVcjs = require('../chunk-6ZFVV3AV.cjs');
14
+ var _chunkZOU6W6ZQcjs = require('../chunk-ZOU6W6ZQ.cjs');
15
15
 
16
16
 
17
17
 
18
18
 
19
19
  var _chunkXOJ2VWX4cjs = require('../chunk-XOJ2VWX4.cjs');
20
- require('../chunk-CZVYVNLI.cjs');
20
+ require('../chunk-6QV4L6R2.cjs');
21
+ require('../chunk-A6ZPAM6Z.cjs');
21
22
 
22
23
 
23
- var _chunkXHYR3SGGcjs = require('../chunk-XHYR3SGG.cjs');
24
+ var _chunkT5QVCXVBcjs = require('../chunk-T5QVCXVB.cjs');
24
25
 
25
26
  // src/island/slot-address.ts
26
27
  function slotAddress(app, slot) {
@@ -40,7 +41,7 @@ function notify() {
40
41
  }
41
42
  function registerIsland(record) {
42
43
  const id = nextId++;
43
- islands.set(id, _chunkXHYR3SGGcjs.__spreadValues.call(void 0, { id }, record));
44
+ islands.set(id, _chunkT5QVCXVBcjs.__spreadValues.call(void 0, { id }, record));
44
45
  notify();
45
46
  return () => {
46
47
  islands.delete(id);
@@ -87,4 +88,4 @@ function describeIsland(descriptor, denState) {
87
88
 
88
89
 
89
90
 
90
- exports.ViewLayerToken = _chunkXOJ2VWX4cjs.ViewLayerToken; exports.activateIslandViewModels = _chunk6ZFVV3AVcjs.activateIslandViewModels; exports.collectDocumentContribution = _chunk6ZFVV3AVcjs.collectDocumentContribution; exports.collectIslandState = _chunk6ZFVV3AVcjs.collectIslandState; exports.createIslandContainer = _chunk6ZFVV3AVcjs.createIslandContainer; exports.describeIsland = describeIsland; exports.getAppContainer = _chunk6ZFVV3AVcjs.getAppContainer; exports.getIslandsSnapshot = getIslandsSnapshot; exports.hydrateIslandState = _chunk6ZFVV3AVcjs.hydrateIslandState; exports.isDocumentSource = _chunk6ZFVV3AVcjs.isDocumentSource; exports.matchRoute = _chunk6ZFVV3AVcjs.matchRoute; exports.normalizeRoutes = _chunk6ZFVV3AVcjs.normalizeRoutes; exports.pathPattern = _chunk6ZFVV3AVcjs.pathPattern; exports.registerIsland = registerIsland; exports.renderApp = _chunk6ZFVV3AVcjs.renderApp; exports.resolveEagerUnits = _chunk6ZFVV3AVcjs.resolveEagerUnits; exports.resolveViewAdapter = _chunkXOJ2VWX4cjs.resolveViewAdapter; exports.slotAddress = slotAddress; exports.subscribeIslands = subscribeIslands; exports.viewAdapterOf = _chunkXOJ2VWX4cjs.viewAdapterOf;
91
+ exports.ViewLayerToken = _chunkXOJ2VWX4cjs.ViewLayerToken; exports.activateIslandViewModels = _chunkZOU6W6ZQcjs.activateIslandViewModels; exports.collectDocumentContribution = _chunkZOU6W6ZQcjs.collectDocumentContribution; exports.collectIslandState = _chunkZOU6W6ZQcjs.collectIslandState; exports.createIslandContainer = _chunkZOU6W6ZQcjs.createIslandContainer; exports.describeIsland = describeIsland; exports.getAppContainer = _chunkZOU6W6ZQcjs.getAppContainer; exports.getIslandsSnapshot = getIslandsSnapshot; exports.hydrateIslandState = _chunkZOU6W6ZQcjs.hydrateIslandState; exports.isDocumentSource = _chunkZOU6W6ZQcjs.isDocumentSource; exports.matchRoute = _chunkZOU6W6ZQcjs.matchRoute; exports.normalizeRoutes = _chunkZOU6W6ZQcjs.normalizeRoutes; exports.pathPattern = _chunkZOU6W6ZQcjs.pathPattern; exports.registerIsland = registerIsland; exports.renderApp = _chunkZOU6W6ZQcjs.renderApp; exports.resolveEagerUnits = _chunkZOU6W6ZQcjs.resolveEagerUnits; exports.resolveViewAdapter = _chunkXOJ2VWX4cjs.resolveViewAdapter; exports.slotAddress = slotAddress; exports.subscribeIslands = subscribeIslands; exports.viewAdapterOf = _chunkXOJ2VWX4cjs.viewAdapterOf;
@@ -1,9 +1,10 @@
1
- import { I as IslandDescriptor } from '../descriptor-h0JE9jFx.cjs';
1
+ import { I as IslandDescriptor, A as AppAssets } from '../descriptor-Dujg_1on.cjs';
2
2
  import { Container } from '@foxford/ioc';
3
- import { R as RequestContext } from '../types-COwVwgzE.cjs';
4
- export { A as AppRoute, R as RouteDeclaration, a as RouteMatch, m as matchRoute, n as normalizeRoutes, p as pathPattern } from '../routes-BqIoqbt1.cjs';
5
- export { R as RenderIslandOptions, c as RenderTree, S as ServerRender, d as ServerRenderResult, V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken, r as resolveViewAdapter, v as viewAdapterOf } from '../view-adapter-D2597RJZ.cjs';
6
- import '../define-slot-BKvArA02.cjs';
3
+ import { R as RequestContext } from '../types-Dx5qGiwk.cjs';
4
+ export { A as AppRoute, R as RouteDeclaration, a as RouteMatch, m as matchRoute, n as normalizeRoutes, p as pathPattern } from '../routes-B0hDrkiF.cjs';
5
+ export { R as RenderTree, a as ServerRender, S as ServerRenderResult } from '../server-render-CocWXQKC.cjs';
6
+ export { R as RenderIslandOptions, V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken, r as resolveViewAdapter, v as viewAdapterOf } from '../view-adapter-DJ7yB6Ml.cjs';
7
+ import '../define-slot-DYNCLDJY.cjs';
7
8
 
8
9
  /** Вклад приложения в `<head>` документа. */
9
10
  interface DocumentHead {
@@ -201,6 +202,12 @@ interface RenderAppResult {
201
202
  headHtml?: string;
202
203
  /** Адрес для 3xx. */
203
204
  redirect?: string;
205
+ /**
206
+ * Ссылки на клиентские артефакты приложения — хост подключает их к документу.
207
+ *
208
+ * Только при исходе `200`: на остальных рисовать нечего, и оживлять тоже нечего.
209
+ */
210
+ assets?: AppAssets;
204
211
  }
205
212
  /**
206
213
  * Рисует приложение по адресу и отдаёт разметку вместе с состоянием.
@@ -269,4 +276,4 @@ declare function getAppContainer(): Container;
269
276
  */
270
277
  declare function slotAddress(app: string, slot: string): string;
271
278
 
272
- export { type CreateIslandContainerOptions, type DocumentContribution, type DocumentHead, type DocumentSource, IslandDescriptor, type IslandRecord, type IslandRoute, type RenderAppRequest, type RenderAppResult, activateIslandViewModels, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsSnapshot, hydrateIslandState, isDocumentSource, registerIsland, renderApp, resolveEagerUnits, slotAddress, subscribeIslands };
279
+ export { AppAssets, type CreateIslandContainerOptions, type DocumentContribution, type DocumentHead, type DocumentSource, IslandDescriptor, type IslandRecord, type IslandRoute, type RenderAppRequest, type RenderAppResult, activateIslandViewModels, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsSnapshot, hydrateIslandState, isDocumentSource, registerIsland, renderApp, resolveEagerUnits, slotAddress, subscribeIslands };
package/island/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { I as IslandDescriptor } from '../descriptor-DZDNH7R5.js';
1
+ import { I as IslandDescriptor, A as AppAssets } from '../descriptor-DQ6Gi7A_.js';
2
2
  import { Container } from '@foxford/ioc';
3
- import { R as RequestContext } from '../types-COwVwgzE.js';
4
- export { A as AppRoute, R as RouteDeclaration, a as RouteMatch, m as matchRoute, n as normalizeRoutes, p as pathPattern } from '../routes-CWpIqVAM.js';
5
- export { R as RenderIslandOptions, c as RenderTree, S as ServerRender, d as ServerRenderResult, V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken, r as resolveViewAdapter, v as viewAdapterOf } from '../view-adapter-CPI8056c.js';
6
- import '../define-slot-Dil8Kr1A.js';
3
+ import { R as RequestContext } from '../types-Dx5qGiwk.js';
4
+ export { A as AppRoute, R as RouteDeclaration, a as RouteMatch, m as matchRoute, n as normalizeRoutes, p as pathPattern } from '../routes-0uXJ0fux.js';
5
+ export { R as RenderTree, a as ServerRender, S as ServerRenderResult } from '../server-render-CocWXQKC.js';
6
+ export { R as RenderIslandOptions, V as ViewAdapter, a as ViewLayerDefinition, b as ViewLayerToken, r as resolveViewAdapter, v as viewAdapterOf } from '../view-adapter-B4gEb-ms.js';
7
+ import '../define-slot-Cngzae6i.js';
7
8
 
8
9
  /** Вклад приложения в `<head>` документа. */
9
10
  interface DocumentHead {
@@ -201,6 +202,12 @@ interface RenderAppResult {
201
202
  headHtml?: string;
202
203
  /** Адрес для 3xx. */
203
204
  redirect?: string;
205
+ /**
206
+ * Ссылки на клиентские артефакты приложения — хост подключает их к документу.
207
+ *
208
+ * Только при исходе `200`: на остальных рисовать нечего, и оживлять тоже нечего.
209
+ */
210
+ assets?: AppAssets;
204
211
  }
205
212
  /**
206
213
  * Рисует приложение по адресу и отдаёт разметку вместе с состоянием.
@@ -269,4 +276,4 @@ declare function getAppContainer(): Container;
269
276
  */
270
277
  declare function slotAddress(app: string, slot: string): string;
271
278
 
272
- export { type CreateIslandContainerOptions, type DocumentContribution, type DocumentHead, type DocumentSource, IslandDescriptor, type IslandRecord, type IslandRoute, type RenderAppRequest, type RenderAppResult, activateIslandViewModels, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsSnapshot, hydrateIslandState, isDocumentSource, registerIsland, renderApp, resolveEagerUnits, slotAddress, subscribeIslands };
279
+ export { AppAssets, type CreateIslandContainerOptions, type DocumentContribution, type DocumentHead, type DocumentSource, IslandDescriptor, type IslandRecord, type IslandRoute, type RenderAppRequest, type RenderAppResult, activateIslandViewModels, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsSnapshot, hydrateIslandState, isDocumentSource, registerIsland, renderApp, resolveEagerUnits, slotAddress, subscribeIslands };
package/island/index.js CHANGED
@@ -11,16 +11,17 @@ import {
11
11
  pathPattern,
12
12
  renderApp,
13
13
  resolveEagerUnits
14
- } from "../chunk-7M5OAOQ4.js";
14
+ } from "../chunk-TPHJUDHG.js";
15
15
  import {
16
16
  ViewLayerToken,
17
17
  resolveViewAdapter,
18
18
  viewAdapterOf
19
19
  } from "../chunk-E23E2VUC.js";
20
- import "../chunk-KJ6NDOOL.js";
20
+ import "../chunk-3RX2OSUL.js";
21
+ import "../chunk-TPBI6TOU.js";
21
22
  import {
22
23
  __spreadValues
23
- } from "../chunk-HJO26HIQ.js";
24
+ } from "../chunk-6FNC3XMI.js";
24
25
 
25
26
  // src/island/slot-address.ts
26
27
  function slotAddress(app, slot) {