@praxisui/tabs 1.0.0-beta.8 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,12 +1,29 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnChanges, EventEmitter, SimpleChanges, Provider } from '@angular/core';
2
+ import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Provider } from '@angular/core';
3
3
  import { MatTabChangeEvent } from '@angular/material/tabs';
4
4
  import { FormGroup } from '@angular/forms';
5
5
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
6
- import { WidgetDefinition, ComponentDocMeta, ComponentMetadataRegistry } from '@praxisui/core';
6
+ import { WidgetDefinition, ComponentDocMeta, ComponentMetadataRegistry, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
7
+ import { BaseAiAdapter, Capability as Capability$1, PatchResult } from '@praxisui/ai';
7
8
  import { BehaviorSubject } from 'rxjs';
8
9
  import { SettingsValueProvider } from '@praxisui/settings-panel';
9
10
 
11
+ declare class TabsAiAdapter extends BaseAiAdapter<TabsMetadata> {
12
+ private tabs;
13
+ componentName: string;
14
+ constructor(tabs: PraxisTabs);
15
+ getCurrentConfig(): TabsMetadata;
16
+ getCapabilities(): Capability$1[];
17
+ getRuntimeState(): Record<string, any>;
18
+ createSnapshot(): TabsMetadata;
19
+ restoreSnapshot(snapshot: TabsMetadata): Promise<void>;
20
+ applyPatch(patch: Partial<TabsMetadata>): Promise<PatchResult>;
21
+ private applyConfig;
22
+ private smartMergeTabsConfig;
23
+ private mergeByKey;
24
+ private cloneConfig;
25
+ }
26
+
10
27
  interface TabsMetadata {
11
28
  meta?: any;
12
29
  appearance?: TabsAppearanceConfig;
@@ -32,9 +49,11 @@ interface TabsBehaviorConfig {
32
49
  interface TabsEventConfig {
33
50
  }
34
51
  interface TabsAccessibilityConfig {
52
+ /** @deprecated Declared-only. No direct runtime binding; prefer mode-specific aria fields instead. */
35
53
  ariaLabels?: {
36
54
  [key: string]: string;
37
55
  };
56
+ /** @deprecated Declared-only. Keyboard navigation follows Angular Material defaults; no dedicated runtime gate exists. */
38
57
  keyboardNavigation?: boolean;
39
58
  highContrast?: boolean;
40
59
  reduceMotion?: boolean;
@@ -45,6 +64,7 @@ interface TabGroupMetadata {
45
64
  ariaLabel?: string;
46
65
  ariaLabelledby?: string;
47
66
  color?: 'primary' | 'accent' | 'warn';
67
+ /** @deprecated Declared-only. No template binding in the current runtime. */
48
68
  contentTabIndex?: number;
49
69
  disablePagination?: boolean;
50
70
  disableRipple?: boolean;
@@ -74,6 +94,8 @@ interface TabNavMetadata {
74
94
  animationDuration?: string;
75
95
  color?: 'primary' | 'accent' | 'warn';
76
96
  backgroundColor?: 'primary' | 'accent' | 'warn' | undefined;
97
+ ariaLabel?: string;
98
+ ariaLabelledby?: string;
77
99
  disablePagination?: boolean;
78
100
  disableRipple?: boolean;
79
101
  fitInkBarToContent?: boolean;
@@ -106,13 +128,18 @@ interface TabsStyleTokens {
106
128
  'divider-color': string;
107
129
  'background-color': string;
108
130
  }
109
- declare class PraxisTabs implements OnInit, OnChanges {
131
+ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
110
132
  private readonly settings;
111
133
  private readonly storage;
112
134
  private readonly snack;
135
+ private readonly componentKeys;
136
+ private readonly logger;
137
+ private readonly route;
138
+ private warnedMissingId;
113
139
  config: TabsMetadata | null;
114
- tabsId?: string;
115
- editModeEnabled: boolean;
140
+ tabsId: string;
141
+ componentInstanceId?: string;
142
+ enableCustomization: boolean;
116
143
  form: FormGroup | null;
117
144
  context: Record<string, any> | null;
118
145
  animationDone: EventEmitter<void>;
@@ -130,12 +157,15 @@ declare class PraxisTabs implements OnInit, OnChanges {
130
157
  output?: string;
131
158
  payload?: any;
132
159
  }>;
160
+ aiAdapter: TabsAiAdapter;
133
161
  protected currentNavIndex: i0.WritableSignal<number>;
134
162
  protected selectedIndexSignal: i0.WritableSignal<number>;
135
163
  private groupLoaded;
136
164
  private navLoaded;
165
+ private readonly destroy$;
137
166
  ngOnInit(): void;
138
167
  ngOnChanges(changes: SimpleChanges): void;
168
+ ngOnDestroy(): void;
139
169
  isNavMode(): boolean;
140
170
  effectiveAnimationDuration(): string;
141
171
  getNavActive(i: number): boolean;
@@ -150,6 +180,12 @@ declare class PraxisTabs implements OnInit, OnChanges {
150
180
  resetPreferences(): void;
151
181
  openQuickSetup(): void;
152
182
  private storageKey;
183
+ private syncSelectionFromConfig;
184
+ private persistConfig;
185
+ private componentKeyId;
186
+ private warnMissingId;
187
+ private clampIndex;
188
+ applyConfigFromAdapter(next: TabsMetadata): void;
153
189
  private isLazy;
154
190
  protected groupContentReady(index: number): boolean;
155
191
  protected navContentReady(index: number): boolean;
@@ -164,9 +200,12 @@ declare class PraxisTabs implements OnInit, OnChanges {
164
200
  output?: string;
165
201
  payload?: any;
166
202
  }): void;
203
+ protected styleScopeId(): string;
204
+ protected safeCustomCss(): string | null;
205
+ private sanitizeCssValue;
167
206
  protected styleCss(): string | null;
168
207
  static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTabs, never>;
169
- static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabs, "praxis-tabs", never, { "config": { "alias": "config"; "required": false; }; "tabsId": { "alias": "tabsId"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "form": { "alias": "form"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "animationDone": "animationDone"; "focusChange": "focusChange"; "selectedIndexChange": "selectedIndexChange"; "selectedTabChange": "selectedTabChange"; "indexFocused": "indexFocused"; "selectFocusedIndex": "selectFocusedIndex"; "widgetEvent": "widgetEvent"; }, never, never, true, never>;
208
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabs, "praxis-tabs", never, { "config": { "alias": "config"; "required": false; }; "tabsId": { "alias": "tabsId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "form": { "alias": "form"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "animationDone": "animationDone"; "focusChange": "focusChange"; "selectedIndexChange": "selectedIndexChange"; "selectedTabChange": "selectedTabChange"; "indexFocused": "indexFocused"; "selectFocusedIndex": "selectFocusedIndex"; "widgetEvent": "widgetEvent"; }, never, never, true, never>;
170
209
  }
171
210
 
172
211
  declare const PRAXIS_TABS_COMPONENT_METADATA: ComponentDocMeta;
@@ -269,5 +308,28 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
269
308
  static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabsConfigEditor, "praxis-tabs-config-editor", never, {}, {}, never, never, true, never>;
270
309
  }
271
310
 
272
- export { PRAXIS_TABS_COMPONENT_METADATA, PraxisTabs, PraxisTabsConfigEditor, providePraxisTabsMetadata };
273
- export type { TabGroupMetadata, TabLinkMetadata, TabMetadata, TabNavMetadata, TabsAccessibilityConfig, TabsAppearanceConfig, TabsBehaviorConfig, TabsEventConfig, TabsMetadata, TabsStyleTokens };
311
+ /**
312
+ * Capabilities catalog for Praxis Tabs (TabsMetadata).
313
+ * Paths follow TabsMetadata shape (patches are merged at config root).
314
+ */
315
+
316
+ declare module '@praxisui/core' {
317
+ interface AiCapabilityCategoryMap {
318
+ meta: true;
319
+ group: true;
320
+ nav: true;
321
+ tabs: true;
322
+ }
323
+ }
324
+ type CapabilityCategory = AiCapabilityCategory;
325
+ type ValueKind = AiValueKind;
326
+ interface Capability extends AiCapability {
327
+ category: CapabilityCategory;
328
+ }
329
+ interface CapabilityCatalog extends AiCapabilityCatalog {
330
+ capabilities: Capability[];
331
+ }
332
+ declare const TABS_AI_CAPABILITIES: CapabilityCatalog;
333
+
334
+ export { PRAXIS_TABS_COMPONENT_METADATA, PraxisTabs, PraxisTabsConfigEditor, TABS_AI_CAPABILITIES, providePraxisTabsMetadata };
335
+ export type { Capability, CapabilityCatalog, CapabilityCategory, TabGroupMetadata, TabLinkMetadata, TabMetadata, TabNavMetadata, TabsAccessibilityConfig, TabsAppearanceConfig, TabsBehaviorConfig, TabsEventConfig, TabsMetadata, TabsStyleTokens, ValueKind };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@praxisui/tabs",
3
- "version": "1.0.0-beta.8",
3
+ "version": "3.0.0-beta.0",
4
4
  "description": "Configurable tabs (group and nav) for Praxis UI with metadata-driven content and runtime editor.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.0.0",
7
7
  "@angular/core": "^20.0.0",
8
8
  "@angular/material": "^20.0.0",
9
9
  "@angular/cdk": "^20.0.0",
10
- "@praxisui/core": "^1.0.0-beta.8",
11
- "@praxisui/dynamic-fields": "^1.0.0-beta.8",
12
- "@praxisui/settings-panel": "^1.0.0-beta.8"
10
+ "@praxisui/core": "^3.0.0-beta.0",
11
+ "@praxisui/dynamic-fields": "^3.0.0-beta.0",
12
+ "@praxisui/settings-panel": "^3.0.0-beta.0"
13
13
  },
14
14
  "dependencies": {
15
15
  "tslib": "^2.3.0",
@@ -21,18 +21,19 @@
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "https://github.com/codexrodrigues/praxis"
24
+ "url": "https://github.com/codexrodrigues/praxis-ui-angular"
25
25
  },
26
- "homepage": "https://github.com/codexrodrigues/praxis#readme",
26
+ "homepage": "https://praxisui.dev",
27
27
  "bugs": {
28
- "url": "https://github.com/codexrodrigues/praxis/issues"
28
+ "url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
29
29
  },
30
30
  "keywords": [
31
31
  "angular",
32
32
  "praxisui",
33
33
  "tabs",
34
- "ui",
35
- "material"
34
+ "navigation",
35
+ "material",
36
+ "metadata-driven"
36
37
  ],
37
38
  "sideEffects": false,
38
39
  "module": "fesm2022/praxisui-tabs.mjs",