@kodaris/krubble-app-components 1.0.138 → 1.0.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/krubble-app.bundled.js +6 -2
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +1 -1
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +6 -2
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +1 -1
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/dist/router.d.ts +16 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +6 -2
- package/dist/router.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export { KRChatbot } from './chatbot.js';
|
|
|
7
7
|
export type { KRSubbarBreadcrumb } from './subbar.js';
|
|
8
8
|
export type { KRNavItem, KRNavItemFlat, KRUser } from './scaffold.js';
|
|
9
9
|
export type { KRScreenNavItem, KRScreenNavAction } from './screen-nav.js';
|
|
10
|
-
export type { KRRoute, KRRouterConfig, KRMatchedRoute } from './router.js';
|
|
10
|
+
export type { KRRoute, KRRouterConfig, KRMatchedRoute, KRRouteSnapshot } from './router.js';
|
|
11
11
|
export type { KRChatbotMessage, KRChatbotSend, KRChatbotConversationFile, KRChatbotSendFile } from './chatbot.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC5F,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -12248,10 +12248,14 @@ class KRRouter {
|
|
|
12248
12248
|
const constructor = customElements.get(match.route.component);
|
|
12249
12249
|
if (constructor && typeof constructor.resolve === 'function') {
|
|
12250
12250
|
return Promise.resolve(constructor.resolve(KRRouter.getParams())).then(data => {
|
|
12251
|
-
|
|
12251
|
+
// Frozen so a component can't quietly swap params/data at runtime either — the readonly
|
|
12252
|
+
// modifiers on KRRouteSnapshot only hold at compile time. Shallow: `data`'s own contents are
|
|
12253
|
+
// still mutable, since components legitimately read structures out of it.
|
|
12254
|
+
const routeSnapshot = Object.freeze({
|
|
12252
12255
|
params: match.params,
|
|
12253
12256
|
data,
|
|
12254
|
-
};
|
|
12257
|
+
});
|
|
12258
|
+
el.routeSnapshot = routeSnapshot;
|
|
12255
12259
|
return el;
|
|
12256
12260
|
});
|
|
12257
12261
|
}
|