@ojiepermana/angular 22.2.12 → 22.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +9 -1
  2. package/fesm2022/ojiepermana-angular-component-alert.mjs +4 -2
  3. package/fesm2022/ojiepermana-angular-component-button.mjs +1 -1
  4. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1 -1
  5. package/fesm2022/ojiepermana-angular-component-form.mjs +2 -2
  6. package/fesm2022/ojiepermana-angular-component-input-group.mjs +1 -1
  7. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +1 -1
  8. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1 -1
  9. package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-DwOSHmKC.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs} +2 -2
  10. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-DtRHbiBM.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs} +4 -4
  11. package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-Bo2nIOJk.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs} +6 -6
  12. package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-DUyMjBKb.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs} +4 -4
  13. package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs → ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs} +7 -4
  14. package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-DI-En6rE.mjs → ojiepermana-angular-navigation-navigation-list.component-Bs6dssld.mjs} +1 -1
  15. package/fesm2022/ojiepermana-angular-navigation.mjs +21 -20
  16. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +15 -4
  17. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +48 -18
  18. package/fesm2022/ojiepermana-angular-theme-layout.mjs +1 -4
  19. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +1 -0
  20. package/fesm2022/ojiepermana-angular-theme-shell.mjs +1 -0
  21. package/fesm2022/ojiepermana-angular-theme-styles.mjs +22 -3
  22. package/package.json +2 -2
  23. package/sdk/README.md +15 -4
  24. package/sdk/schematics/sdk/index.js +84 -12
  25. package/theme/layout/README.md +2 -1
  26. package/theme/styles/css/base/prefers-dark.css +1 -0
  27. package/theme/styles/css/base/tailwind.css +6 -0
  28. package/theme/styles/css/base/theme.css +3 -0
  29. package/theme/styles/css/color/brand.css +16 -0
  30. package/types/ojiepermana-angular-navigation.d.ts +1 -1
  31. package/types/ojiepermana-angular-theme-component-settings.d.ts +10 -0
  32. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +13 -0
  33. package/types/ojiepermana-angular-theme-layout.d.ts +0 -1
  34. package/types/ojiepermana-angular-theme-styles.d.ts +3 -2
@@ -2,6 +2,14 @@ import * as i0 from "@angular/core";
2
2
  import { Component, DestroyRef, Directive, ElementRef, NgZone, PLATFORM_ID, TemplateRef, afterNextRender, afterRenderEffect, computed, contentChild, inject, input, signal, viewChild } from "@angular/core";
3
3
  import { CartesianContext, CategoricalViewportContext, ChartContext, ScatterViewportContext, bandTicks, effectiveIndexRange, indexRangeSize, linearTicks, nearestCategoryIndex, normalizeIndexRange, normalizeNumericDomain, panIndexRange, panNumericDomain, seriesColorVar, zoomIndexRange, zoomNumericDomain } from "@ojiepermana/angular/chart/core";
4
4
  import { DOCUMENT, NgComponentOutlet, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
5
+ const LABEL_CHAR_PX = 7.2;
6
+ const LABEL_GAP_PX = 8;
7
+ function thinCategoryTicks(ticks, step) {
8
+ if (ticks.length < 2 || step <= 0) return ticks;
9
+ const needed = Math.max(...ticks.map((tick) => tick.label.length)) * LABEL_CHAR_PX + LABEL_GAP_PX;
10
+ const every = Math.ceil(needed / step);
11
+ return every <= 1 ? ticks : ticks.filter((_, index) => index % every === 0);
12
+ }
5
13
  var ChartAxisX = class ChartAxisX {
6
14
  ctx = inject(CartesianContext);
7
15
  tickCount = input(5, ...ngDevMode ? [{ debugName: "tickCount" }] : /* istanbul ignore next */ []);
@@ -15,7 +23,7 @@ var ChartAxisX = class ChartAxisX {
15
23
  return scale ? linearTicks(scale, this.tickCount(), this.tickFormat()) : [];
16
24
  }
17
25
  const scale = this.ctx.categoryScale();
18
- return scale ? bandTicks(scale) : [];
26
+ return scale ? thinCategoryTicks(bandTicks(scale), scale.step()) : [];
19
27
  }, ...ngDevMode ? [{ debugName: "ticks" }] : /* istanbul ignore next */ []);
20
28
  static ɵfac = i0.ɵɵngDeclareFactory({
21
29
  minVersion: "12.0.0",
@@ -7,11 +7,13 @@ import { cva } from "class-variance-authority";
7
7
  const alertVariants = cva([
8
8
  "relative block w-full rounded-lg border p-4 [&:has(AlertAction)]:pr-20",
9
9
  "[&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px]",
10
- "[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground"
10
+ "[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
11
+ "[&>Icon~*]:pl-7 [&>Icon+div]:translate-y-[-3px]",
12
+ "[&>Icon]:absolute [&>Icon]:left-4 [&>Icon]:top-4 [&>Icon]:text-foreground"
11
13
  ].join(" "), {
12
14
  variants: { variant: {
13
15
  default: "bg-background text-foreground",
14
- destructive: "border-destructive/50 text-destructive [&>svg]:text-destructive dark:border-destructive"
16
+ destructive: "border-destructive/50 text-destructive-ink [&>svg]:text-destructive-ink [&>Icon]:text-destructive-ink dark:border-destructive"
15
17
  } },
16
18
  defaultVariants: { variant: "default" }
17
19
  });
@@ -19,7 +19,7 @@ const buttonVariants = cva([
19
19
  outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
20
20
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
21
21
  ghost: "hover:bg-accent hover:text-accent-foreground",
22
- link: "text-primary underline-offset-4 hover:underline"
22
+ link: "text-primary-ink underline-offset-4 hover:underline"
23
23
  },
24
24
  size: {
25
25
  xs: "h-7 rounded-md px-2.5 text-xs",
@@ -37,7 +37,7 @@ var MenuFocusableItem = class MenuFocusableItem {
37
37
  return this.el.nativeElement.textContent?.trim() ?? "";
38
38
  }
39
39
  buildItemClasses(extraClass = "") {
40
- return cn("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none", "transition-colors focus:bg-accent focus:text-accent-foreground", "aria-disabled:pointer-events-none aria-disabled:opacity-50", "data-[inset=true]:pl-8", "data-[variant=destructive]:text-destructive", "data-[variant=destructive]:focus:bg-destructive/10", "data-[variant=destructive]:focus:text-destructive", extraClass, this.class());
40
+ return cn("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none", "transition-colors focus:bg-accent focus:text-accent-foreground", "aria-disabled:pointer-events-none aria-disabled:opacity-50", "data-[inset=true]:pl-8", "data-[variant=destructive]:text-destructive-ink", "data-[variant=destructive]:focus:bg-destructive/10", "data-[variant=destructive]:focus:text-destructive-ink", extraClass, this.class());
41
41
  }
42
42
  emitSelection(event) {
43
43
  if (this.disabled) {
@@ -515,7 +515,7 @@ i0.ɵɵngDeclareClassMetadata({
515
515
  var FormLabelComponent = class FormLabelComponent {
516
516
  ctx = inject(FormFieldContext);
517
517
  class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
518
- classes = computed(() => cn("text-sm font-medium leading-none", this.ctx.invalid() ? "text-destructive" : "text-foreground", "peer-disabled:cursor-not-allowed peer-disabled:opacity-70", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
518
+ classes = computed(() => cn("text-sm font-medium leading-none", this.ctx.invalid() ? "text-destructive-ink" : "text-foreground", "peer-disabled:cursor-not-allowed peer-disabled:opacity-70", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
519
519
  ngOnInit() {
520
520
  this.ctx.hasLabel.set(true);
521
521
  }
@@ -670,7 +670,7 @@ var FormMessageComponent = class FormMessageComponent {
670
670
  if (!errorKey) return "";
671
671
  return this.errorMessageResolver()(errorKey, control?.errors?.[errorKey], control);
672
672
  }, ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
673
- classes = computed(() => cn("text-sm font-medium text-destructive", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
673
+ classes = computed(() => cn("text-sm font-medium text-destructive-ink", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
674
674
  ngOnInit() {
675
675
  this.ctx.hasMessage.set(true);
676
676
  }
@@ -43,7 +43,7 @@ const CONTROL_BASE = [
43
43
  "placeholder:text-muted-foreground",
44
44
  "disabled:cursor-not-allowed disabled:opacity-50",
45
45
  "focus-visible:outline-none",
46
- "aria-[invalid=true]:text-destructive"
46
+ "aria-[invalid=true]:text-destructive-ink"
47
47
  ].join(" ");
48
48
  var InputGroupComponent = class InputGroupComponent {
49
49
  class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
@@ -197,7 +197,7 @@ var InputOtpSlotComponent = class InputOtpSlotComponent {
197
197
  ariaLabelledBy = computed(() => this.ctx.slotAriaLabelledBy(this.index()), ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
198
198
  ariaDescribedBy = computed(() => this.ctx.slotAriaDescribedBy(), ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
199
199
  effectiveInvalid = computed(() => this.invalid() || this.ctx.isInvalid(), ...ngDevMode ? [{ debugName: "effectiveInvalid" }] : /* istanbul ignore next */ []);
200
- classes = computed(() => cn("relative flex h-control-10 w-control-10 items-center justify-center border-r border-border text-sm font-medium transition-[background-color,box-shadow,opacity] last:border-r-0", this.active() && !this.effectiveInvalid() && "z-10 ring-1 ring-inset ring-ring", this.effectiveInvalid() && "bg-destructive/5 text-destructive ring-1 ring-inset ring-destructive/50", this.disabled() && "opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
200
+ classes = computed(() => cn("relative flex h-control-10 w-control-10 items-center justify-center border-r border-border text-sm font-medium transition-[background-color,box-shadow,opacity] last:border-r-0", this.active() && !this.effectiveInvalid() && "z-10 ring-1 ring-inset ring-ring", this.effectiveInvalid() && "bg-destructive/5 text-destructive-ink ring-1 ring-inset ring-destructive/50", this.disabled() && "opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
201
201
  focus(select = true) {
202
202
  const input = this.inputRef().nativeElement;
203
203
  input.focus();
@@ -315,7 +315,7 @@ var PillboxOptionCreateComponent = class PillboxOptionCreateComponent extends Pi
315
315
  selected = output();
316
316
  visible = computed(() => this.context.createVisible(this), ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
317
317
  tabIndex = computed(() => this.context.optionTabIndex(this), ...ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []);
318
- classes = computed(() => cn("relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium text-primary outline-none transition-colors", "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground", "aria-disabled:pointer-events-none aria-disabled:opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
318
+ classes = computed(() => cn("relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium text-primary-ink outline-none transition-colors", "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground", "aria-disabled:pointer-events-none aria-disabled:opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
319
319
  rovingVisible() {
320
320
  return this.visible();
321
321
  }
@@ -1,6 +1,6 @@
1
1
  import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs";
2
- import { r as NavigationItemContentComponent, s as NAVIGATION_SHELL, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs";
3
- import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DI-En6rE.mjs";
2
+ import { r as NavigationItemContentComponent, s as NAVIGATION_SHELL, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
3
+ import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-Bs6dssld.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, ElementRef, Injector, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
6
6
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -1,4 +1,4 @@
1
- import { n as navigationPanelId, o as NavigationItemBadgeComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs";
1
+ import { n as navigationPanelId, o as NavigationItemBadgeComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Component, computed, inject, input, output, signal } from "@angular/core";
4
4
  import { ActivatedRoute, Router, RouterLink } from "@angular/router";
@@ -25,7 +25,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
25
25
  openedIdsChange = output();
26
26
  itemSelected = output();
27
27
  isBorderRail = computed(() => this.typeStyle() === "border-rail", ...ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []);
28
- navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
28
+ navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary-ink"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
29
29
  collapsedEntryKeys = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "collapsedEntryKeys" }] : /* istanbul ignore next */ []);
30
30
  entryState = computed(() => {
31
31
  const activeIds = this.activeIds();
@@ -102,12 +102,12 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
102
102
  return index < lastActive ? "through" : index === lastActive ? "end" : null;
103
103
  }
104
104
  entryClasses(item, active) {
105
- return cn("relative isolate group/nav nav-text flex w-full items-center gap-(--nav-item-gap) px-(--nav-item-padding-x) py-2 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", active ? "rounded-md bg-primary text-primary-foreground" : this.isBorderRail() ? "rounded-none text-foreground hover:text-primary" : "rounded-lg text-foreground hover:bg-accent hover:text-accent-foreground", active && item.children.length > 0 && this.isEntryOpen(item) && this.collapseTree() === "stairs" && "before:pointer-events-none before:absolute before:top-1/2 before:bottom-0 before:left-(--nav-rail-offset) before:-z-10 before:w-px before:-translate-x-1/2 before:bg-primary before:content-['']", item.disabled && "pointer-events-none opacity-50", item.classes?.wrapper, this.itemClass());
105
+ return cn("relative isolate group/nav nav-text flex w-full items-center gap-(--nav-item-gap) px-(--nav-item-padding-x) py-2 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", active ? "rounded-md bg-primary text-primary-foreground" : this.isBorderRail() ? "rounded-none text-foreground hover:text-primary-ink" : "rounded-lg text-foreground hover:bg-accent hover:text-accent-foreground", active && item.children.length > 0 && this.isEntryOpen(item) && this.collapseTree() === "stairs" && "before:pointer-events-none before:absolute before:top-1/2 before:bottom-0 before:left-(--nav-rail-offset) before:-z-10 before:w-px before:-translate-x-1/2 before:bg-primary before:content-['']", item.disabled && "pointer-events-none opacity-50", item.classes?.wrapper, this.itemClass());
106
106
  }
107
107
  entryIconClasses(active, parent) {
108
108
  if (parent) return cn("relative inline-flex size-(--nav-icon-size) shrink-0 items-center justify-center self-center", active ? "text-current" : "text-muted-foreground group-hover/nav:text-current");
109
109
  if (active) return "relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center text-current";
110
- if (this.isBorderRail()) return "relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center text-foreground transition-colors group-hover/nav:text-primary";
110
+ if (this.isBorderRail()) return "relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center text-foreground transition-colors group-hover/nav:text-primary-ink";
111
111
  return cn("relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center rounded-lg border bg-background text-foreground shadow-sm transition-colors", "border-[hsl(var(--border)/var(--section-border-opacity))]");
112
112
  }
113
113
  entryIconGlyphClasses(item) {
@@ -1,5 +1,5 @@
1
- import { a as navigationInteractiveStateClasses, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-DtRHbiBM.mjs";
1
+ import { a as navigationInteractiveStateClasses, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
2
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs";
3
3
  import * as i0 from "@angular/core";
4
4
  import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
5
5
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -42,7 +42,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
42
42
  isBottom = computed(() => this.position() === "bottom", ...ngDevMode ? [{ debugName: "isBottom" }] : /* istanbul ignore next */ []);
43
43
  showIconOnly = computed(() => this.compact() || this.iconOnly(), ...ngDevMode ? [{ debugName: "showIconOnly" }] : /* istanbul ignore next */ []);
44
44
  triggerIcon = computed(() => this.icon() ?? (this.showIconOnly() ? "menu" : null), ...ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []);
45
- navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "h-(--nav-item-height) rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
45
+ navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "h-(--nav-item-height) rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary-ink"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
46
46
  branches = computed(() => this.items().filter((item) => item.children.length > 0), ...ngDevMode ? [{ debugName: "branches" }] : /* istanbul ignore next */ []);
47
47
  activeBranch = computed(() => {
48
48
  const key = this.nav.currentPanelKey(this.navId());
@@ -156,9 +156,9 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
156
156
  triggerClasses() {
157
157
  const iconOnly = this.showIconOnly();
158
158
  const base = "nav-trigger group/nav inline-flex min-w-0 items-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
159
- if (this.variant() === "link") return cn(base, "nav-text underline-offset-4 hover:underline", iconOnly ? "h-(--nav-item-height) w-(--nav-item-height) justify-center gap-0" : "gap-1.5", this.isOpen() ? "text-primary underline" : "text-primary/90 hover:text-primary", this.itemClass(), this.triggerButtonClass());
159
+ if (this.variant() === "link") return cn(base, "nav-text underline-offset-4 hover:underline", iconOnly ? "h-(--nav-item-height) w-(--nav-item-height) justify-center gap-0" : "gap-1.5", this.isOpen() ? "text-primary-ink underline" : "text-primary-ink/90 hover:text-primary-ink", this.itemClass(), this.triggerButtonClass());
160
160
  if (this.variant() === "plain") return cn(base, "gap-(--nav-item-gap) rounded-md nav-text", iconOnly ? "h-(--nav-item-height) w-(--nav-item-height) justify-center" : "h-(--nav-item-height) px-(--nav-item-padding-x)", this.isOpen() ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", this.itemClass(), this.triggerButtonClass());
161
- return cn(base, "h-(--nav-item-height) gap-(--nav-item-gap) rounded-full border border-[hsl(var(--border)/var(--section-border-opacity))] bg-background px-4 nav-text shadow-sm", iconOnly && "w-(--nav-item-height) justify-center gap-0 px-0", this.isBorderRail() ? this.isOpen() ? "text-primary" : "text-foreground/80 hover:text-primary" : this.isOpen() ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", this.itemClass(), this.triggerButtonClass());
161
+ return cn(base, "h-(--nav-item-height) gap-(--nav-item-gap) rounded-full border border-[hsl(var(--border)/var(--section-border-opacity))] bg-background px-4 nav-text shadow-sm", iconOnly && "w-(--nav-item-height) justify-center gap-0 px-0", this.isBorderRail() ? this.isOpen() ? "text-primary-ink" : "text-foreground/80 hover:text-primary-ink" : this.isOpen() ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", this.itemClass(), this.triggerButtonClass());
162
162
  }
163
163
  panelCardClasses() {
164
164
  if (this.floating()) return cn("relative flex flex-col rounded-xl border border-[hsl(var(--border)/var(--section-border-opacity))] bg-popover text-popover-foreground shadow-2xl", "max-h-[min(28rem,70vh)] overflow-hidden");
@@ -174,7 +174,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
174
174
  return this.itemState().get(item)?.tabClasses ?? "";
175
175
  }
176
176
  computeTabClasses(item, active, open) {
177
- return cn("nav-trigger nav-text group/nav inline-flex h-full min-h-(--nav-item-height) min-w-0 items-center gap-(--nav-item-gap) rounded-md px-(--nav-item-padding-x) transition-colors", active ? "rounded-md" : this.isBottom() ? "rounded-t-none" : "rounded-b-none", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", active ? navigationInteractiveStateClasses(true, "horizontal", false, item.children.length > 0, false, false) : this.isBorderRail() ? open ? "rounded-none text-primary" : "rounded-none text-foreground/80 hover:text-primary" : open ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
177
+ return cn("nav-trigger nav-text group/nav inline-flex h-full min-h-(--nav-item-height) min-w-0 items-center gap-(--nav-item-gap) rounded-md px-(--nav-item-padding-x) transition-colors", active ? "rounded-md" : this.isBottom() ? "rounded-t-none" : "rounded-b-none", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", active ? navigationInteractiveStateClasses(true, "horizontal", false, item.children.length > 0, false, false) : this.isBorderRail() ? open ? "rounded-none text-primary-ink" : "rounded-none text-foreground/80 hover:text-primary-ink" : open ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
178
178
  }
179
179
  tabChevronClasses(item) {
180
180
  return cn("shrink-0 self-center text-(length:--nav-icon-size-sub) text-current transition-transform duration-normal", this.isBranchOpen(item) && "rotate-90");
@@ -1,6 +1,6 @@
1
1
  import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-DtRHbiBM.mjs";
3
- import { a as navigationInteractiveStateClasses, n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs";
2
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs";
3
+ import { a as navigationInteractiveStateClasses, n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
6
6
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -29,7 +29,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
29
29
  itemSelected = output();
30
30
  isBorderRail = computed(() => this.typeStyle() === "border-rail", ...ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []);
31
31
  isBottom = computed(() => this.position() === "bottom", ...ngDevMode ? [{ debugName: "isBottom" }] : /* istanbul ignore next */ []);
32
- navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
32
+ navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary-ink"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
33
33
  listClasses = computed(() => cn("flex h-full min-w-0 items-center justify-center gap-1 list-none p-0"), ...ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []);
34
34
  openPanelKey = computed(() => this.nav.currentPanelKey(this.navId()), ...ngDevMode ? [{ debugName: "openPanelKey" }] : /* istanbul ignore next */ []);
35
35
  itemState = computed(() => {
@@ -108,7 +108,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
108
108
  return this.itemState().get(item)?.triggerClasses ?? "";
109
109
  }
110
110
  computeTriggerClasses(item, active, open) {
111
- return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center gap-(--nav-item-gap) rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", "h-(--nav-item-height) px-(--nav-item-padding-x)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0", active ? navigationInteractiveStateClasses(true, "horizontal", this.compact(), item.children.length > 0, false, false) : this.isBorderRail() ? open ? "rounded-none text-primary" : "rounded-none text-foreground/80 hover:text-primary" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
111
+ return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center gap-(--nav-item-gap) rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", "h-(--nav-item-height) px-(--nav-item-padding-x)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0", active ? navigationInteractiveStateClasses(true, "horizontal", this.compact(), item.children.length > 0, false, false) : this.isBorderRail() ? open ? "rounded-none text-primary-ink" : "rounded-none text-foreground/80 hover:text-primary-ink" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
112
112
  }
113
113
  panelClasses() {
114
114
  return cn("absolute z-50 bg-popover text-popover-foreground shadow-lg", "max-h-[calc(100dvh-5rem)] overflow-x-hidden overflow-y-auto overscroll-contain", this.isBottom() ? "bottom-full" : "top-full", !this.panelPlacement() && "inset-x-0", this.isBorderRail() ? "rounded-none border-y border-border" : cn("rounded-xl border border-[hsl(var(--border)/var(--section-border-opacity))]", this.isBottom() ? "rounded-b-none" : "rounded-t-none"));
@@ -170,6 +170,9 @@ i0.ɵɵngDeclareClassMetadata({
170
170
  }
171
171
  });
172
172
  const NAVIGATION_ACTIVE_PARENT_ICON_CLASSES = "isolate text-primary-foreground before:pointer-events-none before:absolute before:-inset-1 before:-z-10 before:rounded-md before:border before:border-primary before:bg-primary before:content-['']";
173
+ function navigationTargetLayoutClasses(orientation, level) {
174
+ return orientation === "horizontal" && level === 0 ? "inline-flex h-(--nav-item-height) px-(--nav-item-padding-x)" : "flex min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left";
175
+ }
173
176
  function navigationActiveRailClasses(segment, stairsRail, firstInBranch) {
174
177
  if (!segment || stairsRail && segment === "end") return "";
175
178
  return cn("relative", "before:pointer-events-none before:absolute before:content-['']", stairsRail ? "before:-left-[calc(var(--nav-indent)-var(--nav-rail-offset))] before:-translate-x-1/2 before:w-px before:bg-primary before:-top-0.5" : cn("before:left-(--nav-rail-offset) before:w-0 before:-z-10 before:border-l before:border-dotted before:border-primary", firstInBranch ? "before:-top-[calc(var(--nav-item-height)/2+var(--spacing-base)*0.5)]" : "before:-top-0.5"), segment === "end" ? "before:bottom-[calc(100%-var(--nav-item-height)/2)]" : "before:-bottom-0.5");
@@ -617,10 +620,10 @@ var NavigationItemComponent = class NavigationItemComponent {
617
620
  this.nav.closeDrawer(this.navId());
618
621
  }
619
622
  leafClasses(active) {
620
- return cn("NavigationItem nav-text group/nav inline-flex min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", this.orientation() === "horizontal" && this.level() === 0 ? "h-(--nav-item-height) px-(--nav-item-padding-x)" : "min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left", "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().disabled && "pointer-events-none opacity-50", this.item().classes?.wrapper, this.itemClass());
623
+ return cn("NavigationItem nav-text group/nav min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", navigationTargetLayoutClasses(this.orientation(), this.level()), "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().disabled && "pointer-events-none opacity-50", this.item().classes?.wrapper, this.itemClass());
621
624
  }
622
625
  triggerClasses(active) {
623
- return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", this.orientation() === "horizontal" && this.level() === 0 ? "h-(--nav-item-height) px-(--nav-item-padding-x)" : "min-h-(--nav-item-height) w-full px-(--nav-item-padding-x) py-1 text-left", "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().classes?.wrapper, this.itemClass());
626
+ return cn("nav-trigger nav-text group/nav min-w-0 items-center rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", navigationTargetLayoutClasses(this.orientation(), this.level()), "gap-(--nav-item-gap)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0 py-0 text-center", this.interactiveStateClasses(active), this.item().classes?.wrapper, this.itemClass());
624
627
  }
625
628
  interactiveStateClasses(active) {
626
629
  return navigationInteractiveStateClasses(active, this.level() > 0 ? "vertical" : this.orientation(), this.compact(), this.item().children.length > 0, this.stairsRail(), this.showChildren() && this.showsStairsRailForChildren() && (this.rail() === "default" || this.lastActiveChildIndex() >= 0));
@@ -843,7 +846,7 @@ var NavigationItemComponent = class NavigationItemComponent {
843
846
  <div [id]="headingId()" [class]="groupHeadingClasses()">
844
847
  <ng-container [ngTemplateOutlet]="headingIcon" />
845
848
  <span class="min-w-0 flex-1">
846
- <span class="block truncate">{{ item().title }}</span>
849
+ <span class="block truncate" data-navigation-group-title>{{ item().title }}</span>
847
850
 
848
851
  @if (item().subtitle) {
849
852
  <span
@@ -1238,7 +1241,7 @@ i0.ɵɵngDeclareClassMetadata({
1238
1241
  <div [id]="headingId()" [class]="groupHeadingClasses()">
1239
1242
  <ng-container [ngTemplateOutlet]="headingIcon" />
1240
1243
  <span class="min-w-0 flex-1">
1241
- <span class="block truncate">{{ item().title }}</span>
1244
+ <span class="block truncate" data-navigation-group-title>{{ item().title }}</span>
1242
1245
 
1243
1246
  @if (item().subtitle) {
1244
1247
  <span
@@ -1,4 +1,4 @@
1
- import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs";
1
+ import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Component, computed, input, output } from "@angular/core";
4
4
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -1,6 +1,6 @@
1
1
  import { a as injectNavigationBadgeTotal, o as navigationBadgeSourceKeys, r as NAVIGATION_BADGE_STREAMS, s as navigationDescendantBadgeSources } from "./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs";
2
- import { s as NAVIGATION_SHELL } from "./ojiepermana-angular-navigation-navigation-item.component-BKmO7Pqa.mjs";
3
- import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DI-En6rE.mjs";
2
+ import { s as NAVIGATION_SHELL } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
3
+ import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-Bs6dssld.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, model, output, signal } from "@angular/core";
6
6
  import { ActivatedRoute } from "@angular/router";
@@ -9,7 +9,7 @@ import { NavigationIconDirective, NavigationIconDirective as NavigationIconDirec
9
9
  import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@ojiepermana/angular/navigation/core";
10
10
  import { NAVIGATION_DOCKBAR_FALLBACK_ICON, NAVIGATION_DOCKBAR_FALLBACK_ICON as NAVIGATION_DOCKBAR_FALLBACK_ICON$1, formatNavigationBadgeCount, normalizeUiNavItems, normalizeUiNavItems as normalizeUiNavItems$1, toMinidockItems, ɵassertMinidockItems, ɵcompactNavigationDividers } from "@ojiepermana/angular/navigation/types";
11
11
  import { NgTemplateOutlet } from "@angular/common";
12
- import { Circle, CircleDot, Route } from "lucide";
12
+ import { Route, SquarePaddingLeft, SquarePaddingRight } from "lucide";
13
13
  import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
14
14
  import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
15
15
  export * from "@ojiepermana/angular/navigation/core";
@@ -820,9 +820,9 @@ var NavigationContentComponent = class NavigationContentComponent {
820
820
  outputs: ["openedIdsChange", "itemSelected"]
821
821
  }],
822
822
  deferBlockDependencies: [
823
- () => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-Bo2nIOJk.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
824
- () => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-DUyMjBKb.mjs").then((m) => m.NavigationHorizontalComponent)],
825
- () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DwOSHmKC.mjs").then((m) => m.NavigationDockbarMenuComponent)]
823
+ () => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
824
+ () => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs").then((m) => m.NavigationHorizontalComponent)],
825
+ () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs").then((m) => m.NavigationDockbarMenuComponent)]
826
826
  ]
827
827
  });
828
828
  };
@@ -832,9 +832,9 @@ i0.ɵɵngDeclareClassMetadataAsync({
832
832
  ngImport: i0,
833
833
  type: NavigationContentComponent,
834
834
  resolveDeferredDeps: () => [
835
- import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-Bo2nIOJk.mjs").then((m) => m.NavigationFlyoutMenuComponent),
836
- import("./ojiepermana-angular-navigation-navigation-horizontal.component-DUyMjBKb.mjs").then((m) => m.NavigationHorizontalComponent),
837
- import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DwOSHmKC.mjs").then((m) => m.NavigationDockbarMenuComponent)
835
+ import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs").then((m) => m.NavigationFlyoutMenuComponent),
836
+ import("./ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs").then((m) => m.NavigationHorizontalComponent),
837
+ import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs").then((m) => m.NavigationDockbarMenuComponent)
838
838
  ],
839
839
  resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({
840
840
  decorators: [{
@@ -1072,6 +1072,7 @@ var NavigationHeaderComponent = class NavigationHeaderComponent {
1072
1072
  rowClasses = computed(() => cn("flex h-full items-center", !this.isHorizontal() && this.displayCollapsed() ? "justify-center" : "gap-3 px-3"), ...ngDevMode ? [{ debugName: "rowClasses" }] : /* istanbul ignore next */ []);
1073
1073
  contentClasses = computed(() => {
1074
1074
  if (this.isHorizontal()) return "flex min-w-0 items-center gap-3";
1075
+ if (this.displayCollapsed() && this.showToggle()) return "hidden";
1075
1076
  return this.displayCollapsed() ? "flex min-w-0 items-center justify-center" : "flex min-w-0 flex-1 items-center gap-3";
1076
1077
  }, ...ngDevMode ? [{ debugName: "contentClasses" }] : /* istanbul ignore next */ []);
1077
1078
  hostClasses = computed(() => cn(this.isHorizontal() ? "relative z-10 block h-full w-auto shrink-0" : "sticky top-0 z-10 block h-(--layout-topbar-height) shrink-0 border-b border-[hsl(var(--border)/var(--section-border-opacity))]", this.class()), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
@@ -1113,13 +1114,13 @@ var NavigationHeaderComponent = class NavigationHeaderComponent {
1113
1114
  "attr.data-collapsed": "displayCollapsed()"
1114
1115
  } },
1115
1116
  providers: [provideIcons({
1116
- name: "circle",
1117
+ name: "square-padding-left",
1117
1118
  size: 24,
1118
- node: Circle
1119
+ node: SquarePaddingLeft
1119
1120
  }, {
1120
- name: "circle-dot",
1121
+ name: "square-padding-right",
1121
1122
  size: 24,
1122
- node: CircleDot
1123
+ node: SquarePaddingRight
1123
1124
  })],
1124
1125
  ngImport: i0,
1125
1126
  template: `
@@ -1139,7 +1140,7 @@ var NavigationHeaderComponent = class NavigationHeaderComponent {
1139
1140
  >
1140
1141
  <Icon
1141
1142
  data-navigation-header-toggle-icon="true"
1142
- [name]="collapsed() ? 'circle' : 'circle-dot'"
1143
+ [name]="collapsed() ? 'square-padding-right' : 'square-padding-left'"
1143
1144
  size="inherit"
1144
1145
  class="text-(length:--nav-icon-size)"
1145
1146
  />
@@ -1173,13 +1174,13 @@ i0.ɵɵngDeclareClassMetadata({
1173
1174
  selector: "NavigationHeader",
1174
1175
  imports: [IconComponent],
1175
1176
  providers: [provideIcons({
1176
- name: "circle",
1177
+ name: "square-padding-left",
1177
1178
  size: 24,
1178
- node: Circle
1179
+ node: SquarePaddingLeft
1179
1180
  }, {
1180
- name: "circle-dot",
1181
+ name: "square-padding-right",
1181
1182
  size: 24,
1182
- node: CircleDot
1183
+ node: SquarePaddingRight
1183
1184
  })],
1184
1185
  host: {
1185
1186
  "[class]": "hostClasses()",
@@ -1202,7 +1203,7 @@ i0.ɵɵngDeclareClassMetadata({
1202
1203
  >
1203
1204
  <Icon
1204
1205
  data-navigation-header-toggle-icon="true"
1205
- [name]="collapsed() ? 'circle' : 'circle-dot'"
1206
+ [name]="collapsed() ? 'square-padding-right' : 'square-padding-left'"
1206
1207
  size="inherit"
1207
1208
  class="text-(length:--nav-icon-size)"
1208
1209
  />
@@ -2777,7 +2778,7 @@ function deriveNavigationInitials(name) {
2777
2778
  const last = parts[parts.length - 1] ?? "";
2778
2779
  return (first.charAt(0) + last.charAt(0)).toUpperCase();
2779
2780
  }
2780
- const INITIAL_HOST_CLASSES = "inline-flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md bg-primary/10 text-primary";
2781
+ const INITIAL_HOST_CLASSES = "inline-flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md bg-primary/10 text-primary-ink";
2781
2782
  function setupNavigationInitial(sources) {
2782
2783
  return {
2783
2784
  resolvedInitials: computed(() => sources.initials()?.slice(0, 2).toUpperCase() || deriveNavigationInitials(sources.name())),
@@ -312,6 +312,13 @@ var ThemeSettingsDefaultAdapter = class ThemeSettingsDefaultAdapter {
312
312
  constructor() {
313
313
  effect(() => this.enforceConstraints(this.layoutTypeState(), this.shell.mode()));
314
314
  }
315
+ registerDefaults(defaults) {
316
+ const { navType, navTypeMode } = defaults;
317
+ if (navType !== void 0 && !this.isStored("nav-type", NAV_TYPES) && allowedNavTypes(this.layoutTypeState(), this.shell.mode()).includes(navType)) this.navTypeState.set(navType);
318
+ if (navTypeMode !== void 0 && !this.isStored("nav-type-mode", NAV_TYPE_MODES) && allowedNavTypeModes(this.navTypeState()).includes(navTypeMode)) this.navTypeModeState.set(navTypeMode);
319
+ this.enforceNavTypeMode();
320
+ return this;
321
+ }
315
322
  setSurface(surface) {
316
323
  this.layout.setSurface(surface);
317
324
  }
@@ -353,6 +360,10 @@ var ThemeSettingsDefaultAdapter = class ThemeSettingsDefaultAdapter {
353
360
  const available = allowedNavTypeModes(this.navTypeState());
354
361
  if (!available.includes(this.navTypeModeState())) this.setNavTypeMode(available[0]);
355
362
  }
363
+ isStored(key, values) {
364
+ const stored = this.storage.read(key);
365
+ return stored !== null && values.includes(stored);
366
+ }
356
367
  readStoredNavType() {
357
368
  const stored = this.storage.read(NAV_TYPE_STORAGE_KEY);
358
369
  return stored && NAV_TYPES.includes(stored) ? stored : "dockbar";
@@ -944,7 +955,7 @@ var ThemeSettingsNavigationSectionComponent = class ThemeSettingsNavigationSecti
944
955
  icon: "list-tree"
945
956
  }, {
946
957
  value: "rail-active",
947
- label: "rail-active",
958
+ label: "Active rail",
948
959
  icon: "git-branch"
949
960
  }];
950
961
  navRailLabelId = injectUniqueId("theme-settings-nav-rail");
@@ -1717,7 +1728,7 @@ var ThemeSettingsComponent = class ThemeSettingsComponent {
1717
1728
  ...ngDevMode ? { debugName: "class" } : /* istanbul ignore next */ {},
1718
1729
  alias: "class"
1719
1730
  });
1720
- triggerClasses = computed(() => cn("inline-flex items-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none", this.trigger() === "link" ? this.triggerIconOnly() ? "size-11 p-0 text-primary underline-offset-4 hover:underline" : "min-h-11 px-1 text-primary underline-offset-4 hover:underline" : this.triggerIconOnly() ? "size-11 justify-center p-0 text-muted-foreground hover:bg-accent hover:text-foreground" : "min-h-11 justify-center px-3 text-muted-foreground hover:bg-accent hover:text-accent-foreground", this.class()), ...ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []);
1731
+ triggerClasses = computed(() => cn("inline-flex items-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none", this.trigger() === "link" ? this.triggerIconOnly() ? "size-11 p-0 text-primary-ink underline-offset-4 hover:underline" : "min-h-11 px-1 text-primary-ink underline-offset-4 hover:underline" : this.triggerIconOnly() ? "size-11 justify-center p-0 text-muted-foreground hover:bg-accent hover:text-foreground" : "min-h-11 justify-center px-3 text-muted-foreground hover:bg-accent hover:text-accent-foreground", this.class()), ...ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []);
1721
1732
  static ɵfac = i0.ɵɵngDeclareFactory({
1722
1733
  minVersion: "12.0.0",
1723
1734
  version: "22.2.6",
@@ -1840,7 +1851,7 @@ var ThemeSettingsComponent = class ThemeSettingsComponent {
1840
1851
  >
1841
1852
  <span
1842
1853
  aria-hidden="true"
1843
- class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
1854
+ class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary-ink ring-1 ring-primary/20"
1844
1855
  ><Icon name="palette" [size]="18"
1845
1856
  /></span>
1846
1857
  <div class="min-w-0 flex-1">
@@ -2019,7 +2030,7 @@ i0.ɵɵngDeclareClassMetadata({
2019
2030
  >
2020
2031
  <span
2021
2032
  aria-hidden="true"
2022
- class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
2033
+ class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary-ink ring-1 ring-primary/20"
2023
2034
  ><Icon name="palette" [size]="18"
2024
2035
  /></span>
2025
2036
  <div class="min-w-0 flex-1">
@@ -215,12 +215,18 @@ var LayoutUser = class LayoutUser {
215
215
  alias: "show-theme-settings",
216
216
  transform: optionalBooleanAttribute
217
217
  });
218
+ showLogout = input(null, {
219
+ ...ngDevMode ? { debugName: "showLogout" } : /* istanbul ignore next */ {},
220
+ alias: "show-logout",
221
+ transform: optionalBooleanAttribute
222
+ });
218
223
  logoutLabel = input(null, ...ngDevMode ? [{ debugName: "logoutLabel" }] : /* istanbul ignore next */ []);
219
224
  logoutIcon = input(null, ...ngDevMode ? [{ debugName: "logoutIcon" }] : /* istanbul ignore next */ []);
220
225
  logout = output();
221
226
  showsIdentity = computed(() => this.detailed() || this.options?.detailed === true, ...ngDevMode ? [{ debugName: "showsIdentity" }] : /* istanbul ignore next */ []);
222
227
  showsEmail = computed(() => this.showEmail() ?? this.options?.showEmail ?? true, ...ngDevMode ? [{ debugName: "showsEmail" }] : /* istanbul ignore next */ []);
223
228
  showsThemeSettings = computed(() => this.showThemeSettings() ?? this.options?.showThemeSettings ?? true, ...ngDevMode ? [{ debugName: "showsThemeSettings" }] : /* istanbul ignore next */ []);
229
+ showsLogout = computed(() => this.showLogout() ?? this.options?.showLogout ?? true, ...ngDevMode ? [{ debugName: "showsLogout" }] : /* istanbul ignore next */ []);
224
230
  resolvedLogoutLabel = computed(() => this.logoutLabel() ?? this.options?.logoutLabel ?? "Logout", ...ngDevMode ? [{ debugName: "resolvedLogoutLabel" }] : /* istanbul ignore next */ []);
225
231
  resolvedLogoutIcon = computed(() => this.logoutIcon() ?? this.options?.logoutIcon ?? "log-out", ...ngDevMode ? [{ debugName: "resolvedLogoutIcon" }] : /* istanbul ignore next */ []);
226
232
  static ɵfac = i0.ɵɵngDeclareFactory({
@@ -273,6 +279,13 @@ var LayoutUser = class LayoutUser {
273
279
  isRequired: false,
274
280
  transformFunction: null
275
281
  },
282
+ showLogout: {
283
+ classPropertyName: "showLogout",
284
+ publicName: "show-logout",
285
+ isSignal: true,
286
+ isRequired: false,
287
+ transformFunction: null
288
+ },
276
289
  logoutLabel: {
277
290
  classPropertyName: "logoutLabel",
278
291
  publicName: "logoutLabel",
@@ -313,15 +326,17 @@ var LayoutUser = class LayoutUser {
313
326
  }
314
327
 
315
328
  <NavigationFooterAction class="ml-auto">
316
- <button
317
- type="button"
318
- [attr.aria-label]="resolvedLogoutLabel()"
319
- [attr.title]="resolvedLogoutLabel()"
320
- class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
321
- (click)="logout.emit()"
322
- >
323
- <Icon [name]="resolvedLogoutIcon()" [size]="18" />
324
- </button>
329
+ @if (showsLogout()) {
330
+ <button
331
+ type="button"
332
+ [attr.aria-label]="resolvedLogoutLabel()"
333
+ [attr.title]="resolvedLogoutLabel()"
334
+ class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
335
+ (click)="logout.emit()"
336
+ >
337
+ <Icon [name]="resolvedLogoutIcon()" [size]="18" />
338
+ </button>
339
+ }
325
340
  @if (showsThemeSettings()) {
326
341
  <ThemeSettings [trigger-icon-only]="true" class="size-8! min-h-8!" />
327
342
  }
@@ -427,15 +442,17 @@ i0.ɵɵngDeclareClassMetadata({
427
442
  }
428
443
 
429
444
  <NavigationFooterAction class="ml-auto">
430
- <button
431
- type="button"
432
- [attr.aria-label]="resolvedLogoutLabel()"
433
- [attr.title]="resolvedLogoutLabel()"
434
- class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
435
- (click)="logout.emit()"
436
- >
437
- <Icon [name]="resolvedLogoutIcon()" [size]="18" />
438
- </button>
445
+ @if (showsLogout()) {
446
+ <button
447
+ type="button"
448
+ [attr.aria-label]="resolvedLogoutLabel()"
449
+ [attr.title]="resolvedLogoutLabel()"
450
+ class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
451
+ (click)="logout.emit()"
452
+ >
453
+ <Icon [name]="resolvedLogoutIcon()" [size]="18" />
454
+ </button>
455
+ }
439
456
  @if (showsThemeSettings()) {
440
457
  <ThemeSettings [trigger-icon-only]="true" class="size-8! min-h-8!" />
441
458
  }
@@ -484,6 +501,14 @@ i0.ɵɵngDeclareClassMetadata({
484
501
  required: false
485
502
  }]
486
503
  }],
504
+ showLogout: [{
505
+ type: i0.Input,
506
+ args: [{
507
+ isSignal: true,
508
+ alias: "show-logout",
509
+ required: false
510
+ }]
511
+ }],
487
512
  logoutLabel: [{
488
513
  type: i0.Input,
489
514
  args: [{
@@ -617,6 +642,7 @@ var LayoutNavSidebar = class LayoutNavSidebar {
617
642
  "show-initial",
618
643
  "show-email",
619
644
  "show-theme-settings",
645
+ "show-logout",
620
646
  "logoutLabel",
621
647
  "logoutIcon"
622
648
  ],
@@ -859,6 +885,7 @@ var LayoutNavDockbar = class LayoutNavDockbar {
859
885
  "show-initial",
860
886
  "show-email",
861
887
  "show-theme-settings",
888
+ "show-logout",
862
889
  "logoutLabel",
863
890
  "logoutIcon"
864
891
  ],
@@ -1064,6 +1091,7 @@ var LayoutNavMinidock = class LayoutNavMinidock {
1064
1091
  "show-initial",
1065
1092
  "show-email",
1066
1093
  "show-theme-settings",
1094
+ "show-logout",
1067
1095
  "logoutLabel",
1068
1096
  "logoutIcon"
1069
1097
  ],
@@ -1227,6 +1255,7 @@ var LayoutNavNavbar = class LayoutNavNavbar {
1227
1255
  "show-initial",
1228
1256
  "show-email",
1229
1257
  "show-theme-settings",
1258
+ "show-logout",
1230
1259
  "logoutLabel",
1231
1260
  "logoutIcon"
1232
1261
  ],
@@ -1409,6 +1438,7 @@ var LayoutNavFlyout = class LayoutNavFlyout {
1409
1438
  "show-initial",
1410
1439
  "show-email",
1411
1440
  "show-theme-settings",
1441
+ "show-logout",
1412
1442
  "logoutLabel",
1413
1443
  "logoutIcon"
1414
1444
  ],
@@ -2,7 +2,6 @@ import * as i0 from "@angular/core";
2
2
  import { Component, DestroyRef, ElementRef, booleanAttribute, computed, effect, inject, input } from "@angular/core";
3
3
  import { cn } from "@ojiepermana/angular/component/utils/core";
4
4
  import { LAYOUT_LOADING_HIDE_DELAY_MS, LAYOUT_LOADING_INITIAL_PROGRESS, LAYOUT_LOADING_SKIP, LAYOUT_LOADING_TRICKLE_CEILING, LAYOUT_LOADING_TRICKLE_INTERVAL_MS, LayoutLoadingService, LayoutLoadingService as LayoutLoadingService$1, LayoutService, LayoutService as LayoutService$1, layoutLoadingInterceptor } from "@ojiepermana/angular/theme/layout/services";
5
- import { ThemeRadiusService } from "@ojiepermana/angular/theme/styles";
6
5
  import { LAYOUT_APPEARANCES, LAYOUT_APPEARANCE_STORAGE_KEY, LAYOUT_DEFAULT_APPEARANCE, LAYOUT_DEFAULT_APPEARANCE as LAYOUT_DEFAULT_APPEARANCE$1, LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_SURFACE as LAYOUT_DEFAULT_SURFACE$1, LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_DEFAULT_WIDTH as LAYOUT_DEFAULT_WIDTH$1, LAYOUT_LOCKED_WIDTH, LAYOUT_LOCKED_WIDTH as LAYOUT_LOCKED_WIDTH$1, LAYOUT_SURFACES, LAYOUT_SURFACE_STORAGE_KEY, LAYOUT_TYPES, LAYOUT_TYPE_STORAGE_KEY, LAYOUT_WIDTHS, LAYOUT_WIDTH_STORAGE_KEY, isUiLayoutAppearance, isUiLayoutSurface, isUiLayoutType, isUiLayoutWidth } from "@ojiepermana/angular/theme/layout/types";
7
6
  import { DOCUMENT } from "@angular/common";
8
7
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
@@ -139,7 +138,6 @@ i0.ɵɵngDeclareClassMetadata({
139
138
  });
140
139
  var LayoutComponent = class LayoutComponent {
141
140
  layout = inject(LayoutService$1);
142
- themeRadius = inject(ThemeRadiusService);
143
141
  surface = input(null, ...ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []);
144
142
  appearance = input(null, ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
145
143
  layoutAppearanceAttribute = input(null, {
@@ -182,7 +180,6 @@ var LayoutComponent = class LayoutComponent {
182
180
  const appearance = this.appearanceInput();
183
181
  if (appearance !== null) this.layout.setAppearance(appearance, { persist: false });
184
182
  else this.layout.registerAppearance(LAYOUT_DEFAULT_APPEARANCE$1);
185
- if (this.resolvedAppearance() === "border-rail" && this.themeRadius.radius() !== "none") this.themeRadius.setRadius("none");
186
183
  const width = this.width();
187
184
  if (this.layout.widthLocked()) {} else if (width !== null) this.layout.setWidth(width, { persist: false });
188
185
  else this.layout.registerWidth(LAYOUT_DEFAULT_WIDTH$1);
@@ -208,7 +205,7 @@ var LayoutComponent = class LayoutComponent {
208
205
  case "wide": return "p-0 sm:p-4 lg:p-12";
209
206
  case "container": return "p-0 sm:p-4 lg:px-0 lg:py-16";
210
207
  case "fluid": return "p-0 sm:p-6 lg:p-8";
211
- default: return "p-0 sm:p-4";
208
+ default: return "";
212
209
  }
213
210
  }
214
211
  frameSizeClasses() {
@@ -444,6 +444,7 @@ var PageComponent = class PageComponent {
444
444
  "show-initial",
445
445
  "show-email",
446
446
  "show-theme-settings",
447
+ "show-logout",
447
448
  "logoutLabel",
448
449
  "logoutIcon"
449
450
  ],
@@ -176,6 +176,7 @@ var ShellNavigationFlyoutComponent = class ShellNavigationFlyoutComponent {
176
176
  "show-initial",
177
177
  "show-email",
178
178
  "show-theme-settings",
179
+ "show-logout",
179
180
  "logoutLabel",
180
181
  "logoutIcon"
181
182
  ],
@@ -202,6 +202,18 @@ function brandRing(color, background) {
202
202
  from: parsed.l
203
203
  }) ?? color;
204
204
  }
205
+ function brandInk(color, background) {
206
+ const parsed = parseHslTriplet(color);
207
+ if (!parsed) return null;
208
+ if (contrastRatio(color, background) >= TEXT_CONTRAST_MIN) return color;
209
+ return solveLightnessNearest({
210
+ h: parsed.h,
211
+ s: parsed.s,
212
+ against: [background],
213
+ min: TEXT_CONTRAST_MIN,
214
+ from: parsed.l
215
+ }) ?? color;
216
+ }
205
217
  function brandPatternHueSaturation(color) {
206
218
  const parsed = parseHslTriplet(color);
207
219
  return parsed ? `${parsed.h} ${parsed.s}%` : null;
@@ -240,14 +252,21 @@ var ThemeBrandService = class ThemeBrandService {
240
252
  "--brand-foreground": null,
241
253
  "--brand-pattern-hs": null,
242
254
  "--brand-ring-light": null,
243
- "--brand-ring-dark": null
255
+ "--brand-ring-dark": null,
256
+ "--brand-ink-light": null,
257
+ "--brand-ink-dark": null,
258
+ "--brand-ink-dark-foreground": null
244
259
  };
260
+ const inkDark = brandInk(brand.color, RING_BACKGROUNDS.dark);
245
261
  return {
246
262
  "--brand": brand.color,
247
263
  "--brand-foreground": brand.foreground,
248
264
  "--brand-pattern-hs": brandPatternHueSaturation(brand.color),
249
265
  "--brand-ring-light": brandRing(brand.color, RING_BACKGROUNDS.light),
250
- "--brand-ring-dark": brandRing(brand.color, RING_BACKGROUNDS.dark)
266
+ "--brand-ring-dark": brandRing(brand.color, RING_BACKGROUNDS.dark),
267
+ "--brand-ink-light": brandInk(brand.color, RING_BACKGROUNDS.light),
268
+ "--brand-ink-dark": inkDark,
269
+ "--brand-ink-dark-foreground": inkDark ? foregroundFor$1(inkDark, "dark") : null
251
270
  };
252
271
  }
253
272
  parseStored(raw) {
@@ -448,7 +467,7 @@ i0.ɵɵngDeclareClassMetadata({
448
467
  type: ThemeSpaceService,
449
468
  decorators: [{ type: Service }]
450
469
  });
451
- const UI_THEME_RELEASE_VERSION = "22.2.12";
470
+ const UI_THEME_RELEASE_VERSION = "22.2.15";
452
471
  const THEME_STORAGE_VERSION_KEY = "theme-storage-version";
453
472
  function validateThemeStorageReset(options) {
454
473
  if ("storageVersion" in options) throw new Error("storageVersion was removed. Migrate to storageReset: { preserveKeys: [] }; the package supplies the version.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ojiepermana/angular",
3
- "version": "22.2.12",
3
+ "version": "22.2.15",
4
4
  "description": "Accessible, tree-shakable Angular 22 design system from ojiepermana: UI components, charts, navigation shells, theme tokens, and an OpenAPI SDK generator.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -508,5 +508,5 @@
508
508
  "module": "fesm2022/ojiepermana-angular.mjs",
509
509
  "typings": "types/ojiepermana-angular.d.ts",
510
510
  "type": "module",
511
- "gitHead": "f8d2dd10601647b9f6801091dd1d542c73cd6b54"
511
+ "gitHead": "6e23b5deaffcef5de3a48cdcb16269f00bbb6af5"
512
512
  }
package/sdk/README.md CHANGED
@@ -186,10 +186,21 @@ sdk.config.json → loader → spec (YAML/JSON) → IR → emitters → layout
186
186
 
187
187
  ### Output ownership and safe cleanup
188
188
 
189
- Each generated output directory contains `.ojiepermana-sdk-manifest.json` with
190
- the relative files owned by the generator. A later run deletes stale files only
191
- when they were recorded in that manifest; unrelated source and documentation in
192
- the same directory are preserved.
189
+ Each generated output directory contains an ownership manifest named after the
190
+ package scope, `.<scope>-sdk-manifest.json` (for this package, the scope of
191
+ `@ojiepermana/angular`), listing the relative files owned by the generator. A later
192
+ run deletes stale files only when they were recorded in that manifest; unrelated
193
+ source and documentation in the same directory are preserved.
194
+
195
+ Releases before brand aware manifests wrote `.ojiepermana-sdk-manifest.json` for
196
+ every brand. The generator migrates that file, or another brand's manifest after
197
+ a brand switch, automatically: it validates the old manifest, uses it to clean up
198
+ stale SDK files, writes the new manifest, and deletes the old one in the same Tree
199
+ transaction. If several manifests exist they must all be valid and record the
200
+ same files; otherwise the run stops with a `conflicting ownership manifests`
201
+ error and changes nothing. Keep the manifest that matches the generated files and
202
+ delete the other. Every `.<scope>-sdk-manifest.json` name is reserved and can
203
+ never be emitted or recorded as an SDK file.
193
204
 
194
205
  The schematic rejects output at the workspace root, outside the workspace, or
195
206
  inside `.git`/`node_modules`, and rejects absolute, traversing, duplicate, and
@@ -1,12 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sdk = sdk;
4
+ exports.sdkManifestName = sdkManifestName;
4
5
  exports.writeResult = writeResult;
5
6
  const node_path_1 = require("node:path");
6
7
  const loader_1 = require("../../src/config/loader");
7
8
  const engine_1 = require("../../src/engine");
8
- const OUTPUT_MANIFEST = '.ojiepermana-sdk-manifest.json';
9
+ /**
10
+ * The package name token. A branded release substitutes it, so the manifest
11
+ * name below follows the brand (`@acme/angular` → `.acme-sdk-manifest.json`)
12
+ * without any brand specific code.
13
+ */
14
+ const PACKAGE_NAME = '@ojiepermana/angular';
9
15
  const OUTPUT_MANIFEST_VERSION = 1;
16
+ /**
17
+ * Any brand's ownership manifest at the output root. Every release before
18
+ * brand aware manifests wrote `.ojiepermana-sdk-manifest.json`, whatever the
19
+ * brand; a consumer who switches brands carries the previous brand's name.
20
+ * Both are migrated to the current brand's manifest automatically.
21
+ */
22
+ const BRAND_MANIFEST_PATTERN = /^\.([a-z0-9][a-z0-9._-]*)-sdk-manifest\.json$/;
10
23
  /**
11
24
  * Schematic factory. Reads `sdk.config.json` at the workspace root, runs the
12
25
  * pure generator, and writes each emitted file into the Tree. Angular CLI
@@ -39,17 +52,31 @@ function selectTargets(targets, selector) {
39
52
  t.output.toLowerCase().includes(lc) ||
40
53
  t.packageName.toLowerCase() === lc);
41
54
  }
42
- function writeResult(tree, workspaceRoot, result, context) {
55
+ /** The ownership manifest file name for a package name such as `@acme/angular`. */
56
+ function sdkManifestName(packageName = PACKAGE_NAME) {
57
+ const scope = /^@([a-z0-9][a-z0-9._-]*)\//.exec(packageName)?.[1];
58
+ if (!scope) {
59
+ throw new Error(`Cannot derive an SDK manifest name from package "${packageName}".`);
60
+ }
61
+ return `.${scope}-sdk-manifest.json`;
62
+ }
63
+ function writeResult(tree, workspaceRoot, result, context, options = {}) {
64
+ const manifestName = sdkManifestName(options.packageName);
43
65
  const outputRoot = validateOutputDirectory(workspaceRoot, result.outputDir);
44
- const files = validateGeneratedFiles(result);
66
+ const files = validateGeneratedFiles(result, manifestName);
45
67
  const relOutput = (0, node_path_1.relative)((0, node_path_1.resolve)(workspaceRoot), (0, node_path_1.resolve)(result.outputDir));
46
68
  context.logger.info(`[sdk] ${result.target.mode} → ${relOutput} ` +
47
69
  `(schemas=${result.stats.schemas}, operations=${result.stats.operations}, ` +
48
70
  `tags=${result.stats.tags}, files=${result.stats.files})`);
49
- const manifestPath = `${outputRoot}/${OUTPUT_MANIFEST}`;
50
- const previousFiles = readManifest(tree, manifestPath);
71
+ // Every check runs before the first mutation, so a rejected run leaves the
72
+ // Tree (and therefore the disk) untouched.
73
+ const manifestPath = `${outputRoot}/${manifestName}`;
74
+ const { previousFiles, foreignManifests } = resolveOwnership(tree, outputRoot, manifestName);
51
75
  const nextFiles = new Set(files.map((file) => file.path));
52
- assertWritableFiles(tree, outputRoot, files, previousFiles);
76
+ assertWritableFiles(tree, outputRoot, files, previousFiles, manifestName);
77
+ for (const foreign of foreignManifests) {
78
+ context.logger.info(`[sdk] migrating ownership manifest ${relOutput}/${foreign} → ${relOutput}/${manifestName}`);
79
+ }
53
80
  removeStaleFiles(tree, outputRoot, previousFiles, nextFiles);
54
81
  for (const file of files) {
55
82
  const treePath = `${outputRoot}/${file.path}`;
@@ -72,6 +99,51 @@ function writeResult(tree, workspaceRoot, result, context) {
72
99
  else {
73
100
  tree.create(manifestPath, manifestBuffer);
74
101
  }
102
+ for (const foreign of foreignManifests) {
103
+ tree.delete(`${outputRoot}/${foreign}`);
104
+ }
105
+ }
106
+ /**
107
+ * Decide which files the generator owned before this run.
108
+ *
109
+ * The current brand's manifest wins when it is alone. Other brands'
110
+ * manifests (the pre brand `.ojiepermana-` name included) are migrated: each
111
+ * must be valid, and when more than one manifest exists they must all record
112
+ * the same version and the same file set. Ownership is never merged and an
113
+ * invalid manifest is never skipped in favour of another one.
114
+ */
115
+ function resolveOwnership(tree, outputRoot, manifestName) {
116
+ const foreignManifests = tree
117
+ .getDir(outputRoot)
118
+ .subfiles.map(String)
119
+ .filter((name) => name !== manifestName && isReservedManifestName(name))
120
+ .sort();
121
+ const candidates = [
122
+ ...(tree.exists(`${outputRoot}/${manifestName}`) ? [manifestName] : []),
123
+ ...foreignManifests,
124
+ ];
125
+ if (candidates.length === 0) {
126
+ return { previousFiles: new Set(), foreignManifests };
127
+ }
128
+ const manifests = candidates.map((name) => ({
129
+ name,
130
+ files: readManifest(tree, `${outputRoot}/${name}`),
131
+ }));
132
+ const [primary, ...others] = manifests;
133
+ for (const other of others) {
134
+ if (!sameFiles(primary.files, other.files)) {
135
+ throw new Error(`SDK output "${outputRoot.slice(1)}" holds conflicting ownership manifests ` +
136
+ `"${primary.name}" and "${other.name}". Nothing was changed. Keep the manifest ` +
137
+ `that matches the generated files, delete the other, and run the generator again.`);
138
+ }
139
+ }
140
+ return { previousFiles: primary.files, foreignManifests };
141
+ }
142
+ function isReservedManifestName(name) {
143
+ return BRAND_MANIFEST_PATTERN.test(name);
144
+ }
145
+ function sameFiles(a, b) {
146
+ return a.size === b.size && [...a].every((file) => b.has(file));
75
147
  }
76
148
  function validateOutputDirectory(workspaceRoot, outputDir) {
77
149
  const workspace = (0, node_path_1.resolve)(workspaceRoot);
@@ -94,12 +166,12 @@ function validateOutputDirectory(workspaceRoot, outputDir) {
94
166
  }
95
167
  return `/${posix}`;
96
168
  }
97
- function validateGeneratedFiles(result) {
169
+ function validateGeneratedFiles(result, manifestName) {
98
170
  const seen = new Set();
99
171
  return result.files.map((file) => {
100
172
  const path = normalizeVirtualPath(file.path);
101
- if (path === OUTPUT_MANIFEST) {
102
- throw new Error(`Generated SDK output cannot use the reserved path "${OUTPUT_MANIFEST}".`);
173
+ if (path === manifestName || isReservedManifestName(path)) {
174
+ throw new Error(`Generated SDK output cannot use the reserved path "${path}".`);
103
175
  }
104
176
  if (seen.has(path)) {
105
177
  throw new Error(`Generated SDK output contains the duplicate path "${path}".`);
@@ -136,7 +208,7 @@ function readManifest(tree, manifestPath) {
136
208
  const files = new Set();
137
209
  for (const file of manifest.files) {
138
210
  const path = normalizeVirtualPath(file);
139
- if (path === OUTPUT_MANIFEST || files.has(path)) {
211
+ if (isReservedManifestName(path) || files.has(path)) {
140
212
  throw new Error(`SDK output manifest contains an invalid or duplicate path: "${file}".`);
141
213
  }
142
214
  files.add(path);
@@ -161,7 +233,7 @@ function removeStaleFiles(tree, outputRoot, previousFiles, nextFiles) {
161
233
  }
162
234
  }
163
235
  }
164
- function assertWritableFiles(tree, outputRoot, files, previousFiles) {
236
+ function assertWritableFiles(tree, outputRoot, files, previousFiles, manifestName) {
165
237
  for (const file of files) {
166
238
  const treePath = `${outputRoot}/${file.path}`;
167
239
  if (!tree.exists(treePath) || previousFiles.has(file.path))
@@ -169,7 +241,7 @@ function assertWritableFiles(tree, outputRoot, files, previousFiles) {
169
241
  const nextContent = Buffer.from(file.content, 'utf8');
170
242
  if (!tree.read(treePath)?.equals(nextContent)) {
171
243
  throw new Error(`Refusing to overwrite unmanaged SDK output "${file.path}". ` +
172
- `Move the file or add it to ${OUTPUT_MANIFEST} only if the generator owns it.`);
244
+ `Move the file or add it to ${manifestName} only if the generator owns it.`);
173
245
  }
174
246
  }
175
247
  }
@@ -390,11 +390,12 @@ export const appConfig = {
390
390
  | `detailed` | `boolean` | `false` | Tampilkan identitas pada semua surface, termasuk navbar/flyout. |
391
391
  | `showEmail` | `boolean` | `true` | Render `user.email` di bawah nama. |
392
392
  | `showThemeSettings` | `boolean` | `true` | Render shortcut `ThemeSettings` di samping logout. |
393
+ | `showLogout` | `boolean` | `true` | Render tombol logout; matikan bila aplikasi tanpa sesi login. |
393
394
  | `logoutLabel` | `string` | `'Logout'` | Accessible name tombol logout. |
394
395
  | `logoutIcon` | `string` | `'log-out'` | Nama ikon Lucide; nama lain didaftarkan lewat `provideIcons()`. |
395
396
 
396
397
  Input pada `<LayoutUser>` sendiri (`detailed`, `show-initial`, `show-email`,
397
- `show-theme-settings`, `logoutLabel`, `logoutIcon`) selalu menang atas opsi
398
+ `show-theme-settings`, `show-logout`, `logoutLabel`, `logoutIcon`) selalu menang atas opsi
398
399
  tersebut; nilai yang tidak diikat jatuh ke opsi, lalu ke default di atas.
399
400
  `show-initial` ada untuk surface yang sudah menampilkan inisial di tempat lain,
400
401
  seperti aside dockbar yang menampilkan inisialnya di rail. Nama panjang
@@ -15,6 +15,7 @@
15
15
  :root:not([data-mode='light']) {
16
16
  --destructive: 0 62% 45%;
17
17
  --destructive-foreground: 0 0% 95%;
18
+ --destructive-ink: 0 72% 64%;
18
19
  --overlay-backdrop: 0 0% 0% / 0.64;
19
20
  --overlay-backdrop-strong: 0 0% 0% / 0.5;
20
21
  --editor-highlight: 48 70% 30%;
@@ -27,6 +27,9 @@
27
27
 
28
28
  --color-primary: hsl(var(--primary));
29
29
  --color-primary-foreground: hsl(var(--primary-foreground));
30
+ /* The primary as text and icons. Only the brand accent sets --primary-ink
31
+ (a per-mode readable variant, spec 0013); every other accent is its primary. */
32
+ --color-primary-ink: hsl(var(--primary-ink, var(--primary)));
30
33
 
31
34
  --color-brand: hsl(var(--brand));
32
35
  --color-brand-foreground: hsl(var(--brand-foreground));
@@ -36,6 +39,9 @@
36
39
 
37
40
  --color-destructive: hsl(var(--destructive));
38
41
  --color-destructive-foreground: hsl(var(--destructive-foreground));
42
+ /* Destructive as text and icons. Only dark mode sets --destructive-ink
43
+ (spec 0014); in light mode it is the destructive fill. */
44
+ --color-destructive-ink: hsl(var(--destructive-ink, var(--destructive)));
39
45
 
40
46
  --color-success: hsl(var(--success));
41
47
  --color-success-foreground: hsl(var(--success-foreground));
@@ -297,6 +297,9 @@
297
297
  [data-mode='dark'] {
298
298
  --destructive: 0 62% 45%;
299
299
  --destructive-foreground: 0 0% 95%;
300
+ /* Destructive as text and icons (spec 0014): 4.5:1 or more on background,
301
+ card and muted for every neutral. The fill above is unchanged. */
302
+ --destructive-ink: 0 72% 64%;
300
303
 
301
304
  --overlay-backdrop: 0 0% 0% / 0.64;
302
305
  --overlay-backdrop-strong: 0 0% 0% / 0.5;
@@ -18,14 +18,29 @@
18
18
  * clear 3 to 1 against the background. ThemeBrandService solves that value once
19
19
  * per mode (--brand-ring-light / --brand-ring-dark); without it the ring simply
20
20
  * falls back to the brand.
21
+ *
22
+ * --primary-ink is the brand as text and icons (spec 0013). The fill keeps one
23
+ * lightness for both modes, so text in that colour can vanish on the dark
24
+ * ground; ThemeBrandService solves --brand-ink-light / --brand-ink-dark at 4.5
25
+ * to 1 and this file picks the one the mode needs.
21
26
  */
22
27
  @layer tokens {
23
28
  html[theme-color='brand'][data-mode='light'] {
24
29
  --brand-ring: var(--brand-ring-light, var(--brand));
30
+ --brand-ink: var(--brand-ink-light, var(--brand));
25
31
  }
26
32
 
27
33
  html[theme-color='brand'][data-mode='dark'] {
28
34
  --brand-ring: var(--brand-ring-dark, var(--brand));
35
+ --brand-ink: var(--brand-ink-dark, var(--brand));
36
+ /* The first chart series is the primary; on the dark ground it takes the ink,
37
+ which clears 4.5 to 1, so the series always clears the 3 to 1 graphics
38
+ minimum. A consumer --theme-chart-1 still wins. */
39
+ --chart-1: var(--theme-chart-1, var(--brand-ink));
40
+ --chart-1-foreground: var(
41
+ --theme-chart-1-foreground,
42
+ var(--brand-ink-dark-foreground, var(--brand-foreground))
43
+ );
29
44
  }
30
45
 
31
46
  html[theme-color='brand'][data-mode='light'],
@@ -34,5 +49,6 @@
34
49
  --primary-foreground: var(--brand-foreground);
35
50
  --ring: var(--brand-ring, var(--brand));
36
51
  --highlight: var(--brand);
52
+ --primary-ink: var(--brand-ink, var(--brand));
37
53
  }
38
54
  }
@@ -317,7 +317,7 @@ export declare class NavigationHeaderComponent {
317
317
  * dengan padding `px-3`.
318
318
  */
319
319
  protected readonly rowClasses: import("@angular/core").Signal<string>;
320
- protected readonly contentClasses: import("@angular/core").Signal<"flex min-w-0 items-center gap-3" | "flex min-w-0 items-center justify-center" | "flex min-w-0 flex-1 items-center gap-3">;
320
+ protected readonly contentClasses: import("@angular/core").Signal<"flex min-w-0 items-center gap-3" | "hidden" | "flex min-w-0 items-center justify-center" | "flex min-w-0 flex-1 items-center gap-3">;
321
321
  protected readonly hostClasses: import("@angular/core").Signal<string>;
322
322
  protected toggleCollapsed(): void;
323
323
  static ɵfac: i0.ɵɵFactoryDeclaration<NavigationHeaderComponent, never>;
@@ -178,6 +178,15 @@ export declare class ThemeSettingsDefaultAdapter implements ThemeSettingsAdapter
178
178
  /** Shell mode the nav-type constraints are resolved against. */
179
179
  readonly shellMode: import("@angular/core").Signal<"tablet" | "desktop" | "web" | "mobile">;
180
180
  constructor();
181
+ /**
182
+ * Seed the navigation axes with app defaults, unless the user already stored a
183
+ * choice — that one always wins. Like `LayoutService.registerDefaults`, seeding
184
+ * never persists, and an incoherent seed is corrected the same way a user pick is.
185
+ */
186
+ registerDefaults(defaults: {
187
+ navType?: ThemeSettingsNavigationType;
188
+ navTypeMode?: ThemeSettingsNavigationMode;
189
+ }): this;
181
190
  setSurface(surface: LayoutSurface): void;
182
191
  setAppearance(appearance: LayoutAppearance): void;
183
192
  setWidth(width: LayoutWidth): void;
@@ -192,6 +201,7 @@ export declare class ThemeSettingsDefaultAdapter implements ThemeSettingsAdapter
192
201
  */
193
202
  private enforceConstraints;
194
203
  private enforceNavTypeMode;
204
+ private isStored;
195
205
  private readStoredNavType;
196
206
  private readStoredNavTypeMode;
197
207
  static ɵfac: i0.ɵɵFactoryDeclaration<ThemeSettingsDefaultAdapter, never>;
@@ -67,6 +67,11 @@ export interface LayoutUserOptions {
67
67
  * off when the application offers the settings on a page of its own.
68
68
  */
69
69
  readonly showThemeSettings?: boolean;
70
+ /**
71
+ * Render the logout control. Default `true`; turn it off when the application
72
+ * has no session to end, such as a public documentation site.
73
+ */
74
+ readonly showLogout?: boolean;
70
75
  /** Accessible name of the logout control. Default `'Logout'`. */
71
76
  readonly logoutLabel?: string;
72
77
  /**
@@ -161,6 +166,8 @@ export declare class LayoutUser {
161
166
  readonly showEmail: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
162
167
  /** Render the ThemeSettings shortcut; unset falls back to the options, then `true`. */
163
168
  readonly showThemeSettings: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
169
+ /** Render the logout button; unset falls back to the options, then `true`. */
170
+ readonly showLogout: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
164
171
  /** Accessible name for the logout button; unset falls back to the options, then `Logout`. */
165
172
  readonly logoutLabel: import("@angular/core").InputSignal<string | null>;
166
173
  /**
@@ -173,6 +180,7 @@ export declare class LayoutUser {
173
180
  protected readonly showsIdentity: import("@angular/core").Signal<boolean>;
174
181
  protected readonly showsEmail: import("@angular/core").Signal<boolean>;
175
182
  protected readonly showsThemeSettings: import("@angular/core").Signal<boolean>;
183
+ protected readonly showsLogout: import("@angular/core").Signal<boolean>;
176
184
  protected readonly resolvedLogoutLabel: import("@angular/core").Signal<string>;
177
185
  protected readonly resolvedLogoutIcon: import("@angular/core").Signal<string>;
178
186
  static ɵfac: i0.ɵɵFactoryDeclaration<LayoutUser, never>;
@@ -202,6 +210,11 @@ export declare class LayoutUser {
202
210
  "required": false;
203
211
  "isSignal": true;
204
212
  };
213
+ "showLogout": {
214
+ "alias": "show-logout";
215
+ "required": false;
216
+ "isSignal": true;
217
+ };
205
218
  "logoutLabel": {
206
219
  "alias": "logoutLabel";
207
220
  "required": false;
@@ -3,7 +3,6 @@ import * as i0 from "@angular/core";
3
3
  import { LAYOUT_APPEARANCES, LAYOUT_APPEARANCE_STORAGE_KEY, LAYOUT_DEFAULT_APPEARANCE, LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_LOCKED_WIDTH, LAYOUT_SURFACES, LAYOUT_SURFACE_STORAGE_KEY, LAYOUT_TYPES, LAYOUT_TYPE_STORAGE_KEY, LAYOUT_WIDTHS, LAYOUT_WIDTH_STORAGE_KEY, LayoutAppearance, LayoutContextValue, LayoutSurface, LayoutType, LayoutWidth, isUiLayoutAppearance, isUiLayoutSurface, isUiLayoutType, isUiLayoutWidth } from "@ojiepermana/angular/theme/layout/types";
4
4
  export declare class LayoutComponent {
5
5
  protected readonly layout: LayoutService$1;
6
- private readonly themeRadius;
7
6
  readonly surface: import("@angular/core").InputSignal<"flat" | "grid" | "grid-line" | "honeycomb" | "matrix" | "circuit" | "line-vertical" | "line-horizontal" | null>;
8
7
  readonly appearance: import("@angular/core").InputSignal<"flat" | "border-rail" | null>;
9
8
  readonly layoutAppearanceAttribute: import("@angular/core").InputSignal<"flat" | "border-rail" | null>;
@@ -106,8 +106,9 @@ export interface ThemeBrand {
106
106
  }
107
107
  /**
108
108
  * Consumer-configurable brand color. Writes `--brand`, `--brand-foreground`, the
109
- * derived `--brand-pattern-hs` hue/saturation source, and a `--brand-ring-light`
110
- * / `--brand-ring-dark` pair as inline custom properties on `<html>` so solid
109
+ * derived `--brand-pattern-hs` hue/saturation source, a `--brand-ink-light` /
110
+ * `--brand-ink-dark` pair for brand-coloured text (spec 0013), and a
111
+ * `--brand-ring-light` / `--brand-ring-dark` pair as inline custom properties on `<html>` so solid
111
112
  * brand utilities, the focus ring, and the soft Layout pattern tiers can resolve
112
113
  * without CSS relative-color syntax.
113
114
  *