@frogbotai/next 0.19.0 → 0.21.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.
Files changed (85) hide show
  1. package/dist/css.css +129 -0
  2. package/dist/elements/Nav/AccountMenu.d.ts +26 -0
  3. package/dist/elements/Nav/AccountMenu.d.ts.map +1 -0
  4. package/dist/elements/Nav/AccountMenu.js +25 -0
  5. package/dist/elements/Nav/AccountMenu.js.map +1 -0
  6. package/dist/elements/Nav/AppSidebar.d.ts +37 -0
  7. package/dist/elements/Nav/AppSidebar.d.ts.map +1 -0
  8. package/dist/elements/Nav/AppSidebar.js +66 -0
  9. package/dist/elements/Nav/AppSidebar.js.map +1 -0
  10. package/dist/elements/Nav/CollectionsSection.d.ts +4 -0
  11. package/dist/elements/Nav/CollectionsSection.d.ts.map +1 -0
  12. package/dist/elements/Nav/CollectionsSection.js +25 -0
  13. package/dist/elements/Nav/CollectionsSection.js.map +1 -0
  14. package/dist/elements/Nav/NavItem.d.ts +14 -0
  15. package/dist/elements/Nav/NavItem.d.ts.map +1 -0
  16. package/dist/elements/Nav/NavItem.js +21 -0
  17. package/dist/elements/Nav/NavItem.js.map +1 -0
  18. package/dist/elements/Nav/NavSection.d.ts +8 -0
  19. package/dist/elements/Nav/NavSection.d.ts.map +1 -0
  20. package/dist/elements/Nav/NavSection.js +32 -0
  21. package/dist/elements/Nav/NavSection.js.map +1 -0
  22. package/dist/elements/Nav/RecentsSection.client.d.ts +14 -0
  23. package/dist/elements/Nav/RecentsSection.client.d.ts.map +1 -0
  24. package/dist/elements/Nav/RecentsSection.client.js +72 -0
  25. package/dist/elements/Nav/RecentsSection.client.js.map +1 -0
  26. package/dist/elements/Nav/RecentsSection.d.ts +6 -0
  27. package/dist/elements/Nav/RecentsSection.d.ts.map +1 -0
  28. package/dist/elements/Nav/RecentsSection.js +34 -0
  29. package/dist/elements/Nav/RecentsSection.js.map +1 -0
  30. package/dist/elements/Nav/buildNavModel.d.ts +55 -0
  31. package/dist/elements/Nav/buildNavModel.d.ts.map +1 -0
  32. package/dist/elements/Nav/buildNavModel.js +70 -0
  33. package/dist/elements/Nav/buildNavModel.js.map +1 -0
  34. package/dist/elements/Nav/fixtures/consumer/RecentsSection.d.ts +6 -0
  35. package/dist/elements/Nav/fixtures/consumer/RecentsSection.d.ts.map +1 -0
  36. package/dist/elements/Nav/fixtures/consumer/RecentsSection.js +34 -0
  37. package/dist/elements/Nav/fixtures/consumer/RecentsSection.js.map +1 -0
  38. package/dist/elements/Nav/fixtures/consumer/config.d.ts +6 -0
  39. package/dist/elements/Nav/fixtures/consumer/config.d.ts.map +1 -0
  40. package/dist/elements/Nav/fixtures/consumer/config.js +6 -0
  41. package/dist/elements/Nav/fixtures/consumer/config.js.map +1 -0
  42. package/dist/elements/Nav/index.client.d.ts +26 -0
  43. package/dist/elements/Nav/index.client.d.ts.map +1 -0
  44. package/dist/elements/Nav/index.client.js +36 -0
  45. package/dist/elements/Nav/index.client.js.map +1 -0
  46. package/dist/elements/Nav/index.css +378 -0
  47. package/dist/elements/Nav/index.d.ts +6 -0
  48. package/dist/elements/Nav/index.d.ts.map +1 -0
  49. package/dist/elements/Nav/index.js +83 -0
  50. package/dist/elements/Nav/index.js.map +1 -0
  51. package/dist/elements/Nav/sections.css +230 -0
  52. package/dist/exports/ChatListView.client.d.ts +12 -0
  53. package/dist/exports/ChatListView.client.d.ts.map +1 -0
  54. package/dist/exports/ChatListView.client.js +12 -0
  55. package/dist/exports/ChatListView.client.js.map +1 -0
  56. package/dist/exports/ChatView.client.d.ts +21 -0
  57. package/dist/exports/ChatView.client.d.ts.map +1 -0
  58. package/dist/exports/ChatView.client.js +112 -0
  59. package/dist/exports/ChatView.client.js.map +1 -0
  60. package/dist/exports/client.d.ts +6 -0
  61. package/dist/exports/client.d.ts.map +1 -1
  62. package/dist/exports/client.js +6 -0
  63. package/dist/exports/client.js.map +1 -1
  64. package/dist/exports/config.d.ts +3 -0
  65. package/dist/exports/config.d.ts.map +1 -0
  66. package/dist/exports/config.js +2 -0
  67. package/dist/exports/config.js.map +1 -0
  68. package/dist/exports/rsc.d.ts +1 -0
  69. package/dist/exports/rsc.d.ts.map +1 -1
  70. package/dist/exports/rsc.js +1 -0
  71. package/dist/exports/rsc.js.map +1 -1
  72. package/dist/exports/views.d.ts +9 -0
  73. package/dist/exports/views.d.ts.map +1 -1
  74. package/dist/exports/views.js +136 -2
  75. package/dist/exports/views.js.map +1 -1
  76. package/dist/graphics/FrogbotIcon.d.ts +1 -2
  77. package/dist/graphics/FrogbotIcon.d.ts.map +1 -1
  78. package/dist/graphics/FrogbotIcon.js +3 -8
  79. package/dist/graphics/FrogbotIcon.js.map +1 -1
  80. package/dist/index.d.ts +4 -0
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +4 -0
  83. package/dist/index.js.map +1 -1
  84. package/dist/views/SettingsView.css +123 -0
  85. package/package.json +14 -5
@@ -0,0 +1,55 @@
1
+ import { getTranslation } from '@payloadcms/translations';
2
+ import { EntityType } from '@payloadcms/ui/shared';
3
+ import type { CustomComponent, SanitizedConfig, ServerProps } from 'payload';
4
+ export type NavConfigItem = {
5
+ icon?: CustomComponent;
6
+ label: string;
7
+ path: string;
8
+ };
9
+ type EntityIcon = CustomComponent | string;
10
+ export type BuildNavModelProps = {
11
+ chatsSlug?: string;
12
+ config: SanitizedConfig;
13
+ i18n: ServerProps['i18n'];
14
+ permissions: NonNullable<ServerProps['permissions']>;
15
+ visibleEntities: NonNullable<ServerProps['visibleEntities']>;
16
+ };
17
+ export declare function buildCollectionGroups({ config, i18n, permissions, visibleEntities, }: BuildNavModelProps): {
18
+ entities: ({
19
+ entity: import("payload").SanitizedCollectionConfig;
20
+ type: EntityType.collection;
21
+ } | {
22
+ entity: import("payload").SanitizedGlobalConfig;
23
+ type: EntityType.global;
24
+ })[];
25
+ groups: {
26
+ label: string;
27
+ items: {
28
+ icon: EntityIcon | undefined;
29
+ label: string;
30
+ path: string;
31
+ }[];
32
+ }[];
33
+ mapEntity: (entity: {
34
+ label: Parameters<typeof getTranslation>[0];
35
+ slug: string;
36
+ type: EntityType;
37
+ }) => {
38
+ icon: EntityIcon | undefined;
39
+ label: string;
40
+ path: string;
41
+ };
42
+ };
43
+ export declare function buildNavModel({ chatsSlug, config, i18n, permissions, visibleEntities, }: BuildNavModelProps): {
44
+ groups: {
45
+ label: string;
46
+ items: {
47
+ icon: EntityIcon | undefined;
48
+ label: string;
49
+ path: string;
50
+ }[];
51
+ }[];
52
+ items: NavConfigItem[];
53
+ };
54
+ export {};
55
+ //# sourceMappingURL=buildNavModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildNavModel.d.ts","sourceRoot":"","sources":["../../../src/elements/Nav/buildNavModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAiB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG7E,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACpF,KAAK,UAAU,GAAG,eAAe,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IACrD,eAAe,EAAE,WAAW,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,GAChB,EAAE,kBAAkB;;;;;;;;;;;;;;;;wBAYQ;QACzB,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,UAAU,CAAC;KAClB;;;;;EAyBF;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAmB,EACnB,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,GAChB,EAAE,kBAAkB;;;;;;;;;;EAsCpB"}
@@ -0,0 +1,70 @@
1
+ import { getTranslation } from '@payloadcms/translations';
2
+ import { EntityType, groupNavItems } from '@payloadcms/ui/shared';
3
+ import { formatAdminURL } from 'payload/shared';
4
+ export function buildCollectionGroups({ config, i18n, permissions, visibleEntities, }) {
5
+ const entities = [
6
+ ...config.collections
7
+ .filter(({ slug }) => visibleEntities.collections.includes(slug))
8
+ .map((entity) => ({ entity, type: EntityType.collection })),
9
+ ...config.globals
10
+ .filter(({ slug }) => visibleEntities.globals.includes(slug))
11
+ .map((entity) => ({ entity, type: EntityType.global })),
12
+ ];
13
+ const entityByKey = new Map(entities.map(({ entity, type }) => [`${type}:${entity.slug}`, entity]));
14
+ const mapEntity = (entity) => {
15
+ const label = getTranslation(entity.label, i18n);
16
+ return {
17
+ icon: entityByKey.get(`${entity.type}:${entity.slug}`)?.admin
18
+ ?.icon,
19
+ label: typeof label === 'string' ? label : entity.slug,
20
+ path: formatAdminURL({
21
+ adminRoute: config.routes.admin,
22
+ path: `/${entity.type}/${entity.slug}`,
23
+ }),
24
+ };
25
+ };
26
+ return {
27
+ entities,
28
+ groups: groupNavItems(entities.filter(({ entity }) => entity.admin.group !== null), permissions, i18n).map(({ entities: groupedEntities, label }) => ({
29
+ label,
30
+ items: groupedEntities.map(mapEntity),
31
+ })),
32
+ mapEntity,
33
+ };
34
+ }
35
+ export function buildNavModel({ chatsSlug = 'chats', config, i18n, permissions, visibleEntities, }) {
36
+ const { admin, routes } = config;
37
+ const { entities, groups, mapEntity } = buildCollectionGroups({
38
+ config,
39
+ i18n,
40
+ permissions,
41
+ visibleEntities,
42
+ });
43
+ const topLevelItems = entities
44
+ .filter(({ entity, type }) => {
45
+ const entityPermissions = permissions[type]?.[entity.slug];
46
+ return entity.admin.group === null && entityPermissions?.read;
47
+ })
48
+ .map(({ entity, type }) => {
49
+ const label = 'labels' in entity ? entity.labels.plural : entity.label;
50
+ return mapEntity({
51
+ label,
52
+ slug: entity.slug,
53
+ type,
54
+ });
55
+ });
56
+ const configuredItems = admin.components?.navItems;
57
+ const newChatItem = {
58
+ icon: 'pencil-edit',
59
+ label: 'New Chat',
60
+ path: formatAdminURL({
61
+ adminRoute: routes.admin,
62
+ path: `/collections/${chatsSlug}/create`,
63
+ }),
64
+ };
65
+ return {
66
+ groups,
67
+ items: [...(configuredItems ?? [newChatItem]), ...topLevelItems],
68
+ };
69
+ }
70
+ //# sourceMappingURL=buildNavModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildNavModel.js","sourceRoot":"","sources":["../../../src/elements/Nav/buildNavModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAahD,MAAM,UAAU,qBAAqB,CAAC,EACpC,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,GACI;IACnB,MAAM,QAAQ,GAAG;QACf,GAAG,MAAM,CAAC,WAAW;aAClB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aAChE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,UAAU,EAAE,CAAyB,CAAC;QACrF,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C,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,cAAc,CAAC;YACnB,UAAU,EAAE,MAAM,CAAC,KAAK;YACxB,IAAI,EAAE,gBAAgB,SAAS,SAAS;SACzC,CAAC;KACH,CAAC;IAEF,OAAO;QACL,MAAM;QACN,KAAK,EAAE,CAAC,GAAG,CAAC,eAAe,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,aAAa,CAAC;KACjE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PayloadRequest, ServerProps } from 'payload';
2
+ export type RecentsSectionProps = {
3
+ req?: PayloadRequest;
4
+ } & ServerProps;
5
+ export declare function RecentsSection({ payload, req }: RecentsSectionProps): Promise<import("react/jsx-runtime").JSX.Element>;
6
+ //# sourceMappingURL=RecentsSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentsSection.d.ts","sourceRoot":"","sources":["../../../../../src/elements/Nav/fixtures/consumer/RecentsSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3D,MAAM,MAAM,mBAAmB,GAAG;IAAE,GAAG,CAAC,EAAE,cAAc,CAAA;CAAE,GAAG,WAAW,CAAC;AAEzE,wBAAsB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,mBAAmB,oDAsCzE"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NavSection } from '@frogbotai/next';
3
+ import { RecentsSectionClient } from '@frogbotai/next/client';
4
+ import { getCachedFrogbot } from 'frogbot';
5
+ import { formatAdminURL } from 'payload/shared';
6
+ export async function RecentsSection({ payload, req }) {
7
+ const chat = getCachedFrogbot()?.config.chat;
8
+ const chatsSlug = chat?.enabled ? chat.chatsSlug : '';
9
+ const messagesSlug = chat?.enabled ? chat.messagesSlug : '';
10
+ let recents = [];
11
+ let collectionPath = '';
12
+ if (chat?.enabled && req?.user) {
13
+ const result = await payload.find({
14
+ collection: chat.chatsSlug,
15
+ depth: 0,
16
+ limit: 30,
17
+ overrideAccess: false,
18
+ req,
19
+ sort: '-lastMessageAt',
20
+ });
21
+ collectionPath = formatAdminURL({
22
+ adminRoute: payload.config.routes.admin,
23
+ path: `/collections/${chat.chatsSlug}`,
24
+ });
25
+ recents = result.docs.map((doc) => ({
26
+ id: doc.id,
27
+ title: typeof doc.title === 'string' && doc.title ? doc.title : 'Untitled',
28
+ agent: typeof doc.agent === 'string' ? doc.agent : '',
29
+ lastMessageAt: typeof doc.lastMessageAt === 'string' ? doc.lastMessageAt : null,
30
+ }));
31
+ }
32
+ return (_jsx(NavSection, { id: "recents", title: "Recents", children: _jsx(RecentsSectionClient, { chatsSlug: chatsSlug, collectionPath: collectionPath, messagesSlug: messagesSlug, recents: recents }) }));
33
+ }
34
+ //# sourceMappingURL=RecentsSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentsSection.js","sourceRoot":"","sources":["../../../../../src/elements/Nav/fixtures/consumer/RecentsSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIhD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAuB;IACxE,MAAM,IAAI,GAAG,gBAAgB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACtD,MAAM,YAAY,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,C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,EAC9B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,GAChB,GACS,CACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const admin: {
2
+ components: {
3
+ navSections: string[];
4
+ };
5
+ };
6
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/elements/Nav/fixtures/consumer/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;CAIS,CAAC"}
@@ -0,0 +1,6 @@
1
+ export const admin = {
2
+ components: {
3
+ navSections: ['./RecentsSection#RecentsSection'],
4
+ },
5
+ };
6
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/elements/Nav/fixtures/consumer/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,UAAU,EAAE;QACV,WAAW,EAAE,CAAC,iCAAiC,CAAC;KACjD;CACwB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { AppSidebarNavItem } from './AppSidebar.js';
3
+ export type FrogbotNavClientProps = {
4
+ accountEmail?: string;
5
+ accountIcon?: ReactNode;
6
+ accountName?: string;
7
+ afterAccountMenu?: ReactNode;
8
+ afterNavLinks?: ReactNode;
9
+ afterBottomRail?: ReactNode;
10
+ beforeAccountMenu?: ReactNode;
11
+ beforeNavLinks?: ReactNode;
12
+ beforeBottomRail?: ReactNode;
13
+ beforeSidebarClose?: ReactNode;
14
+ bottom?: ReactNode;
15
+ accountPath: string;
16
+ homePath: string;
17
+ initialOpen?: boolean;
18
+ items: AppSidebarNavItem[];
19
+ logo?: ReactNode;
20
+ logout?: ReactNode;
21
+ logoutPath?: string;
22
+ sections?: ReactNode;
23
+ settingsPath: string;
24
+ };
25
+ export declare function FrogbotNavClient({ accountEmail, accountIcon, accountName, accountPath, afterAccountMenu, afterBottomRail, afterNavLinks, beforeAccountMenu, beforeBottomRail, beforeNavLinks, beforeSidebarClose, bottom, homePath, initialOpen, items, logo, logout, logoutPath, sections, settingsPath, }: FrogbotNavClientProps): import("react/jsx-runtime").JSX.Element;
26
+ //# sourceMappingURL=index.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../src/elements/Nav/index.client.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,KAAK,EACL,IAAI,EACJ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,YAAY,GACb,EAAE,qBAAqB,2CA4DvB"}
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useNav, usePreferences, useRouteTransition } from '@payloadcms/ui';
4
+ import { usePathname, useRouter } from 'next/navigation.js';
5
+ import { PREFERENCE_KEYS } from 'payload/shared';
6
+ import { useEffect } from 'react';
7
+ import { AppSidebar } from './AppSidebar.js';
8
+ export function FrogbotNavClient({ accountEmail, accountIcon, accountName, accountPath, afterAccountMenu, afterBottomRail, afterNavLinks, beforeAccountMenu, beforeBottomRail, beforeNavLinks, beforeSidebarClose, bottom, homePath, initialOpen, items, logo, logout, logoutPath, sections, settingsPath, }) {
9
+ const pathname = usePathname();
10
+ const router = useRouter();
11
+ const { setPreference } = usePreferences();
12
+ const { startRouteTransition } = useRouteTransition();
13
+ const { hydrated, navOpen, navRef, setNavOpen, shouldAnimate } = useNav();
14
+ useEffect(() => {
15
+ if (initialOpen !== undefined)
16
+ setNavOpen(initialOpen);
17
+ }, [initialOpen, setNavOpen]);
18
+ return (_jsx("aside", { className: [
19
+ 'nav frogbot-nav-shell',
20
+ navOpen && 'nav--nav-open',
21
+ shouldAnimate && 'nav--nav-animate',
22
+ hydrated && 'nav--nav-hydrated',
23
+ ]
24
+ .filter(Boolean)
25
+ .join(' '), children: _jsx("div", { className: "nav__scroll", ref: navRef, children: _jsx("div", { className: "frogbot-nav", children: _jsx(AppSidebar, { accountEmail: accountEmail, accountIcon: accountIcon, accountName: accountName, accountPath: accountPath, afterAccountMenu: afterAccountMenu, afterBottomRail: afterBottomRail, afterNavLinks: afterNavLinks, beforeAccountMenu: beforeAccountMenu, beforeBottomRail: beforeBottomRail, beforeNavLinks: beforeNavLinks, beforeSidebarClose: beforeSidebarClose, bottom: bottom, currentPath: pathname, homePath: homePath, logo: logo, logout: logout, logoutPath: logoutPath, navItems: items, onNavigate: (path) => {
26
+ if (/^https?:\/\//.test(path))
27
+ window.location.assign(path);
28
+ else
29
+ startRouteTransition(() => router.push(path));
30
+ }, onToggle: () => {
31
+ const open = !navOpen;
32
+ setNavOpen(open);
33
+ void setPreference(PREFERENCE_KEYS.NAV, { open }, true);
34
+ }, open: navOpen, sections: sections, settingsPath: settingsPath }) }) }) }));
35
+ }
36
+ //# sourceMappingURL=index.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.client.js","sourceRoot":"","sources":["../../../src/elements/Nav/index.client.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAyB7C,MAAM,UAAU,gBAAgB,CAAC,EAC/B,YAAY,EACZ,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,KAAK,EACL,IAAI,EACJ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,YAAY,GACU;IACtB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,aAAa,EAAE,GAAG,cAAc,EAAE,CAAC;IA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oBAAoB,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACrD,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE;wBACb,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC;wBACtB,UAAU,CAAC,IAAI,CAAC,CAAC;wBACjB,KAAK,aAAa,CAAC,eAAe,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;oBAC1D,CAAC,EACD,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,GAC1B,GACE,GACF,GACA,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,378 @@
1
+ .frogbot-nav {
2
+ background: var(--theme-bg);
3
+ color: var(--theme-text);
4
+ display: block;
5
+ height: 100vh;
6
+ min-height: 100%;
7
+ overflow: visible;
8
+ width: 100%;
9
+ }
10
+
11
+ .frogbot-nav,
12
+ .frogbot-nav * {
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ .frogbot-admin-sidebar {
17
+ cursor: default;
18
+ display: flex;
19
+ flex-direction: column;
20
+ height: 100%;
21
+ min-height: 0;
22
+ }
23
+
24
+ .frogbot-admin-sidebar--collapsed {
25
+ cursor: pointer;
26
+ }
27
+
28
+ .frogbot-admin-sidebar--collapsed .frogbot-admin-sidebar__group-label,
29
+ .frogbot-admin-sidebar--collapsed .frogbot-admin-sidebar__label {
30
+ display: none;
31
+ }
32
+
33
+ .frogbot-admin-sidebar--collapsed .frogbot-nav-section__toggle,
34
+ .frogbot-admin-sidebar--collapsed .frogbot-collections-section__group-label,
35
+ .frogbot-admin-sidebar--collapsed .frogbot-recents-section__group-label,
36
+ .frogbot-admin-sidebar--collapsed .frogbot-recents-section__empty {
37
+ display: none;
38
+ }
39
+
40
+ .frogbot-admin-sidebar--collapsed .frogbot-collections-section__items {
41
+ padding-inline-start: 0;
42
+ }
43
+
44
+ .frogbot-admin-sidebar--collapsed .frogbot-nav-item {
45
+ justify-content: center;
46
+ padding: 8px;
47
+ }
48
+
49
+ .frogbot-admin-sidebar--collapsed .frogbot-nav-item__label {
50
+ display: none;
51
+ }
52
+
53
+ .frogbot-admin-sidebar--collapsed .frogbot-admin-sidebar__item {
54
+ justify-content: center;
55
+ padding: 8px;
56
+ }
57
+
58
+ .frogbot-admin-sidebar__header {
59
+ align-items: center;
60
+ display: flex;
61
+ flex: 0 0 auto;
62
+ justify-content: space-between;
63
+ margin-block-end: 8px;
64
+ }
65
+
66
+ .frogbot-admin-sidebar__header-controls {
67
+ align-items: center;
68
+ display: flex;
69
+ gap: 4px;
70
+ }
71
+
72
+ .frogbot-admin-sidebar__logo,
73
+ .frogbot-admin-sidebar__collapse {
74
+ align-items: center;
75
+ appearance: none;
76
+ background: transparent;
77
+ border: 0;
78
+ border-radius: 8px;
79
+ color: inherit;
80
+ cursor: pointer;
81
+ display: flex;
82
+ font: inherit;
83
+ justify-content: center;
84
+ margin: 0;
85
+ padding: 0;
86
+ }
87
+
88
+ .frogbot-admin-sidebar__logo {
89
+ height: 40px;
90
+ margin-inline-start: 3px;
91
+ width: 40px;
92
+ }
93
+
94
+ .frogbot-admin-sidebar__logo > *,
95
+ .frogbot-admin-sidebar__logo svg {
96
+ height: 100%;
97
+ width: 100%;
98
+ }
99
+
100
+ .frogbot-admin-sidebar__logo--toggle {
101
+ padding: 8px;
102
+ }
103
+
104
+ .frogbot-admin-sidebar__collapse {
105
+ height: 32px;
106
+ width: 32px;
107
+ }
108
+
109
+ .frogbot-admin-sidebar__logo--toggle:hover,
110
+ .frogbot-admin-sidebar__collapse:hover,
111
+ .frogbot-admin-sidebar__item:hover {
112
+ background: var(--theme-elevation-100);
113
+ }
114
+
115
+ .frogbot-admin-sidebar__tooltip {
116
+ position: fixed;
117
+ z-index: 100;
118
+ }
119
+
120
+ .frogbot-admin-sidebar__tooltip .tooltip {
121
+ bottom: auto;
122
+ left: 0;
123
+ top: 0;
124
+ transform: translate3d(8px, -50%, 0);
125
+ }
126
+
127
+ .frogbot-admin-sidebar__tooltip .tooltip::after {
128
+ display: none;
129
+ }
130
+
131
+ .frogbot-admin-sidebar__nav {
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: 2px;
135
+ min-height: 0;
136
+ overflow-y: auto;
137
+ scrollbar-width: none;
138
+ }
139
+
140
+ .frogbot-admin-sidebar__nav::-webkit-scrollbar {
141
+ display: none;
142
+ }
143
+
144
+ .frogbot-admin-sidebar__group {
145
+ margin-block-start: 12px;
146
+ }
147
+
148
+ .frogbot-admin-sidebar__group:first-child {
149
+ margin-block-start: 0;
150
+ }
151
+
152
+ .frogbot-admin-sidebar__group-label {
153
+ color: var(--theme-elevation-600);
154
+ cursor: pointer;
155
+ font-size: 12px;
156
+ font-weight: 500;
157
+ list-style: none;
158
+ padding: 0 10px 4px;
159
+ }
160
+
161
+ .frogbot-admin-sidebar__group-label::-webkit-details-marker {
162
+ display: none;
163
+ }
164
+
165
+ .frogbot-admin-sidebar__group-label::marker {
166
+ content: "";
167
+ }
168
+
169
+ .frogbot-admin-sidebar__items,
170
+ .frogbot-admin-sidebar__bottom {
171
+ display: flex;
172
+ flex-direction: column;
173
+ gap: 2px;
174
+ }
175
+
176
+ .frogbot-admin-sidebar__spacer {
177
+ flex: 1;
178
+ }
179
+
180
+ .frogbot-admin-sidebar__bottom {
181
+ flex: 0 0 auto;
182
+ }
183
+
184
+ .frogbot-admin-sidebar__item,
185
+ .frogbot-admin-sidebar__bottom .nav__log-out {
186
+ align-items: center;
187
+ background: transparent;
188
+ border: 0;
189
+ border-radius: 8px;
190
+ color: var(--theme-elevation-700);
191
+ cursor: pointer;
192
+ display: flex;
193
+ font: inherit;
194
+ font-size: 14px;
195
+ font-weight: 500;
196
+ justify-content: flex-start;
197
+ padding: 8px 10px;
198
+ text-align: start;
199
+ transition:
200
+ background 200ms ease-out,
201
+ color 200ms ease-out,
202
+ transform 200ms ease-out;
203
+ width: 100%;
204
+ }
205
+
206
+ .frogbot-admin-sidebar__bottom .nav__log-out:hover {
207
+ transform: translateX(4px);
208
+ }
209
+
210
+ .frogbot-admin-sidebar__item--active,
211
+ .frogbot-admin-sidebar__bottom .nav__log-out:hover {
212
+ background: var(--theme-elevation-150);
213
+ color: var(--theme-elevation-900);
214
+ }
215
+
216
+ .frogbot-admin-sidebar--collapsed .frogbot-admin-sidebar__bottom .nav__log-out {
217
+ justify-content: center;
218
+ padding: 8px;
219
+ }
220
+
221
+ .frogbot-admin-sidebar__item svg,
222
+ .frogbot-admin-sidebar__bottom .nav__log-out svg {
223
+ flex: 0 0 auto;
224
+ height: 20px;
225
+ width: 20px;
226
+ }
227
+
228
+ .frogbot-admin-sidebar__item svg.frogbot-admin-sidebar__icon {
229
+ box-sizing: border-box;
230
+ flex: 0 0 auto;
231
+ height: 24px;
232
+ padding: 2px;
233
+ width: 24px;
234
+ }
235
+
236
+ .frogbot-admin-sidebar__icon :is(circle, ellipse, line, path, polygon, polyline, rect) {
237
+ stroke-width: 2px;
238
+ vector-effect: non-scaling-stroke;
239
+ }
240
+
241
+ .frogbot-admin-sidebar__label {
242
+ margin-inline-start: 8px;
243
+ overflow: hidden;
244
+ text-overflow: ellipsis;
245
+ white-space: nowrap;
246
+ }
247
+
248
+ .frogbot-nav .usage-reports-nav-link {
249
+ color: var(--theme-elevation-700);
250
+ display: flex;
251
+ font-size: 14px;
252
+ font-weight: 500;
253
+ padding: 8px 10px;
254
+ text-decoration: none;
255
+ }
256
+
257
+ .frogbot-nav .usage-reports-nav-link:hover {
258
+ background: var(--theme-elevation-100);
259
+ border-radius: 8px;
260
+ color: var(--theme-elevation-900);
261
+ }
262
+
263
+ .frogbot-account-menu.fb-dropdown-menu__content {
264
+ background: var(--theme-input-bg);
265
+ border: 1px solid var(--theme-elevation-150);
266
+ border-radius: 12px;
267
+ box-shadow:
268
+ 0 8px 24px rgb(0 0 0 / 0.12),
269
+ 0 2px 8px rgb(0 0 0 / 0.08);
270
+ color: var(--theme-text);
271
+ min-width: 240px;
272
+ padding: 8px;
273
+ z-index: 100;
274
+ }
275
+
276
+ .frogbot-account-menu__header {
277
+ align-items: center;
278
+ display: flex;
279
+ gap: 10px;
280
+ padding: 8px 10px;
281
+ }
282
+
283
+ .frogbot-account-menu__header.fb-dropdown-menu__item {
284
+ border-radius: 8px;
285
+ cursor: pointer;
286
+ }
287
+
288
+ .frogbot-account-menu__header.fb-dropdown-menu__item:focus,
289
+ .frogbot-account-menu__header.fb-dropdown-menu__item[data-highlighted] {
290
+ background: var(--theme-elevation-100);
291
+ }
292
+
293
+ .frogbot-account-menu__avatar {
294
+ align-items: center;
295
+ display: flex;
296
+ flex: 0 0 auto;
297
+ justify-content: center;
298
+ }
299
+
300
+ .frogbot-account-menu__avatar svg {
301
+ height: 32px;
302
+ width: 32px;
303
+ }
304
+
305
+ .frogbot-account-menu__identity {
306
+ display: flex;
307
+ flex-direction: column;
308
+ min-width: 0;
309
+ }
310
+
311
+ .frogbot-account-menu__name {
312
+ font-size: 14px;
313
+ font-weight: 600;
314
+ overflow: hidden;
315
+ text-overflow: ellipsis;
316
+ white-space: nowrap;
317
+ }
318
+
319
+ .frogbot-account-menu__email {
320
+ color: var(--theme-elevation-600);
321
+ font-size: 12px;
322
+ overflow: hidden;
323
+ text-overflow: ellipsis;
324
+ white-space: nowrap;
325
+ }
326
+
327
+ .frogbot-account-menu__separator.fb-dropdown-menu__separator {
328
+ background: var(--theme-elevation-150);
329
+ margin: 6px 0;
330
+ }
331
+
332
+ .frogbot-account-menu__item.fb-dropdown-menu__item {
333
+ align-items: center;
334
+ border-radius: 8px;
335
+ color: var(--theme-elevation-700);
336
+ cursor: pointer;
337
+ display: flex;
338
+ font-size: 14px;
339
+ font-weight: 500;
340
+ gap: 8px;
341
+ padding: 8px 10px;
342
+ }
343
+
344
+ .frogbot-account-menu__item.fb-dropdown-menu__item:focus,
345
+ .frogbot-account-menu__item.fb-dropdown-menu__item[data-highlighted] {
346
+ background: var(--theme-elevation-100);
347
+ color: var(--theme-elevation-900);
348
+ }
349
+
350
+ .frogbot-account-menu__item-icon {
351
+ flex: 0 0 auto;
352
+ height: 20px;
353
+ width: 20px;
354
+ }
355
+
356
+ .frogbot-account-menu__item-label {
357
+ overflow: hidden;
358
+ text-overflow: ellipsis;
359
+ white-space: nowrap;
360
+ }
361
+
362
+ .frogbot-account-menu .nav__log-out {
363
+ align-items: center;
364
+ border-radius: 8px;
365
+ color: var(--theme-elevation-700);
366
+ display: flex;
367
+ font-size: 14px;
368
+ font-weight: 500;
369
+ gap: 8px;
370
+ padding: 8px 10px;
371
+ text-decoration: none;
372
+ width: 100%;
373
+ }
374
+
375
+ .frogbot-account-menu .nav__log-out:hover {
376
+ background: var(--theme-elevation-100);
377
+ color: var(--theme-elevation-900);
378
+ }
@@ -0,0 +1,6 @@
1
+ import type { PayloadRequest, ServerProps } from 'payload';
2
+ export type FrogbotNavProps = {
3
+ req?: PayloadRequest;
4
+ } & ServerProps;
5
+ export declare function FrogbotNav(props: FrogbotNavProps): Promise<import("react/jsx-runtime").JSX.Element | null>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Nav/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAkB,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAyB3E,MAAM,MAAM,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,cAAc,CAAA;CAAE,GAAG,WAAW,CAAC;AAErE,wBAAsB,UAAU,CAAC,KAAK,EAAE,eAAe,2DAoHtD"}