@kodaris/krubble-app-components 1.0.136 → 1.0.138

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/router.d.ts CHANGED
@@ -1,4 +1,25 @@
1
1
  import { LitElement } from 'lit';
2
+ /**
3
+ * SPA router to run Lit based SPA apps.
4
+ *
5
+ * It is quite simple and models the Angular router.
6
+ *
7
+ * 1. Engineer defines:
8
+ * - A list of route definitions. Each definition:
9
+ * - Specifies a url path
10
+ * - A DOM element to render as the screen
11
+ * - An array of child route definitions
12
+ * - A router outlet
13
+ * - where on the page the router should render the screen for a particular route
14
+ * - Multiple nested router outlets can be placed to render child screens with parent screens
15
+ * 2. Router intercepts all browser navigation events (popstate)
16
+ * 2. Upon a navgiation
17
+ * - Router matches browser url to the correct route definitions
18
+ * - Router executes `resolve` methods on each route component to pre-load data for the screen before rendering the screen
19
+ * - Router creates each route component in the DOM
20
+ * - Router grabs the previous route components from the DOM and stores them to re-attach later should the user go back to the previous route
21
+ * - Router attaches each new route component in the DOM in the appropriate router outlet
22
+ */
2
23
  export interface KRRoute {
3
24
  path: string;
4
25
  component: string;
@@ -12,25 +33,44 @@ export interface KRRouterConfig {
12
33
  export interface KRMatchedRoute {
13
34
  route: KRRoute;
14
35
  params: Record<string, string>;
36
+ url: string;
37
+ }
38
+ interface KRRouteMatch {
39
+ routes: KRMatchedRoute[];
40
+ url: string;
41
+ }
42
+ interface KROutletContext {
43
+ outlet: KRRouterOutlet | null;
44
+ element: HTMLElement | null;
45
+ url: string;
46
+ }
47
+ interface KRCachedRoute {
48
+ el: HTMLElement;
49
+ scrolls: number[];
15
50
  }
16
51
  export declare class KRRouter {
17
52
  static base: string;
18
53
  static routes: KRRoute[];
19
- static elementCache: Map<string, HTMLElement>;
54
+ static routeCache: Map<string, KRCachedRoute>;
55
+ static outletContexts: Map<number, KROutletContext>;
56
+ static navToken: number;
20
57
  static configure(config: KRRouterConfig): void;
58
+ static handleNavigation(): void;
59
+ static registerOutlet(level: number, outlet: KRRouterOutlet): void;
60
+ static unregisterOutlet(level: number, outlet: KRRouterOutlet): void;
21
61
  static navigate(path: string): void;
22
62
  static getParams(): Record<string, string>;
23
- static outlet(level: number): HTMLElement | null;
24
- static matchAll(): KRMatchedRoute[];
25
- static matchRoutes(routes: KRRoute[], segments: string[]): KRMatchedRoute[];
63
+ static getScrollableElements(root: Element): Element[];
64
+ static matchRoutes(routes?: KRRoute[], segments?: string[]): KRRouteMatch;
26
65
  }
27
66
  export declare class KRRouterOutlet extends LitElement {
28
67
  static styles: import("lit").CSSResult;
29
68
  level: number;
69
+ el: HTMLElement | null;
30
70
  connectedCallback(): void;
31
71
  disconnectedCallback(): void;
32
- handlePopState: () => void;
33
- detectLevel(): number;
72
+ activate(el: HTMLElement): void;
73
+ deactivate(): void;
34
74
  render(): import("lit-html").TemplateResult<1>;
35
75
  }
36
76
  declare global {
@@ -38,4 +78,5 @@ declare global {
38
78
  'kr-router-outlet': KRRouterOutlet;
39
79
  }
40
80
  }
81
+ export {};
41
82
  //# sourceMappingURL=router.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,qBAAa,QAAQ;IACnB,MAAM,CAAC,IAAI,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E,EAAE,WAAW,GAAG,IAAI,CAAQ;IAEvC,iBAAiB;IA2BjB,oBAAoB;IAKpB,QAAQ,CAAC,EAAE,EAAE,WAAW;IAIxB,UAAU;IAKV,MAAM;CAMP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
package/dist/router.js CHANGED
@@ -1,4 +1,11 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
1
7
  import { LitElement, css, html } from 'lit';
8
+ import { customElement, state } from 'lit/decorators.js';
2
9
  export class KRRouter {
3
10
  static configure(config) {
4
11
  KRRouter.base = config.base;
@@ -15,9 +22,171 @@ export class KRRouter {
15
22
  if (!anchor.pathname.startsWith(KRRouter.base)) {
16
23
  return;
17
24
  }
25
+ if (anchor.target === '_blank') {
26
+ return;
27
+ }
18
28
  e.preventDefault();
19
29
  KRRouter.navigate(anchor.pathname);
20
30
  });
31
+ // Process each navigation. popstate covers every source — a link click, a KRRouter.navigate()
32
+ // call (which dispatches one itself), and the browser's back/forward buttons.
33
+ window.addEventListener('popstate', () => {
34
+ KRRouter.handleNavigation();
35
+ });
36
+ // The initial page load fires no popstate, so process the URL the app booted on. Deferred to a
37
+ // microtask rather than run synchronously: configure() is called while app.js is being evaluated
38
+ // as an import, which happens BEFORE the importing module's body. Navigating synchronously here
39
+ // would fire the first resolve() fetches before main.ts had run KRHttp.configure(), so they'd go
40
+ // to the dev server's own origin (localhost:4201/api/...) instead of devUrl and 404.
41
+ Promise.resolve().then(() => {
42
+ KRRouter.handleNavigation();
43
+ });
44
+ }
45
+ static handleNavigation() {
46
+ const matched = KRRouter.matchRoutes();
47
+ // Nothing matched (a stale or mistyped link). An unrecognized URL
48
+ // shouldn't destroy the state of the screen the user is on.
49
+ if (!matched.routes.length) {
50
+ return;
51
+ }
52
+ // A route with children but no child segment in the URL resolves to its `default` child, so the
53
+ // resolved url is longer than what's in the address bar (/pages/42 resolves pages/42/details).
54
+ // Rewrite it so the URL reflects what's actually on screen.
55
+ let resolvedPath = KRRouter.base;
56
+ if (matched.url) {
57
+ resolvedPath = KRRouter.base + '/' + matched.url;
58
+ }
59
+ if (window.location.pathname !== resolvedPath) {
60
+ window.history.replaceState({}, '', resolvedPath);
61
+ }
62
+ // Drop cached entries for routes DEEPER than the URL we're navigating to — if the user navigates
63
+ // up a level we assume they're moving on to a different task. This is what keeps the cache from
64
+ // growing without bound.
65
+ for (const key of KRRouter.routeCache.keys()) {
66
+ if (matched.url.split('/').filter(s => s).length < key.split('/').filter(s => s).length) {
67
+ KRRouter.routeCache.delete(key);
68
+ }
69
+ }
70
+ const token = ++KRRouter.navToken;
71
+ // Resolve every route's matching component (screen).
72
+ Promise.all(matched.routes.map(match => {
73
+ // Reuse the cached element for this url if we have one
74
+ const cached = KRRouter.routeCache.get(match.url);
75
+ if (cached) {
76
+ return Promise.resolve(cached.el);
77
+ }
78
+ // Create and cache the screen element
79
+ const el = document.createElement(match.route.component);
80
+ KRRouter.routeCache.set(match.url, {
81
+ el,
82
+ scrolls: [],
83
+ });
84
+ // If the component class defines a static resolve(params), await it and hand the result to the
85
+ // element as `routeSnapshot` = { params, data } before it mounts, so it paints with data instead
86
+ // of flashing empty
87
+ const constructor = customElements.get(match.route.component);
88
+ if (constructor && typeof constructor.resolve === 'function') {
89
+ return Promise.resolve(constructor.resolve(KRRouter.getParams())).then(data => {
90
+ el.routeSnapshot = {
91
+ params: match.params,
92
+ data,
93
+ };
94
+ return el;
95
+ });
96
+ }
97
+ return Promise.resolve(el);
98
+ }))
99
+ .then(elements => {
100
+ // A newer navigation started while we were resolving — its elements are the current truth.
101
+ if (token !== KRRouter.navToken) {
102
+ return;
103
+ }
104
+ // ---- PASS 1: deactivate, deepest level first ----
105
+ // Remove screen elements that no longer apply to the new current routes for the current url
106
+ const levels = Array.from(KRRouter.outletContexts.keys()).sort((a, b) => b - a);
107
+ for (const level of levels) {
108
+ const context = KRRouter.outletContexts.get(level);
109
+ if (!context?.outlet?.el || context.outlet.el === elements[level]) {
110
+ continue;
111
+ }
112
+ // Capture the outgoing element's scroll positions into its cache entry, then unmount it.
113
+ const outgoing = KRRouter.routeCache.get(context.url);
114
+ if (outgoing) {
115
+ outgoing.scrolls = KRRouter.getScrollableElements(context.outlet.el).map(scrollable => scrollable.scrollTop);
116
+ }
117
+ context.outlet.deactivate();
118
+ context.element = null;
119
+ context.url = '';
120
+ }
121
+ // Put each screen element into the appropriate router outlet
122
+ elements.forEach((el, level) => {
123
+ // First navigation to reach this depth has no context yet.
124
+ let context = KRRouter.outletContexts.get(level);
125
+ if (!context) {
126
+ context = {
127
+ outlet: null,
128
+ element: null,
129
+ url: '',
130
+ };
131
+ KRRouter.outletContexts.set(level, context);
132
+ }
133
+ context.element = el;
134
+ context.url = matched.routes[level].url;
135
+ if (context.outlet && context.outlet.el !== el) {
136
+ context.outlet.activate(el);
137
+ // Put back the scroll positions captured when the user last left this element.
138
+ const cached = KRRouter.routeCache.get(context.url);
139
+ if (cached?.scrolls.length) {
140
+ setTimeout(() => {
141
+ const scrollables = KRRouter.getScrollableElements(cached.el);
142
+ cached.scrolls.forEach((top, index) => {
143
+ if (scrollables[index]) {
144
+ scrollables[index].scrollTop = top;
145
+ }
146
+ });
147
+ }, 0);
148
+ }
149
+ }
150
+ });
151
+ });
152
+ }
153
+ // An outlet announces itself here when it connects and takes whatever element its context holds.
154
+ static registerOutlet(level, outlet) {
155
+ // No context yet when an outlet connects before a navigation
156
+ let context = KRRouter.outletContexts.get(level);
157
+ if (!context) {
158
+ context = {
159
+ outlet: null,
160
+ element: null,
161
+ url: '',
162
+ };
163
+ KRRouter.outletContexts.set(level, context);
164
+ }
165
+ context.outlet = outlet;
166
+ // An outlet re-attached with its element already mounted (a cached parent coming back) must not
167
+ // restore scroll again — that would overwrite the live position with a stale one.
168
+ if (context.element && outlet.el !== context.element) {
169
+ outlet.activate(context.element);
170
+ // Same scroll restore as the activation pass in handleNavigation — this is the path taken when
171
+ // the outlet didn't exist yet at navigation time, which for us is the common case.
172
+ const cached = KRRouter.routeCache.get(context.url);
173
+ if (cached?.scrolls.length) {
174
+ setTimeout(() => {
175
+ const scrollables = KRRouter.getScrollableElements(cached.el);
176
+ cached.scrolls.forEach((top, index) => {
177
+ if (scrollables[index]) {
178
+ scrollables[index].scrollTop = top;
179
+ }
180
+ });
181
+ }, 0);
182
+ }
183
+ }
184
+ }
185
+ static unregisterOutlet(level, outlet) {
186
+ const context = KRRouter.outletContexts.get(level);
187
+ if (context && context.outlet === outlet) {
188
+ context.outlet = null;
189
+ }
21
190
  }
22
191
  static navigate(path) {
23
192
  let fullPath = path;
@@ -28,53 +197,92 @@ export class KRRouter {
28
197
  window.dispatchEvent(new PopStateEvent('popstate'));
29
198
  }
30
199
  static getParams() {
31
- const matched = KRRouter.matchAll();
200
+ const matched = KRRouter.matchRoutes();
32
201
  const params = {};
33
- for (const match of matched) {
202
+ for (const match of matched.routes) {
34
203
  for (const key in match.params) {
35
204
  params[key] = decodeURIComponent(match.params[key]);
36
205
  }
37
206
  }
38
207
  return params;
39
208
  }
40
- static outlet(level) {
41
- const matched = KRRouter.matchAll();
42
- if (level >= matched.length) {
43
- return null;
44
- }
45
- const match = matched[level];
46
- const tag = match.route.component;
47
- const cached = KRRouter.elementCache.get(level + ':' + tag);
48
- if (cached) {
49
- return cached;
50
- }
51
- // Clear old cache entry for this level
52
- for (const key of KRRouter.elementCache.keys()) {
53
- if (key.startsWith(level + ':')) {
54
- KRRouter.elementCache.delete(key);
209
+ // Every scrollable element in and under `root`, in document order — piercing shadow roots.
210
+ static getScrollableElements(root) {
211
+ const scrollables = [];
212
+ // Depth-first pre-order, each node's shadow root before its light children. An explicit stack
213
+ // rather than recursion; pushing children in reverse makes them pop in document order, which keeps
214
+ // the sequence identical to the recursive walk this replaces. The ORDER is load-bearing: capture
215
+ // and restore index into the returned list positionally, so both passes must enumerate the same
216
+ // nodes in the same sequence.
217
+ const stack = [root];
218
+ while (stack.length) {
219
+ const node = stack.pop();
220
+ if (!node) {
221
+ break;
222
+ }
223
+ const style = getComputedStyle(node);
224
+ if (style.overflow === 'auto'
225
+ || style.overflow === 'scroll'
226
+ || style.overflowY === 'auto'
227
+ || style.overflowY === 'scroll') {
228
+ scrollables.push(node);
229
+ }
230
+ // Shadow children first so they occupy the same positions the recursion gave them.
231
+ const children = [];
232
+ if (node.shadowRoot) {
233
+ children.push(...Array.from(node.shadowRoot.children));
234
+ }
235
+ children.push(...Array.from(node.children));
236
+ for (let index = children.length - 1; index >= 0; index--) {
237
+ stack.push(children[index]);
55
238
  }
56
239
  }
57
- const el = document.createElement(tag);
58
- KRRouter.elementCache.set(level + ':' + tag, el);
59
- return el;
240
+ return scrollables;
60
241
  }
61
- static matchAll() {
62
- const path = window.location.pathname;
63
- let relative = path;
64
- if (path.startsWith(KRRouter.base)) {
65
- relative = path.slice(KRRouter.base.length);
242
+ // Match the CURRENT browser URL against the route defs.
243
+ //
244
+ // Example, with base '/operations/app/ai-cms' and the routes configured in app.ts:
245
+ //
246
+ // URL /operations/app/ai-cms/pages/42/seo
247
+ // segments ['pages', '42', 'seo'] (base stripped, split on '/')
248
+ // returns {
249
+ // routes: [
250
+ // { route: { path: 'pages/:contentPageID', component: 'kt-page' }, params: { contentPageID: '42' }, url: 'pages/42' },
251
+ // { route: { path: 'seo', component: 'kt-page-seo' }, params: {}, url: 'pages/42/seo' },
252
+ // ],
253
+ // url: 'pages/42/seo',
254
+ // }
255
+ //
256
+ // Three other shapes worth knowing:
257
+ //
258
+ // .../pages/42 a route with children but no child segment resolves its `default` child, so this
259
+ // returns BOTH levels and a url of 'pages/42/details' — longer than the address
260
+ // bar. handleNavigation() is what syncs the URL to it; this function is pure and
261
+ // never touches history.
262
+ // .../ (no segments) matches the path:'' route, returning a single entry for kt-home.
263
+ // .../nope no route matches, returning no routes and an empty url.
264
+ static matchRoutes(routes = KRRouter.routes, segments) {
265
+ // An empty array is a legitimate "nothing left to match" from a recursive call and stays as-is —
266
+ // only a genuinely absent argument (the entry call) reaches for the browser URL.
267
+ if (!segments) {
268
+ let relative = window.location.pathname;
269
+ if (relative.startsWith(KRRouter.base)) {
270
+ relative = relative.slice(KRRouter.base.length);
271
+ }
272
+ segments = relative.split('/').filter(s => s);
66
273
  }
67
- const segments = relative.split('/').filter(s => s);
68
- return KRRouter.matchRoutes(KRRouter.routes, segments);
69
- }
70
- static matchRoutes(routes, segments) {
71
274
  for (const route of routes) {
72
275
  const routeSegments = route.path.split('/').filter(s => s);
276
+ // index route {path: '', component: kt-home}
73
277
  if (routeSegments.length === 0 && segments.length === 0) {
74
- return [{
75
- route,
76
- params: {}
77
- }];
278
+ return {
279
+ routes: [{
280
+ route,
281
+ params: {},
282
+ url: ''
283
+ }],
284
+ url: ''
285
+ };
78
286
  }
79
287
  if (routeSegments.length === 0) {
80
288
  continue;
@@ -97,56 +305,86 @@ export class KRRouter {
97
305
  continue;
98
306
  }
99
307
  const remaining = segments.slice(routeSegments.length);
100
- // If there are remaining segments but no children, this route doesn't fully match — try next route
101
- if (remaining.length > 0 && !route.children) {
102
- continue;
103
- }
104
- const result = [{
308
+ // This level's own resolved URL: the segments it consumed, with :params swapped for their real
309
+ // values. Children come back from the recursion holding only THEIR portion, so we prefix each
310
+ // with this as the recursion unwinds — every entry ends up with the full path from the root.
311
+ const url = segments.slice(0, routeSegments.length).join('/');
312
+ const matchedRoutes = [{
105
313
  route,
106
- params
314
+ params,
315
+ url
107
316
  }];
108
- if (route.children && remaining.length > 0) {
109
- const childMatches = KRRouter.matchRoutes(route.children, remaining);
110
- if (childMatches.length > 0) {
111
- result.push(...childMatches);
112
- return result;
317
+ if (remaining.length > 0) {
318
+ // Segments left over and nowhere to put them — this route doesn't fully match the URL, so try
319
+ // the next one. Without this, a route would be accepted having consumed only part of the URL:
320
+ // /pages/42/seo would match {path: 'pages'} and render the Pages list. It also narrows
321
+ // route.children for the call below, which matters because matchRoutes' first parameter has a
322
+ // DEFAULT — passing undefined would silently re-match from the top-level routes rather than
323
+ // failing.
324
+ if (!route.children) {
325
+ continue;
326
+ }
327
+ const childMatch = KRRouter.matchRoutes(route.children, remaining);
328
+ if (childMatch.routes.length > 0) {
329
+ for (const child of childMatch.routes) {
330
+ child.url = url + '/' + child.url;
331
+ }
332
+ matchedRoutes.push(...childMatch.routes);
333
+ return {
334
+ routes: matchedRoutes,
335
+ url: url + '/' + childMatch.url
336
+ };
113
337
  }
114
338
  }
115
- // No remaining segments + default child — redirect
339
+ // No remaining segments + a default child — resolve as though that child's segment were in the
340
+ // URL. We do NOT rewrite the address bar here; matching stays pure. handleNavigation() syncs the
341
+ // URL to the resolved `url` this returns.
116
342
  if (route.children && remaining.length === 0 && route.default) {
117
- window.history.replaceState({}, '', window.location.pathname + '/' + route.default);
118
- const childMatches = KRRouter.matchRoutes(route.children, [route.default]);
119
- if (childMatches.length > 0) {
120
- result.push(...childMatches);
121
- return result;
343
+ const childMatch = KRRouter.matchRoutes(route.children, [route.default]);
344
+ if (childMatch.routes.length > 0) {
345
+ for (const child of childMatch.routes) {
346
+ child.url = url + '/' + child.url;
347
+ }
348
+ matchedRoutes.push(...childMatch.routes);
349
+ return {
350
+ routes: matchedRoutes,
351
+ url: url + '/' + childMatch.url
352
+ };
122
353
  }
123
354
  }
124
- return result;
355
+ return {
356
+ routes: matchedRoutes,
357
+ url
358
+ };
125
359
  }
126
- return [];
360
+ return {
361
+ routes: [],
362
+ url: ''
363
+ };
127
364
  }
128
365
  }
129
366
  KRRouter.base = '';
130
367
  KRRouter.routes = [];
131
- KRRouter.elementCache = new Map();
132
- export class KRRouterOutlet extends LitElement {
368
+ KRRouter.routeCache = new Map();
369
+ // One context per nesting level — Angular's ChildrenOutletContexts, keyed by level rather than by
370
+ // outlet name since we only have one (primary) outlet per level. Outlets are DRIVEN through these;
371
+ // they never ask the router for anything.
372
+ KRRouter.outletContexts = new Map();
373
+ // One token per navigation. A slower navigation that has been superseded must not activate its
374
+ // (stale) elements, so it checks the token before committing anything.
375
+ KRRouter.navToken = 0;
376
+ let KRRouterOutlet = class KRRouterOutlet extends LitElement {
133
377
  constructor() {
134
378
  super(...arguments);
135
379
  this.level = -1;
136
- this.handlePopState = () => {
137
- this.requestUpdate();
138
- };
380
+ // The element the router has told this outlet to show.
381
+ this.el = null;
139
382
  }
140
383
  connectedCallback() {
141
384
  super.connectedCallback();
142
- this.level = this.detectLevel();
143
- window.addEventListener('popstate', this.handlePopState);
144
- }
145
- disconnectedCallback() {
146
- super.disconnectedCallback();
147
- window.removeEventListener('popstate', this.handlePopState);
148
- }
149
- detectLevel() {
385
+ // This outlet's nesting depth = how many kr-router-outlet ancestors it has, which is only
386
+ // knowable once attached. Walk up through shadow boundaries too (via ShadowRoot.host), since a
387
+ // nested outlet lives inside its parent element's shadow root and parentNode stops at the root.
150
388
  let level = 0;
151
389
  let node = this;
152
390
  while (node) {
@@ -164,26 +402,37 @@ export class KRRouterOutlet extends LitElement {
164
402
  node = null;
165
403
  }
166
404
  }
167
- return level;
405
+ this.level = level;
406
+ KRRouter.registerOutlet(this.level, this);
407
+ }
408
+ disconnectedCallback() {
409
+ super.disconnectedCallback();
410
+ KRRouter.unregisterOutlet(this.level, this);
411
+ }
412
+ activate(el) {
413
+ this.el = el;
414
+ }
415
+ deactivate() {
416
+ this.el = null;
168
417
  }
169
418
  render() {
170
- const el = KRRouter.outlet(this.level);
171
- if (!el) {
419
+ if (!this.el) {
172
420
  return html ``;
173
421
  }
174
- return html `${el}`;
422
+ return html `${this.el}`;
175
423
  }
176
- }
424
+ };
177
425
  KRRouterOutlet.styles = css `
178
426
  :host {
179
427
  display: block;
180
428
  height: 100%;
181
429
  }
182
430
  `;
183
- // Guarded registration: no-op if the tag is already defined, so a second copy of krubble on
184
- // the page (e.g. the Operations shell loads krubble globally while an embedded app bundled its
185
- // own copy) doesn't throw. First definition wins.
186
- if (!customElements.get('kr-router-outlet')) {
187
- customElements.define('kr-router-outlet', KRRouterOutlet);
188
- }
431
+ __decorate([
432
+ state()
433
+ ], KRRouterOutlet.prototype, "el", void 0);
434
+ KRRouterOutlet = __decorate([
435
+ customElement('kr-router-outlet')
436
+ ], KRRouterOutlet);
437
+ export { KRRouterOutlet };
189
438
  //# sourceMappingURL=router.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAmB5C,MAAM,OAAO,QAAQ;IAOnB,MAAM,CAAC,SAAS,CAAC,MAAsB;QACrC,QAAQ,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAC5B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAEhC,kDAAkD;QAClD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,YAAY,iBAAiB,CAAkC,CAAC;YAC7G,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO;YACT,CAAC;YACD,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;gBAC7C,OAAO;YACT,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/C,OAAO;YACT,CAA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AAK,CAAC;QAEnB,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,QAAQ,CAAC,EAAe;QACtB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,UAAU;QACR,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;IACjB,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,OAAO,IAAI,CAAA,EAAE,CAAC;QAChB,CAAC;QACD,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC1B,CAAC;;AA1DM,qBAAM,GAAG,GAAG,CAAA;;;;;GAKlB,AALY,CAKX;AAKO;IAAR,KAAK,EAAE;0CAA+B;AAX5B,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA4D1B"}
@@ -51,7 +51,7 @@ export interface KRScreenNavAction {
51
51
  * ```
52
52
  *
53
53
  * Actions render in a footer at the bottom of the nav column. With more than
54
- * `maxVisibleActions` (default 3), the overflow collapses into a "More" dropdown.
54
+ * `maxVisibleActions` (default 5), the overflow collapses into a "More" dropdown.
55
55
  * Listen for `action-click` to handle a click: `e.detail.action` is the action id.
56
56
  *
57
57
  * @slot - The main screen content
@@ -61,7 +61,7 @@ export interface KRScreenNavAction {
61
61
  * @property {KRScreenNavItem[]} items - Navigation items as JSON array
62
62
  * @property {string} activeId - Currently active item ID
63
63
  * @property {KRScreenNavAction[]} actions - Action buttons rendered in the nav footer
64
- * @property {number} maxVisibleActions - Max inline actions before collapsing into a "More" dropdown (default 3)
64
+ * @property {number} maxVisibleActions - Max inline actions before collapsing into a "More" dropdown (default 5)
65
65
  *
66
66
  * @fires action-click - When an action button (inline or overflow) is clicked; detail is `{ action: id }`
67
67
  */