@molecule/app-settings-panel-vue 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.
- package/LICENSE +202 -0
- package/README.md +781 -2
- package/dist/AccountSection.d.ts +23 -0
- package/dist/AccountSection.d.ts.map +1 -0
- package/dist/AccountSection.js +139 -0
- package/dist/AccountSection.js.map +1 -0
- package/dist/AppearanceSection.d.ts +20 -0
- package/dist/AppearanceSection.d.ts.map +1 -0
- package/dist/AppearanceSection.js +47 -0
- package/dist/AppearanceSection.js.map +1 -0
- package/dist/AuthSection.d.ts +30 -0
- package/dist/AuthSection.d.ts.map +1 -0
- package/dist/AuthSection.js +320 -0
- package/dist/AuthSection.js.map +1 -0
- package/dist/BillingSection.d.ts +51 -0
- package/dist/BillingSection.d.ts.map +1 -0
- package/dist/BillingSection.js +84 -0
- package/dist/BillingSection.js.map +1 -0
- package/dist/DevicesSection.d.ts +52 -0
- package/dist/DevicesSection.d.ts.map +1 -0
- package/dist/DevicesSection.js +171 -0
- package/dist/DevicesSection.js.map +1 -0
- package/dist/LogOutDeleteSection.d.ts +22 -0
- package/dist/LogOutDeleteSection.d.ts.map +1 -0
- package/dist/LogOutDeleteSection.js +129 -0
- package/dist/LogOutDeleteSection.js.map +1 -0
- package/dist/NotificationsSection.d.ts +27 -0
- package/dist/NotificationsSection.d.ts.map +1 -0
- package/dist/NotificationsSection.js +148 -0
- package/dist/NotificationsSection.js.map +1 -0
- package/dist/SettingsContainer.d.ts +39 -0
- package/dist/SettingsContainer.d.ts.map +1 -0
- package/dist/SettingsContainer.js +48 -0
- package/dist/SettingsContainer.js.map +1 -0
- package/dist/ThisDeviceSection.d.ts +21 -0
- package/dist/ThisDeviceSection.d.ts.map +1 -0
- package/dist/ThisDeviceSection.js +57 -0
- package/dist/ThisDeviceSection.js.map +1 -0
- package/dist/TiersUpgradeSection.d.ts +56 -0
- package/dist/TiersUpgradeSection.d.ts.map +1 -0
- package/dist/TiersUpgradeSection.js +218 -0
- package/dist/TiersUpgradeSection.js.map +1 -0
- package/dist/context.d.ts +25 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +20 -0
- package/dist/context.js.map +1 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +95 -0
- package/dist/index.js.map +1 -0
- package/dist/pushToggle.d.ts +12 -0
- package/dist/pushToggle.d.ts.map +1 -0
- package/dist/pushToggle.js +11 -0
- package/dist/pushToggle.js.map +1 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +72 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Context published by `<SettingsContainer>` to its children.
|
|
4
|
+
*
|
|
5
|
+
* The container owns the dismiss-the-panel handler; sub-components
|
|
6
|
+
* that need to close after an action (logout, delete account, email
|
|
7
|
+
* error) read it from context rather than threading the prop down.
|
|
8
|
+
*/
|
|
9
|
+
export interface SettingsPanelContextValue {
|
|
10
|
+
/** Dismisses the settings panel; `<SettingsContainer>` receives it as a prop. */
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Vue injection key for the settings panel context, published by
|
|
15
|
+
* `<SettingsContainer>`; consume via `useSettingsPanelContext`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SettingsPanelContext: InjectionKey<SettingsPanelContextValue>;
|
|
18
|
+
/**
|
|
19
|
+
* Reads the `onClose` handler exposed by the parent `<SettingsContainer>`.
|
|
20
|
+
* Throws if used outside the container so component misuse is loud.
|
|
21
|
+
*
|
|
22
|
+
* @returns The container's context value.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useSettingsPanelContext(): SettingsPanelContextValue;
|
|
25
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAE/C;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,yBAAyB,CACtC,CAAA;AAEnC;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,yBAAyB,CAQnE"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Vue injection key for the settings panel context, published by
|
|
4
|
+
* `<SettingsContainer>`; consume via `useSettingsPanelContext`.
|
|
5
|
+
*/
|
|
6
|
+
export const SettingsPanelContext = Symbol('molecule-settings-panel');
|
|
7
|
+
/**
|
|
8
|
+
* Reads the `onClose` handler exposed by the parent `<SettingsContainer>`.
|
|
9
|
+
* Throws if used outside the container so component misuse is loud.
|
|
10
|
+
*
|
|
11
|
+
* @returns The container's context value.
|
|
12
|
+
*/
|
|
13
|
+
export function useSettingsPanelContext() {
|
|
14
|
+
const value = inject(SettingsPanelContext, null);
|
|
15
|
+
if (!value) {
|
|
16
|
+
throw new Error('Settings panel section components must be rendered inside <SettingsContainer>.');
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,KAAK,CAAA;AAc/C;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,MAAM,CAAC,yBAAyB,CAAC,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,KAAK,GAAG,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAA;IAChD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@molecule/app-settings-panel-vue` — the Vue counterpart of
|
|
3
|
+
* `@molecule/app-settings-panel-react`: a composable, batteries-included
|
|
4
|
+
* settings panel with the same props (React names), the same DOM for the
|
|
5
|
+
* same input, and the same callbacks and service calls.
|
|
6
|
+
*
|
|
7
|
+
* `<SettingsContainer onClose={…}>` owns the layout and publishes `onClose`
|
|
8
|
+
* via Vue injection; each section component is independent and loads its own
|
|
9
|
+
* data through `@molecule/app-vue` composables:
|
|
10
|
+
* - `<AccountSection>` — name/email edit (`PATCH /api/users/:id`).
|
|
11
|
+
* - `<AppearanceSection>` — dark-mode toggle (`useTheme()`).
|
|
12
|
+
* - `<AuthSection>` — password change + TOTP two-factor
|
|
13
|
+
* (`POST /api/users/:id/verify-two-factor`).
|
|
14
|
+
* - `<NotificationsSection>` — web-push toggle (see the exported
|
|
15
|
+
* `enablePushOnCurrentDevice` / `disablePushOnCurrentDevice` helpers and
|
|
16
|
+
* their documented device-row contract).
|
|
17
|
+
* - `<BillingSection>` — read-only plan display (`GET /api/billing/status`),
|
|
18
|
+
* or `<TiersUpgradeSection>` — full Stripe upgrade/cancel flow
|
|
19
|
+
* (`/api/billing/tiers|checkout|cancel`). Use one or the other, not both.
|
|
20
|
+
* - `<DevicesSection>` / `<ThisDeviceSection>` — device list + current
|
|
21
|
+
* device (`GET/DELETE /api/devices`).
|
|
22
|
+
* - `<LogOutDeleteSection>` — sign out + delete account
|
|
23
|
+
* (`DELETE /api/users/:id`).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { createApp, defineComponent, h } from 'vue'
|
|
28
|
+
* import {
|
|
29
|
+
* AccountSection,
|
|
30
|
+
* AppearanceSection,
|
|
31
|
+
* AuthSection,
|
|
32
|
+
* BillingSection,
|
|
33
|
+
* DevicesSection,
|
|
34
|
+
* LogOutDeleteSection,
|
|
35
|
+
* NotificationsSection,
|
|
36
|
+
* SettingsContainer,
|
|
37
|
+
* ThisDeviceSection,
|
|
38
|
+
* TiersUpgradeSection,
|
|
39
|
+
* } from '@molecule/app-settings-panel-vue'
|
|
40
|
+
*
|
|
41
|
+
* const SettingsPanel = defineComponent({
|
|
42
|
+
* props: { onClose: { type: Function, required: true } },
|
|
43
|
+
* setup(props) {
|
|
44
|
+
* return () =>
|
|
45
|
+
* h(SettingsContainer, { onClose: props.onClose }, {
|
|
46
|
+
* default: () => [
|
|
47
|
+
* h(AccountSection),
|
|
48
|
+
* h(AppearanceSection),
|
|
49
|
+
* h(AuthSection),
|
|
50
|
+
* h(NotificationsSection),
|
|
51
|
+
* h(BillingSection),
|
|
52
|
+
* h(DevicesSection),
|
|
53
|
+
* h(ThisDeviceSection),
|
|
54
|
+
* h(LogOutDeleteSection),
|
|
55
|
+
* ],
|
|
56
|
+
* })
|
|
57
|
+
* },
|
|
58
|
+
* })
|
|
59
|
+
*
|
|
60
|
+
* createApp(SettingsPanel).mount('#app')
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* - Wiring prereqs: sections need the standard `@molecule/app-vue` plugin
|
|
65
|
+
* stack — `moleculePlugin` installed with `i18n`, `http` (authenticated
|
|
66
|
+
* client), `auth`, `theme` (AppearanceSection), and the push + device
|
|
67
|
+
* providers bonded (`@molecule/app-push` / `@molecule/app-device`,
|
|
68
|
+
* NotificationsSection/ThisDeviceSection) — plus a bonded ClassMap.
|
|
69
|
+
* `<BillingSection>` and `<LogOutDeleteSection>` also navigate through the
|
|
70
|
+
* binding's `useRouter()` and throw outside it.
|
|
71
|
+
* - Section components throw if rendered outside `<SettingsContainer>`
|
|
72
|
+
* (they read its injection for `onClose`).
|
|
73
|
+
* - Server contract: the molecule API surface from
|
|
74
|
+
* `@molecule/api-resource-user`, `@molecule/api-resource-device`,
|
|
75
|
+
* `@molecule/api-two-factor`, and the billing endpoints
|
|
76
|
+
* (`/api/billing/*`) wired by the payments stack. Missing read endpoints
|
|
77
|
+
* degrade gracefully (sections render empty); the mutating actions do not.
|
|
78
|
+
* - Translations: `@molecule/app-locales-settings-panel` companion bond.
|
|
79
|
+
*
|
|
80
|
+
* @module
|
|
81
|
+
*/
|
|
82
|
+
export * from './AccountSection.js';
|
|
83
|
+
export * from './AppearanceSection.js';
|
|
84
|
+
export * from './AuthSection.js';
|
|
85
|
+
export * from './BillingSection.js';
|
|
86
|
+
export * from './context.js';
|
|
87
|
+
export * from './DevicesSection.js';
|
|
88
|
+
export * from './LogOutDeleteSection.js';
|
|
89
|
+
export * from './NotificationsSection.js';
|
|
90
|
+
export * from './pushToggle.js';
|
|
91
|
+
export * from './SettingsContainer.js';
|
|
92
|
+
export * from './ThisDeviceSection.js';
|
|
93
|
+
export * from './TiersUpgradeSection.js';
|
|
94
|
+
export * from './types.js';
|
|
95
|
+
//# 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,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,YAAY,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@molecule/app-settings-panel-vue` — the Vue counterpart of
|
|
3
|
+
* `@molecule/app-settings-panel-react`: a composable, batteries-included
|
|
4
|
+
* settings panel with the same props (React names), the same DOM for the
|
|
5
|
+
* same input, and the same callbacks and service calls.
|
|
6
|
+
*
|
|
7
|
+
* `<SettingsContainer onClose={…}>` owns the layout and publishes `onClose`
|
|
8
|
+
* via Vue injection; each section component is independent and loads its own
|
|
9
|
+
* data through `@molecule/app-vue` composables:
|
|
10
|
+
* - `<AccountSection>` — name/email edit (`PATCH /api/users/:id`).
|
|
11
|
+
* - `<AppearanceSection>` — dark-mode toggle (`useTheme()`).
|
|
12
|
+
* - `<AuthSection>` — password change + TOTP two-factor
|
|
13
|
+
* (`POST /api/users/:id/verify-two-factor`).
|
|
14
|
+
* - `<NotificationsSection>` — web-push toggle (see the exported
|
|
15
|
+
* `enablePushOnCurrentDevice` / `disablePushOnCurrentDevice` helpers and
|
|
16
|
+
* their documented device-row contract).
|
|
17
|
+
* - `<BillingSection>` — read-only plan display (`GET /api/billing/status`),
|
|
18
|
+
* or `<TiersUpgradeSection>` — full Stripe upgrade/cancel flow
|
|
19
|
+
* (`/api/billing/tiers|checkout|cancel`). Use one or the other, not both.
|
|
20
|
+
* - `<DevicesSection>` / `<ThisDeviceSection>` — device list + current
|
|
21
|
+
* device (`GET/DELETE /api/devices`).
|
|
22
|
+
* - `<LogOutDeleteSection>` — sign out + delete account
|
|
23
|
+
* (`DELETE /api/users/:id`).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { createApp, defineComponent, h } from 'vue'
|
|
28
|
+
* import {
|
|
29
|
+
* AccountSection,
|
|
30
|
+
* AppearanceSection,
|
|
31
|
+
* AuthSection,
|
|
32
|
+
* BillingSection,
|
|
33
|
+
* DevicesSection,
|
|
34
|
+
* LogOutDeleteSection,
|
|
35
|
+
* NotificationsSection,
|
|
36
|
+
* SettingsContainer,
|
|
37
|
+
* ThisDeviceSection,
|
|
38
|
+
* TiersUpgradeSection,
|
|
39
|
+
* } from '@molecule/app-settings-panel-vue'
|
|
40
|
+
*
|
|
41
|
+
* const SettingsPanel = defineComponent({
|
|
42
|
+
* props: { onClose: { type: Function, required: true } },
|
|
43
|
+
* setup(props) {
|
|
44
|
+
* return () =>
|
|
45
|
+
* h(SettingsContainer, { onClose: props.onClose }, {
|
|
46
|
+
* default: () => [
|
|
47
|
+
* h(AccountSection),
|
|
48
|
+
* h(AppearanceSection),
|
|
49
|
+
* h(AuthSection),
|
|
50
|
+
* h(NotificationsSection),
|
|
51
|
+
* h(BillingSection),
|
|
52
|
+
* h(DevicesSection),
|
|
53
|
+
* h(ThisDeviceSection),
|
|
54
|
+
* h(LogOutDeleteSection),
|
|
55
|
+
* ],
|
|
56
|
+
* })
|
|
57
|
+
* },
|
|
58
|
+
* })
|
|
59
|
+
*
|
|
60
|
+
* createApp(SettingsPanel).mount('#app')
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* - Wiring prereqs: sections need the standard `@molecule/app-vue` plugin
|
|
65
|
+
* stack — `moleculePlugin` installed with `i18n`, `http` (authenticated
|
|
66
|
+
* client), `auth`, `theme` (AppearanceSection), and the push + device
|
|
67
|
+
* providers bonded (`@molecule/app-push` / `@molecule/app-device`,
|
|
68
|
+
* NotificationsSection/ThisDeviceSection) — plus a bonded ClassMap.
|
|
69
|
+
* `<BillingSection>` and `<LogOutDeleteSection>` also navigate through the
|
|
70
|
+
* binding's `useRouter()` and throw outside it.
|
|
71
|
+
* - Section components throw if rendered outside `<SettingsContainer>`
|
|
72
|
+
* (they read its injection for `onClose`).
|
|
73
|
+
* - Server contract: the molecule API surface from
|
|
74
|
+
* `@molecule/api-resource-user`, `@molecule/api-resource-device`,
|
|
75
|
+
* `@molecule/api-two-factor`, and the billing endpoints
|
|
76
|
+
* (`/api/billing/*`) wired by the payments stack. Missing read endpoints
|
|
77
|
+
* degrade gracefully (sections render empty); the mutating actions do not.
|
|
78
|
+
* - Translations: `@molecule/app-locales-settings-panel` companion bond.
|
|
79
|
+
*
|
|
80
|
+
* @module
|
|
81
|
+
*/
|
|
82
|
+
export * from './AccountSection.js';
|
|
83
|
+
export * from './AppearanceSection.js';
|
|
84
|
+
export * from './AuthSection.js';
|
|
85
|
+
export * from './BillingSection.js';
|
|
86
|
+
export * from './context.js';
|
|
87
|
+
export * from './DevicesSection.js';
|
|
88
|
+
export * from './LogOutDeleteSection.js';
|
|
89
|
+
export * from './NotificationsSection.js';
|
|
90
|
+
export * from './pushToggle.js';
|
|
91
|
+
export * from './SettingsContainer.js';
|
|
92
|
+
export * from './ThisDeviceSection.js';
|
|
93
|
+
export * from './TiersUpgradeSection.js';
|
|
94
|
+
export * from './types.js';
|
|
95
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The current-device push toggle behind {@link NotificationsSection}: the
|
|
3
|
+
* full enable/disable chain — permission → runtime VAPID key fetch →
|
|
4
|
+
* subscribe → persist on the device row. It lives in `@molecule/app-push`
|
|
5
|
+
* (`device-toggle.ts`, with the server contract) so every framework's
|
|
6
|
+
* settings panel runs the same functions; this package re-exports them.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export type { PushToggleDevice, PushToggleFailureReason, PushToggleHttp, PushToggleResult, PushToggleToken, } from '@molecule/app-push';
|
|
11
|
+
export { disablePushOnCurrentDevice, enablePushOnCurrentDevice, findCurrentDevice, readCurrentDevicePushEnabled, subscriptionFromToken, } from '@molecule/app-push';
|
|
12
|
+
//# sourceMappingURL=pushToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushToggle.d.ts","sourceRoot":"","sources":["../src/pushToggle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,eAAe,GAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The current-device push toggle behind {@link NotificationsSection}: the
|
|
3
|
+
* full enable/disable chain — permission → runtime VAPID key fetch →
|
|
4
|
+
* subscribe → persist on the device row. It lives in `@molecule/app-push`
|
|
5
|
+
* (`device-toggle.ts`, with the server contract) so every framework's
|
|
6
|
+
* settings panel runs the same functions; this package re-exports them.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export { disablePushOnCurrentDevice, enablePushOnCurrentDevice, findCurrentDevice, readCurrentDevicePushEnabled, subscriptionFromToken, } from '@molecule/app-push';
|
|
11
|
+
//# sourceMappingURL=pushToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushToggle.js","sourceRoot":"","sources":["../src/pushToggle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,oBAAoB,CAAA"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Vue settings panel.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/** A user's registered device (subset rendered in the settings list). */
|
|
7
|
+
export interface Device {
|
|
8
|
+
/** The device row's id (names the revoke request URL). */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The device's display name (a blank name falls back to the platform). */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The device's platform label. */
|
|
13
|
+
platform: string;
|
|
14
|
+
/** When the device was last seen, as the API renders it. */
|
|
15
|
+
lastSeen?: string;
|
|
16
|
+
/** `true` for the device making the current request (the API marks it). */
|
|
17
|
+
isCurrent?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Props for the {@link TiersUpgradeSection} component. */
|
|
20
|
+
export interface TiersUpgradeSectionProps {
|
|
21
|
+
/**
|
|
22
|
+
* How the page leaves for the checkout URL the server returns. Defaults to a
|
|
23
|
+
* full-page navigation (`openUrl` from `@molecule/app-utilities`).
|
|
24
|
+
*/
|
|
25
|
+
redirectToCheckout?: (checkoutUrl: string) => void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,yEAAyE;AACzE,MAAM,WAAW,MAAM;IACrB,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAA;IACV,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,2DAA2D;AAC3D,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CACnD"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-settings-panel-vue",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Composable settings panel — a SettingsContainer + family of section sub-components (Account, Auth, Notifications, Billing, Devices, ThisDevice, LogOutDelete). Apps compose via the default slot, picking which sections to include and what order.",
|
|
5
|
+
"homepage": "https://www.molecule.dev/packages/app-settings-panel-vue",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"dev": "vue-tsc --watch",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test:watch": "vitest"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"molecule",
|
|
27
|
+
"settings",
|
|
28
|
+
"panel",
|
|
29
|
+
"vue"
|
|
30
|
+
],
|
|
31
|
+
"author": "Molecule Dev, Inc. (https://molecule.dev)",
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/molecule-dev/molecule.git",
|
|
36
|
+
"directory": "packages/app/features/settings-panel-vue"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20"
|
|
40
|
+
},
|
|
41
|
+
"bugs": "https://github.com/molecule-dev/molecule/issues",
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@molecule/app-auth": "^3.0.0",
|
|
47
|
+
"@molecule/app-http": "^1.8.0",
|
|
48
|
+
"@molecule/app-push": "^1.1.0",
|
|
49
|
+
"@molecule/app-ui": "^1.0.1",
|
|
50
|
+
"@molecule/app-ui-vue": "^1.1.0",
|
|
51
|
+
"@molecule/app-utilities": "^1.0.6",
|
|
52
|
+
"@molecule/app-vue": "^3.5.0",
|
|
53
|
+
"vue": "^3.4.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@molecule/app-auth": "3.4.2",
|
|
57
|
+
"@molecule/app-framework-conformance": "0.0.0",
|
|
58
|
+
"@molecule/app-http": "1.8.0",
|
|
59
|
+
"@molecule/app-i18n": "1.2.1",
|
|
60
|
+
"@molecule/app-icons": "1.0.4",
|
|
61
|
+
"@molecule/app-push": "1.1.0",
|
|
62
|
+
"@molecule/app-ui": "1.3.11",
|
|
63
|
+
"@molecule/app-ui-vue": "1.1.2",
|
|
64
|
+
"@molecule/app-utilities": "1.0.6",
|
|
65
|
+
"@molecule/app-vue": "3.6.0",
|
|
66
|
+
"@types/node": "26.6.5",
|
|
67
|
+
"jsdom": "30.1.3",
|
|
68
|
+
"typescript": "6.0.3",
|
|
69
|
+
"vite": "8.3.5",
|
|
70
|
+
"vitest": "4.1.12",
|
|
71
|
+
"vue": "3.5.44",
|
|
72
|
+
"vue-tsc": "3.3.13"
|
|
73
|
+
}
|
|
74
|
+
}
|