@molecule/app-angular 3.8.0 → 3.10.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/README.md +201 -53
- package/dist/hooks/use-ide.d.ts +10 -8
- package/dist/hooks/use-ide.d.ts.map +1 -1
- package/dist/hooks/use-ide.js.map +1 -1
- package/dist/hooks/use-router.d.ts +3 -1
- package/dist/hooks/use-router.d.ts.map +1 -1
- package/dist/hooks/use-router.js +9 -3
- package/dist/hooks/use-router.js.map +1 -1
- package/dist/hooks/use-translation.d.ts +18 -2
- package/dist/hooks/use-translation.d.ts.map +1 -1
- package/dist/hooks/use-translation.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/inject.d.ts +1 -1
- package/dist/inject.d.ts.map +1 -1
- package/dist/inject.js +0 -4
- package/dist/inject.js.map +1 -1
- package/dist/link.d.ts +15 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js.map +1 -1
- package/dist/providers.d.ts +11 -3
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +26 -5
- package/dist/providers.js.map +1 -1
- package/dist/routed-view-token.d.ts +18 -0
- package/dist/routed-view-token.d.ts.map +1 -0
- package/dist/routed-view-token.js +25 -0
- package/dist/routed-view-token.js.map +1 -0
- package/dist/routed-view.d.ts +43 -0
- package/dist/routed-view.d.ts.map +1 -0
- package/dist/routed-view.js +65 -0
- package/dist/routed-view.js.map +1 -0
- package/dist/session-ready.d.ts +15 -2
- package/dist/session-ready.d.ts.map +1 -1
- package/dist/session-ready.js +4 -3
- package/dist/session-ready.js.map +1 -1
- package/dist/types.d.ts +12 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -1
package/dist/index.js
CHANGED
|
@@ -75,11 +75,10 @@
|
|
|
75
75
|
* `user` can be null. A restore failure other than 401/403 never signs out.
|
|
76
76
|
* `provideMolecule({ auth })` starts the bundled client's restore when a
|
|
77
77
|
* consumer first reads the session, so the app entry can mount its root without
|
|
78
|
-
* calling `initialize()`.
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* undecided.
|
|
78
|
+
* calling `initialize()`. It holds bootstrap — and so every page's first
|
|
79
|
+
* render — while a token-only or cookie-only restore is undecided; a cached
|
|
80
|
+
* token and user, and a visitor without a session candidate, settle at once.
|
|
81
|
+
* Pass `awaitSession: false` to render before the restore settles.
|
|
83
82
|
*
|
|
84
83
|
* @remarks
|
|
85
84
|
* - Peer requirements: Angular 22 (`@angular/core` is pinned to 22.0.0) and
|
|
@@ -110,6 +109,7 @@ export * from './i18n-reactive.js';
|
|
|
110
109
|
export * from './link.js';
|
|
111
110
|
export * from './maybe-signal.js';
|
|
112
111
|
export * from './providers.js';
|
|
112
|
+
export * from './routed-view.js';
|
|
113
113
|
export * from './services/index.js';
|
|
114
114
|
export * from './session-ready.js';
|
|
115
115
|
export * from './tokens.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuGG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
package/dist/inject.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type InjectionToken } from '@angular/core';
|
|
|
9
9
|
* an injection token (the React hook's error-key suffix; the full key is
|
|
10
10
|
* `angular.error.<key>`).
|
|
11
11
|
*/
|
|
12
|
-
export type ProviderErrorKey = 'useAuthOutsideProvider' | 'useEditorOutsideProvider' | 'useHttpOutsideProvider' | 'useLoggerOutsideProvider' | 'usePreviewOutsideProvider' | '
|
|
12
|
+
export type ProviderErrorKey = 'useAuthOutsideProvider' | 'useEditorOutsideProvider' | 'useHttpOutsideProvider' | 'useLoggerOutsideProvider' | 'usePreviewOutsideProvider' | 'useStorageOutsideProvider' | 'useThemeOutsideProvider' | 'useWorkspaceOutsideProvider';
|
|
13
13
|
/**
|
|
14
14
|
* Reads a service token registered by `provideMolecule` (or a `provide*`
|
|
15
15
|
* helper), throwing React's provider-missing error when it is absent.
|
package/dist/inject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AAI3D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,0BAA0B,GAC1B,wBAAwB,GACxB,0BAA0B,GAC1B,2BAA2B,GAC3B,
|
|
1
|
+
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AAI3D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,0BAA0B,GAC1B,wBAAwB,GACxB,0BAA0B,GAC1B,2BAA2B,GAC3B,2BAA2B,GAC3B,yBAAyB,GACzB,6BAA6B,CAAA;AAgDjC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,GAAG,CAAC,CAMpF"}
|
package/dist/inject.js
CHANGED
|
@@ -36,10 +36,6 @@ const providerErrorMessage = (key) => {
|
|
|
36
36
|
return t('angular.error.usePreviewOutsideProvider', undefined, {
|
|
37
37
|
defaultValue: 'usePreviewProvider must be used within a PreviewProvider',
|
|
38
38
|
});
|
|
39
|
-
case 'useRouterOutsideProvider':
|
|
40
|
-
return t('angular.error.useRouterOutsideProvider', undefined, {
|
|
41
|
-
defaultValue: 'useRouterInstance must be used within a RouterProvider',
|
|
42
|
-
});
|
|
43
39
|
case 'useStorageOutsideProvider':
|
|
44
40
|
return t('angular.error.useStorageOutsideProvider', undefined, {
|
|
45
41
|
defaultValue: 'useStorageProvider must be used within a StorageProvider',
|
package/dist/inject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAuB,MAAM,eAAe,CAAA;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAuB,MAAM,eAAe,CAAA;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AAiBtC;;;;;;;;GAQG;AACH,MAAM,oBAAoB,GAAG,CAAC,GAAqB,EAAU,EAAE;IAC7D,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,wBAAwB;YAC3B,OAAO,CAAC,CAAC,sCAAsC,EAAE,SAAS,EAAE;gBAC1D,YAAY,EAAE,mDAAmD;aAClE,CAAC,CAAA;QACJ,KAAK,0BAA0B;YAC7B,OAAO,CAA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Init } from '@angular/core';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* The inputs {@link Link} takes: `@molecule/app-react`'s `LinkProps` for an
|
|
11
|
+
* Angular directive. React's `to` is the directive's own attribute,
|
|
12
|
+
* `molLink`; every other anchor attribute (`class`, `target`, `rel`) is
|
|
13
|
+
* written on the `<a>` as usual.
|
|
14
|
+
*/
|
|
15
|
+
export interface LinkProps {
|
|
16
|
+
/** The destination: an app path or a URL (React's `to`). */
|
|
17
|
+
molLink: string;
|
|
18
|
+
/** Replace the current history entry instead of pushing one. */
|
|
19
|
+
replace?: boolean;
|
|
20
|
+
/** State stored with the new history entry. */
|
|
21
|
+
state?: unknown;
|
|
22
|
+
}
|
|
9
23
|
/**
|
|
10
24
|
* `<a molLink="/settings">`: sets the anchor's `href` and navigates in-app
|
|
11
25
|
* through the molecule router, with react-router `<Link>`'s rules
|
|
@@ -40,7 +54,7 @@ import * as i0 from "@angular/core";
|
|
|
40
54
|
* export class NavComponent {}
|
|
41
55
|
* ```
|
|
42
56
|
*/
|
|
43
|
-
export declare class Link implements OnInit {
|
|
57
|
+
export declare class Link implements OnInit, LinkProps {
|
|
44
58
|
/**
|
|
45
59
|
* The destination: an app path (`/settings?tab=billing#plan`) or a URL. An app path's `href` is
|
|
46
60
|
* the one the router writes for it (`routerLinkHref`), base path included.
|
package/dist/link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA6C,KAAK,MAAM,EAAa,MAAM,eAAe,CAAA;;AAMjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAMa,IAAK,YAAW,MAAM;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA6C,KAAK,MAAM,EAAa,MAAM,eAAe,CAAA;;AAMjG;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;IACf,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAMa,IAAK,YAAW,MAAM,EAAE,SAAS;IAC5C;;;OAGG;IACH,OAAO,SAAK;IACZ,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAE7C,0FAA0F;IAC1F,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoD;IAC5E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAEhD;;;;OAIG;IACH,QAAQ,IAAI,IAAI;yCA1BL,IAAI;2CAAJ,IAAI;CAmChB"}
|
package/dist/link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAe,SAAS,EAAE,MAAM,eAAe,CAAA;AAEjG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;;
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,SA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O,CAAC;gBACvC,IAAI,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE;aAChC"}
|
package/dist/providers.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import type { EnvironmentProviders } from '@angular/core';
|
|
6
|
+
import type { EnvironmentProviders, Type } from '@angular/core';
|
|
7
7
|
import type { ChatProvider } from '@molecule/app-ai-chat';
|
|
8
8
|
import type { AuthClient } from '@molecule/app-auth';
|
|
9
9
|
import type { EditorProvider } from '@molecule/app-code-editor';
|
|
@@ -41,10 +41,18 @@ export declare function provideTheme(provider: ThemeProvider): EnvironmentProvid
|
|
|
41
41
|
/**
|
|
42
42
|
* Registers a Router as an Angular environment provider for dependency injection.
|
|
43
43
|
*
|
|
44
|
-
* @param router -
|
|
44
|
+
* @param router - The router, or a function that returns it. The function runs once, in the
|
|
45
|
+
* environment injector's injection context, the first time the router is injected: a routing
|
|
46
|
+
* bond builds its router from the framework router it injects there.
|
|
47
|
+
* @param options - From a routing bond: its routed view (see `RoutedView`).
|
|
48
|
+
* @param options.routedView - The component that renders the matched child route where a layout
|
|
49
|
+
* or guard puts it. Left out when the bond has none, and `RoutedView` then throws an error saying
|
|
50
|
+
* so.
|
|
45
51
|
* @returns Environment providers
|
|
46
52
|
*/
|
|
47
|
-
export declare function provideRouter(router: Router)
|
|
53
|
+
export declare function provideRouter(router: Router | (() => Router), options?: {
|
|
54
|
+
routedView?: Type<unknown>;
|
|
55
|
+
}): EnvironmentProviders;
|
|
48
56
|
/**
|
|
49
57
|
* Registers an I18nProvider as an Angular environment provider for dependency injection.
|
|
50
58
|
*
|
package/dist/providers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAY,MAAM,eAAe,CAAA;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MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAC/B,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;CAAO,GAC3C,oBAAoB,CAOtB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,oBAAoB,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,oBAAoB,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,oBAAoB,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,oBAAoB,CAE5E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,oBAAoB,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,oBAAoB,CAElF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,oBAAoB,CAE5E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,oBAAoB,CAE9E;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB,CA+FlF"}
|
package/dist/providers.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { DestroyRef, inject, makeEnvironmentProviders, provideAppInitializer, provideEnvironmentInitializer, } from '@angular/core';
|
|
7
7
|
import { getProvider as getStateProvider, hasProvider as hasStateProvider, } from '@molecule/app-state';
|
|
8
8
|
import { bumpLocaleVersion } from './i18n-reactive.js';
|
|
9
|
+
import { ROUTED_VIEW } from './routed-view-token.js';
|
|
9
10
|
import { AUTH_CLIENT, CHAT_PROVIDER, EDITOR_PROVIDER, HTTP_CLIENT, I18N_PROVIDER, LOGGER_PROVIDER, PREVIEW_PROVIDER, ROUTER, STATE_PROVIDER, STORAGE_PROVIDER, THEME_PROVIDER, WORKSPACE_PROVIDER, } from './tokens.js';
|
|
10
11
|
/**
|
|
11
12
|
* Provide state management.
|
|
@@ -37,11 +38,22 @@ export function provideTheme(provider) {
|
|
|
37
38
|
/**
|
|
38
39
|
* Registers a Router as an Angular environment provider for dependency injection.
|
|
39
40
|
*
|
|
40
|
-
* @param router -
|
|
41
|
+
* @param router - The router, or a function that returns it. The function runs once, in the
|
|
42
|
+
* environment injector's injection context, the first time the router is injected: a routing
|
|
43
|
+
* bond builds its router from the framework router it injects there.
|
|
44
|
+
* @param options - From a routing bond: its routed view (see `RoutedView`).
|
|
45
|
+
* @param options.routedView - The component that renders the matched child route where a layout
|
|
46
|
+
* or guard puts it. Left out when the bond has none, and `RoutedView` then throws an error saying
|
|
47
|
+
* so.
|
|
41
48
|
* @returns Environment providers
|
|
42
49
|
*/
|
|
43
|
-
export function provideRouter(router) {
|
|
44
|
-
return makeEnvironmentProviders([
|
|
50
|
+
export function provideRouter(router, options = {}) {
|
|
51
|
+
return makeEnvironmentProviders([
|
|
52
|
+
typeof router === 'function'
|
|
53
|
+
? { provide: ROUTER, useFactory: router }
|
|
54
|
+
: { provide: ROUTER, useValue: router },
|
|
55
|
+
...(options.routedView ? [{ provide: ROUTED_VIEW, useValue: options.routedView }] : []),
|
|
56
|
+
]);
|
|
45
57
|
}
|
|
46
58
|
/**
|
|
47
59
|
* Registers an I18nProvider as an Angular environment provider for dependency injection.
|
|
@@ -190,7 +202,9 @@ export function provideMolecule(config) {
|
|
|
190
202
|
if (config.preview) {
|
|
191
203
|
providers.push({ provide: PREVIEW_PROVIDER, useValue: config.preview });
|
|
192
204
|
}
|
|
193
|
-
|
|
205
|
+
// Held by default, as React's MoleculeProvider is: a page's first render reads the
|
|
206
|
+
// restored session unless the app opts out with `awaitSession: false`.
|
|
207
|
+
if (config.awaitSession !== false && config.auth) {
|
|
194
208
|
const client = config.auth;
|
|
195
209
|
providers.push(
|
|
196
210
|
// The idiomatic hold: Angular creates no component (so no page renders) until
|
|
@@ -205,6 +219,10 @@ export function provideMolecule(config) {
|
|
|
205
219
|
if (client.getState().status !== 'loading')
|
|
206
220
|
return;
|
|
207
221
|
let unsubscribe;
|
|
222
|
+
const stop = () => {
|
|
223
|
+
unsubscribe?.();
|
|
224
|
+
unsubscribe = undefined;
|
|
225
|
+
};
|
|
208
226
|
const ready = new Promise((resolve) => {
|
|
209
227
|
const check = () => {
|
|
210
228
|
if (client.getState().status !== 'loading')
|
|
@@ -216,7 +234,10 @@ export function provideMolecule(config) {
|
|
|
216
234
|
check();
|
|
217
235
|
void joined.then(check);
|
|
218
236
|
});
|
|
219
|
-
|
|
237
|
+
// An app destroyed while it still holds (torn down mid-restore) leaves no listener on
|
|
238
|
+
// the client, as React's SessionReady unsubscribes when it unmounts.
|
|
239
|
+
inject(DestroyRef).onDestroy(stop);
|
|
240
|
+
return ready.finally(stop);
|
|
220
241
|
}));
|
|
221
242
|
}
|
|
222
243
|
return makeEnvironmentProviders(providers);
|
package/dist/providers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,UAAU,EACV,MAAM,EACN,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,eAAe,CAAA;AAYtB,OAAO,EACL,WAAW,IAAI,gBAAgB,EAC/B,WAAW,IAAI,gBAAgB,GAChC,MAAM,qBAAqB,CAAA;AAI5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EAC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18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The routed view's injection token. Kept out of the package's exports, as in
|
|
3
|
+
* `@molecule/app-react`: a routed view is provided only with a router
|
|
4
|
+
* (`provideRouter(router, { routedView })`).
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import { InjectionToken, type Type } from '@angular/core';
|
|
9
|
+
/** The component the routing bond renders where the matched child route goes. */
|
|
10
|
+
export declare const ROUTED_VIEW: InjectionToken<Type<unknown>>;
|
|
11
|
+
/**
|
|
12
|
+
* The routed view the routing bond provided, for `RoutedView`. Call it in an injection context.
|
|
13
|
+
*
|
|
14
|
+
* @returns The routing bond's routed view.
|
|
15
|
+
* @throws {I18nError} When the routing bond has none.
|
|
16
|
+
*/
|
|
17
|
+
export declare function routedViewOrThrow(): Type<unknown>;
|
|
18
|
+
//# sourceMappingURL=routed-view-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routed-view-token.d.ts","sourceRoot":"","sources":["../src/routed-view-token.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAU,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,eAAe,CAAA;AAIjE,iFAAiF;AACjF,eAAO,MAAM,WAAW,+BAA4D,CAAA;AAEpF;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,CAUjD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The routed view's injection token. Kept out of the package's exports, as in
|
|
3
|
+
* `@molecule/app-react`: a routed view is provided only with a router
|
|
4
|
+
* (`provideRouter(router, { routedView })`).
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import { inject, InjectionToken } from '@angular/core';
|
|
9
|
+
import { I18nError } from '@molecule/app-i18n';
|
|
10
|
+
/** The component the routing bond renders where the matched child route goes. */
|
|
11
|
+
export const ROUTED_VIEW = new InjectionToken('molecule-routed-view');
|
|
12
|
+
/**
|
|
13
|
+
* The routed view the routing bond provided, for `RoutedView`. Call it in an injection context.
|
|
14
|
+
*
|
|
15
|
+
* @returns The routing bond's routed view.
|
|
16
|
+
* @throws {I18nError} When the routing bond has none.
|
|
17
|
+
*/
|
|
18
|
+
export function routedViewOrThrow() {
|
|
19
|
+
const view = inject(ROUTED_VIEW, { optional: true });
|
|
20
|
+
if (!view) {
|
|
21
|
+
throw new I18nError('angular.error.noRoutedView', undefined, 'This routing bond has no routed view to render here: pass the page as children instead.');
|
|
22
|
+
}
|
|
23
|
+
return view;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=routed-view-token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routed-view-token.js","sourceRoot":"","sources":["../src/routed-view-token.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAa,MAAM,eAAe,CAAA;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,iFAAiF;AACjF,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,cAAc,CAAgB,sBAAsB,CAAC,CAAA;AAEpF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACpD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,SAAS,CACjB,4BAA4B,EAC5B,SAAS,EACT,yFAAyF,CAC1F,CAAA;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `RoutedView`, as `@molecule/app-react`'s: the matched child route, through whichever routing
|
|
3
|
+
* bond the app wired.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type OnInit, ViewContainerRef } from '@angular/core';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the matched child route, through whichever routing bond the app wired (an outlet
|
|
11
|
+
* component under the angular-router bond). A layout or guard renders it where its page goes
|
|
12
|
+
* when it was given no projected content, so the component imports no router library. The page
|
|
13
|
+
* renders inside this element, whose box the page takes (`display: contents`).
|
|
14
|
+
*
|
|
15
|
+
* Throws an `I18nError` (`angular.error.noRoutedView`) when it is created and the routing bond
|
|
16
|
+
* has no routed view: project the page instead. Rendering nothing there would show a blank page
|
|
17
|
+
* with no error.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* @Component({
|
|
22
|
+
* selector: 'app-shell',
|
|
23
|
+
* imports: [RoutedView],
|
|
24
|
+
* template: `<main><mol-routed-view /></main>`,
|
|
25
|
+
* })
|
|
26
|
+
* class Shell {}
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class RoutedView implements OnInit {
|
|
30
|
+
private readonly view;
|
|
31
|
+
/**
|
|
32
|
+
* An anchor of its own template: a RoutedView created outside any template (a test mounting it
|
|
33
|
+
* alone) has no parent element for its host's container, so a page placed there never shows. A
|
|
34
|
+
* decorator query, not `viewChild()`: this package is compiled by `tsc`, and Angular's JIT
|
|
35
|
+
* compiler sees no signal query in a field initializer (NG0951). Static, so set before ngOnInit.
|
|
36
|
+
*/
|
|
37
|
+
outlet?: ViewContainerRef;
|
|
38
|
+
/** Creates the routed view's component at this element's anchor. */
|
|
39
|
+
ngOnInit(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RoutedView, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RoutedView, "mol-routed-view", never, {}, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=routed-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routed-view.d.ts","sourceRoot":"","sources":["../src/routed-view.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAa,KAAK,MAAM,EAAa,gBAAgB,EAAE,MAAM,eAAe,CAAA;;AAInF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBASa,UAAW,YAAW,MAAM;IACvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAsB;IAC3C;;;;;OAKG;IAC4D,MAAM,CAAC,EAAE,gBAAgB,CAAA;IAExF,oEAAoE;IACpE,QAAQ,IAAI,IAAI;yCAXL,UAAU;2CAAV,UAAU;CActB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `RoutedView`, as `@molecule/app-react`'s: the matched child route, through whichever routing
|
|
3
|
+
* bond the app wired.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { Component, ViewChild, ViewContainerRef } from '@angular/core';
|
|
8
|
+
import { routedViewOrThrow } from './routed-view-token.js';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
const _c0 = ["outlet"];
|
|
11
|
+
/**
|
|
12
|
+
* Renders the matched child route, through whichever routing bond the app wired (an outlet
|
|
13
|
+
* component under the angular-router bond). A layout or guard renders it where its page goes
|
|
14
|
+
* when it was given no projected content, so the component imports no router library. The page
|
|
15
|
+
* renders inside this element, whose box the page takes (`display: contents`).
|
|
16
|
+
*
|
|
17
|
+
* Throws an `I18nError` (`angular.error.noRoutedView`) when it is created and the routing bond
|
|
18
|
+
* has no routed view: project the page instead. Rendering nothing there would show a blank page
|
|
19
|
+
* with no error.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* @Component({
|
|
24
|
+
* selector: 'app-shell',
|
|
25
|
+
* imports: [RoutedView],
|
|
26
|
+
* template: `<main><mol-routed-view /></main>`,
|
|
27
|
+
* })
|
|
28
|
+
* class Shell {}
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export class RoutedView {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.view = routedViewOrThrow();
|
|
34
|
+
}
|
|
35
|
+
/** Creates the routed view's component at this element's anchor. */
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
this.outlet?.createComponent(this.view);
|
|
38
|
+
}
|
|
39
|
+
static { this.ɵfac = function RoutedView_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RoutedView)(); }; }
|
|
40
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RoutedView, selectors: [["mol-routed-view"]], viewQuery: function RoutedView_Query(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
|
|
42
|
+
} if (rf & 2) {
|
|
43
|
+
let _t;
|
|
44
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.outlet = _t.first);
|
|
45
|
+
} }, hostAttrs: ["data-parity-unwrap", "", 2, "display", "contents"], decls: 2, vars: 0, consts: [["outlet", ""]], template: function RoutedView_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵdomElementContainer(0, null, 0);
|
|
47
|
+
} }, encapsulation: 2 }); }
|
|
48
|
+
}
|
|
49
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RoutedView, [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: 'mol-routed-view',
|
|
53
|
+
standalone: true,
|
|
54
|
+
template: '<ng-container #outlet />',
|
|
55
|
+
host: {
|
|
56
|
+
'data-parity-unwrap': '',
|
|
57
|
+
style: 'display: contents',
|
|
58
|
+
},
|
|
59
|
+
}]
|
|
60
|
+
}], null, { outlet: [{
|
|
61
|
+
type: ViewChild,
|
|
62
|
+
args: ['outlet', { read: ViewContainerRef, static: true }]
|
|
63
|
+
}] }); })();
|
|
64
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RoutedView, { className: "RoutedView", filePath: "routed-view.ts", lineNumber: 41 }); })();
|
|
65
|
+
//# sourceMappingURL=routed-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routed-view.js","sourceRoot":"","sources":["../src/routed-view.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAe,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;;;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AAUH,MAAM,OAAO,UAAU;IATvB;QAUmB,SAAI,GAAG,iBAAiB,EAAE,CAAA;KAa5C;IAJC,oEAAoE;IACpE,QAAQ;QACN,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzC,CAAC;2GAbU,UAAU;oEAAV,UAAU;mCAQQ,gBAAgB;;;;;YAdlC,oCAAwB;;;iFAMxB,UAAU;cATtB,SAAS;eAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,0BAA0B;gBACpC,IAAI,EAAE;oBACJ,oBAAoB,EAAE,EAAE;oBACxB,KAAK,EAAE,mBAAmB;iBAC3B;aACF;;kBASE,SAAS;mBAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kFARlD,UAAU"}
|
package/dist/session-ready.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* The content {@link SessionReady} takes. React passes these nodes as the
|
|
4
|
+
* `children` and `fallback` props; an Angular component takes nodes as
|
|
5
|
+
* projected content, so `children` is the content and `fallback` is the
|
|
6
|
+
* element marked `slot="fallback"`.
|
|
7
|
+
*/
|
|
8
|
+
export interface SessionReadyProps {
|
|
9
|
+
/** What renders once the initial restore settles (projected content). */
|
|
10
|
+
children?: unknown;
|
|
11
|
+
/** What renders while the session restore is still undecided (the `[slot=fallback]` element). */
|
|
12
|
+
fallback?: unknown;
|
|
13
|
+
}
|
|
2
14
|
/**
|
|
3
15
|
* Renders its content once `useAuth().status` has left `'loading'` (signed in,
|
|
4
16
|
* signed out, or `'unavailable'`), and the `[slot=fallback]` content until
|
|
@@ -11,8 +23,9 @@ import * as i0 from "@angular/core";
|
|
|
11
23
|
* public page that renders a signed-in action at once lets that action run
|
|
12
24
|
* against "signed out": a Follow button whose handler starts with
|
|
13
25
|
* `if (!user) return` ignores the click, one that redirects to `/login` signs
|
|
14
|
-
* the visitor out of the flow.
|
|
15
|
-
*
|
|
26
|
+
* the visitor out of the flow. `provideMolecule({ auth })` holds bootstrap for
|
|
27
|
+
* that by default; wrap the routes in this component where an app passes
|
|
28
|
+
* `awaitSession: false`, so every page's first render reads the restored user
|
|
16
29
|
* when restoration succeeds.
|
|
17
30
|
*
|
|
18
31
|
* A visitor with no session candidate settles synchronously without a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-ready.d.ts","sourceRoot":"","sources":["../src/session-ready.ts"],"names":[],"mappings":";AAWA
|
|
1
|
+
{"version":3,"file":"session-ready.d.ts","sourceRoot":"","sources":["../src/session-ready.ts"],"names":[],"mappings":";AAWA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAWa,YAAY;IACvB,gFAAgF;IAChF,QAAQ,CAAC,MAAM,0EAAmB;yCAFvB,YAAY;2CAAZ,YAAY;CAGxB"}
|
package/dist/session-ready.js
CHANGED
|
@@ -27,8 +27,9 @@ function SessionReady_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
27
27
|
* public page that renders a signed-in action at once lets that action run
|
|
28
28
|
* against "signed out": a Follow button whose handler starts with
|
|
29
29
|
* `if (!user) return` ignores the click, one that redirects to `/login` signs
|
|
30
|
-
* the visitor out of the flow.
|
|
31
|
-
*
|
|
30
|
+
* the visitor out of the flow. `provideMolecule({ auth })` holds bootstrap for
|
|
31
|
+
* that by default; wrap the routes in this component where an app passes
|
|
32
|
+
* `awaitSession: false`, so every page's first render reads the restored user
|
|
32
33
|
* when restoration succeeds.
|
|
33
34
|
*
|
|
34
35
|
* A visitor with no session candidate settles synchronously without a
|
|
@@ -76,5 +77,5 @@ export class SessionReady {
|
|
|
76
77
|
`,
|
|
77
78
|
}]
|
|
78
79
|
}], null, null); })();
|
|
79
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SessionReady, { className: "SessionReady", filePath: "session-ready.ts", lineNumber:
|
|
80
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SessionReady, { className: "SessionReady", filePath: "session-ready.ts", lineNumber: 71 }); })();
|
|
80
81
|
//# sourceMappingURL=session-ready.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-ready.js","sourceRoot":"","sources":["../src/session-ready.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;;;;;
|
|
1
|
+
{"version":3,"file":"session-ready.js","sourceRoot":"","sources":["../src/session-ready.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;;;;;IAuDvC,kBAAuC;;;IAEvC,qBAAc;;AA1CpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAYH,MAAM,OAAO,YAAY;IAXzB;QAYE,gFAAgF;QACvE,WAAM,GAAG,OAAO,EAAE,CAAC,MAAM,CAAA;KACnC;6GAHY,YAAY;oEAAZ,YAAY;;YALnB,AAFF,oEAA8B,8CAErB;;YAFT,oDAIC;;;iFAGQ,YAAY;cAXxB,SAAS;eAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;;;GAMT;aACF;;kFACY,YAAY"}
|
package/dist/types.d.ts
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
import type { ChatProvider } from '@molecule/app-ai-chat';
|
|
7
7
|
import type { AuthClient, AuthState } from '@molecule/app-auth';
|
|
8
8
|
import type { EditorProvider } from '@molecule/app-code-editor';
|
|
9
|
-
import type { FormController, FormOptions } from '@molecule/app-forms';
|
|
9
|
+
import type { FormController, FormOptions, FormResetOptions } from '@molecule/app-forms';
|
|
10
10
|
import type { HttpClient } from '@molecule/app-http';
|
|
11
11
|
import type { I18nProvider } from '@molecule/app-i18n';
|
|
12
12
|
import type { WorkspaceProvider } from '@molecule/app-ide';
|
|
13
13
|
import type { PreviewProvider } from '@molecule/app-live-preview';
|
|
14
14
|
import type { Logger, LoggerProvider } from '@molecule/app-logger';
|
|
15
|
-
import type { QueryParams, RouteLocation, RouteParams, Router } from '@molecule/app-routing';
|
|
15
|
+
import type { QueryParams, RouteLocation, RouteParams, Router, RouterConfig } from '@molecule/app-routing';
|
|
16
16
|
import type { StateProvider, Store, StoreConfig } from '@molecule/app-state';
|
|
17
17
|
import type { StorageProvider } from '@molecule/app-storage';
|
|
18
18
|
import type { Theme, ThemeProvider } from '@molecule/app-theme';
|
|
@@ -24,13 +24,15 @@ export interface MoleculeModuleConfig {
|
|
|
24
24
|
auth?: AuthClient<unknown>;
|
|
25
25
|
/**
|
|
26
26
|
* Hold bootstrap (and so every page's first render) until `auth` has decided the
|
|
27
|
-
* session.
|
|
28
|
-
* Until it answers, a public page's
|
|
29
|
-
* redirect to `/login`)
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* null user. A visitor with no
|
|
33
|
-
* a request.
|
|
27
|
+
* session. Defaults to true, as React's `MoleculeProvider` does. A token-only or
|
|
28
|
+
* cookie-only restore makes a current-user request. Until it answers, a public page's
|
|
29
|
+
* signed-in action (`if (!user) return`, a redirect to `/login`) treats a signed-in
|
|
30
|
+
* visitor as signed out. Angular's app initializer waits only while status is
|
|
31
|
+
* `'loading'`, so a cached session renders while its verification continues in the
|
|
32
|
+
* background. `'unavailable'` also renders and may have a null user. A visitor with no
|
|
33
|
+
* session candidate settles synchronously without a request. While the initializer
|
|
34
|
+
* waits, the page shows whatever the app root holds in `index.html` (Angular has no
|
|
35
|
+
* `sessionFallback`). Set false to render at once. Ignored without `auth`.
|
|
34
36
|
*/
|
|
35
37
|
awaitSession?: boolean;
|
|
36
38
|
theme?: ThemeProvider;
|
|
@@ -65,5 +67,5 @@ export interface MoleculeTokens {
|
|
|
65
67
|
EDITOR_PROVIDER: symbol;
|
|
66
68
|
PREVIEW_PROVIDER: symbol;
|
|
67
69
|
}
|
|
68
|
-
export type { AuthClient, AuthState, EditorProvider, FormController, FormOptions, HttpClient, I18nProvider, Logger, LoggerProvider, PreviewProvider, QueryParams, RouteLocation, RouteParams, Router, StateProvider, StorageProvider, Store, StoreConfig, Theme, ThemeProvider, WorkspaceProvider, };
|
|
70
|
+
export type { AuthClient, AuthState, EditorProvider, FormController, FormOptions, FormResetOptions, HttpClient, I18nProvider, Logger, LoggerProvider, PreviewProvider, QueryParams, RouteLocation, RouteParams, Router, RouterConfig, StateProvider, StorageProvider, Store, StoreConfig, Theme, ThemeProvider, WorkspaceProvider, };
|
|
69
71
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources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M,EACN,YAAY,EACZ,aAAa,EACb,eAAe,EACf,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,EACb,iBAAiB,GAClB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-angular",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "Angular framework bindings for molecule.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./link": {
|
|
14
|
+
"types": "./dist/link.d.ts",
|
|
15
|
+
"default": "./dist/link.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
8
19
|
"files": [
|
|
9
20
|
"dist",
|
|
10
21
|
"README.md"
|