maquinaweb-ui 2.70.0 → 2.71.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/dist/container-animation/container-animation.d.ts +2 -2
- package/dist/date-hour-field/DateHourField.d.ts +2 -2
- package/dist/input-suggest/input-suggest.d.ts +2 -2
- package/dist/kanban-dnd/kanban-card-item.d.ts +2 -2
- package/dist/kanban-dnd/kanban-dnd-monitor.d.ts +2 -2
- package/dist/kanban-dnd/kanban-dropzone.d.ts +2 -2
- package/dist/kanban-dnd/kanban-selector.d.ts +2 -2
- package/dist/landing-text/client-landing-text.js +2 -2
- package/dist/landing-text/client-landing-text.js.map +1 -1
- package/dist/landing-text/landing-content.d.ts.map +1 -1
- package/dist/landing-text/landing-content.js +6 -2
- package/dist/landing-text/landing-content.js.map +1 -1
- package/dist/landing-text/landing-text.d.ts +3 -2
- package/dist/landing-text/landing-text.d.ts.map +1 -1
- package/dist/landing-text/landing-text.js +12 -18
- package/dist/landing-text/landing-text.js.map +1 -1
- package/dist/landing-text/server-landing-text.d.ts +5 -4
- package/dist/landing-text/server-landing-text.d.ts.map +1 -1
- package/dist/landing-text/server-landing-text.js +2 -2
- package/dist/landing-text/server-landing-text.js.map +1 -1
- package/dist/landing-text/types.d.ts +10 -12
- package/dist/landing-text/types.d.ts.map +1 -1
- package/dist/page-header/page-header.d.ts +2 -2
- package/dist/remote-selector/remote-selector.d.ts +3 -3
- package/dist/split-text-poor/split-text-poor.d.ts.map +1 -1
- package/dist/split-text-poor/split-text-poor.js +2 -1
- package/dist/split-text-poor/split-text-poor.js.map +1 -1
- package/dist/toggle-field/ToggleGroup.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ElementType } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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>) =>
|
|
26
|
+
}: ContainerAnimationProps<T>) => react_jsx_runtime3.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { ContainerAnimation, ContainerAnimationProps };
|
|
29
29
|
//# sourceMappingURL=container-animation.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 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>):
|
|
32
|
+
}: DateHourFieldProps<TFieldValues, TFieldName>): react_jsx_runtime1.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
|
|
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):
|
|
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
|
|
2
|
+
import * as react_jsx_runtime16 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):
|
|
11
|
+
}: KanbanCardItemProps): react_jsx_runtime16.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
|
|
2
|
+
import * as react_jsx_runtime17 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>):
|
|
26
|
+
}: KanbanDndMonitorProps<TColumn>): react_jsx_runtime17.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
|
|
2
|
+
import * as react_jsx_runtime18 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):
|
|
10
|
+
}: KanbanDropZoneProps): react_jsx_runtime18.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
|
|
2
|
+
import * as react_jsx_runtime19 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):
|
|
9
|
+
}: KanbanSelectorProps): react_jsx_runtime19.JSX.Element | null;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { KanbanSelector };
|
|
12
12
|
//# sourceMappingURL=kanban-selector.d.ts.map
|
|
@@ -54,7 +54,7 @@ async function persistLandingContent(item, value) {
|
|
|
54
54
|
})).ok) throw new Error("Nao foi possivel salvar o conteudo.");
|
|
55
55
|
await refreshTag(`landing-page-content-${item.pageKey}`);
|
|
56
56
|
}
|
|
57
|
-
function ClientLandingText({ item, editable, children }) {
|
|
57
|
+
function ClientLandingText({ item, editable = false, children }) {
|
|
58
58
|
const [isEditing, setIsEditing] = useState(false);
|
|
59
59
|
const [isSaving, setIsSaving] = useState(false);
|
|
60
60
|
const [currentValue, setCurrentValue] = useState(item.value);
|
|
@@ -95,7 +95,7 @@ function ClientLandingText({ item, editable, children }) {
|
|
|
95
95
|
children: [editable && isEditing && /* @__PURE__ */ jsxs("div", {
|
|
96
96
|
className: "absolute right-0 z-10 h-fit -top-7 flex",
|
|
97
97
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
98
|
-
className: "size-6 rounded-none p-0",
|
|
98
|
+
className: "size-6 rounded-none p-0 text-foreground!",
|
|
99
99
|
disabled: isSaving,
|
|
100
100
|
onClick: handleCancel,
|
|
101
101
|
size: "icon",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-landing-text.js","names":[],"sources":["../../src/components/landing-text/client-landing-text.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { Button } from '../ui/button';\n\nimport { Check, Loader2, X } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { refreshTag } from '../actions';\nimport type { LandingTextItem } from './types';\n\ninterface ClientLandingTextProps {\n item: LandingTextItem;\n editable
|
|
1
|
+
{"version":3,"file":"client-landing-text.js","names":[],"sources":["../../src/components/landing-text/client-landing-text.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { Button } from '../ui/button';\n\nimport { Check, Loader2, X } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { refreshTag } from '../actions';\nimport type { LandingTextItem } from './types';\n\ninterface ClientLandingTextProps {\n item: LandingTextItem;\n editable?: boolean;\n children: React.ReactNode;\n}\n\nfunction labelFromKey(value: string) {\n if (!value) {\n return '';\n }\n\n return value\n .split(/[-_\\.]/g)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n}\n\nfunction normalizeBaseUrl(baseUrl: string): string {\n return baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;\n}\n\nfunction getCookieValue(name: string): string | undefined {\n if (typeof document === 'undefined') {\n return undefined;\n }\n\n const key = `${encodeURIComponent(name)}=`;\n const cookies = document.cookie ? document.cookie.split('; ') : [];\n\n for (const cookie of cookies) {\n if (!cookie.startsWith(key)) {\n continue;\n }\n\n return decodeURIComponent(cookie.slice(key.length));\n }\n\n return undefined;\n}\n\nasync function persistLandingContent(item: LandingTextItem, value: string) {\n const baseUrl = String(process.env.NEXT_PUBLIC_BASE_URL || '');\n const organization = process.env.NEXT_PUBLIC_ORGANIZATION_ID || '';\n\n if (!baseUrl) {\n return;\n }\n\n const token = getCookieValue('token');\n\n if (!token || !organization) {\n throw new Error(\n 'Credenciais de edição indisponíveis para salvar conteúdo.'\n );\n }\n\n const endpoint = '/landing-page-contents/upsert/';\n const response = await fetch(`${normalizeBaseUrl(baseUrl)}${endpoint}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Token ${token}`,\n 'X-Organization': organization,\n },\n body: JSON.stringify({\n page_key: item.pageKey,\n page_title: labelFromKey(item.pageKey),\n section_key: item.sectionKey,\n section_title: labelFromKey(item.sectionKey),\n content_key: item.contentKey,\n content_title: labelFromKey(item.contentKey),\n value,\n default_value: item.defaultValue,\n metadata: item.metadata,\n }),\n credentials: 'include',\n });\n\n if (!response.ok) {\n throw new Error('Nao foi possivel salvar o conteudo.');\n }\n\n await refreshTag(`landing-page-content-${item.pageKey}`);\n}\n\nfunction ClientLandingText({\n item,\n editable = false,\n children,\n}: ClientLandingTextProps) {\n const [isEditing, setIsEditing] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [currentValue, setCurrentValue] = useState(item.value);\n const [draftValue, setDraftValue] = useState(item.value);\n const ref = useRef<HTMLElement | null>(null);\n\n const handleEdit = (event: React.MouseEvent<HTMLElement>) => {\n if (!editable || isSaving) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n const nextDraft = ref.current?.innerText ?? currentValue;\n setDraftValue(nextDraft);\n setIsEditing(true);\n\n requestAnimationFrame(() => {\n ref.current?.focus();\n });\n };\n\n const handleCancel = () => {\n if (ref.current) {\n ref.current.innerText = currentValue;\n }\n setDraftValue(currentValue);\n setIsEditing(false);\n };\n\n const handleSave = async () => {\n try {\n setIsSaving(true);\n await persistLandingContent(item, draftValue);\n setCurrentValue(draftValue);\n if (ref.current) {\n ref.current.innerText = draftValue;\n }\n setIsEditing(false);\n } finally {\n setIsSaving(false);\n }\n };\n\n const handleInput = (event: React.FormEvent<HTMLElement>) => {\n if (!isEditing) {\n return;\n }\n setDraftValue(event.currentTarget.innerText);\n };\n\n return (\n <div className=\"relative\">\n {editable && isEditing && (\n <div className=\"absolute right-0 z-10 h-fit -top-7 flex\">\n <Button\n className=\"size-6 rounded-none p-0 text-foreground!\"\n disabled={isSaving}\n onClick={handleCancel}\n size=\"icon\"\n type=\"button\"\n variant=\"outline\"\n >\n <X />\n </Button>\n <Button\n className=\"size-6 rounded-none p-0\"\n disabled={isSaving}\n onClick={handleSave}\n size=\"icon\"\n type=\"button\"\n >\n {isSaving ? <Loader2 className=\"animate-spin size-3\" /> : <Check />}\n </Button>\n </div>\n )}\n\n <Slot\n className={cn(\n 'relative',\n 'after:z-10 after:w-full after:h-full after:absolute after:left-1/2 after:-translate-x-1/2 after:top-1/2 after:-translate-y-1/2 after:box-content after:p-1',\n editable && 'hover:after:border hover:after:border-input',\n isEditing && 'after:border after:border-input',\n isEditing && 'outline-none cursor-text before:bg-red-500',\n !editable && 'after:hidden'\n )}\n contentEditable={editable && isEditing}\n onClick={handleEdit}\n onInput={handleInput}\n ref={ref}\n suppressContentEditableWarning\n >\n {children}\n </Slot>\n </div>\n );\n}\n\nexport { ClientLandingText };\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAS,aAAa,OAAe;A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,8JACA,YAAY,+CACZ,aAAa,mCACb,aAAa,8CACb,CAAC,YAAY,eACd;GACD,iBAAiB,YAAY;GAC7B,SAAS;GACT,SAAS;GACJ;GACL;GAEC;IACI;GACH"}
|
|
@@ -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,
|
|
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,iBAmEM,qBAAA,CAnEgB,OAAA,EAoE3B,cApE2B,CAAA,EAqEnC,OArEmC,CAqE3B,0BArE2B,CAAA;AACnB,iBAoHH,uBAAA,CApHG,IAAA,EAAA,MAAA,CAAA,EAAA;EAAgB,OAAA,EAAA,MAAA;EAAvB,UAAA,EAAA,MAAA;EAAM,UAAA,EAAA,MAAA;AAQlB,CAAA,GAAgB,IAAA;AA0DM,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"}
|
|
@@ -18,8 +18,12 @@ function toApiUrl(path) {
|
|
|
18
18
|
return baseUrl ? `${baseUrl}${path}` : "";
|
|
19
19
|
}
|
|
20
20
|
async function getEditableState() {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
try {
|
|
22
|
+
const cookieStore = await cookies();
|
|
23
|
+
return Boolean(cookieStore.get("token")?.value && cookieStore.get("organization")?.value);
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
28
|
async function getLandingOverrides(pageKey) {
|
|
25
29
|
const organizationId = process.env.NEXT_PUBLIC_ORGANIZATION_ID;
|
|
@@ -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
|
|
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 try {\n const cookieStore = await cookies();\n return Boolean(\n cookieStore.get('token')?.value && cookieStore.get('organization')?.value\n );\n } catch {\n // Static routes (e.g. Cosmos fixtures) can run with dynamic=\"error\".\n // In this context, reading cookies is not allowed, so we disable editing.\n return false;\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,UAAU,OAAO,QAAQ,IAAI,wBAAwB,GAAG,CAAC,QAC7D,OACA,GACD;AACD,QAAO,UAAU,GAAG,UA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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,9 @@
|
|
|
1
1
|
import { LandingTextProps } from "./types.js";
|
|
2
|
-
import
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
4
|
|
|
4
5
|
//#region src/components/landing-text/landing-text.d.ts
|
|
5
|
-
declare function LandingText(props: LandingTextProps): Promise<
|
|
6
|
+
declare function LandingText<TAs extends ElementType = 'span'>(props: LandingTextProps<TAs>): Promise<react_jsx_runtime7.JSX.Element>;
|
|
6
7
|
//#endregion
|
|
7
8
|
export { LandingText };
|
|
8
9
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOe,wBAAwB,6BAC9B,iBAAiB,OAAI,QAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -4,28 +4,22 @@ import { ServerLandingText } from "./server-landing-text.js";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/landing-text/landing-text.tsx
|
|
7
|
-
function isLandingTextWithName(props) {
|
|
8
|
-
return "name" in props;
|
|
9
|
-
}
|
|
10
7
|
async function LandingText(props) {
|
|
11
|
-
const {
|
|
12
|
-
const { item, editable } =
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
const { name, editable: editableOverride,...elementProps } = props;
|
|
9
|
+
const { item, editable } = await getLandingContentByName(name);
|
|
10
|
+
const serverProps = {
|
|
11
|
+
...elementProps,
|
|
12
|
+
registration: {
|
|
13
|
+
pageKey: item.pageKey,
|
|
14
|
+
sectionKey: item.sectionKey,
|
|
15
|
+
contentKey: item.contentKey
|
|
16
|
+
},
|
|
17
|
+
value: item.value
|
|
15
18
|
};
|
|
16
19
|
return /* @__PURE__ */ jsx(ClientLandingText, {
|
|
17
|
-
editable,
|
|
20
|
+
editable: props.editable || editable,
|
|
18
21
|
item,
|
|
19
|
-
children: /* @__PURE__ */ jsx(ServerLandingText, {
|
|
20
|
-
as,
|
|
21
|
-
className,
|
|
22
|
-
registration: {
|
|
23
|
-
pageKey: item.pageKey,
|
|
24
|
-
sectionKey: item.sectionKey,
|
|
25
|
-
contentKey: item.contentKey
|
|
26
|
-
},
|
|
27
|
-
value: item.value
|
|
28
|
-
})
|
|
22
|
+
children: /* @__PURE__ */ jsx(ServerLandingText, { ...serverProps })
|
|
29
23
|
});
|
|
30
24
|
}
|
|
31
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-text.js","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":["import { ClientLandingText } from './client-landing-text';\nimport { getLandingContentByName } from './landing-content';\nimport { ServerLandingText } from './server-landing-text';\nimport type { LandingTextProps,
|
|
1
|
+
{"version":3,"file":"landing-text.js","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":["import type { ElementType } from 'react';\n\nimport { ClientLandingText } from './client-landing-text';\nimport { getLandingContentByName } from './landing-content';\nimport { ServerLandingText } from './server-landing-text';\nimport type { LandingTextProps, ServerLandingTextProps } from './types';\n\nasync function LandingText<TAs extends ElementType = 'span'>(\n props: LandingTextProps<TAs>\n) {\n const { name, editable: editableOverride, ...elementProps } = props;\n const { item, editable } = await getLandingContentByName(name);\n const serverProps = {\n ...elementProps,\n registration: {\n pageKey: item.pageKey,\n sectionKey: item.sectionKey,\n contentKey: item.contentKey,\n },\n value: item.value,\n } as unknown as ServerLandingTextProps<TAs>;\n\n return (\n <ClientLandingText editable={props.editable || editable} item={item}>\n <ServerLandingText<TAs> {...serverProps} />\n </ClientLandingText>\n );\n}\n\nexport { LandingText };\n"],"mappings":";;;;;;AAOA,eAAe,YACb,OACA;CACA,MAAM,EAAE,MAAM,UAAU,iBAAkB,GAAG,iBAAiB;CAC9D,MAAM,EAAE,MAAM,aAAa,MAAM,wBAAwB,KAAK;CAC9D,MAAM,cAAc;EAClB,GAAG;EACH,cAAc;GACZ,SAAS,KAAK;GACd,YAAY,KAAK;GACjB,YAAY,KAAK;GAClB;EACD,OAAO,KAAK;EACb;AAED,QACE,oBAAC;EAAkB,UAAU,MAAM,YAAY;EAAgB;YAC7D,oBAAC,qBAAuB,GAAI,cAAe;GACzB"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ServerLandingTextProps } from "./types.js";
|
|
2
|
-
import
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
4
|
|
|
4
5
|
//#region src/components/landing-text/server-landing-text.d.ts
|
|
5
|
-
declare function ServerLandingText({
|
|
6
|
-
as
|
|
6
|
+
declare function ServerLandingText<TAs extends ElementType = 'span'>({
|
|
7
|
+
as,
|
|
7
8
|
value,
|
|
8
9
|
className,
|
|
9
10
|
registration,
|
|
10
11
|
...props
|
|
11
|
-
}: ServerLandingTextProps):
|
|
12
|
+
}: ServerLandingTextProps<TAs>): react_jsx_runtime6.JSX.Element;
|
|
12
13
|
//#endregion
|
|
13
14
|
export { ServerLandingText };
|
|
14
15
|
//# sourceMappingURL=server-landing-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server-landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":[],"mappings":";;;;;iBAKS,8BAA8B;;;;;;GAMpC,uBAAuB,OAAI,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -2,8 +2,8 @@ import { cn } from "../src/lib/utils.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/landing-text/server-landing-text.tsx
|
|
5
|
-
function ServerLandingText({ as
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
5
|
+
function ServerLandingText({ as, value, className, registration,...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(as ?? "span", {
|
|
7
7
|
className: cn(className),
|
|
8
8
|
"data-content-key": registration?.contentKey,
|
|
9
9
|
"data-page-key": registration?.pageKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-landing-text.js","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport type { ServerLandingTextProps } from './types';\n\nfunction ServerLandingText
|
|
1
|
+
{"version":3,"file":"server-landing-text.js","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":["import type { ElementType } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport type { ServerLandingTextProps } from './types';\n\nfunction ServerLandingText<TAs extends ElementType = 'span'>({\n as,\n value,\n className,\n registration,\n ...props\n}: ServerLandingTextProps<TAs>) {\n const Component = as ?? 'span';\n\n return (\n <Component\n className={cn(className)}\n data-content-key={registration?.contentKey}\n data-page-key={registration?.pageKey}\n data-section-key={registration?.sectionKey}\n {...props}\n >\n {value}\n </Component>\n );\n}\n\nexport { ServerLandingText };\n"],"mappings":";;;;AAKA,SAAS,kBAAoD,EAC3D,IACA,OACA,WACA,aACA,GAAG,SAC2B;AAG9B,QACE,oBAHgB,MAAM;EAIpB,WAAW,GAAG,UAAU;EACxB,oBAAkB,cAAc;EAChC,iBAAe,cAAc;EAC7B,oBAAkB,cAAc;EAChC,GAAI;YAEH;GACS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/landing-text/types.d.ts
|
|
4
4
|
type LandingPageKey = string;
|
|
@@ -48,21 +48,19 @@ interface LandingTextItem extends LandingTextRegistration {
|
|
|
48
48
|
}
|
|
49
49
|
interface LandingTextBaseProps {
|
|
50
50
|
className?: string;
|
|
51
|
-
as?: 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'div';
|
|
52
51
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
interface LandingTextWithNameProps extends LandingTextBaseProps {
|
|
52
|
+
type PolymorphicProps<TAs extends ElementType, TOwnProps> = TOwnProps & {
|
|
53
|
+
as?: TAs;
|
|
54
|
+
} & Omit<ComponentPropsWithoutRef<TAs>, keyof TOwnProps | 'as' | 'children'>;
|
|
55
|
+
type LandingTextWithNameProps<TAs extends ElementType = 'span'> = PolymorphicProps<TAs, LandingTextBaseProps & {
|
|
58
56
|
name: LandingContentName;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
as?: ElementType;
|
|
57
|
+
editable?: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
type ServerLandingTextProps<TAs extends ElementType = 'span'> = PolymorphicProps<TAs, LandingTextBaseProps & {
|
|
63
60
|
value: string;
|
|
64
61
|
registration?: LandingTextRegistration;
|
|
65
|
-
}
|
|
62
|
+
}>;
|
|
63
|
+
type LandingTextProps<TAs extends ElementType = 'span'> = LandingTextWithNameProps<TAs>;
|
|
66
64
|
//#endregion
|
|
67
65
|
export { LandingContentDefinitionItem, LandingContentDefinitionSection, LandingContentName, LandingPageContentApiItem, LandingPageContentDefinition, LandingPageKey, LandingTextItem, LandingTextProps, LandingTextRegistration, ResolvedLandingContentItem, ResolvedLandingPageContent, ServerLandingTextProps };
|
|
68
66
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/components/landing-text/types.ts"],"sourcesContent":[],"mappings":";;;KAEY,cAAA;KACA,kBAAA;AADA,UAGK,4BAAA,CAHS;EACd,UAAA,EAAA,MAAA;EAEK,KAAA,EAAA,MAAA;EAMA,QAAA,CAAA,EAHJ,MAGI,CAAA,MAAA,EAAA,OAAA,CAA+B;AAKhD;AAKiB,UAVA,+BAAA,CAeJ;EAGI,UAAA,EAAA,MAAA;EASA,QAAA,EAzBL,4BAyB+B,EAAA;AAM3C;AAMiB,UAlCA,4BAAA,CAkCwB;EAMxB,OAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/components/landing-text/types.ts"],"sourcesContent":[],"mappings":";;;KAEY,cAAA;K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|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 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):
|
|
13
|
+
}: PageHeaderProps): react_jsx_runtime2.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
|
|
3
|
+
import * as react_jsx_runtime4 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
|
-
}):
|
|
41
|
+
}): react_jsx_runtime4.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>):
|
|
61
|
+
}: RemoteSelectorQueryProps<T>): react_jsx_runtime4.JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { BaseRemoteSelectorProps, RemoteSelectorField, RemoteSelectorFieldProps, RemoteSelectorQuery, RemoteSelectorQueryProps, TUseData };
|
|
64
64
|
//# sourceMappingURL=remote-selector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-text-poor.d.ts","names":[],"sources":["../../src/components/split-text-poor/split-text-poor.tsx"],"sourcesContent":[],"mappings":";cAwBM;EAAA,EAAA,EAAA;;;;;;IAoBM,OAAA,EAAA,CAAA;MAAA,KAAkB;MAAA;KAAA,
|
|
1
|
+
{"version":3,"file":"split-text-poor.d.ts","names":[],"sources":["../../src/components/split-text-poor/split-text-poor.tsx"],"sourcesContent":[],"mappings":";cAwBM;EAAA,EAAA,EAAA;;;;;;IAoBM,OAAA,EAAA,CAAA;MAAA,KAAkB;MAAA;KAAA,EAAA;MASxB,KAAA,EAAA,MAyDL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAlEW,kBAAA;YACA,KAAA,CAAM;;wBAEM;;;;;cAMlB,eAAe,KAAA,CAAM,GAAG"}
|
|
@@ -42,7 +42,7 @@ const configs = {
|
|
|
42
42
|
},
|
|
43
43
|
default: defaultConfig
|
|
44
44
|
};
|
|
45
|
-
const SplitTextPoor = ({ children, className, config = "default", as: As = "div", split = " ", delay = 0 }) => {
|
|
45
|
+
const SplitTextPoor = ({ children, className, config = "default", as: As = "div", split = " ", delay = 0,...props }) => {
|
|
46
46
|
const selectedConfig = configs[config] || defaultConfig;
|
|
47
47
|
let wordIndex = 0;
|
|
48
48
|
const wrapWords = (node) => {
|
|
@@ -70,6 +70,7 @@ const SplitTextPoor = ({ children, className, config = "default", as: As = "div"
|
|
|
70
70
|
return /* @__PURE__ */ jsx(As, {
|
|
71
71
|
className: cn(className, "initial-opacity will-change-[transform,filter]"),
|
|
72
72
|
style: { display: "inline-block" },
|
|
73
|
+
...props,
|
|
73
74
|
children: Children.map(children, wrapWords)
|
|
74
75
|
});
|
|
75
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-text-poor.js","names":["SplitTextPoor: React.FC<SplitTextPoorProps>"],"sources":["../../src/components/split-text-poor/split-text-poor.tsx"],"sourcesContent":["'use client';\n\nimport { Children, cloneElement, isValidElement } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport * as motion from 'motion/react-m';\n\nconst defaultConfig = {\n hidden: {\n transform: 'translateY(20px) skewY(6deg)',\n opacity: 0,\n filter: 'blur(7px)',\n },\n visible: ({ index, delay }: { index: number; delay: number }) => ({\n transform: 'translateY(0px) skewY(0deg)',\n opacity: 1,\n filter: 'blur(0px)',\n transition: {\n duration: 0.4,\n delay: index * 0.08 + delay,\n },\n }),\n};\n\nconst configs = {\n sm: {\n hidden: {\n transform: 'translateY(10px)',\n filter: 'blur(7px)',\n opacity: 0,\n },\n visible: ({ index, delay }: { index: number; delay: number }) => ({\n transform: 'translateY(0px)',\n filter: 'blur(0px)',\n opacity: 1,\n transition: {\n duration: 0.4,\n delay: index * 0.06 + delay,\n },\n }),\n },\n default: defaultConfig,\n};\n\nexport type SplitTextPoorProps = {\n children: React.ReactNode;\n className?: string;\n config?: keyof typeof configs;\n split?: string;\n delay?: number;\n as?: any;\n};\n\nconst SplitTextPoor: React.FC<SplitTextPoorProps> = ({\n children,\n className,\n config = 'default',\n as: As = 'div',\n split = ' ',\n delay = 0,\n}) => {\n const selectedConfig = configs[config] || defaultConfig;\n let wordIndex = 0;\n\n const wrapWords = (node: React.ReactNode): React.ReactNode => {\n if (typeof node === 'string') {\n return node.split(split).map((word, index) => {\n wordIndex++;\n return (\n <motion.span\n custom={{\n index: wordIndex - 1,\n delay,\n }}\n initial=\"hidden\"\n key={index}\n style={{ display: 'inline-block', whiteSpace: 'nowrap' }}\n variants={selectedConfig}\n viewport={{ once: true }}\n whileInView=\"visible\"\n >\n {word}\n {index < node.split(split).length - 1 && '\\u00A0'}\n </motion.span>\n );\n });\n }\n\n if (isValidElement(node)) {\n return cloneElement(node, {\n children: Children.map((node.props as any).children, wrapWords),\n } as any);\n }\n\n return node;\n };\n\n return (\n <As\n className={cn(\n className,\n 'initial-opacity will-change-[transform,filter]'\n )}\n style={{ display: 'inline-block' }}\n >\n {Children.map(children, wrapWords)}\n </As>\n );\n};\n\nexport { SplitTextPoor };\n"],"mappings":";;;;;;;;;AAOA,MAAM,gBAAgB;CACpB,QAAQ;EACN,WAAW;EACX,SAAS;EACT,QAAQ;EACT;CACD,UAAU,EAAE,OAAO,aAA+C;EAChE,WAAW;EACX,SAAS;EACT,QAAQ;EACR,YAAY;GACV,UAAU;GACV,OAAO,QAAQ,MAAO;GACvB;EACF;CACF;AAED,MAAM,UAAU;CACd,IAAI;EACF,QAAQ;GACN,WAAW;GACX,QAAQ;GACR,SAAS;GACV;EACD,UAAU,EAAE,OAAO,aAA+C;GAChE,WAAW;GACX,QAAQ;GACR,SAAS;GACT,YAAY;IACV,UAAU;IACV,OAAO,QAAQ,MAAO;IACvB;GACF;EACF;CACD,SAAS;CACV;AAWD,MAAMA,iBAA+C,EACnD,UACA,WACA,SAAS,WACT,IAAI,KAAK,OACT,QAAQ,KACR,QAAQ,
|
|
1
|
+
{"version":3,"file":"split-text-poor.js","names":["SplitTextPoor: React.FC<SplitTextPoorProps>"],"sources":["../../src/components/split-text-poor/split-text-poor.tsx"],"sourcesContent":["'use client';\n\nimport { Children, cloneElement, isValidElement } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport * as motion from 'motion/react-m';\n\nconst defaultConfig = {\n hidden: {\n transform: 'translateY(20px) skewY(6deg)',\n opacity: 0,\n filter: 'blur(7px)',\n },\n visible: ({ index, delay }: { index: number; delay: number }) => ({\n transform: 'translateY(0px) skewY(0deg)',\n opacity: 1,\n filter: 'blur(0px)',\n transition: {\n duration: 0.4,\n delay: index * 0.08 + delay,\n },\n }),\n};\n\nconst configs = {\n sm: {\n hidden: {\n transform: 'translateY(10px)',\n filter: 'blur(7px)',\n opacity: 0,\n },\n visible: ({ index, delay }: { index: number; delay: number }) => ({\n transform: 'translateY(0px)',\n filter: 'blur(0px)',\n opacity: 1,\n transition: {\n duration: 0.4,\n delay: index * 0.06 + delay,\n },\n }),\n },\n default: defaultConfig,\n};\n\nexport type SplitTextPoorProps = {\n children: React.ReactNode;\n className?: string;\n config?: keyof typeof configs;\n split?: string;\n delay?: number;\n as?: any;\n};\n\nconst SplitTextPoor: React.FC<SplitTextPoorProps> = ({\n children,\n className,\n config = 'default',\n as: As = 'div',\n split = ' ',\n delay = 0,\n ...props\n}) => {\n const selectedConfig = configs[config] || defaultConfig;\n let wordIndex = 0;\n\n const wrapWords = (node: React.ReactNode): React.ReactNode => {\n if (typeof node === 'string') {\n return node.split(split).map((word, index) => {\n wordIndex++;\n return (\n <motion.span\n custom={{\n index: wordIndex - 1,\n delay,\n }}\n initial=\"hidden\"\n key={index}\n style={{ display: 'inline-block', whiteSpace: 'nowrap' }}\n variants={selectedConfig}\n viewport={{ once: true }}\n whileInView=\"visible\"\n >\n {word}\n {index < node.split(split).length - 1 && '\\u00A0'}\n </motion.span>\n );\n });\n }\n\n if (isValidElement(node)) {\n return cloneElement(node, {\n children: Children.map((node.props as any).children, wrapWords),\n } as any);\n }\n\n return node;\n };\n\n return (\n <As\n className={cn(\n className,\n 'initial-opacity will-change-[transform,filter]'\n )}\n style={{ display: 'inline-block' }}\n {...props}\n >\n {Children.map(children, wrapWords)}\n </As>\n );\n};\n\nexport { SplitTextPoor };\n"],"mappings":";;;;;;;;;AAOA,MAAM,gBAAgB;CACpB,QAAQ;EACN,WAAW;EACX,SAAS;EACT,QAAQ;EACT;CACD,UAAU,EAAE,OAAO,aAA+C;EAChE,WAAW;EACX,SAAS;EACT,QAAQ;EACR,YAAY;GACV,UAAU;GACV,OAAO,QAAQ,MAAO;GACvB;EACF;CACF;AAED,MAAM,UAAU;CACd,IAAI;EACF,QAAQ;GACN,WAAW;GACX,QAAQ;GACR,SAAS;GACV;EACD,UAAU,EAAE,OAAO,aAA+C;GAChE,WAAW;GACX,QAAQ;GACR,SAAS;GACT,YAAY;IACV,UAAU;IACV,OAAO,QAAQ,MAAO;IACvB;GACF;EACF;CACD,SAAS;CACV;AAWD,MAAMA,iBAA+C,EACnD,UACA,WACA,SAAS,WACT,IAAI,KAAK,OACT,QAAQ,KACR,QAAQ,EACR,GAAG,YACC;CACJ,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,IAAI,YAAY;CAEhB,MAAM,aAAa,SAA2C;AAC5D,MAAI,OAAO,SAAS,SAClB,QAAO,KAAK,MAAM,MAAM,CAAC,KAAK,MAAM,UAAU;AAC5C;AACA,UACE,qBAAC,OAAO;IACN,QAAQ;KACN,OAAO,YAAY;KACnB;KACD;IACD,SAAQ;IAER,OAAO;KAAE,SAAS;KAAgB,YAAY;KAAU;IACxD,UAAU;IACV,UAAU,EAAE,MAAM,MAAM;IACxB,aAAY;eAEX,MACA,QAAQ,KAAK,MAAM,MAAM,CAAC,SAAS,KAAK;MAPpC,MAQO;IAEhB;AAGJ,MAAI,eAAe,KAAK,CACtB,QAAO,aAAa,MAAM,EACxB,UAAU,SAAS,IAAK,KAAK,MAAc,UAAU,UAAU,EAChE,CAAQ;AAGX,SAAO;;AAGT,QACE,oBAAC;EACC,WAAW,GACT,WACA,iDACD;EACD,OAAO,EAAE,SAAS,gBAAgB;EAClC,GAAI;YAEH,SAAS,IAAI,UAAU,UAAU;GAC/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 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):
|
|
31
|
+
}: ToggleGroupProps): react_jsx_runtime13.JSX.Element;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { ToggleGroup };
|
|
34
34
|
//# sourceMappingURL=ToggleGroup.d.ts.map
|