@wordpress/interactivity-router 2.31.1-next.f56bd8138.0 → 2.32.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/CHANGELOG.md +2 -0
- package/build/index.js +89 -26
- package/build/index.js.map +1 -1
- package/build-module/index.js +89 -26
- package/build-module/index.js.map +1 -1
- package/build-types/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +104 -23
- package/tsconfig.main.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/build/index.js
CHANGED
|
@@ -22,11 +22,13 @@ const {
|
|
|
22
22
|
render,
|
|
23
23
|
parseServerData,
|
|
24
24
|
populateServerData,
|
|
25
|
-
batch
|
|
25
|
+
batch,
|
|
26
|
+
routerRegions,
|
|
27
|
+
cloneElement
|
|
26
28
|
} = (0, _interactivity.privateApis)('I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.');
|
|
27
29
|
const regionAttr = `data-${directivePrefix}-router-region`;
|
|
28
30
|
const interactiveAttr = `data-${directivePrefix}-interactive`;
|
|
29
|
-
const regionsSelector = `[${interactiveAttr}][${regionAttr}]
|
|
31
|
+
const regionsSelector = `[${interactiveAttr}][${regionAttr}], [${interactiveAttr}] [${interactiveAttr}][${regionAttr}]`;
|
|
30
32
|
// The cache of visited and prefetched pages, stylesheets and scripts.
|
|
31
33
|
const pages = new Map();
|
|
32
34
|
|
|
@@ -61,6 +63,42 @@ const parseRegionAttribute = region => {
|
|
|
61
63
|
}
|
|
62
64
|
};
|
|
63
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Clones the content of the router region vDOM passed as argument.
|
|
68
|
+
*
|
|
69
|
+
* The function creates a new VNode instance removing all priority levels up to
|
|
70
|
+
* the one containing the router-region directive, which should have evaluated
|
|
71
|
+
* in advance.
|
|
72
|
+
*
|
|
73
|
+
* @param vdom A router region's VNode.
|
|
74
|
+
* @return The VNode for the passed router region's content.
|
|
75
|
+
*/
|
|
76
|
+
const cloneRouterRegionContent = vdom => {
|
|
77
|
+
if (!vdom) {
|
|
78
|
+
return vdom;
|
|
79
|
+
}
|
|
80
|
+
const allPriorityLevels = vdom.props.priorityLevels;
|
|
81
|
+
const routerRegionLevel = allPriorityLevels.findIndex(level => level.includes('router-region'));
|
|
82
|
+
const priorityLevels = routerRegionLevel !== -1 ? allPriorityLevels.slice(routerRegionLevel + 1) : allPriorityLevels;
|
|
83
|
+
return priorityLevels.length > 0 ? cloneElement(vdom, {
|
|
84
|
+
...vdom.props,
|
|
85
|
+
priorityLevels
|
|
86
|
+
}) : vdom.props.element;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* IDs of router regions with an `attachTo` property pointing to the same parent
|
|
91
|
+
* element.
|
|
92
|
+
*/
|
|
93
|
+
const regionsToAttachByParent = new WeakMap();
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Map of root fragments by parent element, used to render router regions with
|
|
97
|
+
* the `attachTo` property. Those elements with the same parent are rendered
|
|
98
|
+
* together in the corresponding root fragment.
|
|
99
|
+
*/
|
|
100
|
+
const rootFragmentsByParent = new WeakMap();
|
|
101
|
+
|
|
64
102
|
/**
|
|
65
103
|
* Fetches and prepares a page from a given URL.
|
|
66
104
|
*
|
|
@@ -122,7 +160,11 @@ const preparePage = async (url, dom, {
|
|
|
122
160
|
id,
|
|
123
161
|
attachTo
|
|
124
162
|
} = parseRegionAttribute(region);
|
|
125
|
-
|
|
163
|
+
if (region.parentElement.closest(`[${regionAttr}]`)) {
|
|
164
|
+
regions[id] = undefined;
|
|
165
|
+
} else {
|
|
166
|
+
regions[id] = vdom?.has(region) ? vdom.get(region) : toVdom(region);
|
|
167
|
+
}
|
|
126
168
|
if (attachTo) {
|
|
127
169
|
regionsToAttach[id] = attachTo;
|
|
128
170
|
}
|
|
@@ -157,36 +199,57 @@ const renderPage = page => {
|
|
|
157
199
|
...page.regionsToAttach
|
|
158
200
|
};
|
|
159
201
|
batch(() => {
|
|
202
|
+
// Update server data.
|
|
160
203
|
populateServerData(page.initialData);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const fragment = getRegionRootFragment(region);
|
|
166
|
-
render(page.regions[id], fragment);
|
|
167
|
-
// If this is an attached region, remove it from the list.
|
|
168
|
-
delete regionsToAttach[id];
|
|
204
|
+
|
|
205
|
+
// Reset all router regions before setting the actual values.
|
|
206
|
+
routerRegions.forEach(signal => {
|
|
207
|
+
signal.value = null;
|
|
169
208
|
});
|
|
170
209
|
|
|
171
|
-
//
|
|
210
|
+
//Init regions with attachTo that don't exist yet.
|
|
211
|
+
const parentsToUpdate = new Set();
|
|
172
212
|
for (const id in regionsToAttach) {
|
|
173
213
|
const parent = document.querySelector(regionsToAttach[id]);
|
|
214
|
+
if (!regionsToAttachByParent.has(parent)) {
|
|
215
|
+
regionsToAttachByParent.set(parent, []);
|
|
216
|
+
}
|
|
217
|
+
const regions = regionsToAttachByParent.get(parent);
|
|
218
|
+
if (!regions.includes(id)) {
|
|
219
|
+
regions.push(id);
|
|
220
|
+
parentsToUpdate.add(parent);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
174
223
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
} = page.regions[id];
|
|
181
|
-
const elementType = typeof type === 'function' ? props.type : type;
|
|
182
|
-
|
|
183
|
-
// Create an element with the obtained type where the region will be
|
|
184
|
-
// rendered. The type should match the one of the root vnode.
|
|
185
|
-
const region = document.createElement(elementType);
|
|
186
|
-
parent.appendChild(region);
|
|
187
|
-
const fragment = getRegionRootFragment(region);
|
|
188
|
-
render(page.regions[id], fragment);
|
|
224
|
+
//Update all existing regions.
|
|
225
|
+
for (const id in page.regions) {
|
|
226
|
+
if (routerRegions.has(id)) {
|
|
227
|
+
routerRegions.get(id).value = cloneRouterRegionContent(page.regions[id]);
|
|
228
|
+
}
|
|
189
229
|
}
|
|
230
|
+
|
|
231
|
+
// Render regions attached to the same parent in the same fragment.
|
|
232
|
+
parentsToUpdate.forEach(parent => {
|
|
233
|
+
const ids = regionsToAttachByParent.get(parent);
|
|
234
|
+
const vdoms = ids.map(id => page.regions[id]);
|
|
235
|
+
if (!rootFragmentsByParent.has(parent)) {
|
|
236
|
+
const regions = vdoms.map(({
|
|
237
|
+
props,
|
|
238
|
+
type
|
|
239
|
+
}) => {
|
|
240
|
+
const elementType = typeof type === 'function' ? props.type : type;
|
|
241
|
+
|
|
242
|
+
// Create an element with the obtained type where the region will be
|
|
243
|
+
// rendered. The type should match the one of the root vnode.
|
|
244
|
+
const region = document.createElement(elementType);
|
|
245
|
+
parent.appendChild(region);
|
|
246
|
+
return region;
|
|
247
|
+
});
|
|
248
|
+
rootFragmentsByParent.set(parent, getRegionRootFragment(regions));
|
|
249
|
+
}
|
|
250
|
+
const fragment = rootFragmentsByParent.get(parent);
|
|
251
|
+
render(vdoms, fragment);
|
|
252
|
+
});
|
|
190
253
|
});
|
|
191
254
|
if (page.title) {
|
|
192
255
|
document.title = page.title;
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_interactivity","require","_styles","_scriptModules","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","directivePrefix","getRegionRootFragment","initialVdom","toVdom","render","parseServerData","populateServerData","batch","privateApis","regionAttr","interactiveAttr","regionsSelector","pages","Map","getPagePath","url","URL","window","location","href","pathname","search","parseRegionAttribute","region","value","getAttribute","id","attachTo","JSON","parse","fetchPage","html","res","fetch","status","text","dom","DOMParser","parseFromString","preparePage","vdom","querySelectorAll","forEach","el","remove","regions","regionsToAttach","title","querySelector","innerText","initialData","styles","scriptModules","Promise","all","preloadStyles","preloadScriptModules","renderPage","page","applyStyles","document","fragment","parent","props","type","elementType","createElement","appendChild","forcePageReload","assign","addEventListener","pagePath","state","reload","src","markScriptModuleAsResolved","resolve","navigatingTo","hasLoadedNavigationTextsData","navigationTexts","loading","loaded","actions","store","navigation","hasStarted","hasFinished","navigate","options","clientNavigationDisabled","getConfig","loadingAnimation","screenReaderAnnouncement","timeout","prefetch","timeoutPromise","setTimeout","loadingTimeout","a11ySpeak","race","clearTimeout","config","importScriptModules","history","replace","hash","scrollIntoView","force","exports","messageKey","content","getElementById","textContent","parsed","i18n","texts","message","then","speak"],"sources":["@wordpress/interactivity-router/src/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, privateApis, getConfig } from '@wordpress/interactivity';\n\n/**\n * Internal dependencies\n */\nimport { preloadStyles, applyStyles, type StyleElement } from './assets/styles';\nimport {\n\tpreloadScriptModules,\n\timportScriptModules,\n\tmarkScriptModuleAsResolved,\n\ttype ScriptModuleLoad,\n} from './assets/script-modules';\n\nconst {\n\tdirectivePrefix,\n\tgetRegionRootFragment,\n\tinitialVdom,\n\ttoVdom,\n\trender,\n\tparseServerData,\n\tpopulateServerData,\n\tbatch,\n} = privateApis(\n\t'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'\n);\n\nconst regionAttr = `data-${ directivePrefix }-router-region`;\nconst interactiveAttr = `data-${ directivePrefix }-interactive`;\nconst regionsSelector = `[${ interactiveAttr }][${ regionAttr }]:not([${ interactiveAttr }] [${ interactiveAttr }])`;\n\nexport interface NavigateOptions {\n\tforce?: boolean;\n\thtml?: string;\n\treplace?: boolean;\n\ttimeout?: number;\n\tloadingAnimation?: boolean;\n\tscreenReaderAnnouncement?: boolean;\n}\n\nexport interface PrefetchOptions {\n\tforce?: boolean;\n\thtml?: string;\n}\n\ninterface VdomParams {\n\tvdom?: typeof initialVdom;\n}\n\ninterface Page {\n\turl: string;\n\tregions: Record< string, any >;\n\tregionsToAttach: Record< string, string >;\n\tstyles: StyleElement[];\n\tscriptModules: ScriptModuleLoad[];\n\ttitle: string;\n\tinitialData: any;\n}\n\ntype PreparePage = (\n\turl: string,\n\tdom: Document,\n\tparams?: VdomParams\n) => Promise< Page >;\n\n// The cache of visited and prefetched pages, stylesheets and scripts.\nconst pages = new Map< string, Promise< Page | false > >();\n\n// Helper to remove domain and hash from the URL. We are only interesting in\n// caching the path and the query.\nconst getPagePath = ( url: string ) => {\n\tconst u = new URL( url, window.location.href );\n\treturn u.pathname + u.search;\n};\n\n/**\n * Parses the given region's directive.\n *\n * @param region Region element.\n * @return Data contained in the region directive value.\n */\nconst parseRegionAttribute = ( region: Element ) => {\n\tconst value = region.getAttribute( regionAttr );\n\ttry {\n\t\tconst { id, attachTo } = JSON.parse( value );\n\t\treturn { id, attachTo };\n\t} catch ( e ) {\n\t\treturn { id: value };\n\t}\n};\n\n/**\n * Fetches and prepares a page from a given URL.\n *\n * @param url The URL of the page to fetch.\n * @param options Options for the fetch operation.\n * @param options.html Optional HTML content. If provided, the function will use\n * this instead of fetching from the URL.\n * @return A Promise that resolves to the prepared page, or false if\n * there was an error during fetching or preparation.\n */\nconst fetchPage = async ( url: string, { html }: { html: string } ) => {\n\ttry {\n\t\tif ( ! html ) {\n\t\t\tconst res = await window.fetch( url );\n\t\t\tif ( res.status !== 200 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\thtml = await res.text();\n\t\t}\n\t\tconst dom = new window.DOMParser().parseFromString( html, 'text/html' );\n\t\treturn await preparePage( url, dom );\n\t} catch ( e ) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Processes a DOM document to extract router regions and related resources.\n *\n * This function analyzes the provided DOM document and creates a virtual DOM\n * representation of all HTML regions marked with a `router-region` directive.\n * It also extracts and preloads associated styles and scripts to prepare for\n * rendering the page.\n *\n * @param url The URL associated with the page, used for asset\n * loading and caching.\n * @param dom The DOM document to process.\n * @param vdomParams Optional parameters for virtual DOM processing.\n * @param vdomParams.vdom An optional existing virtual DOM cache to check for\n * regions. If a region exists in this cache, it will be\n * reused instead of creating a new vDOM representation.\n * @return A Promise that resolves to a {@link Page} object\n * containing the virtual DOM for all router regions,\n * preloaded styles and scripts, page title, and initial\n * server-rendered data.\n */\nconst preparePage: PreparePage = async ( url, dom, { vdom } = {} ) => {\n\t// Remove all noscript elements as they're irrelevant when request is served via router.\n\t// This prevents browsers from extracting styles from noscript tags.\n\tdom.querySelectorAll( 'noscript' ).forEach( ( el ) => el.remove() );\n\n\tconst regions = {};\n\tconst regionsToAttach = {};\n\tdom.querySelectorAll( regionsSelector ).forEach( ( region ) => {\n\t\tconst { id, attachTo } = parseRegionAttribute( region );\n\t\tregions[ id ] = vdom?.has( region )\n\t\t\t? vdom.get( region )\n\t\t\t: toVdom( region );\n\t\tif ( attachTo ) {\n\t\t\tregionsToAttach[ id ] = attachTo;\n\t\t}\n\t} );\n\n\tconst title = dom.querySelector( 'title' )?.innerText;\n\tconst initialData = parseServerData( dom );\n\n\t// Wait for styles and modules to be ready.\n\tconst [ styles, scriptModules ] = await Promise.all( [\n\t\tPromise.all( preloadStyles( dom, url ) ),\n\t\tPromise.all( preloadScriptModules( dom ) ),\n\t] );\n\n\treturn {\n\t\tregions,\n\t\tregionsToAttach,\n\t\tstyles,\n\t\tscriptModules,\n\t\ttitle,\n\t\tinitialData,\n\t\turl,\n\t};\n};\n\n/**\n * Renders a page by applying styles, populating server data, rendering regions,\n * and updating the document title.\n *\n * @param page The {@link Page} object to render.\n */\nconst renderPage = ( page: Page ) => {\n\tapplyStyles( page.styles );\n\n\t// Clone regionsToAttach.\n\tconst regionsToAttach = { ...page.regionsToAttach };\n\n\tbatch( () => {\n\t\tpopulateServerData( page.initialData );\n\t\tdocument.querySelectorAll( regionsSelector ).forEach( ( region ) => {\n\t\t\tconst { id } = parseRegionAttribute( region );\n\t\t\tconst fragment = getRegionRootFragment( region );\n\t\t\trender( page.regions[ id ], fragment );\n\t\t\t// If this is an attached region, remove it from the list.\n\t\t\tdelete regionsToAttach[ id ];\n\t\t} );\n\n\t\t// Render unattached regions.\n\t\tfor ( const id in regionsToAttach ) {\n\t\t\tconst parent = document.querySelector( regionsToAttach[ id ] );\n\n\t\t\t// Get the type from the vnode. If wrapped with Directives, get the\n\t\t\t// original type from `props.type`.\n\t\t\tconst { props, type } = page.regions[ id ];\n\t\t\tconst elementType = typeof type === 'function' ? props.type : type;\n\n\t\t\t// Create an element with the obtained type where the region will be\n\t\t\t// rendered. The type should match the one of the root vnode.\n\t\t\tconst region = document.createElement( elementType );\n\t\t\tparent.appendChild( region );\n\n\t\t\tconst fragment = getRegionRootFragment( region );\n\t\t\trender( page.regions[ id ], fragment );\n\t\t}\n\t} );\n\n\tif ( page.title ) {\n\t\tdocument.title = page.title;\n\t}\n};\n\n/**\n * Loads the given page forcing a full page reload.\n *\n * The function returns a promise that won't resolve, useful to prevent any\n * potential feedback indicating that the navigation has finished while the new\n * page is being loaded.\n *\n * @param href The page href.\n * @return Promise that never resolves.\n */\nconst forcePageReload = ( href: string ) => {\n\twindow.location.assign( href );\n\treturn new Promise( () => {} );\n};\n\n// Listen to the back and forward buttons and restore the page if it's in the\n// cache.\nwindow.addEventListener( 'popstate', async () => {\n\tconst pagePath = getPagePath( window.location.href ); // Remove hash.\n\tconst page = pages.has( pagePath ) && ( await pages.get( pagePath ) );\n\tif ( page ) {\n\t\trenderPage( page );\n\t\t// Update the URL in the state.\n\t\tstate.url = window.location.href;\n\t} else {\n\t\twindow.location.reload();\n\t}\n} );\n\n// Initialize the router and cache the initial page using the initial vDOM.\nwindow.document\n\t.querySelectorAll< HTMLScriptElement >( 'script[type=module][src]' )\n\t.forEach( ( { src } ) => markScriptModuleAsResolved( src ) );\npages.set(\n\tgetPagePath( window.location.href ),\n\tPromise.resolve(\n\t\tpreparePage( getPagePath( window.location.href ), document, {\n\t\t\tvdom: initialVdom,\n\t\t} )\n\t)\n);\n\n// Variable to store the current navigation.\nlet navigatingTo = '';\n\nlet hasLoadedNavigationTextsData = false;\nconst navigationTexts = {\n\tloading: 'Loading page, please wait.',\n\tloaded: 'Page Loaded.',\n};\n\ninterface Store {\n\tstate: {\n\t\turl: string;\n\t\tnavigation: {\n\t\t\thasStarted: boolean;\n\t\t\thasFinished: boolean;\n\t\t};\n\t};\n\tactions: {\n\t\tnavigate: (\n\t\t\thref: string,\n\t\t\toptions?: NavigateOptions\n\t\t) => Promise< void >;\n\t\tprefetch: ( url: string, options?: PrefetchOptions ) => Promise< void >;\n\t};\n}\n\nexport const { state, actions } = store< Store >( 'core/router', {\n\tstate: {\n\t\turl: window.location.href,\n\t\tnavigation: {\n\t\t\thasStarted: false,\n\t\t\thasFinished: false,\n\t\t},\n\t},\n\tactions: {\n\t\t/**\n\t\t * Navigates to the specified page.\n\t\t *\n\t\t * This function normalizes the passed href, fetches the page HTML if\n\t\t * needed, and updates any interactive regions whose contents have\n\t\t * changed. It also creates a new entry in the browser session history.\n\t\t *\n\t\t * @param href The page href.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] If true, it forces re-fetching the URL.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t * @param [options.replace] If true, it replaces the current entry in the browser session history.\n\t\t * @param [options.timeout] Time until the navigation is aborted, in milliseconds. Default is 10000.\n\t\t * @param [options.loadingAnimation] Whether an animation should be shown while navigating. Default to `true`.\n\t\t * @param [options.screenReaderAnnouncement] Whether a message for screen readers should be announced while navigating. Default to `true`.\n\t\t *\n\t\t * @return Promise that resolves once the navigation is completed or aborted.\n\t\t */\n\t\t*navigate( href: string, options: NavigateOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( href );\n\t\t\tconst { navigation } = state;\n\t\t\tconst {\n\t\t\t\tloadingAnimation = true,\n\t\t\t\tscreenReaderAnnouncement = true,\n\t\t\t\ttimeout = 10000,\n\t\t\t} = options;\n\n\t\t\tnavigatingTo = href;\n\t\t\tactions.prefetch( pagePath, options );\n\n\t\t\t// Create a promise that resolves when the specified timeout ends.\n\t\t\t// The timeout value is 10 seconds by default.\n\t\t\tconst timeoutPromise = new Promise< void >( ( resolve ) =>\n\t\t\t\tsetTimeout( resolve, timeout )\n\t\t\t);\n\n\t\t\t// Don't update the navigation status immediately, wait 400 ms.\n\t\t\tconst loadingTimeout = setTimeout( () => {\n\t\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = true;\n\t\t\t\t\tnavigation.hasFinished = false;\n\t\t\t\t}\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loading' );\n\t\t\t\t}\n\t\t\t}, 400 );\n\n\t\t\tconst page = yield Promise.race( [\n\t\t\t\tpages.get( pagePath ),\n\t\t\t\ttimeoutPromise,\n\t\t\t] );\n\n\t\t\t// Dismiss loading message if it hasn't been added yet.\n\t\t\tclearTimeout( loadingTimeout );\n\n\t\t\t// Once the page is fetched, the destination URL could have changed\n\t\t\t// (e.g., by clicking another link in the meantime). If so, bail\n\t\t\t// out, and let the newer execution to update the HTML.\n\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tpage &&\n\t\t\t\t! page.initialData?.config?.[ 'core/router' ]\n\t\t\t\t\t?.clientNavigationDisabled\n\t\t\t) {\n\t\t\t\tyield importScriptModules( page.scriptModules );\n\t\t\t\trenderPage( page );\n\t\t\t\twindow.history[\n\t\t\t\t\toptions.replace ? 'replaceState' : 'pushState'\n\t\t\t\t]( {}, '', href );\n\n\t\t\t\t// Update the URL in the state.\n\t\t\t\tstate.url = href;\n\n\t\t\t\t// Update the navigation status once the the new page rendering\n\t\t\t\t// has been completed.\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = false;\n\t\t\t\t\tnavigation.hasFinished = true;\n\t\t\t\t}\n\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loaded' );\n\t\t\t\t}\n\n\t\t\t\t// Scroll to the anchor if exits in the link.\n\t\t\t\tconst { hash } = new URL( href, window.location.href );\n\t\t\t\tif ( hash ) {\n\t\t\t\t\tdocument.querySelector( hash )?.scrollIntoView();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Prefetches the page with the passed URL.\n\t\t *\n\t\t * The function normalizes the URL and stores internally the fetch\n\t\t * promise, to avoid triggering a second fetch for an ongoing request.\n\t\t *\n\t\t * @param url The page URL.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] Force fetching the URL again.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t *\n\t\t * @return Promise that resolves once the page has been fetched.\n\t\t */\n\t\t*prefetch( url: string, options: PrefetchOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( url );\n\t\t\tif ( options.force || ! pages.has( pagePath ) ) {\n\t\t\t\tpages.set(\n\t\t\t\t\tpagePath,\n\t\t\t\t\tfetchPage( pagePath, { html: options.html } )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tyield pages.get( pagePath );\n\t\t},\n\t},\n} );\n\n/**\n * Announces a message to screen readers.\n *\n * This is a wrapper around the `@wordpress/a11y` package's `speak` function. It handles importing\n * the package on demand and should be used instead of calling `a11y.speak` directly.\n *\n * @param messageKey The message to be announced by assistive technologies.\n */\nfunction a11ySpeak( messageKey: keyof typeof navigationTexts ) {\n\tif ( ! hasLoadedNavigationTextsData ) {\n\t\thasLoadedNavigationTextsData = true;\n\t\tconst content = document.getElementById(\n\t\t\t'wp-script-module-data-@wordpress/interactivity-router'\n\t\t)?.textContent;\n\t\tif ( content ) {\n\t\t\ttry {\n\t\t\t\tconst parsed = JSON.parse( content );\n\t\t\t\tif ( typeof parsed?.i18n?.loading === 'string' ) {\n\t\t\t\t\tnavigationTexts.loading = parsed.i18n.loading;\n\t\t\t\t}\n\t\t\t\tif ( typeof parsed?.i18n?.loaded === 'string' ) {\n\t\t\t\t\tnavigationTexts.loaded = parsed.i18n.loaded;\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t} else {\n\t\t\t// Fallback to localized strings from Interactivity API state.\n\t\t\t// @todo This block is for Core < 6.7.0. Remove when support is dropped.\n\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loading ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loading = state.navigation.texts.loading;\n\t\t\t}\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loaded ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loaded = state.navigation.texts.loaded;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst message = navigationTexts[ messageKey ];\n\n\timport( '@wordpress/a11y' ).then(\n\t\t( { speak } ) => speak( message ),\n\t\t// Ignore failures to load the a11y module.\n\t\t() => {}\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAKiC,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA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AC9C;QACA,IAAK,OAAOiC,MAAM,EAAEC,IAAI,EAAEjC,MAAM,KAAK,QAAQ,EAAG;UAC/CF,eAAe,CAACE,MAAM,GAAGgC,MAAM,CAACC,IAAI,CAACjC,MAAM;QAC5C;MACD,CAAC,CAAC,MAAM,CAAC;IACV,CAAC,MAAM;MACN;MACA;;MAEA;MACA,IAAKT,KAAK,CAACY,UAAU,CAAC+B,KAAK,EAAEnC,OAAO,EAAG;QACtC;QACAD,eAAe,CAACC,OAAO,GAAGR,KAAK,CAACY,UAAU,CAAC+B,KAAK,CAACnC,OAAO;MACzD;MACA;MACA,IAAKR,KAAK,CAACY,UAAU,CAAC+B,KAAK,EAAElC,MAAM,EAAG;QACrC;QACAF,eAAe,CAACE,MAAM,GAAGT,KAAK,CAACY,UAAU,CAAC+B,KAAK,CAAClC,MAAM;MACvD;IACD;EACD;EAEA,MAAMmC,OAAO,GAAGrC,eAAe,CAAE8B,UAAU,CAAE;EAE7CxD,OAAA,CAAAuB,OAAA,GAAAyC,IAAA,OAAArI,uBAAA,CAAAR,OAAA,CAAQ,iBAAiB,IAAG6I,IAAI,CAC/B,CAAE;IAAEC;EAAM,CAAC,KAAMA,KAAK,CAAEF,OAAQ,CAAC;EACjC;EACA,MAAM,CAAC,CACR,CAAC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_interactivity","require","_styles","_scriptModules","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","directivePrefix","getRegionRootFragment","initialVdom","toVdom","render","parseServerData","populateServerData","batch","routerRegions","cloneElement","privateApis","regionAttr","interactiveAttr","regionsSelector","pages","Map","getPagePath","url","URL","window","location","href","pathname","search","parseRegionAttribute","region","value","getAttribute","id","attachTo","JSON","parse","cloneRouterRegionContent","vdom","allPriorityLevels","props","priorityLevels","routerRegionLevel","findIndex","level","includes","slice","length","element","regionsToAttachByParent","rootFragmentsByParent","fetchPage","html","res","fetch","status","text","dom","DOMParser","parseFromString","preparePage","querySelectorAll","forEach","el","remove","regions","regionsToAttach","parentElement","closest","undefined","title","querySelector","innerText","initialData","styles","scriptModules","Promise","all","preloadStyles","preloadScriptModules","renderPage","page","applyStyles","signal","parentsToUpdate","Set","parent","document","push","add","ids","vdoms","map","type","elementType","createElement","appendChild","fragment","forcePageReload","assign","addEventListener","pagePath","state","reload","src","markScriptModuleAsResolved","resolve","navigatingTo","hasLoadedNavigationTextsData","navigationTexts","loading","loaded","actions","store","navigation","hasStarted","hasFinished","navigate","options","clientNavigationDisabled","getConfig","loadingAnimation","screenReaderAnnouncement","timeout","prefetch","timeoutPromise","setTimeout","loadingTimeout","a11ySpeak","race","clearTimeout","config","importScriptModules","history","replace","hash","scrollIntoView","force","exports","messageKey","content","getElementById","textContent","parsed","i18n","texts","message","then","speak"],"sources":["@wordpress/interactivity-router/src/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, privateApis, getConfig } from '@wordpress/interactivity';\n\n/**\n * Internal dependencies\n */\nimport { preloadStyles, applyStyles, type StyleElement } from './assets/styles';\nimport {\n\tpreloadScriptModules,\n\timportScriptModules,\n\tmarkScriptModuleAsResolved,\n\ttype ScriptModuleLoad,\n} from './assets/script-modules';\n\nconst {\n\tdirectivePrefix,\n\tgetRegionRootFragment,\n\tinitialVdom,\n\ttoVdom,\n\trender,\n\tparseServerData,\n\tpopulateServerData,\n\tbatch,\n\trouterRegions,\n\tcloneElement,\n} = privateApis(\n\t'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'\n);\n\nconst regionAttr = `data-${ directivePrefix }-router-region`;\nconst interactiveAttr = `data-${ directivePrefix }-interactive`;\nconst regionsSelector = `[${ interactiveAttr }][${ regionAttr }], [${ interactiveAttr }] [${ interactiveAttr }][${ regionAttr }]`;\n\nexport interface NavigateOptions {\n\tforce?: boolean;\n\thtml?: string;\n\treplace?: boolean;\n\ttimeout?: number;\n\tloadingAnimation?: boolean;\n\tscreenReaderAnnouncement?: boolean;\n}\n\nexport interface PrefetchOptions {\n\tforce?: boolean;\n\thtml?: string;\n}\n\ninterface VdomParams {\n\tvdom?: typeof initialVdom;\n}\n\ninterface Page {\n\turl: string;\n\tregions: Record< string, any >;\n\tregionsToAttach: Record< string, string >;\n\tstyles: StyleElement[];\n\tscriptModules: ScriptModuleLoad[];\n\ttitle: string;\n\tinitialData: any;\n}\n\ntype PreparePage = (\n\turl: string,\n\tdom: Document,\n\tparams?: VdomParams\n) => Promise< Page >;\n\n// The cache of visited and prefetched pages, stylesheets and scripts.\nconst pages = new Map< string, Promise< Page | false > >();\n\n// Helper to remove domain and hash from the URL. We are only interesting in\n// caching the path and the query.\nconst getPagePath = ( url: string ) => {\n\tconst u = new URL( url, window.location.href );\n\treturn u.pathname + u.search;\n};\n\n/**\n * Parses the given region's directive.\n *\n * @param region Region element.\n * @return Data contained in the region directive value.\n */\nconst parseRegionAttribute = ( region: Element ) => {\n\tconst value = region.getAttribute( regionAttr );\n\ttry {\n\t\tconst { id, attachTo } = JSON.parse( value );\n\t\treturn { id, attachTo };\n\t} catch ( e ) {\n\t\treturn { id: value };\n\t}\n};\n\n/**\n * Clones the content of the router region vDOM passed as argument.\n *\n * The function creates a new VNode instance removing all priority levels up to\n * the one containing the router-region directive, which should have evaluated\n * in advance.\n *\n * @param vdom A router region's VNode.\n * @return The VNode for the passed router region's content.\n */\nconst cloneRouterRegionContent = ( vdom: any ) => {\n\tif ( ! vdom ) {\n\t\treturn vdom;\n\t}\n\tconst allPriorityLevels: string[][] = vdom.props.priorityLevels;\n\tconst routerRegionLevel = allPriorityLevels.findIndex( ( level ) =>\n\t\tlevel.includes( 'router-region' )\n\t);\n\tconst priorityLevels =\n\t\trouterRegionLevel !== -1\n\t\t\t? allPriorityLevels.slice( routerRegionLevel + 1 )\n\t\t\t: allPriorityLevels;\n\n\treturn priorityLevels.length > 0\n\t\t? cloneElement( vdom, {\n\t\t\t\t...vdom.props,\n\t\t\t\tpriorityLevels,\n\t\t } )\n\t\t: vdom.props.element;\n};\n\n/**\n * IDs of router regions with an `attachTo` property pointing to the same parent\n * element.\n */\nconst regionsToAttachByParent = new WeakMap< Element, string[] >();\n\n/**\n * Map of root fragments by parent element, used to render router regions with\n * the `attachTo` property. Those elements with the same parent are rendered\n * together in the corresponding root fragment.\n */\nconst rootFragmentsByParent = new WeakMap< Element, any >();\n\n/**\n * Fetches and prepares a page from a given URL.\n *\n * @param url The URL of the page to fetch.\n * @param options Options for the fetch operation.\n * @param options.html Optional HTML content. If provided, the function will use\n * this instead of fetching from the URL.\n * @return A Promise that resolves to the prepared page, or false if\n * there was an error during fetching or preparation.\n */\nconst fetchPage = async ( url: string, { html }: { html: string } ) => {\n\ttry {\n\t\tif ( ! html ) {\n\t\t\tconst res = await window.fetch( url );\n\t\t\tif ( res.status !== 200 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\thtml = await res.text();\n\t\t}\n\t\tconst dom = new window.DOMParser().parseFromString( html, 'text/html' );\n\t\treturn await preparePage( url, dom );\n\t} catch ( e ) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Processes a DOM document to extract router regions and related resources.\n *\n * This function analyzes the provided DOM document and creates a virtual DOM\n * representation of all HTML regions marked with a `router-region` directive.\n * It also extracts and preloads associated styles and scripts to prepare for\n * rendering the page.\n *\n * @param url The URL associated with the page, used for asset\n * loading and caching.\n * @param dom The DOM document to process.\n * @param vdomParams Optional parameters for virtual DOM processing.\n * @param vdomParams.vdom An optional existing virtual DOM cache to check for\n * regions. If a region exists in this cache, it will be\n * reused instead of creating a new vDOM representation.\n * @return A Promise that resolves to a {@link Page} object\n * containing the virtual DOM for all router regions,\n * preloaded styles and scripts, page title, and initial\n * server-rendered data.\n */\nconst preparePage: PreparePage = async ( url, dom, { vdom } = {} ) => {\n\t// Remove all noscript elements as they're irrelevant when request is served via router.\n\t// This prevents browsers from extracting styles from noscript tags.\n\tdom.querySelectorAll( 'noscript' ).forEach( ( el ) => el.remove() );\n\n\tconst regions = {};\n\tconst regionsToAttach = {};\n\tdom.querySelectorAll( regionsSelector ).forEach( ( region ) => {\n\t\tconst { id, attachTo } = parseRegionAttribute( region );\n\n\t\tif ( region.parentElement.closest( `[${ regionAttr }]` ) ) {\n\t\t\tregions[ id ] = undefined;\n\t\t} else {\n\t\t\tregions[ id ] = vdom?.has( region )\n\t\t\t\t? vdom.get( region )\n\t\t\t\t: toVdom( region );\n\t\t}\n\n\t\tif ( attachTo ) {\n\t\t\tregionsToAttach[ id ] = attachTo;\n\t\t}\n\t} );\n\n\tconst title = dom.querySelector( 'title' )?.innerText;\n\tconst initialData = parseServerData( dom );\n\n\t// Wait for styles and modules to be ready.\n\tconst [ styles, scriptModules ] = await Promise.all( [\n\t\tPromise.all( preloadStyles( dom, url ) ),\n\t\tPromise.all( preloadScriptModules( dom ) ),\n\t] );\n\n\treturn {\n\t\tregions,\n\t\tregionsToAttach,\n\t\tstyles,\n\t\tscriptModules,\n\t\ttitle,\n\t\tinitialData,\n\t\turl,\n\t};\n};\n\n/**\n * Renders a page by applying styles, populating server data, rendering regions,\n * and updating the document title.\n *\n * @param page The {@link Page} object to render.\n */\nconst renderPage = ( page: Page ) => {\n\tapplyStyles( page.styles );\n\n\t// Clone regionsToAttach.\n\tconst regionsToAttach = { ...page.regionsToAttach };\n\n\tbatch( () => {\n\t\t// Update server data.\n\t\tpopulateServerData( page.initialData );\n\n\t\t// Reset all router regions before setting the actual values.\n\t\t( routerRegions as Map< string, any > ).forEach( ( signal ) => {\n\t\t\tsignal.value = null;\n\t\t} );\n\n\t\t//Init regions with attachTo that don't exist yet.\n\t\tconst parentsToUpdate = new Set< Element >();\n\t\tfor ( const id in regionsToAttach ) {\n\t\t\tconst parent = document.querySelector( regionsToAttach[ id ] );\n\t\t\tif ( ! regionsToAttachByParent.has( parent ) ) {\n\t\t\t\tregionsToAttachByParent.set( parent, [] );\n\t\t\t}\n\t\t\tconst regions = regionsToAttachByParent.get( parent );\n\t\t\tif ( ! regions.includes( id ) ) {\n\t\t\t\tregions.push( id );\n\t\t\t\tparentsToUpdate.add( parent );\n\t\t\t}\n\t\t}\n\n\t\t//Update all existing regions.\n\t\tfor ( const id in page.regions ) {\n\t\t\tif ( routerRegions.has( id ) ) {\n\t\t\t\trouterRegions.get( id ).value = cloneRouterRegionContent(\n\t\t\t\t\tpage.regions[ id ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Render regions attached to the same parent in the same fragment.\n\t\tparentsToUpdate.forEach( ( parent ) => {\n\t\t\tconst ids = regionsToAttachByParent.get( parent );\n\t\t\tconst vdoms = ids.map( ( id ) => page.regions[ id ] );\n\n\t\t\tif ( ! rootFragmentsByParent.has( parent ) ) {\n\t\t\t\tconst regions = vdoms.map( ( { props, type } ) => {\n\t\t\t\t\tconst elementType =\n\t\t\t\t\t\ttypeof type === 'function' ? props.type : type;\n\n\t\t\t\t\t// Create an element with the obtained type where the region will be\n\t\t\t\t\t// rendered. The type should match the one of the root vnode.\n\t\t\t\t\tconst region = document.createElement( elementType );\n\t\t\t\t\tparent.appendChild( region );\n\t\t\t\t\treturn region;\n\t\t\t\t} );\n\t\t\t\trootFragmentsByParent.set(\n\t\t\t\t\tparent,\n\t\t\t\t\tgetRegionRootFragment( regions )\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst fragment = rootFragmentsByParent.get( parent );\n\t\t\trender( vdoms, fragment );\n\t\t} );\n\t} );\n\n\tif ( page.title ) {\n\t\tdocument.title = page.title;\n\t}\n};\n\n/**\n * Loads the given page forcing a full page reload.\n *\n * The function returns a promise that won't resolve, useful to prevent any\n * potential feedback indicating that the navigation has finished while the new\n * page is being loaded.\n *\n * @param href The page href.\n * @return Promise that never resolves.\n */\nconst forcePageReload = ( href: string ) => {\n\twindow.location.assign( href );\n\treturn new Promise( () => {} );\n};\n\n// Listen to the back and forward buttons and restore the page if it's in the\n// cache.\nwindow.addEventListener( 'popstate', async () => {\n\tconst pagePath = getPagePath( window.location.href ); // Remove hash.\n\tconst page = pages.has( pagePath ) && ( await pages.get( pagePath ) );\n\tif ( page ) {\n\t\trenderPage( page );\n\t\t// Update the URL in the state.\n\t\tstate.url = window.location.href;\n\t} else {\n\t\twindow.location.reload();\n\t}\n} );\n\n// Initialize the router and cache the initial page using the initial vDOM.\nwindow.document\n\t.querySelectorAll< HTMLScriptElement >( 'script[type=module][src]' )\n\t.forEach( ( { src } ) => markScriptModuleAsResolved( src ) );\npages.set(\n\tgetPagePath( window.location.href ),\n\tPromise.resolve(\n\t\tpreparePage( getPagePath( window.location.href ), document, {\n\t\t\tvdom: initialVdom,\n\t\t} )\n\t)\n);\n\n// Variable to store the current navigation.\nlet navigatingTo = '';\n\nlet hasLoadedNavigationTextsData = false;\nconst navigationTexts = {\n\tloading: 'Loading page, please wait.',\n\tloaded: 'Page Loaded.',\n};\n\ninterface Store {\n\tstate: {\n\t\turl: string;\n\t\tnavigation: {\n\t\t\thasStarted: boolean;\n\t\t\thasFinished: boolean;\n\t\t};\n\t};\n\tactions: {\n\t\tnavigate: (\n\t\t\thref: string,\n\t\t\toptions?: NavigateOptions\n\t\t) => Promise< void >;\n\t\tprefetch: ( url: string, options?: PrefetchOptions ) => Promise< void >;\n\t};\n}\n\nexport const { state, actions } = store< Store >( 'core/router', {\n\tstate: {\n\t\turl: window.location.href,\n\t\tnavigation: {\n\t\t\thasStarted: false,\n\t\t\thasFinished: false,\n\t\t},\n\t},\n\tactions: {\n\t\t/**\n\t\t * Navigates to the specified page.\n\t\t *\n\t\t * This function normalizes the passed href, fetches the page HTML if\n\t\t * needed, and updates any interactive regions whose contents have\n\t\t * changed. It also creates a new entry in the browser session history.\n\t\t *\n\t\t * @param href The page href.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] If true, it forces re-fetching the URL.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t * @param [options.replace] If true, it replaces the current entry in the browser session history.\n\t\t * @param [options.timeout] Time until the navigation is aborted, in milliseconds. Default is 10000.\n\t\t * @param [options.loadingAnimation] Whether an animation should be shown while navigating. Default to `true`.\n\t\t * @param [options.screenReaderAnnouncement] Whether a message for screen readers should be announced while navigating. Default to `true`.\n\t\t *\n\t\t * @return Promise that resolves once the navigation is completed or aborted.\n\t\t */\n\t\t*navigate( href: string, options: NavigateOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( href );\n\t\t\tconst { navigation } = state;\n\t\t\tconst {\n\t\t\t\tloadingAnimation = true,\n\t\t\t\tscreenReaderAnnouncement = true,\n\t\t\t\ttimeout = 10000,\n\t\t\t} = options;\n\n\t\t\tnavigatingTo = href;\n\t\t\tactions.prefetch( pagePath, options );\n\n\t\t\t// Create a promise that resolves when the specified timeout ends.\n\t\t\t// The timeout value is 10 seconds by default.\n\t\t\tconst timeoutPromise = new Promise< void >( ( resolve ) =>\n\t\t\t\tsetTimeout( resolve, timeout )\n\t\t\t);\n\n\t\t\t// Don't update the navigation status immediately, wait 400 ms.\n\t\t\tconst loadingTimeout = setTimeout( () => {\n\t\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = true;\n\t\t\t\t\tnavigation.hasFinished = false;\n\t\t\t\t}\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loading' );\n\t\t\t\t}\n\t\t\t}, 400 );\n\n\t\t\tconst page = yield Promise.race( [\n\t\t\t\tpages.get( pagePath ),\n\t\t\t\ttimeoutPromise,\n\t\t\t] );\n\n\t\t\t// Dismiss loading message if it hasn't been added yet.\n\t\t\tclearTimeout( loadingTimeout );\n\n\t\t\t// Once the page is fetched, the destination URL could have changed\n\t\t\t// (e.g., by clicking another link in the meantime). If so, bail\n\t\t\t// out, and let the newer execution to update the HTML.\n\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tpage &&\n\t\t\t\t! page.initialData?.config?.[ 'core/router' ]\n\t\t\t\t\t?.clientNavigationDisabled\n\t\t\t) {\n\t\t\t\tyield importScriptModules( page.scriptModules );\n\t\t\t\trenderPage( page );\n\t\t\t\twindow.history[\n\t\t\t\t\toptions.replace ? 'replaceState' : 'pushState'\n\t\t\t\t]( {}, '', href );\n\n\t\t\t\t// Update the URL in the state.\n\t\t\t\tstate.url = href;\n\n\t\t\t\t// Update the navigation status once the the new page rendering\n\t\t\t\t// has been completed.\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = false;\n\t\t\t\t\tnavigation.hasFinished = true;\n\t\t\t\t}\n\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loaded' );\n\t\t\t\t}\n\n\t\t\t\t// Scroll to the anchor if exits in the link.\n\t\t\t\tconst { hash } = new URL( href, window.location.href );\n\t\t\t\tif ( hash ) {\n\t\t\t\t\tdocument.querySelector( hash )?.scrollIntoView();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Prefetches the page with the passed URL.\n\t\t *\n\t\t * The function normalizes the URL and stores internally the fetch\n\t\t * promise, to avoid triggering a second fetch for an ongoing request.\n\t\t *\n\t\t * @param url The page URL.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] Force fetching the URL again.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t *\n\t\t * @return Promise that resolves once the page has been fetched.\n\t\t */\n\t\t*prefetch( url: string, options: PrefetchOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( url );\n\t\t\tif ( options.force || ! pages.has( pagePath ) ) {\n\t\t\t\tpages.set(\n\t\t\t\t\tpagePath,\n\t\t\t\t\tfetchPage( pagePath, { html: options.html } )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tyield pages.get( pagePath );\n\t\t},\n\t},\n} );\n\n/**\n * Announces a message to screen readers.\n *\n * This is a wrapper around the `@wordpress/a11y` package's `speak` function. It handles importing\n * the package on demand and should be used instead of calling `a11y.speak` directly.\n *\n * @param messageKey The message to be announced by assistive technologies.\n */\nfunction a11ySpeak( messageKey: keyof typeof navigationTexts ) {\n\tif ( ! hasLoadedNavigationTextsData ) {\n\t\thasLoadedNavigationTextsData = true;\n\t\tconst content = document.getElementById(\n\t\t\t'wp-script-module-data-@wordpress/interactivity-router'\n\t\t)?.textContent;\n\t\tif ( content ) {\n\t\t\ttry {\n\t\t\t\tconst parsed = JSON.parse( content );\n\t\t\t\tif ( typeof parsed?.i18n?.loading === 'string' ) {\n\t\t\t\t\tnavigationTexts.loading = parsed.i18n.loading;\n\t\t\t\t}\n\t\t\t\tif ( typeof parsed?.i18n?.loaded === 'string' ) {\n\t\t\t\t\tnavigationTexts.loaded = parsed.i18n.loaded;\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t} else {\n\t\t\t// Fallback to localized strings from Interactivity API state.\n\t\t\t// @todo This block is for Core < 6.7.0. Remove when support is dropped.\n\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loading ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loading = state.navigation.texts.loading;\n\t\t\t}\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loaded ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loaded = state.navigation.texts.loaded;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst message = navigationTexts[ messageKey ];\n\n\timport( '@wordpress/a11y' ).then(\n\t\t( { speak } ) => speak( message ),\n\t\t// Ignore failures to load the a11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,IAAI,CAAClC,OAAO;QAC9C;QACA,IAAK,OAAOiC,MAAM,EAAEC,IAAI,EAAEjC,MAAM,KAAK,QAAQ,EAAG;UAC/CF,eAAe,CAACE,MAAM,GAAGgC,MAAM,CAACC,IAAI,CAACjC,MAAM;QAC5C;MACD,CAAC,CAAC,MAAM,CAAC;IACV,CAAC,MAAM;MACN;MACA;;MAEA;MACA,IAAKT,KAAK,CAACY,UAAU,CAAC+B,KAAK,EAAEnC,OAAO,EAAG;QACtC;QACAD,eAAe,CAACC,OAAO,GAAGR,KAAK,CAACY,UAAU,CAAC+B,KAAK,CAACnC,OAAO;MACzD;MACA;MACA,IAAKR,KAAK,CAACY,UAAU,CAAC+B,KAAK,EAAElC,MAAM,EAAG;QACrC;QACAF,eAAe,CAACE,MAAM,GAAGT,KAAK,CAACY,UAAU,CAAC+B,KAAK,CAAClC,MAAM;MACvD;IACD;EACD;EAEA,MAAMmC,OAAO,GAAGrC,eAAe,CAAE8B,UAAU,CAAE;EAE7C/D,OAAA,CAAA8B,OAAA,GAAAyC,IAAA,OAAA9J,uBAAA,CAAAR,OAAA,CAAQ,iBAAiB,IAAGsK,IAAI,CAC/B,CAAE;IAAEC;EAAM,CAAC,KAAMA,KAAK,CAAEF,OAAQ,CAAC;EACjC;EACA,MAAM,CAAC,CACR,CAAC;AACF","ignoreList":[]}
|
package/build-module/index.js
CHANGED
|
@@ -17,11 +17,13 @@ const {
|
|
|
17
17
|
render,
|
|
18
18
|
parseServerData,
|
|
19
19
|
populateServerData,
|
|
20
|
-
batch
|
|
20
|
+
batch,
|
|
21
|
+
routerRegions,
|
|
22
|
+
cloneElement
|
|
21
23
|
} = privateApis('I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.');
|
|
22
24
|
const regionAttr = `data-${directivePrefix}-router-region`;
|
|
23
25
|
const interactiveAttr = `data-${directivePrefix}-interactive`;
|
|
24
|
-
const regionsSelector = `[${interactiveAttr}][${regionAttr}]
|
|
26
|
+
const regionsSelector = `[${interactiveAttr}][${regionAttr}], [${interactiveAttr}] [${interactiveAttr}][${regionAttr}]`;
|
|
25
27
|
// The cache of visited and prefetched pages, stylesheets and scripts.
|
|
26
28
|
const pages = new Map();
|
|
27
29
|
|
|
@@ -56,6 +58,42 @@ const parseRegionAttribute = region => {
|
|
|
56
58
|
}
|
|
57
59
|
};
|
|
58
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Clones the content of the router region vDOM passed as argument.
|
|
63
|
+
*
|
|
64
|
+
* The function creates a new VNode instance removing all priority levels up to
|
|
65
|
+
* the one containing the router-region directive, which should have evaluated
|
|
66
|
+
* in advance.
|
|
67
|
+
*
|
|
68
|
+
* @param vdom A router region's VNode.
|
|
69
|
+
* @return The VNode for the passed router region's content.
|
|
70
|
+
*/
|
|
71
|
+
const cloneRouterRegionContent = vdom => {
|
|
72
|
+
if (!vdom) {
|
|
73
|
+
return vdom;
|
|
74
|
+
}
|
|
75
|
+
const allPriorityLevels = vdom.props.priorityLevels;
|
|
76
|
+
const routerRegionLevel = allPriorityLevels.findIndex(level => level.includes('router-region'));
|
|
77
|
+
const priorityLevels = routerRegionLevel !== -1 ? allPriorityLevels.slice(routerRegionLevel + 1) : allPriorityLevels;
|
|
78
|
+
return priorityLevels.length > 0 ? cloneElement(vdom, {
|
|
79
|
+
...vdom.props,
|
|
80
|
+
priorityLevels
|
|
81
|
+
}) : vdom.props.element;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* IDs of router regions with an `attachTo` property pointing to the same parent
|
|
86
|
+
* element.
|
|
87
|
+
*/
|
|
88
|
+
const regionsToAttachByParent = new WeakMap();
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Map of root fragments by parent element, used to render router regions with
|
|
92
|
+
* the `attachTo` property. Those elements with the same parent are rendered
|
|
93
|
+
* together in the corresponding root fragment.
|
|
94
|
+
*/
|
|
95
|
+
const rootFragmentsByParent = new WeakMap();
|
|
96
|
+
|
|
59
97
|
/**
|
|
60
98
|
* Fetches and prepares a page from a given URL.
|
|
61
99
|
*
|
|
@@ -117,7 +155,11 @@ const preparePage = async (url, dom, {
|
|
|
117
155
|
id,
|
|
118
156
|
attachTo
|
|
119
157
|
} = parseRegionAttribute(region);
|
|
120
|
-
|
|
158
|
+
if (region.parentElement.closest(`[${regionAttr}]`)) {
|
|
159
|
+
regions[id] = undefined;
|
|
160
|
+
} else {
|
|
161
|
+
regions[id] = vdom?.has(region) ? vdom.get(region) : toVdom(region);
|
|
162
|
+
}
|
|
121
163
|
if (attachTo) {
|
|
122
164
|
regionsToAttach[id] = attachTo;
|
|
123
165
|
}
|
|
@@ -152,36 +194,57 @@ const renderPage = page => {
|
|
|
152
194
|
...page.regionsToAttach
|
|
153
195
|
};
|
|
154
196
|
batch(() => {
|
|
197
|
+
// Update server data.
|
|
155
198
|
populateServerData(page.initialData);
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const fragment = getRegionRootFragment(region);
|
|
161
|
-
render(page.regions[id], fragment);
|
|
162
|
-
// If this is an attached region, remove it from the list.
|
|
163
|
-
delete regionsToAttach[id];
|
|
199
|
+
|
|
200
|
+
// Reset all router regions before setting the actual values.
|
|
201
|
+
routerRegions.forEach(signal => {
|
|
202
|
+
signal.value = null;
|
|
164
203
|
});
|
|
165
204
|
|
|
166
|
-
//
|
|
205
|
+
//Init regions with attachTo that don't exist yet.
|
|
206
|
+
const parentsToUpdate = new Set();
|
|
167
207
|
for (const id in regionsToAttach) {
|
|
168
208
|
const parent = document.querySelector(regionsToAttach[id]);
|
|
209
|
+
if (!regionsToAttachByParent.has(parent)) {
|
|
210
|
+
regionsToAttachByParent.set(parent, []);
|
|
211
|
+
}
|
|
212
|
+
const regions = regionsToAttachByParent.get(parent);
|
|
213
|
+
if (!regions.includes(id)) {
|
|
214
|
+
regions.push(id);
|
|
215
|
+
parentsToUpdate.add(parent);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
169
218
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
} = page.regions[id];
|
|
176
|
-
const elementType = typeof type === 'function' ? props.type : type;
|
|
177
|
-
|
|
178
|
-
// Create an element with the obtained type where the region will be
|
|
179
|
-
// rendered. The type should match the one of the root vnode.
|
|
180
|
-
const region = document.createElement(elementType);
|
|
181
|
-
parent.appendChild(region);
|
|
182
|
-
const fragment = getRegionRootFragment(region);
|
|
183
|
-
render(page.regions[id], fragment);
|
|
219
|
+
//Update all existing regions.
|
|
220
|
+
for (const id in page.regions) {
|
|
221
|
+
if (routerRegions.has(id)) {
|
|
222
|
+
routerRegions.get(id).value = cloneRouterRegionContent(page.regions[id]);
|
|
223
|
+
}
|
|
184
224
|
}
|
|
225
|
+
|
|
226
|
+
// Render regions attached to the same parent in the same fragment.
|
|
227
|
+
parentsToUpdate.forEach(parent => {
|
|
228
|
+
const ids = regionsToAttachByParent.get(parent);
|
|
229
|
+
const vdoms = ids.map(id => page.regions[id]);
|
|
230
|
+
if (!rootFragmentsByParent.has(parent)) {
|
|
231
|
+
const regions = vdoms.map(({
|
|
232
|
+
props,
|
|
233
|
+
type
|
|
234
|
+
}) => {
|
|
235
|
+
const elementType = typeof type === 'function' ? props.type : type;
|
|
236
|
+
|
|
237
|
+
// Create an element with the obtained type where the region will be
|
|
238
|
+
// rendered. The type should match the one of the root vnode.
|
|
239
|
+
const region = document.createElement(elementType);
|
|
240
|
+
parent.appendChild(region);
|
|
241
|
+
return region;
|
|
242
|
+
});
|
|
243
|
+
rootFragmentsByParent.set(parent, getRegionRootFragment(regions));
|
|
244
|
+
}
|
|
245
|
+
const fragment = rootFragmentsByParent.get(parent);
|
|
246
|
+
render(vdoms, fragment);
|
|
247
|
+
});
|
|
185
248
|
});
|
|
186
249
|
if (page.title) {
|
|
187
250
|
document.title = page.title;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","privateApis","getConfig","preloadStyles","applyStyles","preloadScriptModules","importScriptModules","markScriptModuleAsResolved","directivePrefix","getRegionRootFragment","initialVdom","toVdom","render","parseServerData","populateServerData","batch","regionAttr","interactiveAttr","regionsSelector","pages","Map","getPagePath","url","u","URL","window","location","href","pathname","search","parseRegionAttribute","region","value","getAttribute","id","attachTo","JSON","parse","e","fetchPage","html","res","fetch","status","text","dom","DOMParser","parseFromString","preparePage","vdom","querySelectorAll","forEach","el","remove","regions","regionsToAttach","has","get","title","querySelector","innerText","initialData","styles","scriptModules","Promise","all","renderPage","page","document","fragment","parent","props","type","elementType","createElement","appendChild","forcePageReload","assign","addEventListener","pagePath","state","reload","src","set","resolve","navigatingTo","hasLoadedNavigationTextsData","navigationTexts","loading","loaded","actions","navigation","hasStarted","hasFinished","navigate","options","clientNavigationDisabled","loadingAnimation","screenReaderAnnouncement","timeout","prefetch","timeoutPromise","setTimeout","loadingTimeout","a11ySpeak","race","clearTimeout","config","history","replace","hash","scrollIntoView","force","messageKey","content","getElementById","textContent","parsed","i18n","texts","message","then","speak"],"sources":["@wordpress/interactivity-router/src/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, privateApis, getConfig } from '@wordpress/interactivity';\n\n/**\n * Internal dependencies\n */\nimport { preloadStyles, applyStyles, type StyleElement } from './assets/styles';\nimport {\n\tpreloadScriptModules,\n\timportScriptModules,\n\tmarkScriptModuleAsResolved,\n\ttype ScriptModuleLoad,\n} from './assets/script-modules';\n\nconst {\n\tdirectivePrefix,\n\tgetRegionRootFragment,\n\tinitialVdom,\n\ttoVdom,\n\trender,\n\tparseServerData,\n\tpopulateServerData,\n\tbatch,\n} = privateApis(\n\t'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'\n);\n\nconst regionAttr = `data-${ directivePrefix }-router-region`;\nconst interactiveAttr = `data-${ directivePrefix }-interactive`;\nconst regionsSelector = `[${ interactiveAttr }][${ regionAttr }]:not([${ interactiveAttr }] [${ interactiveAttr }])`;\n\nexport interface NavigateOptions {\n\tforce?: boolean;\n\thtml?: string;\n\treplace?: boolean;\n\ttimeout?: number;\n\tloadingAnimation?: boolean;\n\tscreenReaderAnnouncement?: boolean;\n}\n\nexport interface PrefetchOptions {\n\tforce?: boolean;\n\thtml?: string;\n}\n\ninterface VdomParams {\n\tvdom?: typeof initialVdom;\n}\n\ninterface Page {\n\turl: string;\n\tregions: Record< string, any >;\n\tregionsToAttach: Record< string, string >;\n\tstyles: StyleElement[];\n\tscriptModules: ScriptModuleLoad[];\n\ttitle: string;\n\tinitialData: any;\n}\n\ntype PreparePage = (\n\turl: string,\n\tdom: Document,\n\tparams?: VdomParams\n) => Promise< Page >;\n\n// The cache of visited and prefetched pages, stylesheets and scripts.\nconst pages = new Map< string, Promise< Page | false > >();\n\n// Helper to remove domain and hash from the URL. We are only interesting in\n// caching the path and the query.\nconst getPagePath = ( url: string ) => {\n\tconst u = new URL( url, window.location.href );\n\treturn u.pathname + u.search;\n};\n\n/**\n * Parses the given region's directive.\n *\n * @param region Region element.\n * @return Data contained in the region directive value.\n */\nconst parseRegionAttribute = ( region: Element ) => {\n\tconst value = region.getAttribute( regionAttr );\n\ttry {\n\t\tconst { id, attachTo } = JSON.parse( value );\n\t\treturn { id, attachTo };\n\t} catch ( e ) {\n\t\treturn { id: value };\n\t}\n};\n\n/**\n * Fetches and prepares a page from a given URL.\n *\n * @param url The URL of the page to fetch.\n * @param options Options for the fetch operation.\n * @param options.html Optional HTML content. If provided, the function will use\n * this instead of fetching from the URL.\n * @return A Promise that resolves to the prepared page, or false if\n * there was an error during fetching or preparation.\n */\nconst fetchPage = async ( url: string, { html }: { html: string } ) => {\n\ttry {\n\t\tif ( ! html ) {\n\t\t\tconst res = await window.fetch( url );\n\t\t\tif ( res.status !== 200 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\thtml = await res.text();\n\t\t}\n\t\tconst dom = new window.DOMParser().parseFromString( html, 'text/html' );\n\t\treturn await preparePage( url, dom );\n\t} catch ( e ) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Processes a DOM document to extract router regions and related resources.\n *\n * This function analyzes the provided DOM document and creates a virtual DOM\n * representation of all HTML regions marked with a `router-region` directive.\n * It also extracts and preloads associated styles and scripts to prepare for\n * rendering the page.\n *\n * @param url The URL associated with the page, used for asset\n * loading and caching.\n * @param dom The DOM document to process.\n * @param vdomParams Optional parameters for virtual DOM processing.\n * @param vdomParams.vdom An optional existing virtual DOM cache to check for\n * regions. If a region exists in this cache, it will be\n * reused instead of creating a new vDOM representation.\n * @return A Promise that resolves to a {@link Page} object\n * containing the virtual DOM for all router regions,\n * preloaded styles and scripts, page title, and initial\n * server-rendered data.\n */\nconst preparePage: PreparePage = async ( url, dom, { vdom } = {} ) => {\n\t// Remove all noscript elements as they're irrelevant when request is served via router.\n\t// This prevents browsers from extracting styles from noscript tags.\n\tdom.querySelectorAll( 'noscript' ).forEach( ( el ) => el.remove() );\n\n\tconst regions = {};\n\tconst regionsToAttach = {};\n\tdom.querySelectorAll( regionsSelector ).forEach( ( region ) => {\n\t\tconst { id, attachTo } = parseRegionAttribute( region );\n\t\tregions[ id ] = vdom?.has( region )\n\t\t\t? vdom.get( region )\n\t\t\t: toVdom( region );\n\t\tif ( attachTo ) {\n\t\t\tregionsToAttach[ id ] = attachTo;\n\t\t}\n\t} );\n\n\tconst title = dom.querySelector( 'title' )?.innerText;\n\tconst initialData = parseServerData( dom );\n\n\t// Wait for styles and modules to be ready.\n\tconst [ styles, scriptModules ] = await Promise.all( [\n\t\tPromise.all( preloadStyles( dom, url ) ),\n\t\tPromise.all( preloadScriptModules( dom ) ),\n\t] );\n\n\treturn {\n\t\tregions,\n\t\tregionsToAttach,\n\t\tstyles,\n\t\tscriptModules,\n\t\ttitle,\n\t\tinitialData,\n\t\turl,\n\t};\n};\n\n/**\n * Renders a page by applying styles, populating server data, rendering regions,\n * and updating the document title.\n *\n * @param page The {@link Page} object to render.\n */\nconst renderPage = ( page: Page ) => {\n\tapplyStyles( page.styles );\n\n\t// Clone regionsToAttach.\n\tconst regionsToAttach = { ...page.regionsToAttach };\n\n\tbatch( () => {\n\t\tpopulateServerData( page.initialData );\n\t\tdocument.querySelectorAll( regionsSelector ).forEach( ( region ) => {\n\t\t\tconst { id } = parseRegionAttribute( region );\n\t\t\tconst fragment = getRegionRootFragment( region );\n\t\t\trender( page.regions[ id ], fragment );\n\t\t\t// If this is an attached region, remove it from the list.\n\t\t\tdelete regionsToAttach[ id ];\n\t\t} );\n\n\t\t// Render unattached regions.\n\t\tfor ( const id in regionsToAttach ) {\n\t\t\tconst parent = document.querySelector( regionsToAttach[ id ] );\n\n\t\t\t// Get the type from the vnode. If wrapped with Directives, get the\n\t\t\t// original type from `props.type`.\n\t\t\tconst { props, type } = page.regions[ id ];\n\t\t\tconst elementType = typeof type === 'function' ? props.type : type;\n\n\t\t\t// Create an element with the obtained type where the region will be\n\t\t\t// rendered. The type should match the one of the root vnode.\n\t\t\tconst region = document.createElement( elementType );\n\t\t\tparent.appendChild( region );\n\n\t\t\tconst fragment = getRegionRootFragment( region );\n\t\t\trender( page.regions[ id ], fragment );\n\t\t}\n\t} );\n\n\tif ( page.title ) {\n\t\tdocument.title = page.title;\n\t}\n};\n\n/**\n * Loads the given page forcing a full page reload.\n *\n * The function returns a promise that won't resolve, useful to prevent any\n * potential feedback indicating that the navigation has finished while the new\n * page is being loaded.\n *\n * @param href The page href.\n * @return Promise that never resolves.\n */\nconst forcePageReload = ( href: string ) => {\n\twindow.location.assign( href );\n\treturn new Promise( () => {} );\n};\n\n// Listen to the back and forward buttons and restore the page if it's in the\n// cache.\nwindow.addEventListener( 'popstate', async () => {\n\tconst pagePath = getPagePath( window.location.href ); // Remove hash.\n\tconst page = pages.has( pagePath ) && ( await pages.get( pagePath ) );\n\tif ( page ) {\n\t\trenderPage( page );\n\t\t// Update the URL in the state.\n\t\tstate.url = window.location.href;\n\t} else {\n\t\twindow.location.reload();\n\t}\n} );\n\n// Initialize the router and cache the initial page using the initial vDOM.\nwindow.document\n\t.querySelectorAll< HTMLScriptElement >( 'script[type=module][src]' )\n\t.forEach( ( { src } ) => markScriptModuleAsResolved( src ) );\npages.set(\n\tgetPagePath( window.location.href ),\n\tPromise.resolve(\n\t\tpreparePage( getPagePath( window.location.href ), document, {\n\t\t\tvdom: initialVdom,\n\t\t} )\n\t)\n);\n\n// Variable to store the current navigation.\nlet navigatingTo = '';\n\nlet hasLoadedNavigationTextsData = false;\nconst navigationTexts = {\n\tloading: 'Loading page, please wait.',\n\tloaded: 'Page Loaded.',\n};\n\ninterface Store {\n\tstate: {\n\t\turl: string;\n\t\tnavigation: {\n\t\t\thasStarted: boolean;\n\t\t\thasFinished: boolean;\n\t\t};\n\t};\n\tactions: {\n\t\tnavigate: (\n\t\t\thref: string,\n\t\t\toptions?: NavigateOptions\n\t\t) => Promise< void >;\n\t\tprefetch: ( url: string, options?: PrefetchOptions ) => Promise< void >;\n\t};\n}\n\nexport const { state, actions } = store< Store >( 'core/router', {\n\tstate: {\n\t\turl: window.location.href,\n\t\tnavigation: {\n\t\t\thasStarted: false,\n\t\t\thasFinished: false,\n\t\t},\n\t},\n\tactions: {\n\t\t/**\n\t\t * Navigates to the specified page.\n\t\t *\n\t\t * This function normalizes the passed href, fetches the page HTML if\n\t\t * needed, and updates any interactive regions whose contents have\n\t\t * changed. It also creates a new entry in the browser session history.\n\t\t *\n\t\t * @param href The page href.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] If true, it forces re-fetching the URL.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t * @param [options.replace] If true, it replaces the current entry in the browser session history.\n\t\t * @param [options.timeout] Time until the navigation is aborted, in milliseconds. Default is 10000.\n\t\t * @param [options.loadingAnimation] Whether an animation should be shown while navigating. Default to `true`.\n\t\t * @param [options.screenReaderAnnouncement] Whether a message for screen readers should be announced while navigating. Default to `true`.\n\t\t *\n\t\t * @return Promise that resolves once the navigation is completed or aborted.\n\t\t */\n\t\t*navigate( href: string, options: NavigateOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( href );\n\t\t\tconst { navigation } = state;\n\t\t\tconst {\n\t\t\t\tloadingAnimation = true,\n\t\t\t\tscreenReaderAnnouncement = true,\n\t\t\t\ttimeout = 10000,\n\t\t\t} = options;\n\n\t\t\tnavigatingTo = href;\n\t\t\tactions.prefetch( pagePath, options );\n\n\t\t\t// Create a promise that resolves when the specified timeout ends.\n\t\t\t// The timeout value is 10 seconds by default.\n\t\t\tconst timeoutPromise = new Promise< void >( ( resolve ) =>\n\t\t\t\tsetTimeout( resolve, timeout )\n\t\t\t);\n\n\t\t\t// Don't update the navigation status immediately, wait 400 ms.\n\t\t\tconst loadingTimeout = setTimeout( () => {\n\t\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = true;\n\t\t\t\t\tnavigation.hasFinished = false;\n\t\t\t\t}\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loading' );\n\t\t\t\t}\n\t\t\t}, 400 );\n\n\t\t\tconst page = yield Promise.race( [\n\t\t\t\tpages.get( pagePath ),\n\t\t\t\ttimeoutPromise,\n\t\t\t] );\n\n\t\t\t// Dismiss loading message if it hasn't been added yet.\n\t\t\tclearTimeout( loadingTimeout );\n\n\t\t\t// Once the page is fetched, the destination URL could have changed\n\t\t\t// (e.g., by clicking another link in the meantime). If so, bail\n\t\t\t// out, and let the newer execution to update the HTML.\n\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tpage &&\n\t\t\t\t! page.initialData?.config?.[ 'core/router' ]\n\t\t\t\t\t?.clientNavigationDisabled\n\t\t\t) {\n\t\t\t\tyield importScriptModules( page.scriptModules );\n\t\t\t\trenderPage( page );\n\t\t\t\twindow.history[\n\t\t\t\t\toptions.replace ? 'replaceState' : 'pushState'\n\t\t\t\t]( {}, '', href );\n\n\t\t\t\t// Update the URL in the state.\n\t\t\t\tstate.url = href;\n\n\t\t\t\t// Update the navigation status once the the new page rendering\n\t\t\t\t// has been completed.\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = false;\n\t\t\t\t\tnavigation.hasFinished = true;\n\t\t\t\t}\n\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loaded' );\n\t\t\t\t}\n\n\t\t\t\t// Scroll to the anchor if exits in the link.\n\t\t\t\tconst { hash } = new URL( href, window.location.href );\n\t\t\t\tif ( hash ) {\n\t\t\t\t\tdocument.querySelector( hash )?.scrollIntoView();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Prefetches the page with the passed URL.\n\t\t *\n\t\t * The function normalizes the URL and stores internally the fetch\n\t\t * promise, to avoid triggering a second fetch for an ongoing request.\n\t\t *\n\t\t * @param url The page URL.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] Force fetching the URL again.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t *\n\t\t * @return Promise that resolves once the page has been fetched.\n\t\t */\n\t\t*prefetch( url: string, options: PrefetchOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( url );\n\t\t\tif ( options.force || ! pages.has( pagePath ) ) {\n\t\t\t\tpages.set(\n\t\t\t\t\tpagePath,\n\t\t\t\t\tfetchPage( pagePath, { html: options.html } )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tyield pages.get( pagePath );\n\t\t},\n\t},\n} );\n\n/**\n * Announces a message to screen readers.\n *\n * This is a wrapper around the `@wordpress/a11y` package's `speak` function. It handles importing\n * the package on demand and should be used instead of calling `a11y.speak` directly.\n *\n * @param messageKey The message to be announced by assistive technologies.\n */\nfunction a11ySpeak( messageKey: keyof typeof navigationTexts ) {\n\tif ( ! hasLoadedNavigationTextsData ) {\n\t\thasLoadedNavigationTextsData = true;\n\t\tconst content = document.getElementById(\n\t\t\t'wp-script-module-data-@wordpress/interactivity-router'\n\t\t)?.textContent;\n\t\tif ( content ) {\n\t\t\ttry {\n\t\t\t\tconst parsed = JSON.parse( content );\n\t\t\t\tif ( typeof parsed?.i18n?.loading === 'string' ) {\n\t\t\t\t\tnavigationTexts.loading = parsed.i18n.loading;\n\t\t\t\t}\n\t\t\t\tif ( typeof parsed?.i18n?.loaded === 'string' ) {\n\t\t\t\t\tnavigationTexts.loaded = parsed.i18n.loaded;\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t} else {\n\t\t\t// Fallback to localized strings from Interactivity API state.\n\t\t\t// @todo This block is for Core < 6.7.0. Remove when support is dropped.\n\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loading ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loading = state.navigation.texts.loading;\n\t\t\t}\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loaded ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loaded = state.navigation.texts.loaded;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst message = navigationTexts[ messageKey ];\n\n\timport( '@wordpress/a11y' ).then(\n\t\t( { speak } ) => speak( message ),\n\t\t// Ignore failures to load the a11y module.\n\t\t() => {}\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,EAAEC,WAAW,EAAEC,SAAS,QAAQ,0BAA0B;;AAExE;AACA;AACA;AACA,SAASC,aAAa,EAAEC,WAAW,QAA2B,iBAAiB;AAC/E,SACCC,oBAAoB,EACpBC,mBAAmB,EACnBC,0BAA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fig","preloadStyles","applyStyles","preloadScriptModules","importScriptModules","markScriptModuleAsResolved","directivePrefix","getRegionRootFragment","initialVdom","toVdom","render","parseServerData","populateServerData","batch","routerRegions","cloneElement","regionAttr","interactiveAttr","regionsSelector","pages","Map","getPagePath","url","u","URL","window","location","href","pathname","search","parseRegionAttribute","region","value","getAttribute","id","attachTo","JSON","parse","e","cloneRouterRegionContent","vdom","allPriorityLevels","props","priorityLevels","routerRegionLevel","findIndex","level","includes","slice","length","element","regionsToAttachByParent","WeakMap","rootFragmentsByParent","fetchPage","html","res","fetch","status","text","dom","DOMParser","parseFromString","preparePage","querySelectorAll","forEach","el","remove","regions","regionsToAttach","parentElement","closest","undefined","has","get","title","querySelector","innerText","initialData","styles","scriptModules","Promise","all","renderPage","page","signal","parentsToUpdate","Set","parent","document","set","push","add","ids","vdoms","map","type","elementType","createElement","appendChild","fragment","forcePageReload","assign","addEventListener","pagePath","state","reload","src","resolve","navigatingTo","hasLoadedNavigationTextsData","navigationTexts","loading","loaded","actions","navigation","hasStarted","hasFinished","navigate","options","clientNavigationDisabled","loadingAnimation","screenReaderAnnouncement","timeout","prefetch","timeoutPromise","setTimeout","loadingTimeout","a11ySpeak","race","clearTimeout","config","history","replace","hash","scrollIntoView","force","messageKey","content","getElementById","textContent","parsed","i18n","texts","message","then","speak"],"sources":["@wordpress/interactivity-router/src/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, privateApis, getConfig } from '@wordpress/interactivity';\n\n/**\n * Internal dependencies\n */\nimport { preloadStyles, applyStyles, type StyleElement } from './assets/styles';\nimport {\n\tpreloadScriptModules,\n\timportScriptModules,\n\tmarkScriptModuleAsResolved,\n\ttype ScriptModuleLoad,\n} from './assets/script-modules';\n\nconst {\n\tdirectivePrefix,\n\tgetRegionRootFragment,\n\tinitialVdom,\n\ttoVdom,\n\trender,\n\tparseServerData,\n\tpopulateServerData,\n\tbatch,\n\trouterRegions,\n\tcloneElement,\n} = privateApis(\n\t'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'\n);\n\nconst regionAttr = `data-${ directivePrefix }-router-region`;\nconst interactiveAttr = `data-${ directivePrefix }-interactive`;\nconst regionsSelector = `[${ interactiveAttr }][${ regionAttr }], [${ interactiveAttr }] [${ interactiveAttr }][${ regionAttr }]`;\n\nexport interface NavigateOptions {\n\tforce?: boolean;\n\thtml?: string;\n\treplace?: boolean;\n\ttimeout?: number;\n\tloadingAnimation?: boolean;\n\tscreenReaderAnnouncement?: boolean;\n}\n\nexport interface PrefetchOptions {\n\tforce?: boolean;\n\thtml?: string;\n}\n\ninterface VdomParams {\n\tvdom?: typeof initialVdom;\n}\n\ninterface Page {\n\turl: string;\n\tregions: Record< string, any >;\n\tregionsToAttach: Record< string, string >;\n\tstyles: StyleElement[];\n\tscriptModules: ScriptModuleLoad[];\n\ttitle: string;\n\tinitialData: any;\n}\n\ntype PreparePage = (\n\turl: string,\n\tdom: Document,\n\tparams?: VdomParams\n) => Promise< Page >;\n\n// The cache of visited and prefetched pages, stylesheets and scripts.\nconst pages = new Map< string, Promise< Page | false > >();\n\n// Helper to remove domain and hash from the URL. We are only interesting in\n// caching the path and the query.\nconst getPagePath = ( url: string ) => {\n\tconst u = new URL( url, window.location.href );\n\treturn u.pathname + u.search;\n};\n\n/**\n * Parses the given region's directive.\n *\n * @param region Region element.\n * @return Data contained in the region directive value.\n */\nconst parseRegionAttribute = ( region: Element ) => {\n\tconst value = region.getAttribute( regionAttr );\n\ttry {\n\t\tconst { id, attachTo } = JSON.parse( value );\n\t\treturn { id, attachTo };\n\t} catch ( e ) {\n\t\treturn { id: value };\n\t}\n};\n\n/**\n * Clones the content of the router region vDOM passed as argument.\n *\n * The function creates a new VNode instance removing all priority levels up to\n * the one containing the router-region directive, which should have evaluated\n * in advance.\n *\n * @param vdom A router region's VNode.\n * @return The VNode for the passed router region's content.\n */\nconst cloneRouterRegionContent = ( vdom: any ) => {\n\tif ( ! vdom ) {\n\t\treturn vdom;\n\t}\n\tconst allPriorityLevels: string[][] = vdom.props.priorityLevels;\n\tconst routerRegionLevel = allPriorityLevels.findIndex( ( level ) =>\n\t\tlevel.includes( 'router-region' )\n\t);\n\tconst priorityLevels =\n\t\trouterRegionLevel !== -1\n\t\t\t? allPriorityLevels.slice( routerRegionLevel + 1 )\n\t\t\t: allPriorityLevels;\n\n\treturn priorityLevels.length > 0\n\t\t? cloneElement( vdom, {\n\t\t\t\t...vdom.props,\n\t\t\t\tpriorityLevels,\n\t\t } )\n\t\t: vdom.props.element;\n};\n\n/**\n * IDs of router regions with an `attachTo` property pointing to the same parent\n * element.\n */\nconst regionsToAttachByParent = new WeakMap< Element, string[] >();\n\n/**\n * Map of root fragments by parent element, used to render router regions with\n * the `attachTo` property. Those elements with the same parent are rendered\n * together in the corresponding root fragment.\n */\nconst rootFragmentsByParent = new WeakMap< Element, any >();\n\n/**\n * Fetches and prepares a page from a given URL.\n *\n * @param url The URL of the page to fetch.\n * @param options Options for the fetch operation.\n * @param options.html Optional HTML content. If provided, the function will use\n * this instead of fetching from the URL.\n * @return A Promise that resolves to the prepared page, or false if\n * there was an error during fetching or preparation.\n */\nconst fetchPage = async ( url: string, { html }: { html: string } ) => {\n\ttry {\n\t\tif ( ! html ) {\n\t\t\tconst res = await window.fetch( url );\n\t\t\tif ( res.status !== 200 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\thtml = await res.text();\n\t\t}\n\t\tconst dom = new window.DOMParser().parseFromString( html, 'text/html' );\n\t\treturn await preparePage( url, dom );\n\t} catch ( e ) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Processes a DOM document to extract router regions and related resources.\n *\n * This function analyzes the provided DOM document and creates a virtual DOM\n * representation of all HTML regions marked with a `router-region` directive.\n * It also extracts and preloads associated styles and scripts to prepare for\n * rendering the page.\n *\n * @param url The URL associated with the page, used for asset\n * loading and caching.\n * @param dom The DOM document to process.\n * @param vdomParams Optional parameters for virtual DOM processing.\n * @param vdomParams.vdom An optional existing virtual DOM cache to check for\n * regions. If a region exists in this cache, it will be\n * reused instead of creating a new vDOM representation.\n * @return A Promise that resolves to a {@link Page} object\n * containing the virtual DOM for all router regions,\n * preloaded styles and scripts, page title, and initial\n * server-rendered data.\n */\nconst preparePage: PreparePage = async ( url, dom, { vdom } = {} ) => {\n\t// Remove all noscript elements as they're irrelevant when request is served via router.\n\t// This prevents browsers from extracting styles from noscript tags.\n\tdom.querySelectorAll( 'noscript' ).forEach( ( el ) => el.remove() );\n\n\tconst regions = {};\n\tconst regionsToAttach = {};\n\tdom.querySelectorAll( regionsSelector ).forEach( ( region ) => {\n\t\tconst { id, attachTo } = parseRegionAttribute( region );\n\n\t\tif ( region.parentElement.closest( `[${ regionAttr }]` ) ) {\n\t\t\tregions[ id ] = undefined;\n\t\t} else {\n\t\t\tregions[ id ] = vdom?.has( region )\n\t\t\t\t? vdom.get( region )\n\t\t\t\t: toVdom( region );\n\t\t}\n\n\t\tif ( attachTo ) {\n\t\t\tregionsToAttach[ id ] = attachTo;\n\t\t}\n\t} );\n\n\tconst title = dom.querySelector( 'title' )?.innerText;\n\tconst initialData = parseServerData( dom );\n\n\t// Wait for styles and modules to be ready.\n\tconst [ styles, scriptModules ] = await Promise.all( [\n\t\tPromise.all( preloadStyles( dom, url ) ),\n\t\tPromise.all( preloadScriptModules( dom ) ),\n\t] );\n\n\treturn {\n\t\tregions,\n\t\tregionsToAttach,\n\t\tstyles,\n\t\tscriptModules,\n\t\ttitle,\n\t\tinitialData,\n\t\turl,\n\t};\n};\n\n/**\n * Renders a page by applying styles, populating server data, rendering regions,\n * and updating the document title.\n *\n * @param page The {@link Page} object to render.\n */\nconst renderPage = ( page: Page ) => {\n\tapplyStyles( page.styles );\n\n\t// Clone regionsToAttach.\n\tconst regionsToAttach = { ...page.regionsToAttach };\n\n\tbatch( () => {\n\t\t// Update server data.\n\t\tpopulateServerData( page.initialData );\n\n\t\t// Reset all router regions before setting the actual values.\n\t\t( routerRegions as Map< string, any > ).forEach( ( signal ) => {\n\t\t\tsignal.value = null;\n\t\t} );\n\n\t\t//Init regions with attachTo that don't exist yet.\n\t\tconst parentsToUpdate = new Set< Element >();\n\t\tfor ( const id in regionsToAttach ) {\n\t\t\tconst parent = document.querySelector( regionsToAttach[ id ] );\n\t\t\tif ( ! regionsToAttachByParent.has( parent ) ) {\n\t\t\t\tregionsToAttachByParent.set( parent, [] );\n\t\t\t}\n\t\t\tconst regions = regionsToAttachByParent.get( parent );\n\t\t\tif ( ! regions.includes( id ) ) {\n\t\t\t\tregions.push( id );\n\t\t\t\tparentsToUpdate.add( parent );\n\t\t\t}\n\t\t}\n\n\t\t//Update all existing regions.\n\t\tfor ( const id in page.regions ) {\n\t\t\tif ( routerRegions.has( id ) ) {\n\t\t\t\trouterRegions.get( id ).value = cloneRouterRegionContent(\n\t\t\t\t\tpage.regions[ id ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Render regions attached to the same parent in the same fragment.\n\t\tparentsToUpdate.forEach( ( parent ) => {\n\t\t\tconst ids = regionsToAttachByParent.get( parent );\n\t\t\tconst vdoms = ids.map( ( id ) => page.regions[ id ] );\n\n\t\t\tif ( ! rootFragmentsByParent.has( parent ) ) {\n\t\t\t\tconst regions = vdoms.map( ( { props, type } ) => {\n\t\t\t\t\tconst elementType =\n\t\t\t\t\t\ttypeof type === 'function' ? props.type : type;\n\n\t\t\t\t\t// Create an element with the obtained type where the region will be\n\t\t\t\t\t// rendered. The type should match the one of the root vnode.\n\t\t\t\t\tconst region = document.createElement( elementType );\n\t\t\t\t\tparent.appendChild( region );\n\t\t\t\t\treturn region;\n\t\t\t\t} );\n\t\t\t\trootFragmentsByParent.set(\n\t\t\t\t\tparent,\n\t\t\t\t\tgetRegionRootFragment( regions )\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst fragment = rootFragmentsByParent.get( parent );\n\t\t\trender( vdoms, fragment );\n\t\t} );\n\t} );\n\n\tif ( page.title ) {\n\t\tdocument.title = page.title;\n\t}\n};\n\n/**\n * Loads the given page forcing a full page reload.\n *\n * The function returns a promise that won't resolve, useful to prevent any\n * potential feedback indicating that the navigation has finished while the new\n * page is being loaded.\n *\n * @param href The page href.\n * @return Promise that never resolves.\n */\nconst forcePageReload = ( href: string ) => {\n\twindow.location.assign( href );\n\treturn new Promise( () => {} );\n};\n\n// Listen to the back and forward buttons and restore the page if it's in the\n// cache.\nwindow.addEventListener( 'popstate', async () => {\n\tconst pagePath = getPagePath( window.location.href ); // Remove hash.\n\tconst page = pages.has( pagePath ) && ( await pages.get( pagePath ) );\n\tif ( page ) {\n\t\trenderPage( page );\n\t\t// Update the URL in the state.\n\t\tstate.url = window.location.href;\n\t} else {\n\t\twindow.location.reload();\n\t}\n} );\n\n// Initialize the router and cache the initial page using the initial vDOM.\nwindow.document\n\t.querySelectorAll< HTMLScriptElement >( 'script[type=module][src]' )\n\t.forEach( ( { src } ) => markScriptModuleAsResolved( src ) );\npages.set(\n\tgetPagePath( window.location.href ),\n\tPromise.resolve(\n\t\tpreparePage( getPagePath( window.location.href ), document, {\n\t\t\tvdom: initialVdom,\n\t\t} )\n\t)\n);\n\n// Variable to store the current navigation.\nlet navigatingTo = '';\n\nlet hasLoadedNavigationTextsData = false;\nconst navigationTexts = {\n\tloading: 'Loading page, please wait.',\n\tloaded: 'Page Loaded.',\n};\n\ninterface Store {\n\tstate: {\n\t\turl: string;\n\t\tnavigation: {\n\t\t\thasStarted: boolean;\n\t\t\thasFinished: boolean;\n\t\t};\n\t};\n\tactions: {\n\t\tnavigate: (\n\t\t\thref: string,\n\t\t\toptions?: NavigateOptions\n\t\t) => Promise< void >;\n\t\tprefetch: ( url: string, options?: PrefetchOptions ) => Promise< void >;\n\t};\n}\n\nexport const { state, actions } = store< Store >( 'core/router', {\n\tstate: {\n\t\turl: window.location.href,\n\t\tnavigation: {\n\t\t\thasStarted: false,\n\t\t\thasFinished: false,\n\t\t},\n\t},\n\tactions: {\n\t\t/**\n\t\t * Navigates to the specified page.\n\t\t *\n\t\t * This function normalizes the passed href, fetches the page HTML if\n\t\t * needed, and updates any interactive regions whose contents have\n\t\t * changed. It also creates a new entry in the browser session history.\n\t\t *\n\t\t * @param href The page href.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] If true, it forces re-fetching the URL.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t * @param [options.replace] If true, it replaces the current entry in the browser session history.\n\t\t * @param [options.timeout] Time until the navigation is aborted, in milliseconds. Default is 10000.\n\t\t * @param [options.loadingAnimation] Whether an animation should be shown while navigating. Default to `true`.\n\t\t * @param [options.screenReaderAnnouncement] Whether a message for screen readers should be announced while navigating. Default to `true`.\n\t\t *\n\t\t * @return Promise that resolves once the navigation is completed or aborted.\n\t\t */\n\t\t*navigate( href: string, options: NavigateOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( href );\n\t\t\tconst { navigation } = state;\n\t\t\tconst {\n\t\t\t\tloadingAnimation = true,\n\t\t\t\tscreenReaderAnnouncement = true,\n\t\t\t\ttimeout = 10000,\n\t\t\t} = options;\n\n\t\t\tnavigatingTo = href;\n\t\t\tactions.prefetch( pagePath, options );\n\n\t\t\t// Create a promise that resolves when the specified timeout ends.\n\t\t\t// The timeout value is 10 seconds by default.\n\t\t\tconst timeoutPromise = new Promise< void >( ( resolve ) =>\n\t\t\t\tsetTimeout( resolve, timeout )\n\t\t\t);\n\n\t\t\t// Don't update the navigation status immediately, wait 400 ms.\n\t\t\tconst loadingTimeout = setTimeout( () => {\n\t\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = true;\n\t\t\t\t\tnavigation.hasFinished = false;\n\t\t\t\t}\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loading' );\n\t\t\t\t}\n\t\t\t}, 400 );\n\n\t\t\tconst page = yield Promise.race( [\n\t\t\t\tpages.get( pagePath ),\n\t\t\t\ttimeoutPromise,\n\t\t\t] );\n\n\t\t\t// Dismiss loading message if it hasn't been added yet.\n\t\t\tclearTimeout( loadingTimeout );\n\n\t\t\t// Once the page is fetched, the destination URL could have changed\n\t\t\t// (e.g., by clicking another link in the meantime). If so, bail\n\t\t\t// out, and let the newer execution to update the HTML.\n\t\t\tif ( navigatingTo !== href ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tpage &&\n\t\t\t\t! page.initialData?.config?.[ 'core/router' ]\n\t\t\t\t\t?.clientNavigationDisabled\n\t\t\t) {\n\t\t\t\tyield importScriptModules( page.scriptModules );\n\t\t\t\trenderPage( page );\n\t\t\t\twindow.history[\n\t\t\t\t\toptions.replace ? 'replaceState' : 'pushState'\n\t\t\t\t]( {}, '', href );\n\n\t\t\t\t// Update the URL in the state.\n\t\t\t\tstate.url = href;\n\n\t\t\t\t// Update the navigation status once the the new page rendering\n\t\t\t\t// has been completed.\n\t\t\t\tif ( loadingAnimation ) {\n\t\t\t\t\tnavigation.hasStarted = false;\n\t\t\t\t\tnavigation.hasFinished = true;\n\t\t\t\t}\n\n\t\t\t\tif ( screenReaderAnnouncement ) {\n\t\t\t\t\ta11ySpeak( 'loaded' );\n\t\t\t\t}\n\n\t\t\t\t// Scroll to the anchor if exits in the link.\n\t\t\t\tconst { hash } = new URL( href, window.location.href );\n\t\t\t\tif ( hash ) {\n\t\t\t\t\tdocument.querySelector( hash )?.scrollIntoView();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield forcePageReload( href );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Prefetches the page with the passed URL.\n\t\t *\n\t\t * The function normalizes the URL and stores internally the fetch\n\t\t * promise, to avoid triggering a second fetch for an ongoing request.\n\t\t *\n\t\t * @param url The page URL.\n\t\t * @param [options] Options object.\n\t\t * @param [options.force] Force fetching the URL again.\n\t\t * @param [options.html] HTML string to be used instead of fetching the requested URL.\n\t\t *\n\t\t * @return Promise that resolves once the page has been fetched.\n\t\t */\n\t\t*prefetch( url: string, options: PrefetchOptions = {} ) {\n\t\t\tconst { clientNavigationDisabled } = getConfig();\n\t\t\tif ( clientNavigationDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pagePath = getPagePath( url );\n\t\t\tif ( options.force || ! pages.has( pagePath ) ) {\n\t\t\t\tpages.set(\n\t\t\t\t\tpagePath,\n\t\t\t\t\tfetchPage( pagePath, { html: options.html } )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tyield pages.get( pagePath );\n\t\t},\n\t},\n} );\n\n/**\n * Announces a message to screen readers.\n *\n * This is a wrapper around the `@wordpress/a11y` package's `speak` function. It handles importing\n * the package on demand and should be used instead of calling `a11y.speak` directly.\n *\n * @param messageKey The message to be announced by assistive technologies.\n */\nfunction a11ySpeak( messageKey: keyof typeof navigationTexts ) {\n\tif ( ! hasLoadedNavigationTextsData ) {\n\t\thasLoadedNavigationTextsData = true;\n\t\tconst content = document.getElementById(\n\t\t\t'wp-script-module-data-@wordpress/interactivity-router'\n\t\t)?.textContent;\n\t\tif ( content ) {\n\t\t\ttry {\n\t\t\t\tconst parsed = JSON.parse( content );\n\t\t\t\tif ( typeof parsed?.i18n?.loading === 'string' ) {\n\t\t\t\t\tnavigationTexts.loading = parsed.i18n.loading;\n\t\t\t\t}\n\t\t\t\tif ( typeof parsed?.i18n?.loaded === 'string' ) {\n\t\t\t\t\tnavigationTexts.loaded = parsed.i18n.loaded;\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t} else {\n\t\t\t// Fallback to localized strings from Interactivity API state.\n\t\t\t// @todo This block is for Core < 6.7.0. Remove when support is dropped.\n\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loading ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loading = state.navigation.texts.loading;\n\t\t\t}\n\t\t\t// @ts-expect-error\n\t\t\tif ( state.navigation.texts?.loaded ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnavigationTexts.loaded = state.navigation.texts.loaded;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst message = navigationTexts[ messageKey ];\n\n\timport( '@wordpress/a11y' ).then(\n\t\t( { speak } ) => speak( message ),\n\t\t// Ignore failures to load the a11y module.\n\t\t() => {}\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,EAAEC,WAAW,EAAEC,SAAS,QAAQ,0BAA0B;;AAExE;AACA;AACA;AACA,SAASC,aAAa,EAAEC,WAAW,QAA2B,iBAAiB;AAC/E,SACCC,oBAAoB,EACpBC,mBAAmB,EACnBC,0BAA0B,QAEpB,yBAAyB;AAEhC,MAAM;EACLC,eAAe;EACfC,qBAAqB;EACrBC,WAAW;EACXC,MAAM;EACNC,MAAM;EACNC,eAAe;EACfC,kBAAkB;EAClBC,KAAK;EACLC,aAAa;EACbC;AACD,CAAC,GAAGhB,WAAW,CACd,wHACD,CAAC;AAED,MAAMiB,UAAU,GAAG,QAASV,eAAe,gBAAiB;AAC5D,MAAMW,eAAe,GAAG,QAASX,eAAe,cAAe;AAC/D,MAAMY,eAAe,GAAG,IAAKD,eAAe,KAAOD,UAAU,OAASC,eAAe,MAAQA,eAAe,KAAOD,UAAU,GAAI;AAoCjI;AACA,MAAMG,KAAK,GAAG,IAAIC,GAAG,CAAoC,CAAC;;AAE1D;AACA;AACA,MAAMC,WAAW,GAAKC,GAAW,IAAM;EACtC,MAAMC,CAAC,GAAG,IAAIC,GAAG,CAAEF,GAAG,EAAEG,MAAM,CAACC,QAAQ,CAACC,IAAK,CAAC;EAC9C,OAAOJ,CAAC,CAACK,QAAQ,GAAGL,CAAC,CAACM,MAAM;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAKC,MAAe,IAAM;EACnD,MAA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4B,GAAG,IAAI;IACnC,MAAM4B,OAAO,GAAGjD,QAAQ,CAACkD,cAAc,CACtC,uDACD,CAAC,EAAEC,WAAW;IACd,IAAKF,OAAO,EAAG;MACd,IAAI;QACH,MAAMG,MAAM,GAAGzG,IAAI,CAACC,KAAK,CAAEqG,OAAQ,CAAC;QACpC,IAAK,OAAOG,MAAM,EAAEC,IAAI,EAAE9B,OAAO,KAAK,QAAQ,EAAG;UAChDD,eAAe,CAACC,OAAO,GAAG6B,MAAM,CAACC,IAAI,CAAC9B,OAAO;QAC9C;QACA,IAAK,OAAO6B,MAAM,EAAEC,IAAI,EAAE7B,MAAM,KAAK,QAAQ,EAAG;UAC/CF,eAAe,CAACE,MAAM,GAAG4B,MAAM,CAACC,IAAI,CAAC7B,MAAM;QAC5C;MACD,CAAC,CAAC,MAAM,CAAC;IACV,CAAC,MAAM;MACN;MACA;;MAEA;MACA,IAAKR,KAAK,CAACU,UAAU,CAAC4B,KAAK,EAAE/B,OAAO,EAAG;QACtC;QACAD,eAAe,CAACC,OAAO,GAAGP,KAAK,CAACU,UAAU,CAAC4B,KAAK,CAAC/B,OAAO;MACzD;MACA;MACA,IAAKP,KAAK,CAACU,UAAU,CAAC4B,KAAK,EAAE9B,MAAM,EAAG;QACrC;QACAF,eAAe,CAACE,MAAM,GAAGR,KAAK,CAACU,UAAU,CAAC4B,KAAK,CAAC9B,MAAM;MACvD;IACD;EACD;EAEA,MAAM+B,OAAO,GAAGjC,eAAe,CAAE0B,UAAU,CAAE;EAE7C,MAAM,CAAE,iBAAkB,CAAC,CAACQ,IAAI,CAC/B,CAAE;IAAEC;EAAM,CAAC,KAAMA,KAAK,CAAEF,OAAQ,CAAC;EACjC;EACA,MAAM,CAAC,CACR,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmCA,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAoUD,eAAO,MAAQ,KAAK;SAfb,MAAM;;oBAEE,OAAO;qBACN,OAAO;;GAYD,OAAO;cARjB,CACT,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,eAAe,KACrB,OAAO,CAAE,IAAI,CAAE;cACV,CAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,KAAM,OAAO,CAAE,IAAI,CAAE;CAqJtE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/interactivity-router",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "Package that exposes state and actions from the `core/router` store, part of the Interactivity API.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"types": "build-types",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@wordpress/a11y": "^4.
|
|
35
|
-
"@wordpress/interactivity": "^6.
|
|
34
|
+
"@wordpress/a11y": "^4.32.0",
|
|
35
|
+
"@wordpress/interactivity": "^6.32.0",
|
|
36
36
|
"es-module-lexer": "^1.5.4"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "a030b4c0e0695239b942c7dc18511782b64f10ed"
|
|
42
42
|
}
|
package/src/index.ts
CHANGED
|
@@ -23,13 +23,15 @@ const {
|
|
|
23
23
|
parseServerData,
|
|
24
24
|
populateServerData,
|
|
25
25
|
batch,
|
|
26
|
+
routerRegions,
|
|
27
|
+
cloneElement,
|
|
26
28
|
} = privateApis(
|
|
27
29
|
'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'
|
|
28
30
|
);
|
|
29
31
|
|
|
30
32
|
const regionAttr = `data-${ directivePrefix }-router-region`;
|
|
31
33
|
const interactiveAttr = `data-${ directivePrefix }-interactive`;
|
|
32
|
-
const regionsSelector = `[${ interactiveAttr }][${ regionAttr }]
|
|
34
|
+
const regionsSelector = `[${ interactiveAttr }][${ regionAttr }], [${ interactiveAttr }] [${ interactiveAttr }][${ regionAttr }]`;
|
|
33
35
|
|
|
34
36
|
export interface NavigateOptions {
|
|
35
37
|
force?: boolean;
|
|
@@ -91,6 +93,50 @@ const parseRegionAttribute = ( region: Element ) => {
|
|
|
91
93
|
}
|
|
92
94
|
};
|
|
93
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Clones the content of the router region vDOM passed as argument.
|
|
98
|
+
*
|
|
99
|
+
* The function creates a new VNode instance removing all priority levels up to
|
|
100
|
+
* the one containing the router-region directive, which should have evaluated
|
|
101
|
+
* in advance.
|
|
102
|
+
*
|
|
103
|
+
* @param vdom A router region's VNode.
|
|
104
|
+
* @return The VNode for the passed router region's content.
|
|
105
|
+
*/
|
|
106
|
+
const cloneRouterRegionContent = ( vdom: any ) => {
|
|
107
|
+
if ( ! vdom ) {
|
|
108
|
+
return vdom;
|
|
109
|
+
}
|
|
110
|
+
const allPriorityLevels: string[][] = vdom.props.priorityLevels;
|
|
111
|
+
const routerRegionLevel = allPriorityLevels.findIndex( ( level ) =>
|
|
112
|
+
level.includes( 'router-region' )
|
|
113
|
+
);
|
|
114
|
+
const priorityLevels =
|
|
115
|
+
routerRegionLevel !== -1
|
|
116
|
+
? allPriorityLevels.slice( routerRegionLevel + 1 )
|
|
117
|
+
: allPriorityLevels;
|
|
118
|
+
|
|
119
|
+
return priorityLevels.length > 0
|
|
120
|
+
? cloneElement( vdom, {
|
|
121
|
+
...vdom.props,
|
|
122
|
+
priorityLevels,
|
|
123
|
+
} )
|
|
124
|
+
: vdom.props.element;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* IDs of router regions with an `attachTo` property pointing to the same parent
|
|
129
|
+
* element.
|
|
130
|
+
*/
|
|
131
|
+
const regionsToAttachByParent = new WeakMap< Element, string[] >();
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Map of root fragments by parent element, used to render router regions with
|
|
135
|
+
* the `attachTo` property. Those elements with the same parent are rendered
|
|
136
|
+
* together in the corresponding root fragment.
|
|
137
|
+
*/
|
|
138
|
+
const rootFragmentsByParent = new WeakMap< Element, any >();
|
|
139
|
+
|
|
94
140
|
/**
|
|
95
141
|
* Fetches and prepares a page from a given URL.
|
|
96
142
|
*
|
|
@@ -146,9 +192,15 @@ const preparePage: PreparePage = async ( url, dom, { vdom } = {} ) => {
|
|
|
146
192
|
const regionsToAttach = {};
|
|
147
193
|
dom.querySelectorAll( regionsSelector ).forEach( ( region ) => {
|
|
148
194
|
const { id, attachTo } = parseRegionAttribute( region );
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
195
|
+
|
|
196
|
+
if ( region.parentElement.closest( `[${ regionAttr }]` ) ) {
|
|
197
|
+
regions[ id ] = undefined;
|
|
198
|
+
} else {
|
|
199
|
+
regions[ id ] = vdom?.has( region )
|
|
200
|
+
? vdom.get( region )
|
|
201
|
+
: toVdom( region );
|
|
202
|
+
}
|
|
203
|
+
|
|
152
204
|
if ( attachTo ) {
|
|
153
205
|
regionsToAttach[ id ] = attachTo;
|
|
154
206
|
}
|
|
@@ -187,32 +239,61 @@ const renderPage = ( page: Page ) => {
|
|
|
187
239
|
const regionsToAttach = { ...page.regionsToAttach };
|
|
188
240
|
|
|
189
241
|
batch( () => {
|
|
242
|
+
// Update server data.
|
|
190
243
|
populateServerData( page.initialData );
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// If this is an attached region, remove it from the list.
|
|
196
|
-
delete regionsToAttach[ id ];
|
|
244
|
+
|
|
245
|
+
// Reset all router regions before setting the actual values.
|
|
246
|
+
( routerRegions as Map< string, any > ).forEach( ( signal ) => {
|
|
247
|
+
signal.value = null;
|
|
197
248
|
} );
|
|
198
249
|
|
|
199
|
-
//
|
|
250
|
+
//Init regions with attachTo that don't exist yet.
|
|
251
|
+
const parentsToUpdate = new Set< Element >();
|
|
200
252
|
for ( const id in regionsToAttach ) {
|
|
201
253
|
const parent = document.querySelector( regionsToAttach[ id ] );
|
|
254
|
+
if ( ! regionsToAttachByParent.has( parent ) ) {
|
|
255
|
+
regionsToAttachByParent.set( parent, [] );
|
|
256
|
+
}
|
|
257
|
+
const regions = regionsToAttachByParent.get( parent );
|
|
258
|
+
if ( ! regions.includes( id ) ) {
|
|
259
|
+
regions.push( id );
|
|
260
|
+
parentsToUpdate.add( parent );
|
|
261
|
+
}
|
|
262
|
+
}
|
|
202
263
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
const region = document.createElement( elementType );
|
|
211
|
-
parent.appendChild( region );
|
|
212
|
-
|
|
213
|
-
const fragment = getRegionRootFragment( region );
|
|
214
|
-
render( page.regions[ id ], fragment );
|
|
264
|
+
//Update all existing regions.
|
|
265
|
+
for ( const id in page.regions ) {
|
|
266
|
+
if ( routerRegions.has( id ) ) {
|
|
267
|
+
routerRegions.get( id ).value = cloneRouterRegionContent(
|
|
268
|
+
page.regions[ id ]
|
|
269
|
+
);
|
|
270
|
+
}
|
|
215
271
|
}
|
|
272
|
+
|
|
273
|
+
// Render regions attached to the same parent in the same fragment.
|
|
274
|
+
parentsToUpdate.forEach( ( parent ) => {
|
|
275
|
+
const ids = regionsToAttachByParent.get( parent );
|
|
276
|
+
const vdoms = ids.map( ( id ) => page.regions[ id ] );
|
|
277
|
+
|
|
278
|
+
if ( ! rootFragmentsByParent.has( parent ) ) {
|
|
279
|
+
const regions = vdoms.map( ( { props, type } ) => {
|
|
280
|
+
const elementType =
|
|
281
|
+
typeof type === 'function' ? props.type : type;
|
|
282
|
+
|
|
283
|
+
// Create an element with the obtained type where the region will be
|
|
284
|
+
// rendered. The type should match the one of the root vnode.
|
|
285
|
+
const region = document.createElement( elementType );
|
|
286
|
+
parent.appendChild( region );
|
|
287
|
+
return region;
|
|
288
|
+
} );
|
|
289
|
+
rootFragmentsByParent.set(
|
|
290
|
+
parent,
|
|
291
|
+
getRegionRootFragment( regions )
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
const fragment = rootFragmentsByParent.get( parent );
|
|
295
|
+
render( vdoms, fragment );
|
|
296
|
+
} );
|
|
216
297
|
} );
|
|
217
298
|
|
|
218
299
|
if ( page.title ) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../interactivity/build-types/store.d.ts","../../node_modules/preact/src/jsx.d.ts","../../node_modules/preact/src/index.d.ts","../interactivity/build-types/hooks.d.ts","../interactivity/build-types/scopes.d.ts","../../node_modules/preact/hooks/src/index.d.ts","../interactivity/build-types/utils.d.ts","../interactivity/build-types/index.d.ts","./src/assets/scs.ts","./src/assets/styles.ts","./src/assets/dynamic-importmap/resolver.ts","../../node_modules/es-module-lexer/types/lexer.d.ts","./src/assets/dynamic-importmap/fetch.ts","./src/assets/dynamic-importmap/loader.ts","./src/assets/dynamic-importmap/index.ts","./src/assets/script-modules.ts","../a11y/build-types/shared/index.d.ts","../a11y/build-types/index.d.ts","./src/index.ts"],"fileIdsList":[[81],[80],[95],[92],[89,92],[89,90,91],[93],[87],[86,88,94,96],[81,83],[79,83,84,85],[81,82],[84]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"579a322d61b0b1ab5b653c027f0a7d8b2ee061d65061170d0777c7abbdaa3abb",{"version":"fd40c454d56e1d14e60ce13f3bc60c7fdb9bc70c6ef9c7bfafec1f0eb5d8075b","impliedFormat":1},{"version":"155ced96d70533d95c481061e2691802fae7cfb96869d7c85ac8622f53b51cb7","impliedFormat":1},"0ca516516e714ca97f2d1f32292cbc5a66d84a83bc156cc61f1055d4cf824eb0","4b77de664157c408100eece72ad45f86ce995ea97c6d2165659a26eb558e2668",{"version":"fbc22df38ad21e518d0362b71669e8cc46b77018b096be6d26de1403b5c3f7c6","impliedFormat":1},{"version":"a6b2ee1cf6ea02969583c954f338528614a5ef34de6742608f8ecb486fd24803","affectsGlobalScope":true},"9af8e2b70df19f05dd26d8d2337cd7e4f78fef0c0a837da362a77bda0b328ca1",{"version":"d0961db9cf06c923e4a85175322caf57d12f408207af22cd264dd41ff1844c3f","signature":"4d622752e952dfc53e0b38cabe010cb742ebd9b36e21413e78351a1a0cc8aa63"},{"version":"96c927027f88989a0530da7ececce5ad197d9a1dde48790f9380f33e896153c1","signature":"42dc2a448de4c0fcff923afe6792f84bc2ecfc522f36b123598b2fea12cc1a80"},{"version":"8cfee2ec5e47adee6939f200526066e2db206eccd3ddc4e7624e24b8d969f6c5","signature":"4729d607979da7c88951bc23f8030f27121cb7363424b797162dde45c9df7182"},{"version":"aac44a1794c0eae7920783dfdc3e9487c91803149316cd74f19ee359a2f72bf5","impliedFormat":99},{"version":"59446a866f615c634d443d77db07164a16a2e39f9db5f6ee4ad439386b609852","signature":"83a4fb7704bf62b9e0ec1c2bc9c8693301312cf43345f844679d2a74ea120909"},{"version":"5fb8f06cb73dd59003ce08eadbdd3d4326af12b5f5b2945d4ba086096c19741f","signature":"1451b9b28e4cda6be090c94aef4681ba548b0ed8c46a10c954b575441c160753"},{"version":"b5eaa97a50280489c8fea843459d399d1964b70d1f19f9e9b434342a9b25fde9","signature":"daded167cd234a760ad74721f90f1d934e29b74716c8191205d0beb9e4ba16db"},{"version":"8a41fe3d376d703cafe365677b291ce7f1e8da6bf53a69e2fef1bcf6c87e91b3","signature":"341cdae4ab3c39b6620af36120d83c78d9f2e744dbd5978561d8f1d258ad3337"},"40cfbc59eaef297a6cbc6f871853e4b8bba4cdc2d12c3d8e73e21a28d8280162","3d7a81d5202f0ecb42a07bc4973e2094e291aefd583413f98b1cfdbb1d4e0816",{"version":"134bcb361ffe3a3a5590944080258d0b1bd59c5c7a7f204770942a0a2fc8b6b7","signature":"0380d928bdca55fd1a10a03a5bcf460030c77319df8f6af96f087d2e35143a13"}],"root":[[87,89],[91,94],97],"options":{"allowJs":false,"allowSyntheticDefaultImports":true,"checkJs":false,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":false,"target":99},"referencedMap":[[84,1],[81,2],[80,1],[96,3],[91,4],[93,5],[92,6],[94,7],[88,8],[97,9],[82,10],[86,11],[83,12],[85,13]],"latestChangedDtsFile":"./build-types/index.d.ts","version":"5.7.2"}
|
|
1
|
+
{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../interactivity/build-types/store.d.ts","../../node_modules/preact/src/jsx.d.ts","../../node_modules/preact/src/index.d.ts","../interactivity/build-types/hooks.d.ts","../interactivity/build-types/scopes.d.ts","../../node_modules/preact/hooks/src/index.d.ts","../interactivity/build-types/utils.d.ts","../interactivity/build-types/index.d.ts","./src/assets/scs.ts","./src/assets/styles.ts","./src/assets/dynamic-importmap/resolver.ts","../../node_modules/es-module-lexer/types/lexer.d.ts","./src/assets/dynamic-importmap/fetch.ts","./src/assets/dynamic-importmap/loader.ts","./src/assets/dynamic-importmap/index.ts","./src/assets/script-modules.ts","../a11y/build-types/shared/index.d.ts","../a11y/build-types/index.d.ts","./src/index.ts"],"fileIdsList":[[81],[80],[95],[92],[89,92],[89,90,91],[93],[87],[86,88,94,96],[81,83],[79,83,84,85],[81,82],[84]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"579a322d61b0b1ab5b653c027f0a7d8b2ee061d65061170d0777c7abbdaa3abb",{"version":"fd40c454d56e1d14e60ce13f3bc60c7fdb9bc70c6ef9c7bfafec1f0eb5d8075b","impliedFormat":1},{"version":"155ced96d70533d95c481061e2691802fae7cfb96869d7c85ac8622f53b51cb7","impliedFormat":1},"0ca516516e714ca97f2d1f32292cbc5a66d84a83bc156cc61f1055d4cf824eb0","4b77de664157c408100eece72ad45f86ce995ea97c6d2165659a26eb558e2668",{"version":"fbc22df38ad21e518d0362b71669e8cc46b77018b096be6d26de1403b5c3f7c6","impliedFormat":1},{"version":"362b54116b2b1892e98077d33d513f004f254409618a98a2acfd9243df8eaefb","affectsGlobalScope":true},"9af8e2b70df19f05dd26d8d2337cd7e4f78fef0c0a837da362a77bda0b328ca1",{"version":"d0961db9cf06c923e4a85175322caf57d12f408207af22cd264dd41ff1844c3f","signature":"4d622752e952dfc53e0b38cabe010cb742ebd9b36e21413e78351a1a0cc8aa63"},{"version":"96c927027f88989a0530da7ececce5ad197d9a1dde48790f9380f33e896153c1","signature":"42dc2a448de4c0fcff923afe6792f84bc2ecfc522f36b123598b2fea12cc1a80"},{"version":"8cfee2ec5e47adee6939f200526066e2db206eccd3ddc4e7624e24b8d969f6c5","signature":"4729d607979da7c88951bc23f8030f27121cb7363424b797162dde45c9df7182"},{"version":"aac44a1794c0eae7920783dfdc3e9487c91803149316cd74f19ee359a2f72bf5","impliedFormat":99},{"version":"59446a866f615c634d443d77db07164a16a2e39f9db5f6ee4ad439386b609852","signature":"83a4fb7704bf62b9e0ec1c2bc9c8693301312cf43345f844679d2a74ea120909"},{"version":"5fb8f06cb73dd59003ce08eadbdd3d4326af12b5f5b2945d4ba086096c19741f","signature":"1451b9b28e4cda6be090c94aef4681ba548b0ed8c46a10c954b575441c160753"},{"version":"b5eaa97a50280489c8fea843459d399d1964b70d1f19f9e9b434342a9b25fde9","signature":"daded167cd234a760ad74721f90f1d934e29b74716c8191205d0beb9e4ba16db"},{"version":"8a41fe3d376d703cafe365677b291ce7f1e8da6bf53a69e2fef1bcf6c87e91b3","signature":"341cdae4ab3c39b6620af36120d83c78d9f2e744dbd5978561d8f1d258ad3337"},"40cfbc59eaef297a6cbc6f871853e4b8bba4cdc2d12c3d8e73e21a28d8280162","3d7a81d5202f0ecb42a07bc4973e2094e291aefd583413f98b1cfdbb1d4e0816",{"version":"f779123aecaf1f6a932acbaaf32094d9e0a8ccb690f1c94e31513f4ea15b619f","signature":"0380d928bdca55fd1a10a03a5bcf460030c77319df8f6af96f087d2e35143a13"}],"root":[[87,89],[91,94],97],"options":{"allowJs":false,"allowSyntheticDefaultImports":true,"checkJs":false,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":false,"target":99},"referencedMap":[[84,1],[81,2],[80,1],[96,3],[91,4],[93,5],[92,6],[94,7],[88,8],[97,9],[82,10],[86,11],[83,12],[85,13]],"latestChangedDtsFile":"./build-types/index.d.ts","version":"5.7.2"}
|