maquinaweb-ui 2.67.0 → 2.68.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.
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps, ElementType } from "react";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/container-animation/container-animation.d.ts
5
5
  type ContainerAnimationProps<T extends ElementType = 'div'> = ComponentProps<'div'> & ComponentProps<T> & {
@@ -23,7 +23,7 @@ declare const ContainerAnimation: <T extends ElementType = "div">({
23
23
  distance,
24
24
  hideNotInView,
25
25
  ...props
26
- }: ContainerAnimationProps<T>) => react_jsx_runtime11.JSX.Element;
26
+ }: ContainerAnimationProps<T>) => react_jsx_runtime1.JSX.Element;
27
27
  //#endregion
28
28
  export { ContainerAnimation, ContainerAnimationProps };
29
29
  //# sourceMappingURL=container-animation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"container-animation.d.ts","names":[],"sources":["../../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,mBAAA,CAAA,GAAA,CAAA,OAuB5B"}
1
+ {"version":3,"file":"container-animation.d.ts","names":[],"sources":["../../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,kBAAA,CAAA,GAAA,CAAA,OAuB5B"}
@@ -1,5 +1,5 @@
1
1
  import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
  import { Matcher } from "react-day-picker";
4
4
 
5
5
  //#region src/components/date-field/DateField.d.ts
@@ -29,7 +29,7 @@ declare function DateField<TFieldValues extends FieldValues = FieldValues, TFiel
29
29
  required,
30
30
  help,
31
31
  dateOnly
32
- }: DateFieldProps<TFieldValues, TFieldName>): react_jsx_runtime2.JSX.Element;
32
+ }: DateFieldProps<TFieldValues, TFieldName>): react_jsx_runtime11.JSX.Element;
33
33
  //#endregion
34
34
  export { DateField, DateFieldProps };
35
35
  //# sourceMappingURL=DateField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateField.d.ts","names":[],"sources":["../../src/components/date-field/DateField.tsx"],"sourcesContent":[],"mappings":";;;;;UA4BiB,oCACM,cAAc,gCAChB,UAAU,gBAAgB,UAAU,uBAC/C,KAAK,mBAAmB,cAAc;;;EAH/B,WAAA,CAAA,EAAA,MAAc;EACR,SAAA,CAAA,EAAA,MAAA;EAAc,QAAA,CAAA,EAOxB,OAPwB,GAOd,OAPc,EAAA,GAAA,SAAA;EACN,aAAA,CAAA,EAAA,OAAA;EAAV,YAAA,CAAA,EAQJ,IARI;EAAoC,QAAA,CAAA,EAS5C,IAT4C;EAAV,QAAA,CAAA,EAAA,OAAA;EACb,IAAA,CAAA,EAAA,MAAA;EAAc;EAAjC,QAAA,CAAA,EAAA,OAAA;;iBAeN,SAVc,CAAA,qBAWA,WAXA,GAWc,WAXd,EAAA,mBAYF,SAZE,CAYQ,YAZR,CAAA,GAYwB,SAZxB,CAYkC,YAZlC,CAAA,CAAA,CAAA;EAAA,IAAA;EAAA,KAAA;EAAA,WAAA;EAAA,aAAA;EAAA,QAAA;EAAA,SAAA;EAAA,QAAA;EAAA,YAAA;EAAA,QAAA;EAAA,IAAA;EAAA;AAAA,CAAA,EAyBpB,cAzBoB,CAyBL,YAzBK,EAyBS,UAzBT,CAAA,CAAA,EAyBoB,kBAAA,CAAA,GAAA,CAAA,OAzBpB"}
1
+ {"version":3,"file":"DateField.d.ts","names":[],"sources":["../../src/components/date-field/DateField.tsx"],"sourcesContent":[],"mappings":";;;;;UA4BiB,oCACM,cAAc,gCAChB,UAAU,gBAAgB,UAAU,uBAC/C,KAAK,mBAAmB,cAAc;;;EAH/B,WAAA,CAAA,EAAA,MAAc;EACR,SAAA,CAAA,EAAA,MAAA;EAAc,QAAA,CAAA,EAOxB,OAPwB,GAOd,OAPc,EAAA,GAAA,SAAA;EACN,aAAA,CAAA,EAAA,OAAA;EAAV,YAAA,CAAA,EAQJ,IARI;EAAoC,QAAA,CAAA,EAS5C,IAT4C;EAAV,QAAA,CAAA,EAAA,OAAA;EACb,IAAA,CAAA,EAAA,MAAA;EAAc;EAAjC,QAAA,CAAA,EAAA,OAAA;;iBAeN,SAVc,CAAA,qBAWA,WAXA,GAWc,WAXd,EAAA,mBAYF,SAZE,CAYQ,YAZR,CAAA,GAYwB,SAZxB,CAYkC,YAZlC,CAAA,CAAA,CAAA;EAAA,IAAA;EAAA,KAAA;EAAA,WAAA;EAAA,aAAA;EAAA,QAAA;EAAA,SAAA;EAAA,QAAA;EAAA,YAAA;EAAA,QAAA;EAAA,IAAA;EAAA;AAAA,CAAA,EAyBpB,cAzBoB,CAyBL,YAzBK,EAyBS,UAzBT,CAAA,CAAA,EAyBoB,mBAAA,CAAA,GAAA,CAAA,OAzBpB"}
@@ -1,5 +1,5 @@
1
1
  import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
2
- import * as react_jsx_runtime7 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { Matcher } from "react-day-picker";
4
4
 
5
5
  //#region src/components/date-hour-field/DateHourField.d.ts
@@ -29,7 +29,7 @@ declare function DateHourField<TFieldValues extends FieldValues = FieldValues, T
29
29
  help,
30
30
  hourPlaceholder,
31
31
  valueType
32
- }: DateHourFieldProps<TFieldValues, TFieldName>): react_jsx_runtime7.JSX.Element;
32
+ }: DateHourFieldProps<TFieldValues, TFieldName>): react_jsx_runtime0.JSX.Element;
33
33
  //#endregion
34
34
  export { DateHourField, DateHourFieldProps };
35
35
  //# sourceMappingURL=DateHourField.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { Mask, Options } from "../src/hooks/with-mask.js";
2
2
  import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
3
3
  import { Dispatch, SetStateAction } from "react";
4
- import * as react_jsx_runtime1 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import { PopoverProps } from "@radix-ui/react-popover";
6
6
 
7
7
  //#region src/components/input-suggest/input-suggest.d.ts
@@ -71,7 +71,7 @@ declare function InputSuggest<TFieldValues extends FieldValues = FieldValues, TF
71
71
  debounceTime,
72
72
  maxWait,
73
73
  ...props
74
- }: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime1.JSX.Element;
74
+ }: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime0.JSX.Element;
75
75
  //#endregion
76
76
  export { InputSuggest, InputSuggestProps };
77
77
  //# sourceMappingURL=input-suggest.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { KanbanCardItemProps } from "./types.js";
2
- import * as react_jsx_runtime16 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/kanban-dnd/kanban-card-item.d.ts
5
5
  declare function KanbanCardItem({
@@ -8,7 +8,7 @@ declare function KanbanCardItem({
8
8
  className,
9
9
  getSelectedCardIds,
10
10
  getSelectableItems
11
- }: KanbanCardItemProps): react_jsx_runtime16.JSX.Element;
11
+ }: KanbanCardItemProps): react_jsx_runtime13.JSX.Element;
12
12
  //#endregion
13
13
  export { KanbanCardItem };
14
14
  //# sourceMappingURL=kanban-card-item.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { KanbanDndMonitorProps } from "./types.js";
2
- import * as react_jsx_runtime17 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/kanban-dnd/kanban-dnd-monitor.d.ts
5
5
  declare function KanbanDndMonitor<TColumn>({
@@ -23,7 +23,7 @@ declare function KanbanDndMonitor<TColumn>({
23
23
  isAutoScrollEnabled,
24
24
  renderIdleLayer,
25
25
  className
26
- }: KanbanDndMonitorProps<TColumn>): react_jsx_runtime17.JSX.Element;
26
+ }: KanbanDndMonitorProps<TColumn>): react_jsx_runtime14.JSX.Element;
27
27
  //#endregion
28
28
  export { KanbanDndMonitor };
29
29
  //# sourceMappingURL=kanban-dnd-monitor.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { KanbanDropZoneProps } from "./types.js";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/kanban-dnd/kanban-dropzone.d.ts
5
5
  declare function KanbanDropZone({
@@ -7,7 +7,7 @@ declare function KanbanDropZone({
7
7
  id,
8
8
  className,
9
9
  isOverClassName
10
- }: KanbanDropZoneProps): react_jsx_runtime18.JSX.Element;
10
+ }: KanbanDropZoneProps): react_jsx_runtime15.JSX.Element;
11
11
  //#endregion
12
12
  export { KanbanDropZone };
13
13
  //# sourceMappingURL=kanban-dropzone.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import { KanbanSelectorProps } from "./types.js";
2
- import * as react_jsx_runtime19 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/kanban-dnd/kanban-selector.d.ts
5
5
  declare function KanbanSelector({
6
6
  dragAreaId,
7
7
  autoScrollMargin,
8
8
  ignoredSlots
9
- }: KanbanSelectorProps): react_jsx_runtime19.JSX.Element | null;
9
+ }: KanbanSelectorProps): react_jsx_runtime16.JSX.Element | null;
10
10
  //#endregion
11
11
  export { KanbanSelector };
12
12
  //# sourceMappingURL=kanban-selector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"landing-content.d.ts","names":[],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,sBAAA,WACJ,OAAO,gBAAgB;iBAQnB,cAAA;AATA,iBA4DM,qBAAA,CA5DgB,OAAA,EA6D3B,cA7D2B,CAAA,EA8DnC,OA9DmC,CA8D3B,0BA9D2B,CAAA;AACnB,iBA6GH,uBAAA,CA7GG,IAAA,EAAA,MAAA,CAAA,EAAA;EAAgB,OAAA,EAAA,MAAA;EAAvB,UAAA,EAAA,MAAA;EAAM,UAAA,EAAA,MAAA;AAQlB,CAAA,GAAgB,IAAA;AAmDM,iBAsEN,qBAAA,CAtE2B,OAAA,EAuEhC,0BAvEgC,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAyEvB,0BAzEuB;AAChC,iBAsFW,uBAAA,CAtFX,IAAA,EAsFyC,kBAtFzC,CAAA,EAsF2D,OAtF3D,CAAA;EACA,QAAA,EAAA,OAAA;EAAR,IAAA,EAkGQ,0BAlGR;CAAO,CAAA"}
1
+ {"version":3,"file":"landing-content.d.ts","names":[],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,sBAAA,WACJ,OAAO,gBAAgB;iBAQnB,cAAA;AATA,iBA6DM,qBAAA,CA7DgB,OAAA,EA8D3B,cA9D2B,CAAA,EA+DnC,OA/DmC,CA+D3B,0BA/D2B,CAAA;AACnB,iBA8GH,uBAAA,CA9GG,IAAA,EAAA,MAAA,CAAA,EAAA;EAAgB,OAAA,EAAA,MAAA;EAAvB,UAAA,EAAA,MAAA;EAAM,UAAA,EAAA,MAAA;AAQlB,CAAA,GAAgB,IAAA;AAoDM,iBAsEN,qBAAA,CAtE2B,OAAA,EAuEhC,0BAvEgC,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAyEvB,0BAzEuB;AAChC,iBAsFW,uBAAA,CAtFX,IAAA,EAsFyC,kBAtFzC,CAAA,EAsF2D,OAtF3D,CAAA;EACA,QAAA,EAAA,OAAA;EAAR,IAAA,EAkGQ,0BAlGR;CAAO,CAAA"}
@@ -28,7 +28,10 @@ async function getLandingOverrides(pageKey) {
28
28
  try {
29
29
  const response = await fetch(url, {
30
30
  headers: { "X-Organization": organizationId },
31
- next: { tags: ["landing-page-content", `landing-page-content-${pageKey}`] }
31
+ next: {
32
+ revalidate: 3600,
33
+ tags: ["landing-page-content", `landing-page-content-${pageKey}`]
34
+ }
32
35
  });
33
36
  if (!response.ok) return [];
34
37
  return response.json();
@@ -1 +1 @@
1
- {"version":3,"file":"landing-content.js","names":["pageDefaults: Record<LandingPageKey, LandingPageContentDefinition>"],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":["import 'server-only';\n\nimport { cache } from 'react';\nimport { cookies } from 'next/headers';\n\nimport type {\n LandingContentName,\n LandingPageContentApiItem,\n LandingPageContentDefinition,\n LandingPageKey,\n ResolvedLandingContentItem,\n ResolvedLandingPageContent,\n} from './types';\n\ntype NextFetchInit = RequestInit & {\n next?: {\n tags?: string[];\n };\n};\n\nlet pageDefaults: Record<LandingPageKey, LandingPageContentDefinition> = {};\n\nexport function setLandingPageDefaults(\n defaults: Record<LandingPageKey, LandingPageContentDefinition>\n) {\n pageDefaults = {\n ...pageDefaults,\n ...defaults,\n };\n}\n\nexport function buildContentId(sectionKey: string, contentKey: string) {\n return `${sectionKey}.${contentKey}`;\n}\n\nfunction toApiUrl(path: string) {\n const baseUrl = String(process.env.NEXT_PUBLIC_BASE_URL || '').replace(\n /\\/$/,\n ''\n );\n return baseUrl ? `${baseUrl}${path}` : '';\n}\n\nasync function getEditableState() {\n const cookieStore = await cookies();\n return Boolean(\n cookieStore.get('token')?.value && cookieStore.get('organization')?.value\n );\n}\n\nasync function getLandingOverrides(\n pageKey: LandingPageKey\n): Promise<LandingPageContentApiItem[]> {\n const organizationId = process.env.NEXT_PUBLIC_ORGANIZATION_ID;\n const url = toApiUrl(\n `/public/landing-page-contents/?page_key=${encodeURIComponent(pageKey)}`\n );\n\n if (!organizationId || !url) {\n return [];\n }\n\n try {\n const response = await fetch(url, {\n headers: {\n 'X-Organization': organizationId,\n },\n next: {\n tags: ['landing-page-content', `landing-page-content-${pageKey}`],\n },\n } satisfies NextFetchInit);\n\n if (!response.ok) {\n return [];\n }\n\n return response.json();\n } catch {\n return [];\n }\n}\n\nexport async function getLandingPageContent(\n pageKey: LandingPageKey\n): Promise<ResolvedLandingPageContent> {\n const defaults = pageDefaults[pageKey] ?? {\n pageKey,\n sections: [],\n };\n\n const [editable, overrides] = await Promise.all([\n getEditableState(),\n getLandingOverrides(pageKey),\n ]);\n\n const byId = new Map<string, LandingPageContentApiItem>(\n overrides.map((item) => [\n buildContentId(item.section_key, item.content_key),\n item,\n ])\n );\n\n const contents = Object.fromEntries(\n defaults.sections.flatMap((section) =>\n section.contents.map((item) => {\n const id = buildContentId(section.sectionKey, item.contentKey);\n const override = byId.get(id);\n\n return [\n id,\n {\n pageKey: defaults.pageKey,\n sectionKey: section.sectionKey,\n contentKey: item.contentKey,\n value: override?.value ?? item.value,\n defaultValue: item.value,\n metadata: override?.metadata ?? item.metadata ?? {},\n },\n ] as const;\n })\n )\n );\n\n return {\n pageKey: defaults.pageKey,\n editable,\n contents,\n };\n}\n\nconst getLandingPageContentCached = cache(getLandingPageContent);\n\nexport function parseLandingContentName(name: string) {\n const [rawPageKey, rawSectionKey, ...contentParts] = name\n .split('.')\n .map((part) => part.trim());\n\n const pageKey = rawPageKey || '';\n const sectionKey = rawSectionKey || '';\n const contentKey = contentParts.join('.').trim();\n\n if (!pageDefaults[pageKey] || !sectionKey || !contentKey) {\n return null;\n }\n\n return {\n pageKey,\n sectionKey,\n contentKey,\n };\n}\n\nexport function getLandingContentItem(\n content: ResolvedLandingPageContent,\n sectionKey: string,\n contentKey: string\n) {\n return (\n content.contents[buildContentId(sectionKey, contentKey)] ?? {\n pageKey: content.pageKey,\n sectionKey,\n contentKey,\n value: '',\n defaultValue: '',\n metadata: {},\n }\n );\n}\n\nexport async function getLandingContentByName(name: LandingContentName) {\n const parsed = parseLandingContentName(name);\n\n if (!parsed) {\n return {\n editable: false,\n item: {\n pageKey: 'unknown',\n sectionKey: 'invalid',\n contentKey: name,\n value: '',\n defaultValue: '',\n metadata: {},\n } as ResolvedLandingContentItem,\n };\n }\n\n const content = await getLandingPageContentCached(parsed.pageKey);\n\n return {\n editable: content.editable,\n item: getLandingContentItem(content, parsed.sectionKey, parsed.contentKey),\n };\n}\n"],"mappings":";;;;;AAoBA,IAAIA,eAAqE,EAAE;AAE3E,SAAgB,uBACd,UACA;AACA,gBAAe;EACb,GAAG;EACH,GAA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SAAS;GAClB,YAAY,QAAQ;GACpB,YAAY,KAAK;GACjB,OAAO,UAAU,SAAS,KAAK;GAC/B,cAAc,KAAK;GACnB,UAAU,UAAU,YAAY,KAAK,YAAY,EAAE;GACpD,CACF;GACD,CACH,CACF;AAED,QAAO;EACL,SAAS,SAAS;EAClB;EACA;EACD;;AAGH,MAAM,8BAA8B,MAAM,sBAAsB;AAEhE,SAAgB,wBAAwB,MAAc;CACpD,MAAM,CAAC,YAAY,eAAe,GAAG,gBAAgB,KAClD,MAAM,IAAI,CACV,KAAK,SAAS,KAAK,MAAM,CAAC;CAE7B,MAAM,UAAU,cAAc;CAC9B,MAAM,aAAa,iBAAiB;CACpC,MAAM,aAAa,aAAa,KAAK,IAAI,CAAC,MAAM;AAEhD,KAAI,CAAC,aAAa,YAAY,CAAC,cAAc,CAAC,WAC5C,QAAO;AAGT,QAAO;EACL;EACA;EACA;EACD;;AAGH,SAAgB,sBACd,SACA,YACA,YACA;AACA,QACE,QAAQ,SAAS,eAAe,YAAY,WAAW,KAAK;EAC1D,SAAS,QAAQ;EACjB;EACA;EACA,OAAO;EACP,cAAc;EACd,UAAU,EAAE;EACb;;AAIL,eAAsB,wBAAwB,MAA0B;CACtE,MAAM,SAAS,wBAAwB,KAAK;AAE5C,KAAI,CAAC,OACH,QAAO;EACL,UAAU;EACV,MAAM;GACJ,SAAS;GACT,YAAY;GACZ,YAAY;GACZ,OAAO;GACP,cAAc;GACd,UAAU,EAAE;GACb;EACF;CAGH,MAAM,UAAU,MAAM,4BAA4B,OAAO,QAAQ;AAEjE,QAAO;EACL,UAAU,QAAQ;EAClB,MAAM,sBAAsB,SAAS,OAAO,YAAY,OAAO,WAAW;EAC3E"}
1
+ {"version":3,"file":"landing-content.js","names":["pageDefaults: Record<LandingPageKey, LandingPageContentDefinition>"],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":["import 'server-only';\n\nimport { cache } from 'react';\nimport { cookies } from 'next/headers';\n\nimport type {\n LandingContentName,\n LandingPageContentApiItem,\n LandingPageContentDefinition,\n LandingPageKey,\n ResolvedLandingContentItem,\n ResolvedLandingPageContent,\n} from './types';\n\ntype NextFetchInit = RequestInit & {\n next?: {\n tags?: string[];\n };\n};\n\nlet pageDefaults: Record<LandingPageKey, LandingPageContentDefinition> = {};\n\nexport function setLandingPageDefaults(\n defaults: Record<LandingPageKey, LandingPageContentDefinition>\n) {\n pageDefaults = {\n ...pageDefaults,\n ...defaults,\n };\n}\n\nexport function buildContentId(sectionKey: string, contentKey: string) {\n return `${sectionKey}.${contentKey}`;\n}\n\nfunction toApiUrl(path: string) {\n const baseUrl = String(process.env.NEXT_PUBLIC_BASE_URL || '').replace(\n /\\/$/,\n ''\n );\n return baseUrl ? `${baseUrl}${path}` : '';\n}\n\nasync function getEditableState() {\n const cookieStore = await cookies();\n return Boolean(\n cookieStore.get('token')?.value && cookieStore.get('organization')?.value\n );\n}\n\nasync function getLandingOverrides(\n pageKey: LandingPageKey\n): Promise<LandingPageContentApiItem[]> {\n const organizationId = process.env.NEXT_PUBLIC_ORGANIZATION_ID;\n const url = toApiUrl(\n `/public/landing-page-contents/?page_key=${encodeURIComponent(pageKey)}`\n );\n\n if (!organizationId || !url) {\n return [];\n }\n\n try {\n const response = await fetch(url, {\n headers: {\n 'X-Organization': organizationId,\n },\n next: {\n revalidate: 3600,\n tags: ['landing-page-content', `landing-page-content-${pageKey}`],\n },\n } satisfies NextFetchInit);\n\n if (!response.ok) {\n return [];\n }\n\n return response.json();\n } catch {\n return [];\n }\n}\n\nexport async function getLandingPageContent(\n pageKey: LandingPageKey\n): Promise<ResolvedLandingPageContent> {\n const defaults = pageDefaults[pageKey] ?? {\n pageKey,\n sections: [],\n };\n\n const [editable, overrides] = await Promise.all([\n getEditableState(),\n getLandingOverrides(pageKey),\n ]);\n\n const byId = new Map<string, LandingPageContentApiItem>(\n overrides.map((item) => [\n buildContentId(item.section_key, item.content_key),\n item,\n ])\n );\n\n const contents = Object.fromEntries(\n defaults.sections.flatMap((section) =>\n section.contents.map((item) => {\n const id = buildContentId(section.sectionKey, item.contentKey);\n const override = byId.get(id);\n\n return [\n id,\n {\n pageKey: defaults.pageKey,\n sectionKey: section.sectionKey,\n contentKey: item.contentKey,\n value: override?.value ?? item.value,\n defaultValue: item.value,\n metadata: override?.metadata ?? item.metadata ?? {},\n },\n ] as const;\n })\n )\n );\n\n return {\n pageKey: defaults.pageKey,\n editable,\n contents,\n };\n}\n\nconst getLandingPageContentCached = cache(getLandingPageContent);\n\nexport function parseLandingContentName(name: string) {\n const [rawPageKey, rawSectionKey, ...contentParts] = name\n .split('.')\n .map((part) => part.trim());\n\n const pageKey = rawPageKey || '';\n const sectionKey = rawSectionKey || '';\n const contentKey = contentParts.join('.').trim();\n\n if (!pageDefaults[pageKey] || !sectionKey || !contentKey) {\n return null;\n }\n\n return {\n pageKey,\n sectionKey,\n contentKey,\n };\n}\n\nexport function getLandingContentItem(\n content: ResolvedLandingPageContent,\n sectionKey: string,\n contentKey: string\n) {\n return (\n content.contents[buildContentId(sectionKey, contentKey)] ?? {\n pageKey: content.pageKey,\n sectionKey,\n contentKey,\n value: '',\n defaultValue: '',\n metadata: {},\n }\n );\n}\n\nexport async function getLandingContentByName(name: LandingContentName) {\n const parsed = parseLandingContentName(name);\n\n if (!parsed) {\n return {\n editable: false,\n item: {\n pageKey: 'unknown',\n sectionKey: 'invalid',\n contentKey: name,\n value: '',\n defaultValue: '',\n metadata: {},\n } as ResolvedLandingContentItem,\n };\n }\n\n const content = await getLandingPageContentCached(parsed.pageKey);\n\n return {\n editable: content.editable,\n item: getLandingContentItem(content, parsed.sectionKey, parsed.contentKey),\n };\n}\n"],"mappings":";;;;;AAoBA,IAAIA,eAAqE,EAAE;AAE3E,SAAgB,uBACd,UACA;AACA,gBAAe;EACb,GAAG;EACH,GAAG;EACJ;;AAGH,SAAgB,eAAe,YAAoB,YAAoB;AACrE,QAAO,GAAG,WAAW,GAAG;;AAG1B,SAAS,SAAS,MAAc;CAC9B,MAAM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AAU,UAAU,YAAY,KAAK,YAAY,EAAE;GACpD,CACF;GACD,CACH,CACF;AAED,QAAO;EACL,SAAS,SAAS;EAClB;EACA;EACD;;AAGH,MAAM,8BAA8B,MAAM,sBAAsB;AAEhE,SAAgB,wBAAwB,MAAc;CACpD,MAAM,CAAC,YAAY,eAAe,GAAG,gBAAgB,KAClD,MAAM,IAAI,CACV,KAAK,SAAS,KAAK,MAAM,CAAC;CAE7B,MAAM,UAAU,cAAc;CAC9B,MAAM,aAAa,iBAAiB;CACpC,MAAM,aAAa,aAAa,KAAK,IAAI,CAAC,MAAM;AAEhD,KAAI,CAAC,aAAa,YAAY,CAAC,cAAc,CAAC,WAC5C,QAAO;AAGT,QAAO;EACL;EACA;EACA;EACD;;AAGH,SAAgB,sBACd,SACA,YACA,YACA;AACA,QACE,QAAQ,SAAS,eAAe,YAAY,WAAW,KAAK;EAC1D,SAAS,QAAQ;EACjB;EACA;EACA,OAAO;EACP,cAAc;EACd,UAAU,EAAE;EACb;;AAIL,eAAsB,wBAAwB,MAA0B;CACtE,MAAM,SAAS,wBAAwB,KAAK;AAE5C,KAAI,CAAC,OACH,QAAO;EACL,UAAU;EACV,MAAM;GACJ,SAAS;GACT,YAAY;GACZ,YAAY;GACZ,OAAO;GACP,cAAc;GACd,UAAU,EAAE;GACb;EACF;CAGH,MAAM,UAAU,MAAM,4BAA4B,OAAO,QAAQ;AAEjE,QAAO;EACL,UAAU,QAAQ;EAClB,MAAM,sBAAsB,SAAS,OAAO,YAAY,OAAO,WAAW;EAC3E"}
@@ -1,8 +1,8 @@
1
1
  import { LandingTextProps } from "./types.js";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/landing-text/landing-text.d.ts
5
- declare function LandingText(props: LandingTextProps): Promise<react_jsx_runtime10.JSX.Element>;
5
+ declare function LandingText(props: LandingTextProps): Promise<react_jsx_runtime8.JSX.Element>;
6
6
  //#endregion
7
7
  export { LandingText };
8
8
  //# sourceMappingURL=landing-text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":[],"mappings":";;;;iBAWe,WAAA,QAAmB,mBAAgB,QAAA,mBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":[],"mappings":";;;;iBAWe,WAAA,QAAmB,mBAAgB,QAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ServerLandingTextProps } from "./types.js";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/landing-text/server-landing-text.d.ts
5
5
  declare function ServerLandingText({
@@ -8,7 +8,7 @@ declare function ServerLandingText({
8
8
  className,
9
9
  registration,
10
10
  ...props
11
- }: ServerLandingTextProps): react_jsx_runtime9.JSX.Element;
11
+ }: ServerLandingTextProps): react_jsx_runtime2.JSX.Element;
12
12
  //#endregion
13
13
  export { ServerLandingText };
14
14
  //# sourceMappingURL=server-landing-text.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/page-header/page-header.d.ts
4
4
  interface PageHeaderProps {
@@ -10,7 +10,7 @@ declare function PageHeader({
10
10
  title,
11
11
  help,
12
12
  description
13
- }: PageHeaderProps): react_jsx_runtime8.JSX.Element;
13
+ }: PageHeaderProps): react_jsx_runtime7.JSX.Element;
14
14
  //#endregion
15
15
  export { PageHeader, PageHeaderProps };
16
16
  //# sourceMappingURL=page-header.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { SelectorProps } from "../ui/selector.js";
2
2
  import { FieldPath, FieldPathValue, FieldValues, UseControllerProps } from "react-hook-form";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
4
4
  import { Options } from "nuqs";
5
5
 
6
6
  //#region src/components/remote-selector/remote-selector.d.ts
@@ -38,7 +38,7 @@ declare function RemoteSelectorField<T, TFieldValues extends FieldValues = Field
38
38
  ...props
39
39
  }: RemoteSelectorFieldProps<TFieldValues, TFieldName> & BaseRemoteSelectorProps<T> & {
40
40
  withPortal?: boolean;
41
- }): react_jsx_runtime0.JSX.Element;
41
+ }): react_jsx_runtime9.JSX.Element;
42
42
  interface RemoteSelectorQueryProps<T> extends BaseRemoteSelectorProps<T> {
43
43
  name: string;
44
44
  defaultValue?: string;
@@ -58,7 +58,7 @@ declare function RemoteSelectorQuery<T>({
58
58
  fieldLabel,
59
59
  type,
60
60
  ...props
61
- }: RemoteSelectorQueryProps<T>): react_jsx_runtime0.JSX.Element;
61
+ }: RemoteSelectorQueryProps<T>): react_jsx_runtime9.JSX.Element;
62
62
  //#endregion
63
63
  export { BaseRemoteSelectorProps, RemoteSelectorField, RemoteSelectorFieldProps, RemoteSelectorQuery, RemoteSelectorQueryProps, TUseData };
64
64
  //# sourceMappingURL=remote-selector.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime13 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
  import { Item, Root } from "@radix-ui/react-toggle-group";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import * as class_variance_authority_types0 from "class-variance-authority/types";
@@ -28,7 +28,7 @@ declare function ToggleGroup({
28
28
  transition,
29
29
  activeClassName,
30
30
  ...props
31
- }: ToggleGroupProps): react_jsx_runtime13.JSX.Element;
31
+ }: ToggleGroupProps): react_jsx_runtime18.JSX.Element;
32
32
  //#endregion
33
33
  export { ToggleGroup };
34
34
  //# sourceMappingURL=ToggleGroup.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maquinaweb-ui",
3
- "version": "2.67.0",
3
+ "version": "2.68.0",
4
4
  "description": "A minimal React component library",
5
5
  "type": "module",
6
6
  "sideEffects": false,