@molecule/app-settings-container-angular 0.0.0-stage → 1.1.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.
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Angular Settings-page scaffold (layout chrome only) — the counterpart of
3
+ * `@molecule/app-settings-container-react`: the same props and the same DOM
4
+ * for the same input.
5
+ *
6
+ * Exports:
7
+ * - `<SettingsLayout>` (`div[mol-settings-layout]`) — two-column [sidebar,
8
+ * content] with an optional `[slot=header]` above both.
9
+ * - `<SettingsSidebar>` (`nav[mol-settings-sidebar]`) — controlled side-nav
10
+ * (`items`, `activeId`, `onSelect`, optional `[slot=footer]`).
11
+ * - `<SettingsContent>` (`div[mol-settings-content]`) — stacked wrapper for
12
+ * the right column.
13
+ * - `<SettingsSection>` (`div[mol-settings-section]`) — Card-wrapped titled
14
+ * section (`[slot=title]`, `[slot=description]`, body and
15
+ * `[slot=footer]`).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { Component } from '@angular/core'
20
+ * import {
21
+ * SettingsContent,
22
+ * SettingsLayout,
23
+ * SettingsSection,
24
+ * SettingsSidebar,
25
+ * } from '@molecule/app-settings-container-angular'
26
+ *
27
+ * @Component({
28
+ * selector: 'app-settings-page',
29
+ * standalone: true,
30
+ * imports: [SettingsLayout, SettingsSidebar, SettingsContent, SettingsSection],
31
+ * template: `
32
+ * <div mol-settings-layout [dataMolId]="'settings'">
33
+ * <h1 slot="header">Settings</h1>
34
+ * <nav
35
+ * slot="sidebar"
36
+ * mol-settings-sidebar
37
+ * [items]="nav"
38
+ * [activeId]="active"
39
+ * [onSelect]="select.bind(this)"
40
+ * ></nav>
41
+ * <div mol-settings-content>
42
+ * <div mol-settings-section>
43
+ * <strong slot="title">Profile</strong>
44
+ * <em slot="description">Update your display name and avatar.</em>
45
+ * <p>Form fields go here.</p>
46
+ * </div>
47
+ * </div>
48
+ * </div>
49
+ * `,
50
+ * })
51
+ * export class SettingsPage {
52
+ * active = 'profile'
53
+ * nav = [
54
+ * { id: 'profile', label: 'Profile' },
55
+ * { id: 'notifications', label: 'Notifications' },
56
+ * ]
57
+ *
58
+ * select(id: string): void {
59
+ * this.active = id
60
+ * }
61
+ * }
62
+ * ```
63
+ *
64
+ * @remarks
65
+ * - Node props are projected content: `[slot=header]`, `[slot=sidebar]`,
66
+ * `[slot=footer]`, `[slot=title]` and `[slot=description]` — everything
67
+ * else lands in the default projection. Text-only values (`title`,
68
+ * `description`, `footer`) may also be passed as inputs.
69
+ * - The `header` is rendered above the columns but is NOT sticky — apply your
70
+ * own sticky positioning if you need it pinned.
71
+ * - The two columns do not collapse responsively — swap the sidebar for a
72
+ * drawer on small screens yourself.
73
+ * - Requires a bonded ClassMap. Labels are your own nodes (translate
74
+ * upstream); the sidebar nav's `aria-label="Settings"` is hardcoded English.
75
+ * - Don't confuse with `@molecule/app-settings-panel-angular`: that package is
76
+ * the batteries-included panel (prebuilt Account/Auth/Billing/… sections
77
+ * wired to molecule APIs). THIS package is empty layout chrome for building
78
+ * your own settings pages.
79
+ *
80
+ * @module
81
+ */
82
+ export * from './settings-content.component.js';
83
+ export * from './settings-layout.component.js';
84
+ export * from './settings-section.component.js';
85
+ export * from './settings-sidebar.component.js';
86
+ export * from './types.js';
87
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,YAAY,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Angular Settings-page scaffold (layout chrome only) — the counterpart of
3
+ * `@molecule/app-settings-container-react`: the same props and the same DOM
4
+ * for the same input.
5
+ *
6
+ * Exports:
7
+ * - `<SettingsLayout>` (`div[mol-settings-layout]`) — two-column [sidebar,
8
+ * content] with an optional `[slot=header]` above both.
9
+ * - `<SettingsSidebar>` (`nav[mol-settings-sidebar]`) — controlled side-nav
10
+ * (`items`, `activeId`, `onSelect`, optional `[slot=footer]`).
11
+ * - `<SettingsContent>` (`div[mol-settings-content]`) — stacked wrapper for
12
+ * the right column.
13
+ * - `<SettingsSection>` (`div[mol-settings-section]`) — Card-wrapped titled
14
+ * section (`[slot=title]`, `[slot=description]`, body and
15
+ * `[slot=footer]`).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { Component } from '@angular/core'
20
+ * import {
21
+ * SettingsContent,
22
+ * SettingsLayout,
23
+ * SettingsSection,
24
+ * SettingsSidebar,
25
+ * } from '@molecule/app-settings-container-angular'
26
+ *
27
+ * @Component({
28
+ * selector: 'app-settings-page',
29
+ * standalone: true,
30
+ * imports: [SettingsLayout, SettingsSidebar, SettingsContent, SettingsSection],
31
+ * template: `
32
+ * <div mol-settings-layout [dataMolId]="'settings'">
33
+ * <h1 slot="header">Settings</h1>
34
+ * <nav
35
+ * slot="sidebar"
36
+ * mol-settings-sidebar
37
+ * [items]="nav"
38
+ * [activeId]="active"
39
+ * [onSelect]="select.bind(this)"
40
+ * ></nav>
41
+ * <div mol-settings-content>
42
+ * <div mol-settings-section>
43
+ * <strong slot="title">Profile</strong>
44
+ * <em slot="description">Update your display name and avatar.</em>
45
+ * <p>Form fields go here.</p>
46
+ * </div>
47
+ * </div>
48
+ * </div>
49
+ * `,
50
+ * })
51
+ * export class SettingsPage {
52
+ * active = 'profile'
53
+ * nav = [
54
+ * { id: 'profile', label: 'Profile' },
55
+ * { id: 'notifications', label: 'Notifications' },
56
+ * ]
57
+ *
58
+ * select(id: string): void {
59
+ * this.active = id
60
+ * }
61
+ * }
62
+ * ```
63
+ *
64
+ * @remarks
65
+ * - Node props are projected content: `[slot=header]`, `[slot=sidebar]`,
66
+ * `[slot=footer]`, `[slot=title]` and `[slot=description]` — everything
67
+ * else lands in the default projection. Text-only values (`title`,
68
+ * `description`, `footer`) may also be passed as inputs.
69
+ * - The `header` is rendered above the columns but is NOT sticky — apply your
70
+ * own sticky positioning if you need it pinned.
71
+ * - The two columns do not collapse responsively — swap the sidebar for a
72
+ * drawer on small screens yourself.
73
+ * - Requires a bonded ClassMap. Labels are your own nodes (translate
74
+ * upstream); the sidebar nav's `aria-label="Settings"` is hardcoded English.
75
+ * - Don't confuse with `@molecule/app-settings-panel-angular`: that package is
76
+ * the batteries-included panel (prebuilt Account/Auth/Billing/… sections
77
+ * wired to molecule APIs). THIS package is empty layout chrome for building
78
+ * your own settings pages.
79
+ *
80
+ * @module
81
+ */
82
+ export * from './settings-content.component.js';
83
+ export * from './settings-layout.component.js';
84
+ export * from './settings-section.component.js';
85
+ export * from './settings-sidebar.component.js';
86
+ export * from './types.js';
87
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,YAAY,CAAA"}
@@ -0,0 +1,27 @@
1
+ import type { UIClassMap } from '@molecule/app-ui';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Wrapper for the right-hand column of the settings layout.
5
+ *
6
+ * Just a vertically-stacked container for one or more settings sections —
7
+ * useful as a semantic landmark and for consistent spacing. The host IS the
8
+ * `<div>` React renders (`div[mol-settings-content]`); its content is
9
+ * projected default content.
10
+ */
11
+ export declare class SettingsContent {
12
+ /** Extra classes. */
13
+ className?: string;
14
+ /**
15
+ * The current class map.
16
+ * @returns The UIClassMap.
17
+ */
18
+ cm(): UIClassMap;
19
+ /**
20
+ * The wrapper's class list (React's `cm.cn(cm.stack(6), className)`).
21
+ * @returns The class string.
22
+ */
23
+ classes(): string;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<SettingsContent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<SettingsContent, "div[mol-settings-content]", never, { "className": { "alias": "className"; "required": false; }; }, {}, never, ["*"], true, never>;
26
+ }
27
+ //# sourceMappingURL=settings-content.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-content.component.d.ts","sourceRoot":"","sources":["../src/settings-content.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGlD;;;;;;;GAOG;AACH,qBASa,eAAe;IAC1B,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,eAAe;2CAAf,eAAe;CAmB3B"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * SettingsContent component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { Component } from '@angular/core';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ const _c0 = ["*"];
10
+ /**
11
+ * Wrapper for the right-hand column of the settings layout.
12
+ *
13
+ * Just a vertically-stacked container for one or more settings sections —
14
+ * useful as a semantic landmark and for consistent spacing. The host IS the
15
+ * `<div>` React renders (`div[mol-settings-content]`); its content is
16
+ * projected default content.
17
+ */
18
+ export class SettingsContent {
19
+ /** Extra classes. */
20
+ className;
21
+ /**
22
+ * The current class map.
23
+ * @returns The UIClassMap.
24
+ */
25
+ cm() {
26
+ return getClassMap();
27
+ }
28
+ /**
29
+ * The wrapper's class list (React's `cm.cn(cm.stack(6), className)`).
30
+ * @returns The class string.
31
+ */
32
+ classes() {
33
+ return this.cm().cn(this.cm().stack(6), this.className);
34
+ }
35
+ static ɵfac = function SettingsContent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SettingsContent)(); };
36
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SettingsContent, selectors: [["div", "mol-settings-content", ""]], hostVars: 2, hostBindings: function SettingsContent_HostBindings(rf, ctx) { if (rf & 2) {
37
+ i0.ɵɵclassMap(ctx.classes());
38
+ } }, inputs: { className: "className" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function SettingsContent_Template(rf, ctx) { if (rf & 1) {
39
+ i0.ɵɵprojectionDef();
40
+ i0.ɵɵprojection(0);
41
+ } }, encapsulation: 2 });
42
+ }
43
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SettingsContent, [{
44
+ type: Component,
45
+ args: [{
46
+ selector: 'div[mol-settings-content]',
47
+ standalone: true,
48
+ inputs: ['className'],
49
+ host: {
50
+ '[class]': 'classes()',
51
+ },
52
+ template: `<ng-content></ng-content>`,
53
+ }]
54
+ }], null, null); })();
55
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SettingsContent, { className: "SettingsContent", filePath: "settings-content.component.ts", lineNumber: 29 }); })();
56
+ //# sourceMappingURL=settings-content.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-content.component.js","sourceRoot":"","sources":["../src/settings-content.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;AAE9C;;;;;;;GAOG;AAUH,MAAM,OAAO,eAAe;IAC1B,qBAAqB;IACrB,SAAS,CAAS;IAElB;;;OAGG;IACH,EAAE;QACA,OAAO,WAAW,EAAE,CAAA;IACtB,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACzD,CAAC;yGAlBU,eAAe;6DAAf,eAAe;YAAf,cAAA,aAAS,CAAM;;;YAFf,kBAAyB;;;iFAEzB,eAAe;cAT3B,SAAS;eAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,WAAW,CAAC;gBACrB,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,eAAe"}
@@ -0,0 +1,59 @@
1
+ import { type TemplateRef } from '@angular/core';
2
+ import type { UIClassMap } from '@molecule/app-ui';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Two-column settings-page scaffold.
6
+ *
7
+ * Sidebar on the left, content on the right, optional (non-sticky) header
8
+ * above both. The host IS the outer `<div>` (`div[mol-settings-layout]`),
9
+ * matching React's root exactly. Node props are projected content:
10
+ * `[slot=header]` lands above the columns, `[slot=sidebar]` inside the
11
+ * `<aside>`, and everything else in the main content column.
12
+ */
13
+ export declare class SettingsLayout {
14
+ /** Optional header (breadcrumb, title, save button) — a template or projected `[slot=header]` content. */
15
+ header?: unknown;
16
+ /** Extra classes on the outer wrapper. */
17
+ className?: string;
18
+ /** `data-mol-id` for AI-agent selectors. */
19
+ dataMolId?: string;
20
+ /**
21
+ * The current class map.
22
+ * @returns The UIClassMap.
23
+ */
24
+ cm(): UIClassMap;
25
+ /**
26
+ * The outer wrapper's class list (React's `cm.cn(cm.stack(4), className)`).
27
+ * @returns The class string.
28
+ */
29
+ classes(): string;
30
+ /**
31
+ * The header as a template, when the caller passed a node rather than
32
+ * projected content.
33
+ * @returns The header template, or null.
34
+ */
35
+ headerTemplate(): TemplateRef<unknown> | null;
36
+ /**
37
+ * The column row's class (`cm.flex({ align: 'start', gap: 'lg' })`).
38
+ * @returns The class string.
39
+ */
40
+ rowClasses(): string;
41
+ /**
42
+ * The sidebar column's class (`cm.shrink0`).
43
+ * @returns The class string.
44
+ */
45
+ asideClasses(): string;
46
+ /**
47
+ * The content column's class (`cm.flex1`).
48
+ * @returns The class string.
49
+ */
50
+ mainClasses(): string;
51
+ /**
52
+ * The content stack's class (`cm.stack(6)`).
53
+ * @returns The class string.
54
+ */
55
+ contentClasses(): string;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<SettingsLayout, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<SettingsLayout, "div[mol-settings-layout]", never, { "header": { "alias": "header"; "required": false; }; "className": { "alias": "className"; "required": false; }; "dataMolId": { "alias": "dataMolId"; "required": false; }; }, {}, never, ["[slot=header]", "[slot=sidebar]", "*"], true, never>;
58
+ }
59
+ //# sourceMappingURL=settings-layout.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-layout.component.d.ts","sourceRoot":"","sources":["../src/settings-layout.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAKlD;;;;;;;;GAQG;AACH,qBAYa,cAAc;IACzB,0GAA0G;IAC1G,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,cAAc,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI;IAI7C;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,WAAW,IAAI,MAAM;IAIrB;;;OAGG;IACH,cAAc,IAAI,MAAM;yCA7Db,cAAc;2CAAd,cAAc;CAgE1B"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * SettingsLayout component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { NgTemplateOutlet } from '@angular/common';
7
+ import { Component } from '@angular/core';
8
+ import { getClassMap } from '@molecule/app-ui';
9
+ import { isTemplate } from './slots.js';
10
+ import * as i0 from "@angular/core";
11
+ const _c0 = [[["", "slot", "header"]], [["", "slot", "sidebar"]], "*"];
12
+ const _c1 = ["[slot=header]", "[slot=sidebar]", "*"];
13
+ function SettingsLayout_Conditional_1_Template(rf, ctx) { if (rf & 1) {
14
+ i0.ɵɵelementContainer(0, 0);
15
+ } if (rf & 2) {
16
+ i0.ɵɵproperty("ngTemplateOutlet", ctx);
17
+ } }
18
+ /**
19
+ * Two-column settings-page scaffold.
20
+ *
21
+ * Sidebar on the left, content on the right, optional (non-sticky) header
22
+ * above both. The host IS the outer `<div>` (`div[mol-settings-layout]`),
23
+ * matching React's root exactly. Node props are projected content:
24
+ * `[slot=header]` lands above the columns, `[slot=sidebar]` inside the
25
+ * `<aside>`, and everything else in the main content column.
26
+ */
27
+ export class SettingsLayout {
28
+ /** Optional header (breadcrumb, title, save button) — a template or projected `[slot=header]` content. */
29
+ header;
30
+ /** Extra classes on the outer wrapper. */
31
+ className;
32
+ /** `data-mol-id` for AI-agent selectors. */
33
+ dataMolId;
34
+ /**
35
+ * The current class map.
36
+ * @returns The UIClassMap.
37
+ */
38
+ cm() {
39
+ return getClassMap();
40
+ }
41
+ /**
42
+ * The outer wrapper's class list (React's `cm.cn(cm.stack(4), className)`).
43
+ * @returns The class string.
44
+ */
45
+ classes() {
46
+ return this.cm().cn(this.cm().stack(4), this.className);
47
+ }
48
+ /**
49
+ * The header as a template, when the caller passed a node rather than
50
+ * projected content.
51
+ * @returns The header template, or null.
52
+ */
53
+ headerTemplate() {
54
+ return isTemplate(this.header) ? this.header : null;
55
+ }
56
+ /**
57
+ * The column row's class (`cm.flex({ align: 'start', gap: 'lg' })`).
58
+ * @returns The class string.
59
+ */
60
+ rowClasses() {
61
+ return this.cm().flex({ align: 'start', gap: 'lg' });
62
+ }
63
+ /**
64
+ * The sidebar column's class (`cm.shrink0`).
65
+ * @returns The class string.
66
+ */
67
+ asideClasses() {
68
+ return this.cm().cn(this.cm().shrink0);
69
+ }
70
+ /**
71
+ * The content column's class (`cm.flex1`).
72
+ * @returns The class string.
73
+ */
74
+ mainClasses() {
75
+ return this.cm().cn(this.cm().flex1);
76
+ }
77
+ /**
78
+ * The content stack's class (`cm.stack(6)`).
79
+ * @returns The class string.
80
+ */
81
+ contentClasses() {
82
+ return this.cm().cn(this.cm().stack(6));
83
+ }
84
+ static ɵfac = function SettingsLayout_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SettingsLayout)(); };
85
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SettingsLayout, selectors: [["div", "mol-settings-layout", ""]], hostVars: 3, hostBindings: function SettingsLayout_HostBindings(rf, ctx) { if (rf & 2) {
86
+ i0.ɵɵattribute("data-mol-id", ctx.dataMolId ?? null);
87
+ i0.ɵɵclassMap(ctx.classes());
88
+ } }, inputs: { header: "header", className: "className", dataMolId: "dataMolId" }, ngContentSelectors: _c1, decls: 8, vars: 9, consts: [[3, "ngTemplateOutlet"]], template: function SettingsLayout_Template(rf, ctx) { if (rf & 1) {
89
+ i0.ɵɵprojectionDef(_c0);
90
+ i0.ɵɵprojection(0);
91
+ i0.ɵɵconditionalCreate(1, SettingsLayout_Conditional_1_Template, 1, 1, "ng-container", 0);
92
+ i0.ɵɵelementStart(2, "div")(3, "aside");
93
+ i0.ɵɵprojection(4, 1);
94
+ i0.ɵɵelementEnd();
95
+ i0.ɵɵelementStart(5, "main")(6, "div");
96
+ i0.ɵɵprojection(7, 2);
97
+ i0.ɵɵelementEnd()()();
98
+ } if (rf & 2) {
99
+ let tmp_0_0;
100
+ i0.ɵɵadvance();
101
+ i0.ɵɵconditional((tmp_0_0 = ctx.headerTemplate()) ? 1 : -1, tmp_0_0);
102
+ i0.ɵɵadvance();
103
+ i0.ɵɵclassMap(ctx.rowClasses());
104
+ i0.ɵɵadvance();
105
+ i0.ɵɵclassMap(ctx.asideClasses());
106
+ i0.ɵɵadvance(2);
107
+ i0.ɵɵclassMap(ctx.mainClasses());
108
+ i0.ɵɵadvance();
109
+ i0.ɵɵclassMap(ctx.contentClasses());
110
+ } }, dependencies: [NgTemplateOutlet], encapsulation: 2 });
111
+ }
112
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SettingsLayout, [{
113
+ type: Component,
114
+ args: [{
115
+ selector: 'div[mol-settings-layout]',
116
+ standalone: true,
117
+ imports: [NgTemplateOutlet],
118
+ inputs: ['header', 'className', 'dataMolId'],
119
+ host: {
120
+ '[class]': 'classes()',
121
+ '[attr.data-mol-id]': 'dataMolId ?? null',
122
+ },
123
+ // prettier-ignore
124
+ template: `<ng-content select="[slot=header]"></ng-content>@if (headerTemplate(); as headerTpl) {<ng-container [ngTemplateOutlet]="headerTpl" />}<div [class]="rowClasses()"><aside [class]="asideClasses()"><ng-content select="[slot=sidebar]"></ng-content></aside><main [class]="mainClasses()"><div [class]="contentClasses()"><ng-content></ng-content></div></main></div>`,
125
+ }]
126
+ }], null, null); })();
127
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SettingsLayout, { className: "SettingsLayout", filePath: "settings-layout.component.ts", lineNumber: 36 }); })();
128
+ //# sourceMappingURL=settings-layout.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-layout.component.js","sourceRoot":"","sources":["../src/settings-layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAoB,MAAM,eAAe,C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K,CAAC,CAAC,CAAC,CAAC,CAAA;IACzC,CAAC;wGA/DU,cAAc;6DAAd,cAAc;2DAAD,IAC1B;YADa,cAAA,aAAS,CAAK;;;YAFd,kBAAgD;YAAA,yFAAsC;YAA4E,AAA5B,2BAA4B,YAAgC;YAAA,qBAAiD;YAAA,iBAAQ;YAA8B,AAA9B,4BAA8B,UAAgC;YAAA,qBAAyB;YAAa,AAAP,AAAN,iBAAM,EAAO,EAAM;;;YAArT,cAAsF;YAAtF,oEAAsF;YAAK,cAAsB;YAAtB,+BAAsB;YAAQ,cAAwB;YAAxB,iCAAwB;YAAgE,eAAuB;YAAvB,gCAAuB;YAAM,cAA0B;YAA1B,mCAA0B;4BAPzT,gBAAgB;;iFASf,cAAc;cAZ1B,SAAS;eAAC;gBACT,QAAQ,EAAE,0BAA0B;gBACpC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,gBAAgB,CAAC;gBAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC;gBAC5C,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,oBAAoB,EAAE,mBAAmB;iBAC1C;gBACD,kBAAkB;gBAClB,QAAQ,EAAE,uWAAuW;aAClX;;kFACY,cAAc"}
@@ -0,0 +1,130 @@
1
+ import { type AfterViewInit, type TemplateRef } from '@angular/core';
2
+ import type { UIClassMap } from '@molecule/app-ui';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * One configuration section inside a settings page.
6
+ *
7
+ * Card-wrapped, with a title / description header, body content and an
8
+ * optional footer action row. The host IS the Card `<div>`
9
+ * (`div[mol-settings-section]`), matching React's root exactly: the Card's
10
+ * `elevated` variant, `md` padding and the callers' `className` /
11
+ * `data-mol-id` are the host's. `title`, `description` and `footer` are
12
+ * projected content (`[slot=title]`, `[slot=description]`, `[slot=footer]`)
13
+ * or plain text; the optional regions render only when React would render
14
+ * them.
15
+ */
16
+ export declare class SettingsSection implements AfterViewInit {
17
+ /** Section heading — a projected node template, or plain text. */
18
+ title?: unknown;
19
+ /** Optional description under the heading — a projected node template, or plain text. */
20
+ description?: unknown;
21
+ /** Section body, projected as the element's default content. */
22
+ children?: unknown;
23
+ /** Optional footer row — a projected node template, or plain text. */
24
+ footer?: unknown;
25
+ /** Extra classes on the Card. */
26
+ className?: string;
27
+ /** `data-mol-id` for AI-agent selectors. */
28
+ dataMolId?: string;
29
+ /** The optional description paragraph (projected content lands here; read once). */
30
+ private descriptionEl?;
31
+ /** The optional footer row (projected content lands here; read once). */
32
+ private footerEl?;
33
+ /** Whether a `[slot=description]` projection landed (`null`: decided by the text input). */
34
+ private readonly descriptionProjected;
35
+ /** Whether a `[slot=footer]` projection landed (`null`: decided by the text input). */
36
+ private readonly footerProjected;
37
+ /**
38
+ * Reads the optional regions' first render: when neither a text input nor
39
+ * projected content landed, React would not render the region at all, so the
40
+ * optimistic render is withdrawn.
41
+ */
42
+ ngAfterViewInit(): void;
43
+ /**
44
+ * The current class map.
45
+ * @returns The UIClassMap.
46
+ */
47
+ cm(): UIClassMap;
48
+ /**
49
+ * Renders a text value the way React renders a node string.
50
+ * @param value - The prop value.
51
+ * @returns The text to render, or `''` when there is nothing.
52
+ */
53
+ textOf(value: unknown): string;
54
+ /**
55
+ * The host's class list — Card's own computation with React's defaults
56
+ * (`elevated` variant, `md` padding) and the caller's `className`.
57
+ * @returns The class string.
58
+ */
59
+ classes(): string;
60
+ /**
61
+ * The body stack's class (`cm.stack(4)`).
62
+ * @returns The class string.
63
+ */
64
+ innerClasses(): string;
65
+ /**
66
+ * The header's class (`cm.stack(1)`).
67
+ * @returns The class string.
68
+ */
69
+ headerClasses(): string;
70
+ /**
71
+ * The title's class list (`cm.cn(cm.textSize('lg'), cm.fontWeight('semibold'))`).
72
+ * @returns The class string.
73
+ */
74
+ titleClasses(): string;
75
+ /**
76
+ * The description's class (`cm.textSize('sm')`).
77
+ * @returns The class string.
78
+ */
79
+ descriptionClasses(): string;
80
+ /**
81
+ * The footer row's class (`cm.flex({ justify: 'end', align: 'center', gap: 'sm' })`).
82
+ * @returns The class string.
83
+ */
84
+ footerClasses(): string;
85
+ /**
86
+ * The title as a template, when the caller passed a node.
87
+ * @returns The title template, or null.
88
+ */
89
+ titleTemplate(): TemplateRef<unknown> | null;
90
+ /**
91
+ * The description as a template, when the caller passed a node.
92
+ * @returns The description template, or null.
93
+ */
94
+ descriptionTemplate(): TemplateRef<unknown> | null;
95
+ /**
96
+ * The footer as a template, when the caller passed a node.
97
+ * @returns The footer template, or null.
98
+ */
99
+ footerTemplate(): TemplateRef<unknown> | null;
100
+ /**
101
+ * Whether the title input renders as text (React renders strings and numbers).
102
+ * @returns True when the title is text.
103
+ */
104
+ hasTitleText(): boolean;
105
+ /**
106
+ * Whether the description input renders as truthy text (React's `description && …`).
107
+ * @returns True when the description text renders.
108
+ */
109
+ hasDescriptionText(): boolean;
110
+ /**
111
+ * Whether the footer input renders as truthy text (React's `footer && …`).
112
+ * @returns True when the footer text renders.
113
+ */
114
+ hasFooterText(): boolean;
115
+ /**
116
+ * Whether the description paragraph renders: React's `description && …` on
117
+ * the text input, a template, or projected content.
118
+ * @returns True when the paragraph shows.
119
+ */
120
+ showDescription(): boolean;
121
+ /**
122
+ * Whether the footer row renders: React's `footer && …` on the text input, a
123
+ * template, or projected content.
124
+ * @returns True when the footer shows.
125
+ */
126
+ showFooter(): boolean;
127
+ static ɵfac: i0.ɵɵFactoryDeclaration<SettingsSection, never>;
128
+ static ɵcmp: i0.ɵɵComponentDeclaration<SettingsSection, "div[mol-settings-section]", never, { "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; "className": { "alias": "className"; "required": false; }; "dataMolId": { "alias": "dataMolId"; "required": false; }; }, {}, never, ["[slot=title]", "[slot=description]", "*", "[slot=footer]"], true, never>;
129
+ }
130
+ //# sourceMappingURL=settings-section.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-section.component.d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