@foxford/den 3.6.0 → 3.7.0
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/island/index.cjs +23 -1
- package/island/index.d.cts +8 -1
- package/island/index.d.ts +8 -1
- package/island/index.js +22 -0
- package/package.json +2 -2
package/island/index.cjs
CHANGED
|
@@ -121,6 +121,28 @@ function describeIsland(descriptor, denState) {
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
// src/island/remount.ts
|
|
125
|
+
var generation = 0;
|
|
126
|
+
var listeners2 = /* @__PURE__ */ new Set();
|
|
127
|
+
function remountIslands() {
|
|
128
|
+
generation += 1;
|
|
129
|
+
for (const listener of listeners2) {
|
|
130
|
+
listener();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function getIslandsGeneration() {
|
|
134
|
+
return generation;
|
|
135
|
+
}
|
|
136
|
+
function subscribeIslandsGeneration(listener) {
|
|
137
|
+
listeners2.add(listener);
|
|
138
|
+
return () => {
|
|
139
|
+
listeners2.delete(listener);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
124
146
|
|
|
125
147
|
|
|
126
148
|
|
|
@@ -158,4 +180,4 @@ function describeIsland(descriptor, denState) {
|
|
|
158
180
|
|
|
159
181
|
|
|
160
182
|
|
|
161
|
-
exports.DOCUMENT_EVENT = DOCUMENT_EVENT; exports.ISLAND_ERRORS_KEY = ISLAND_ERRORS_KEY; exports.NAVIGATE_EVENT = NAVIGATE_EVENT; exports.RequestContextToken = _chunk6QV4L6R2cjs.RequestContextToken; exports.RuntimeExtensionsToken = _chunkQTWJTYZWcjs.RuntimeExtensionsToken; exports.ViewLayerToken = _chunkXOJ2VWX4cjs.ViewLayerToken; exports.activateIslandViewModels = _chunkQTWJTYZWcjs.activateIslandViewModels; exports.bindIslandInputs = _chunkQTWJTYZWcjs.bindIslandInputs; exports.bindRequestContext = _chunkQTWJTYZWcjs.bindRequestContext; exports.browserRequestContext = _chunkQTWJTYZWcjs.browserRequestContext; exports.collectDocumentContribution = _chunkQTWJTYZWcjs.collectDocumentContribution; exports.collectIslandState = _chunkQTWJTYZWcjs.collectIslandState; exports.createIslandContainer = _chunkQTWJTYZWcjs.createIslandContainer; exports.describeIsland = describeIsland; exports.getAppContainer = _chunkQTWJTYZWcjs.getAppContainer; exports.getIslandsSnapshot = getIslandsSnapshot; exports.hydrateIslandState = _chunkQTWJTYZWcjs.hydrateIslandState; exports.installRuntime = _chunkQTWJTYZWcjs.installRuntime; exports.isDocumentSource = _chunkQTWJTYZWcjs.isDocumentSource; exports.islandInputsOf = _chunkQTWJTYZWcjs.islandInputsOf; exports.matchRoute = _chunkQTWJTYZWcjs.matchRoute; exports.navigateIsland = navigateIsland; exports.normalizeRoutes = _chunkQTWJTYZWcjs.normalizeRoutes; exports.onIslandDocument = onIslandDocument; exports.onIslandNavigate = onIslandNavigate; exports.parseCookieHeader = _chunkQTWJTYZWcjs.parseCookieHeader; exports.pathPattern = _chunkQTWJTYZWcjs.pathPattern; exports.publishIslandDocument = publishIslandDocument; exports.registerIsland = registerIsland; exports.renderApp = _chunkQTWJTYZWcjs.renderApp; exports.reportIslandError = reportIslandError; exports.resolveEagerUnits = _chunkQTWJTYZWcjs.resolveEagerUnits; exports.resolveViewAdapter = _chunkXOJ2VWX4cjs.resolveViewAdapter; exports.runtimeRequiresOf = _chunkQTWJTYZWcjs.runtimeRequiresOf; exports.slotAddress = slotAddress; exports.subscribeIslands = subscribeIslands; exports.viewAdapterOf = _chunkXOJ2VWX4cjs.viewAdapterOf;
|
|
183
|
+
exports.DOCUMENT_EVENT = DOCUMENT_EVENT; exports.ISLAND_ERRORS_KEY = ISLAND_ERRORS_KEY; exports.NAVIGATE_EVENT = NAVIGATE_EVENT; exports.RequestContextToken = _chunk6QV4L6R2cjs.RequestContextToken; exports.RuntimeExtensionsToken = _chunkQTWJTYZWcjs.RuntimeExtensionsToken; exports.ViewLayerToken = _chunkXOJ2VWX4cjs.ViewLayerToken; exports.activateIslandViewModels = _chunkQTWJTYZWcjs.activateIslandViewModels; exports.bindIslandInputs = _chunkQTWJTYZWcjs.bindIslandInputs; exports.bindRequestContext = _chunkQTWJTYZWcjs.bindRequestContext; exports.browserRequestContext = _chunkQTWJTYZWcjs.browserRequestContext; exports.collectDocumentContribution = _chunkQTWJTYZWcjs.collectDocumentContribution; exports.collectIslandState = _chunkQTWJTYZWcjs.collectIslandState; exports.createIslandContainer = _chunkQTWJTYZWcjs.createIslandContainer; exports.describeIsland = describeIsland; exports.getAppContainer = _chunkQTWJTYZWcjs.getAppContainer; exports.getIslandsGeneration = getIslandsGeneration; exports.getIslandsSnapshot = getIslandsSnapshot; exports.hydrateIslandState = _chunkQTWJTYZWcjs.hydrateIslandState; exports.installRuntime = _chunkQTWJTYZWcjs.installRuntime; exports.isDocumentSource = _chunkQTWJTYZWcjs.isDocumentSource; exports.islandInputsOf = _chunkQTWJTYZWcjs.islandInputsOf; exports.matchRoute = _chunkQTWJTYZWcjs.matchRoute; exports.navigateIsland = navigateIsland; exports.normalizeRoutes = _chunkQTWJTYZWcjs.normalizeRoutes; exports.onIslandDocument = onIslandDocument; exports.onIslandNavigate = onIslandNavigate; exports.parseCookieHeader = _chunkQTWJTYZWcjs.parseCookieHeader; exports.pathPattern = _chunkQTWJTYZWcjs.pathPattern; exports.publishIslandDocument = publishIslandDocument; exports.registerIsland = registerIsland; exports.remountIslands = remountIslands; exports.renderApp = _chunkQTWJTYZWcjs.renderApp; exports.reportIslandError = reportIslandError; exports.resolveEagerUnits = _chunkQTWJTYZWcjs.resolveEagerUnits; exports.resolveViewAdapter = _chunkXOJ2VWX4cjs.resolveViewAdapter; exports.runtimeRequiresOf = _chunkQTWJTYZWcjs.runtimeRequiresOf; exports.slotAddress = slotAddress; exports.subscribeIslands = subscribeIslands; exports.subscribeIslandsGeneration = subscribeIslandsGeneration; exports.viewAdapterOf = _chunkXOJ2VWX4cjs.viewAdapterOf;
|
package/island/index.d.cts
CHANGED
|
@@ -393,6 +393,13 @@ declare function subscribeIslands(listener: () => void): () => void;
|
|
|
393
393
|
*/
|
|
394
394
|
declare function describeIsland(descriptor: IslandDescriptor, denState?: Record<string, unknown>): Omit<IslandRecord, 'id'>;
|
|
395
395
|
|
|
396
|
+
/** Пересобрать все острова вкладки: следующее поколение, подписчики перемонтируют. */
|
|
397
|
+
declare function remountIslands(): void;
|
|
398
|
+
/** Текущее поколение островов — ключ монтирования у адаптера. */
|
|
399
|
+
declare function getIslandsGeneration(): number;
|
|
400
|
+
/** Подписка на смену поколения (совместима с `useSyncExternalStore`). */
|
|
401
|
+
declare function subscribeIslandsGeneration(listener: () => void): () => void;
|
|
402
|
+
|
|
396
403
|
/** App-scope контейнер федерации (создаётся при первом обращении). */
|
|
397
404
|
declare function getAppContainer(): Container;
|
|
398
405
|
/**
|
|
@@ -450,4 +457,4 @@ declare function runtimeRequiresOf(container: Container): ReadonlyArray<Token<un
|
|
|
450
457
|
*/
|
|
451
458
|
declare function slotAddress(app: string, slot: string): string;
|
|
452
459
|
|
|
453
|
-
export { AppAssets, type CreateIslandContainerOptions, DOCUMENT_EVENT, type DocumentContribution, type DocumentHead, type DocumentSource, ISLAND_ERRORS_KEY, IslandDescriptor, type IslandErrorContext, type IslandErrorPhase, type IslandErrorReport, type IslandRecord, type IslandRoute, NAVIGATE_EVENT, type RenderAppRequest, type RenderAppResult, RequestContext, type RuntimeExtension, RuntimeExtensionsToken, activateIslandViewModels, bindIslandInputs, bindRequestContext, browserRequestContext, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsSnapshot, hydrateIslandState, installRuntime, isDocumentSource, islandInputsOf, navigateIsland, onIslandDocument, onIslandNavigate, parseCookieHeader, publishIslandDocument, registerIsland, renderApp, reportIslandError, resolveEagerUnits, runtimeRequiresOf, slotAddress, subscribeIslands };
|
|
460
|
+
export { AppAssets, type CreateIslandContainerOptions, DOCUMENT_EVENT, type DocumentContribution, type DocumentHead, type DocumentSource, ISLAND_ERRORS_KEY, IslandDescriptor, type IslandErrorContext, type IslandErrorPhase, type IslandErrorReport, type IslandRecord, type IslandRoute, NAVIGATE_EVENT, type RenderAppRequest, type RenderAppResult, RequestContext, type RuntimeExtension, RuntimeExtensionsToken, activateIslandViewModels, bindIslandInputs, bindRequestContext, browserRequestContext, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsGeneration, getIslandsSnapshot, hydrateIslandState, installRuntime, isDocumentSource, islandInputsOf, navigateIsland, onIslandDocument, onIslandNavigate, parseCookieHeader, publishIslandDocument, registerIsland, remountIslands, renderApp, reportIslandError, resolveEagerUnits, runtimeRequiresOf, slotAddress, subscribeIslands, subscribeIslandsGeneration };
|
package/island/index.d.ts
CHANGED
|
@@ -393,6 +393,13 @@ declare function subscribeIslands(listener: () => void): () => void;
|
|
|
393
393
|
*/
|
|
394
394
|
declare function describeIsland(descriptor: IslandDescriptor, denState?: Record<string, unknown>): Omit<IslandRecord, 'id'>;
|
|
395
395
|
|
|
396
|
+
/** Пересобрать все острова вкладки: следующее поколение, подписчики перемонтируют. */
|
|
397
|
+
declare function remountIslands(): void;
|
|
398
|
+
/** Текущее поколение островов — ключ монтирования у адаптера. */
|
|
399
|
+
declare function getIslandsGeneration(): number;
|
|
400
|
+
/** Подписка на смену поколения (совместима с `useSyncExternalStore`). */
|
|
401
|
+
declare function subscribeIslandsGeneration(listener: () => void): () => void;
|
|
402
|
+
|
|
396
403
|
/** App-scope контейнер федерации (создаётся при первом обращении). */
|
|
397
404
|
declare function getAppContainer(): Container;
|
|
398
405
|
/**
|
|
@@ -450,4 +457,4 @@ declare function runtimeRequiresOf(container: Container): ReadonlyArray<Token<un
|
|
|
450
457
|
*/
|
|
451
458
|
declare function slotAddress(app: string, slot: string): string;
|
|
452
459
|
|
|
453
|
-
export { AppAssets, type CreateIslandContainerOptions, DOCUMENT_EVENT, type DocumentContribution, type DocumentHead, type DocumentSource, ISLAND_ERRORS_KEY, IslandDescriptor, type IslandErrorContext, type IslandErrorPhase, type IslandErrorReport, type IslandRecord, type IslandRoute, NAVIGATE_EVENT, type RenderAppRequest, type RenderAppResult, RequestContext, type RuntimeExtension, RuntimeExtensionsToken, activateIslandViewModels, bindIslandInputs, bindRequestContext, browserRequestContext, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsSnapshot, hydrateIslandState, installRuntime, isDocumentSource, islandInputsOf, navigateIsland, onIslandDocument, onIslandNavigate, parseCookieHeader, publishIslandDocument, registerIsland, renderApp, reportIslandError, resolveEagerUnits, runtimeRequiresOf, slotAddress, subscribeIslands };
|
|
460
|
+
export { AppAssets, type CreateIslandContainerOptions, DOCUMENT_EVENT, type DocumentContribution, type DocumentHead, type DocumentSource, ISLAND_ERRORS_KEY, IslandDescriptor, type IslandErrorContext, type IslandErrorPhase, type IslandErrorReport, type IslandRecord, type IslandRoute, NAVIGATE_EVENT, type RenderAppRequest, type RenderAppResult, RequestContext, type RuntimeExtension, RuntimeExtensionsToken, activateIslandViewModels, bindIslandInputs, bindRequestContext, browserRequestContext, collectDocumentContribution, collectIslandState, createIslandContainer, describeIsland, getAppContainer, getIslandsGeneration, getIslandsSnapshot, hydrateIslandState, installRuntime, isDocumentSource, islandInputsOf, navigateIsland, onIslandDocument, onIslandNavigate, parseCookieHeader, publishIslandDocument, registerIsland, remountIslands, renderApp, reportIslandError, resolveEagerUnits, runtimeRequiresOf, slotAddress, subscribeIslands, subscribeIslandsGeneration };
|
package/island/index.js
CHANGED
|
@@ -120,6 +120,25 @@ function describeIsland(descriptor, denState) {
|
|
|
120
120
|
viewModels: ((_b = descriptor.viewModels) != null ? _b : []).map((vm) => vm.token.description)
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
// src/island/remount.ts
|
|
125
|
+
var generation = 0;
|
|
126
|
+
var listeners2 = /* @__PURE__ */ new Set();
|
|
127
|
+
function remountIslands() {
|
|
128
|
+
generation += 1;
|
|
129
|
+
for (const listener of listeners2) {
|
|
130
|
+
listener();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function getIslandsGeneration() {
|
|
134
|
+
return generation;
|
|
135
|
+
}
|
|
136
|
+
function subscribeIslandsGeneration(listener) {
|
|
137
|
+
listeners2.add(listener);
|
|
138
|
+
return () => {
|
|
139
|
+
listeners2.delete(listener);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
123
142
|
export {
|
|
124
143
|
DOCUMENT_EVENT,
|
|
125
144
|
ISLAND_ERRORS_KEY,
|
|
@@ -136,6 +155,7 @@ export {
|
|
|
136
155
|
createIslandContainer,
|
|
137
156
|
describeIsland,
|
|
138
157
|
getAppContainer,
|
|
158
|
+
getIslandsGeneration,
|
|
139
159
|
getIslandsSnapshot,
|
|
140
160
|
hydrateIslandState,
|
|
141
161
|
installRuntime,
|
|
@@ -150,6 +170,7 @@ export {
|
|
|
150
170
|
pathPattern,
|
|
151
171
|
publishIslandDocument,
|
|
152
172
|
registerIsland,
|
|
173
|
+
remountIslands,
|
|
153
174
|
renderApp,
|
|
154
175
|
reportIslandError,
|
|
155
176
|
resolveEagerUnits,
|
|
@@ -157,5 +178,6 @@ export {
|
|
|
157
178
|
runtimeRequiresOf,
|
|
158
179
|
slotAddress,
|
|
159
180
|
subscribeIslands,
|
|
181
|
+
subscribeIslandsGeneration,
|
|
160
182
|
viewAdapterOf
|
|
161
183
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foxford/den",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Den — декларативный метафреймворк Foxford (core runtime)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"foxford",
|
|
@@ -134,6 +134,6 @@
|
|
|
134
134
|
"view-adapter-DMLlp3Iu.d.cts",
|
|
135
135
|
"view-adapter-DNLRSFka.d.ts"
|
|
136
136
|
],
|
|
137
|
-
"sha": "
|
|
137
|
+
"sha": "c642307",
|
|
138
138
|
"scripts": {}
|
|
139
139
|
}
|