@raystack/frontier 0.95.3 → 0.96.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/admin/dist/index.js +170 -171
- package/admin/dist/index.mjs +171 -171
- package/package.json +9 -7
- package/react/dist/index.d.ts +99 -2
- package/react/dist/index.js +4674 -185
- package/react/dist/index.mjs +4918 -186
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raystack/frontier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.96.0",
|
|
4
4
|
"description": "A js library for frontier",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -72,12 +72,9 @@
|
|
|
72
72
|
"@raystack/eslint-config": "workspace:^",
|
|
73
73
|
"@raystack/frontier-tsconfig": "workspace:^",
|
|
74
74
|
"@size-limit/preset-small-lib": "^8.2.6",
|
|
75
|
-
"@stitches/react": "^1.2.8",
|
|
76
75
|
"@types/jest": "^29.5.14",
|
|
77
76
|
"@types/lodash": "^4.17.17",
|
|
78
77
|
"@types/node": "^22.10.0",
|
|
79
|
-
"@types/react": "^19.0.0",
|
|
80
|
-
"@types/react-dom": "^19.0.0",
|
|
81
78
|
"@types/uuid": "^10.0.0",
|
|
82
79
|
"@types/validator": "^13.15.1",
|
|
83
80
|
"esbuild-css-modules-plugin": "^2.7.1",
|
|
@@ -104,10 +101,11 @@
|
|
|
104
101
|
"@connectrpc/connect-query": "2.1.1",
|
|
105
102
|
"@connectrpc/connect-web": "2.1.1",
|
|
106
103
|
"@hookform/resolvers": "^3.10.0",
|
|
107
|
-
"@raystack/proton": "0.1.0-
|
|
104
|
+
"@raystack/proton": "0.1.0-fcb776fb2962a9a0378ea4216177b7c2686efc15",
|
|
108
105
|
"@tanstack/react-query": "^5.90.2",
|
|
109
106
|
"@tanstack/react-router": "^1.168.3",
|
|
110
107
|
"axios": "^1.9.0",
|
|
108
|
+
"@raystack/apsara-v1": "npm:@raystack/apsara@1.0.0-rc.2",
|
|
111
109
|
"class-variance-authority": "^0.7.1",
|
|
112
110
|
"dayjs": "^1.11.13",
|
|
113
111
|
"lodash": "^4.17.21",
|
|
@@ -121,8 +119,9 @@
|
|
|
121
119
|
},
|
|
122
120
|
"peerDependencies": {
|
|
123
121
|
"@raystack/apsara": ">=0.30.0",
|
|
124
|
-
"react": "^
|
|
125
|
-
"react
|
|
122
|
+
"@types/react": "^19",
|
|
123
|
+
"react": "^19",
|
|
124
|
+
"react-dom": "^19"
|
|
126
125
|
},
|
|
127
126
|
"peerDependenciesMeta": {
|
|
128
127
|
"react": {
|
|
@@ -131,6 +130,9 @@
|
|
|
131
130
|
"react-dom": {
|
|
132
131
|
"optional": true
|
|
133
132
|
},
|
|
133
|
+
"@types/react": {
|
|
134
|
+
"optional": true
|
|
135
|
+
},
|
|
134
136
|
"svelte": {
|
|
135
137
|
"optional": true
|
|
136
138
|
},
|
package/react/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ComponentPropsWithRef, ReactNode, Dispatch, SetStateAction, PropsWithChildren } from 'react';
|
|
1
|
+
import React, { ComponentPropsWithRef, ReactNode, Dispatch, SetStateAction, PropsWithChildren, ComponentProps } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as yup from 'yup';
|
|
4
4
|
import * as _tanstack_history from '@tanstack/history';
|
|
@@ -10,6 +10,7 @@ import { ThemeProviderProps } from '@raystack/apsara';
|
|
|
10
10
|
import { QueryClient, UseQueryResult, UseMutationResult } from '@tanstack/react-query';
|
|
11
11
|
import { ConnectError } from '@connectrpc/connect';
|
|
12
12
|
import { DescMessage, MessageShape, DescMethodUnary, MessageInitShape } from '@bufbuild/protobuf';
|
|
13
|
+
import { Flex } from '@raystack/apsara-v1';
|
|
13
14
|
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
14
15
|
import { Dayjs } from 'dayjs';
|
|
15
16
|
|
|
@@ -322,6 +323,23 @@ interface CustomizationProviderProps {
|
|
|
322
323
|
}
|
|
323
324
|
declare const CustomizationProvider: React.FC<CustomizationProviderProps>;
|
|
324
325
|
|
|
326
|
+
interface TerminologyOptions {
|
|
327
|
+
plural?: boolean;
|
|
328
|
+
case?: "lower" | "upper" | "capital";
|
|
329
|
+
}
|
|
330
|
+
interface TerminologyEntity {
|
|
331
|
+
(options?: TerminologyOptions): string;
|
|
332
|
+
}
|
|
333
|
+
interface TerminologyMap {
|
|
334
|
+
organization: TerminologyEntity;
|
|
335
|
+
project: TerminologyEntity;
|
|
336
|
+
team: TerminologyEntity;
|
|
337
|
+
member: TerminologyEntity;
|
|
338
|
+
user: TerminologyEntity;
|
|
339
|
+
appName: TerminologyEntity;
|
|
340
|
+
}
|
|
341
|
+
declare const useTerminology: () => TerminologyMap;
|
|
342
|
+
|
|
325
343
|
interface UseTokensReturn {
|
|
326
344
|
tokenBalance: bigint;
|
|
327
345
|
isTokensLoading: boolean;
|
|
@@ -395,6 +413,85 @@ interface PageHeaderProps {
|
|
|
395
413
|
*/
|
|
396
414
|
declare const PageHeader: ({ title, description }: PageHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
397
415
|
|
|
416
|
+
interface ImageUploadProps {
|
|
417
|
+
description?: string;
|
|
418
|
+
value?: string;
|
|
419
|
+
onChange?: (value: string) => void;
|
|
420
|
+
disabled?: boolean;
|
|
421
|
+
initials?: string;
|
|
422
|
+
'data-test-id'?: string;
|
|
423
|
+
}
|
|
424
|
+
declare function ImageUpload({ description, value, onChange, disabled, initials, ...rest }: ImageUploadProps): react_jsx_runtime.JSX.Element;
|
|
425
|
+
|
|
426
|
+
interface ViewContainerProps extends ComponentProps<typeof Flex> {
|
|
427
|
+
contentProps?: Omit<ComponentProps<typeof Flex>, 'children'>;
|
|
428
|
+
}
|
|
429
|
+
declare function ViewContainer({ children, contentProps, className, ...props }: ViewContainerProps): react_jsx_runtime.JSX.Element;
|
|
430
|
+
|
|
431
|
+
interface ViewHeaderProps extends ComponentProps<typeof Flex> {
|
|
432
|
+
title: string;
|
|
433
|
+
description?: string;
|
|
434
|
+
/**
|
|
435
|
+
* When provided, renders a breadcrumb row above the title.
|
|
436
|
+
* `children` are placed alongside the breadcrumb (e.g. action buttons).
|
|
437
|
+
* Without breadcrumb, `children` render alongside the title (default layout).
|
|
438
|
+
*/
|
|
439
|
+
breadcrumb?: ReactNode;
|
|
440
|
+
}
|
|
441
|
+
declare function ViewHeader({ title, description, breadcrumb, children, ...props }: ViewHeaderProps): react_jsx_runtime.JSX.Element;
|
|
442
|
+
|
|
443
|
+
interface GeneralViewProps {
|
|
444
|
+
onDeleteSuccess?: () => void;
|
|
445
|
+
urlPrefix?: string;
|
|
446
|
+
}
|
|
447
|
+
declare function GeneralView({ onDeleteSuccess, urlPrefix }?: GeneralViewProps): react_jsx_runtime.JSX.Element;
|
|
448
|
+
|
|
449
|
+
interface PreferencesViewProps {
|
|
450
|
+
children?: ReactNode;
|
|
451
|
+
}
|
|
452
|
+
declare function PreferencesView({ children }: PreferencesViewProps): react_jsx_runtime.JSX.Element;
|
|
453
|
+
|
|
454
|
+
interface PreferenceRowProps extends ComponentProps<typeof Flex> {
|
|
455
|
+
title: string;
|
|
456
|
+
description: string;
|
|
457
|
+
isLoading?: boolean;
|
|
458
|
+
contentProps?: ComponentProps<typeof Flex>;
|
|
459
|
+
}
|
|
460
|
+
declare function PreferenceRow({ title, description, isLoading, children, className, contentProps, ...props }: PreferenceRowProps): react_jsx_runtime.JSX.Element;
|
|
461
|
+
|
|
462
|
+
declare function ProfileView(): react_jsx_runtime.JSX.Element;
|
|
463
|
+
|
|
464
|
+
interface SessionsViewProps {
|
|
465
|
+
onLogout?: () => void;
|
|
466
|
+
onRevoke?: () => void;
|
|
467
|
+
}
|
|
468
|
+
declare function SessionsView({ onLogout, onRevoke }?: SessionsViewProps): react_jsx_runtime.JSX.Element;
|
|
469
|
+
|
|
470
|
+
interface MembersViewProps {
|
|
471
|
+
showTeamField?: boolean;
|
|
472
|
+
}
|
|
473
|
+
declare function MembersView({ showTeamField }: MembersViewProps): react_jsx_runtime.JSX.Element;
|
|
474
|
+
|
|
475
|
+
interface SecurityViewProps {
|
|
476
|
+
children?: ReactNode;
|
|
477
|
+
}
|
|
478
|
+
declare function SecurityView({ children }: SecurityViewProps): react_jsx_runtime.JSX.Element;
|
|
479
|
+
|
|
480
|
+
interface ProjectsViewProps {
|
|
481
|
+
title?: string;
|
|
482
|
+
description?: string;
|
|
483
|
+
onProjectClick?: (projectId: string) => void;
|
|
484
|
+
}
|
|
485
|
+
declare function ProjectsView({ title, description, onProjectClick }: ProjectsViewProps): react_jsx_runtime.JSX.Element;
|
|
486
|
+
|
|
487
|
+
interface ProjectDetailsViewProps {
|
|
488
|
+
projectId: string;
|
|
489
|
+
projectsLabel?: string;
|
|
490
|
+
onNavigateToProjects?: () => void;
|
|
491
|
+
onDeleteSuccess?: () => void;
|
|
492
|
+
}
|
|
493
|
+
declare function ProjectDetailsView({ projectId, projectsLabel, onNavigateToProjects, onDeleteSuccess }: ProjectDetailsViewProps): react_jsx_runtime.JSX.Element;
|
|
494
|
+
|
|
398
495
|
declare const PREFERENCE_OPTIONS: {
|
|
399
496
|
readonly NEWSLETTER: "newsletter";
|
|
400
497
|
};
|
|
@@ -413,4 +510,4 @@ declare function timestampToDayjs(timestamp?: Timestamp): Dayjs | null;
|
|
|
413
510
|
declare function isNullTimestamp(timestamp?: Timestamp): boolean;
|
|
414
511
|
type TimeStamp = Timestamp;
|
|
415
512
|
|
|
416
|
-
export { AvatarUpload, Container, CreateOrganization, CustomizationProvider, FrontierClientBillingOptions, FrontierClientCustomizationOptions, FrontierClientOptions, FrontierProvider, Header, Layout, MagicLink, MagicLinkVerify, OrganizationProfile, PREFERENCE_OPTIONS, PageHeader, SignIn, SignUp, Subscribe, TimeStamp, Updates, Window, isNullTimestamp, queryClient, timestampToDate, timestampToDayjs, useBillingPermission, useConnectQueryPolling, useFrontier, usePreferences, useTokens };
|
|
513
|
+
export { AvatarUpload, Container, CreateOrganization, CustomizationProvider, FrontierClientBillingOptions, FrontierClientCustomizationOptions, FrontierClientOptions, FrontierProvider, GeneralView, Header, ImageUpload, Layout, MagicLink, MagicLinkVerify, MembersView, OrganizationProfile, PREFERENCE_OPTIONS, PageHeader, PreferenceRow, PreferencesView, ProfileView, ProjectDetailsView, ProjectsView, SecurityView, SessionsView, SignIn, SignUp, Subscribe, TimeStamp, Updates, ViewContainer, ViewHeader, Window, isNullTimestamp, queryClient, timestampToDate, timestampToDayjs, useBillingPermission, useConnectQueryPolling, useFrontier, usePreferences, useTerminology, useTokens };
|