@flamingo-stack/openframe-frontend-core 0.0.449 → 0.0.450
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/{chunk-DJP5HYFG.cjs → chunk-26JSJMMZ.cjs} +7 -7
- package/dist/{chunk-DJP5HYFG.cjs.map → chunk-26JSJMMZ.cjs.map} +1 -1
- package/dist/{chunk-NPBTNWRA.js → chunk-3ITY2LBM.js} +4 -4
- package/dist/{chunk-MWRFPLNB.js → chunk-4SZDO3TE.js} +3 -3
- package/dist/{chunk-LWT6G75Q.js → chunk-4VSTLJDO.js} +2 -2
- package/dist/{chunk-DRKQNXSZ.cjs → chunk-5HW5HMNF.cjs} +5 -5
- package/dist/{chunk-DRKQNXSZ.cjs.map → chunk-5HW5HMNF.cjs.map} +1 -1
- package/dist/{chunk-KKJRBMG3.cjs → chunk-5OY7HYII.cjs} +73 -73
- package/dist/{chunk-KKJRBMG3.cjs.map → chunk-5OY7HYII.cjs.map} +1 -1
- package/dist/{chunk-WYPROXL4.cjs → chunk-6GJKSYM2.cjs} +73 -73
- package/dist/{chunk-WYPROXL4.cjs.map → chunk-6GJKSYM2.cjs.map} +1 -1
- package/dist/{chunk-6TS4AIDX.cjs → chunk-6RA4NRBA.cjs} +15 -15
- package/dist/{chunk-6TS4AIDX.cjs.map → chunk-6RA4NRBA.cjs.map} +1 -1
- package/dist/{chunk-X754WDWO.cjs → chunk-76EN3GEH.cjs} +40 -40
- package/dist/{chunk-X754WDWO.cjs.map → chunk-76EN3GEH.cjs.map} +1 -1
- package/dist/{chunk-YSNMV53O.js → chunk-CM5XKHHS.js} +6 -6
- package/dist/{chunk-47AMTR2S.cjs → chunk-DQ5U6DCR.cjs} +18 -18
- package/dist/{chunk-47AMTR2S.cjs.map → chunk-DQ5U6DCR.cjs.map} +1 -1
- package/dist/{chunk-YHNBJ3F3.js → chunk-EQWE64RJ.js} +2 -2
- package/dist/{chunk-5SJGFLL2.js → chunk-HXCQHMS5.js} +6386 -6032
- package/dist/chunk-HXCQHMS5.js.map +1 -0
- package/dist/{chunk-VSWFYFIG.js → chunk-HYIHXXF3.js} +5 -5
- package/dist/{chunk-AZKVNRZP.cjs → chunk-J5BYYZVM.cjs} +32 -32
- package/dist/{chunk-AZKVNRZP.cjs.map → chunk-J5BYYZVM.cjs.map} +1 -1
- package/dist/{chunk-JAASDJOF.js → chunk-K3GXIGN6.js} +5 -5
- package/dist/{chunk-UNQVTGVG.js → chunk-M3AKWFAO.js} +2 -2
- package/dist/{chunk-TKGCTDQY.js → chunk-MLFFBQ5B.js} +180 -87
- package/dist/chunk-MLFFBQ5B.js.map +1 -0
- package/dist/{chunk-XLFAFH2B.js → chunk-N53FC732.js} +2 -2
- package/dist/{chunk-H56AEHFC.cjs → chunk-N5M72LJX.cjs} +1620 -1266
- package/dist/chunk-N5M72LJX.cjs.map +1 -0
- package/dist/{chunk-4IMXFDRI.js → chunk-PCW2TRZ4.js} +3 -3
- package/dist/{chunk-AN7MCJTV.cjs → chunk-QF3NQW7C.cjs} +122 -29
- package/dist/chunk-QF3NQW7C.cjs.map +1 -0
- package/dist/{chunk-EOFENGSZ.cjs → chunk-ROBGJH52.cjs} +12 -12
- package/dist/{chunk-EOFENGSZ.cjs.map → chunk-ROBGJH52.cjs.map} +1 -1
- package/dist/{chunk-HQ7S6JG5.js → chunk-RQHHACP2.js} +3 -3
- package/dist/{chunk-ROCJMSJI.cjs → chunk-UPRY4I63.cjs} +3 -3
- package/dist/{chunk-ROCJMSJI.cjs.map → chunk-UPRY4I63.cjs.map} +1 -1
- package/dist/{chunk-LQTX7EJS.cjs → chunk-VLDZ4363.cjs} +29 -29
- package/dist/{chunk-LQTX7EJS.cjs.map → chunk-VLDZ4363.cjs.map} +1 -1
- package/dist/{chunk-BSBWBQ7M.js → chunk-VUDZOCPW.js} +6 -6
- package/dist/{chunk-4S4RR7XC.cjs → chunk-XITG5ICQ.cjs} +40 -40
- package/dist/{chunk-4S4RR7XC.cjs.map → chunk-XITG5ICQ.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-quick-action-row.d.ts +26 -1
- package/dist/components/chat/chat-quick-action-row.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +15 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +14 -2
- package/dist/components/chat/quick-action-chip.d.ts +45 -4
- package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
- package/dist/components/chat/quick-action-marquee.d.ts +24 -9
- package/dist/components/chat/quick-action-marquee.d.ts.map +1 -1
- package/dist/components/chat/quick-action-wall.d.ts +96 -0
- package/dist/components/chat/quick-action-wall.d.ts.map +1 -0
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/content-loading-container.d.ts +1 -1
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/cards-strip.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/form.d.ts +1 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +159 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +35 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +27 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +26 -2
- package/dist/components/ui/marquee-wall.d.ts +159 -0
- package/dist/components/ui/marquee-wall.d.ts.map +1 -0
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/ui/index.d.ts +2 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-marquee-engine.d.ts +73 -0
- package/dist/hooks/ui/use-marquee-engine.d.ts.map +1 -0
- package/dist/hooks/ui/use-suppress-clone-focus.d.ts +24 -0
- package/dist/hooks/ui/use-suppress-clone-focus.d.ts.map +1 -0
- package/dist/index.cjs +31 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -2
- package/dist/tailwind.config.cjs +1 -8
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.js +1 -8
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-quick-action-row.tsx +47 -3
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/quick-action-chip.tsx +81 -13
- package/src/components/chat/quick-action-marquee.tsx +54 -47
- package/src/components/chat/quick-action-wall.tsx +247 -0
- package/src/components/features/cards-strip.tsx +88 -158
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/marquee-wall.tsx +522 -0
- package/src/hooks/ui/index.ts +2 -0
- package/src/hooks/ui/use-marquee-engine.ts +158 -0
- package/src/hooks/ui/use-suppress-clone-focus.ts +61 -0
- package/src/stories/MarqueeWall.stories.tsx +132 -0
- package/src/stories/QuickActionMarquee.stories.tsx +8 -7
- package/src/stories/QuickActionWall.stories.tsx +116 -0
- package/tailwind.config.ts +0 -7
- package/dist/chunk-5SJGFLL2.js.map +0 -1
- package/dist/chunk-AN7MCJTV.cjs.map +0 -1
- package/dist/chunk-H56AEHFC.cjs.map +0 -1
- package/dist/chunk-TKGCTDQY.js.map +0 -1
- /package/dist/{chunk-NPBTNWRA.js.map → chunk-3ITY2LBM.js.map} +0 -0
- /package/dist/{chunk-MWRFPLNB.js.map → chunk-4SZDO3TE.js.map} +0 -0
- /package/dist/{chunk-LWT6G75Q.js.map → chunk-4VSTLJDO.js.map} +0 -0
- /package/dist/{chunk-YSNMV53O.js.map → chunk-CM5XKHHS.js.map} +0 -0
- /package/dist/{chunk-YHNBJ3F3.js.map → chunk-EQWE64RJ.js.map} +0 -0
- /package/dist/{chunk-VSWFYFIG.js.map → chunk-HYIHXXF3.js.map} +0 -0
- /package/dist/{chunk-JAASDJOF.js.map → chunk-K3GXIGN6.js.map} +0 -0
- /package/dist/{chunk-UNQVTGVG.js.map → chunk-M3AKWFAO.js.map} +0 -0
- /package/dist/{chunk-XLFAFH2B.js.map → chunk-N53FC732.js.map} +0 -0
- /package/dist/{chunk-4IMXFDRI.js.map → chunk-PCW2TRZ4.js.map} +0 -0
- /package/dist/{chunk-HQ7S6JG5.js.map → chunk-RQHHACP2.js.map} +0 -0
- /package/dist/{chunk-BSBWBQ7M.js.map → chunk-VUDZOCPW.js.map} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type MarqueeWallFadeEdge = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
/** @internal per-instance sync membership (transform writer + driver-role
|
|
4
|
+
* promotion callback, so a surviving member can be re-elected). */
|
|
5
|
+
interface MarqueeSyncMember {
|
|
6
|
+
apply: (pos: number) => void;
|
|
7
|
+
makeDriver: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Pairs two (or more) <MarqueeWall> instances to ONE position driver so their
|
|
11
|
+
* tracks stay pixel-locked (the FreeTrialCTA resolve strips: a pending and a
|
|
12
|
+
* resolved copy of the same chips, clip-path'd at the avatar line). The first
|
|
13
|
+
* mounted instance claims the driver role and runs the shared rAF; the others
|
|
14
|
+
* only register their `apply` transforms. If the driver unmounts while
|
|
15
|
+
* members survive, the next member is promoted — the pair must merely be
|
|
16
|
+
* geometry-identical while mounted together.
|
|
17
|
+
*/
|
|
18
|
+
export interface MarqueeSyncController {
|
|
19
|
+
/** @internal registered members in mount order. */
|
|
20
|
+
members: Set<MarqueeSyncMember>;
|
|
21
|
+
/** @internal current driver member. */
|
|
22
|
+
driver: MarqueeSyncMember | null;
|
|
23
|
+
/** @internal last driver-written position — a promoted driver's engine
|
|
24
|
+
* seeds from it, so re-election never snaps the pair back to 0. */
|
|
25
|
+
position: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function useMarqueeSync(): MarqueeSyncController;
|
|
28
|
+
export interface MarqueeTrackOffset {
|
|
29
|
+
/** Applied translation (px) along each axis. */
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
/** Loop wrap size (single copy + seam gap) along each axis; 0 on the
|
|
33
|
+
* non-scroll axis. Lets morph engines treat a chip and its loop clone as
|
|
34
|
+
* ONE identity `wrap` apart (the Swiper loop-clone model) and fly the
|
|
35
|
+
* copy the viewer actually sees. */
|
|
36
|
+
wrapX: number;
|
|
37
|
+
wrapY: number;
|
|
38
|
+
}
|
|
39
|
+
/** Last known translation + wrap of the wall registered under `trackId`
|
|
40
|
+
* (live or already unmounted). Zeros for unknown ids / static walls. */
|
|
41
|
+
export declare function getMarqueeTrackOffset(trackId: string): MarqueeTrackOffset;
|
|
42
|
+
/**
|
|
43
|
+
* The translation ACTUALLY applied to a wall's track right now, read from the
|
|
44
|
+
* DOM of the `data-marquee-track` container. Morph engines use this on the
|
|
45
|
+
* CAPTURE side (never the registry): a same-id wall freshly remounted in the
|
|
46
|
+
* current commit has not applied any transform yet, while the registry still
|
|
47
|
+
* holds its predecessor's final drift for the flight-side lookup.
|
|
48
|
+
*/
|
|
49
|
+
export declare function getMarqueeAppliedOffset(trackContainer: Element): {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The loop-clone twin of an element inside a wall's PRIMARY copy (same index
|
|
55
|
+
* in the `data-marquee-copy="clone"` copy), or null when there is no clone /
|
|
56
|
+
* the element isn't in the primary copy. Owns the wall's internal DOM shape
|
|
57
|
+
* so morph engines don't hardcode it; `selector` scopes which descendants
|
|
58
|
+
* count as items (default: direct structure-preserving lookup by class is the
|
|
59
|
+
* caller's job — pass the item selector, e.g. `'.flipchip'`).
|
|
60
|
+
*/
|
|
61
|
+
export declare function getMarqueeCloneTwin(trackContainer: Element, el: Element, selector: string): HTMLElement | null;
|
|
62
|
+
export interface MarqueeWallProps {
|
|
63
|
+
/**
|
|
64
|
+
* Presentation mode — the consumer's one switch for "do I want the
|
|
65
|
+
* blur + marquee here at all":
|
|
66
|
+
* - `'animated'` (default): endless marquee when content overflows, with
|
|
67
|
+
* the overflow fades.
|
|
68
|
+
* - `'plain'`: no motion, no fades — a plain clipped wall. All marquee
|
|
69
|
+
* machinery (engine, clone copy, fades) is skipped entirely.
|
|
70
|
+
*/
|
|
71
|
+
mode?: 'animated' | 'plain';
|
|
72
|
+
/**
|
|
73
|
+
* Marquee axis. Defaults to where the fade sits — the animation's job is to
|
|
74
|
+
* reveal what the fade hides: a `bottom`/`top` fade clips rows → vertical
|
|
75
|
+
* (content travels bottom→top); a `left`/`right`-only fade clips columns →
|
|
76
|
+
* horizontal (content travels right→left). No fade → horizontal.
|
|
77
|
+
*/
|
|
78
|
+
axis?: 'x' | 'y';
|
|
79
|
+
/** Reverse travel: `x` reversed moves content right, `y` reversed moves it
|
|
80
|
+
* down. Default false (left / up). */
|
|
81
|
+
reverse?: boolean;
|
|
82
|
+
/** Scroll speed in px/s (the CardsStrip unit — one speed language across
|
|
83
|
+
* every marquee). Default 40: calm chip-wall drift, slower than the 60 the
|
|
84
|
+
* card strips cruise at. */
|
|
85
|
+
speed?: number;
|
|
86
|
+
/** Master switch. Even when true the marquee auto-disables while the content
|
|
87
|
+
* fits the container and under `prefers-reduced-motion` (static wall). */
|
|
88
|
+
animate?: boolean;
|
|
89
|
+
/** Freeze while a hover-capable pointer is anywhere over the wall — content
|
|
90
|
+
* must never move under a pointing cursor (required for interactive chip
|
|
91
|
+
* walls). Default true. */
|
|
92
|
+
pauseOnHover?: boolean;
|
|
93
|
+
/** Edge fade(s) — the "there's more" affordance. ONE spelling of the
|
|
94
|
+
* clip-and-fade across every wall surface. */
|
|
95
|
+
fade?: MarqueeWallFadeEdge | ReadonlyArray<MarqueeWallFadeEdge>;
|
|
96
|
+
/** The color the fades blend INTO — must match the surface behind the wall
|
|
97
|
+
* or the gradient paints a visible box. Default the page background. */
|
|
98
|
+
fadeColor?: string;
|
|
99
|
+
/** Fade thickness: one value for all edges or a per-edge map. Defaults:
|
|
100
|
+
* 40px vertical edges, 112px horizontal edges (the shipped hero-wall
|
|
101
|
+
* geometry). */
|
|
102
|
+
fadeSize?: number | string | Partial<Record<MarqueeWallFadeEdge, number | string>>;
|
|
103
|
+
/** Gap between the two track copies — match the content's own item gap so
|
|
104
|
+
* the seam is invisible. A CSS length string (e.g. `var(--tlcl-chipgap)`)
|
|
105
|
+
* lets responsive CSS own the value; the true seam distance is MEASURED
|
|
106
|
+
* from the rendered copies either way. Default 8. */
|
|
107
|
+
copyGap?: number | string;
|
|
108
|
+
/** Outer container class — sizing lives here (height cap for `y`, width for
|
|
109
|
+
* `x`). The container is always `relative overflow-hidden`. */
|
|
110
|
+
className?: string;
|
|
111
|
+
/** Class on EACH track copy — the wall's own layout (e.g. a wrapping chip
|
|
112
|
+
* row `flex flex-wrap gap-2`, or a fixed-width grid). */
|
|
113
|
+
contentClassName?: string;
|
|
114
|
+
/** Inline style on EACH track copy — for values classes can't carry (e.g.
|
|
115
|
+
* an item gap driven by the same variable as `copyGap`, so chip pitch and
|
|
116
|
+
* seam pitch stay one value by construction). */
|
|
117
|
+
contentStyle?: React.CSSProperties;
|
|
118
|
+
/**
|
|
119
|
+
* Wall content — ONE copy; the wall clones it for the endless loop (clone
|
|
120
|
+
* `aria-hidden` + focus-suppressed but still clickable). Pass a render
|
|
121
|
+
* callback to vary the clone copy (e.g. omit `data-flip-id`s / render
|
|
122
|
+
* decorative chips). Children must be clone-safe: ref-free, unique-DOM-id-
|
|
123
|
+
* free, mount-effect-free (same contract as <CardsStrip> children mode).
|
|
124
|
+
*/
|
|
125
|
+
children: React.ReactNode | ((ctx: {
|
|
126
|
+
isClone: boolean;
|
|
127
|
+
}) => React.ReactNode);
|
|
128
|
+
/** Pair this wall with sibling walls under one shared position driver. */
|
|
129
|
+
sync?: MarqueeSyncController;
|
|
130
|
+
/** Stable id for FLIP coordination: publishes the wall's live offset via
|
|
131
|
+
* {@link getMarqueeTrackOffset} and stamps `data-marquee-track` on the
|
|
132
|
+
* container so morph engines can drift-correct captured positions. */
|
|
133
|
+
trackId?: string;
|
|
134
|
+
}
|
|
135
|
+
/** The wall's edge-fade overlays — exported so composite walls (stacked row
|
|
136
|
+
* marquees) can draw ONE set of fades over the whole stack instead of
|
|
137
|
+
* per-row copies. Parent must be `relative`. Overlays sit at z-1, ABOVE
|
|
138
|
+
* FLIP flight ghosts (z-0 by contract): an in-flight chip dissolves under
|
|
139
|
+
* the blur exactly like a resting chip. */
|
|
140
|
+
export declare function MarqueeWallFades({ fade, fadeColor, fadeSize, }: {
|
|
141
|
+
fade?: MarqueeWallFadeEdge | ReadonlyArray<MarqueeWallFadeEdge>;
|
|
142
|
+
fadeColor?: string;
|
|
143
|
+
fadeSize?: MarqueeWallProps['fadeSize'];
|
|
144
|
+
}): React.JSX.Element;
|
|
145
|
+
/**
|
|
146
|
+
* <MarqueeWall> — THE endless-scroll wall container: a clipped area whose
|
|
147
|
+
* content loops as a marquee along either axis, fading out where the clip
|
|
148
|
+
* cuts. Built on the same `useMarqueeEngine` core as <CardsStrip> (the news /
|
|
149
|
+
* logo / bites strips) with a TRANSFORM driver instead of a scroller — no
|
|
150
|
+
* inner scrollable area is created, so it is safe inside surfaces that forbid
|
|
151
|
+
* nested scrollers (the deck's mobile single-fold panels).
|
|
152
|
+
*
|
|
153
|
+
* Static by circumstance, not by variant: when the content fits the container
|
|
154
|
+
* (or `prefers-reduced-motion`) the wall renders a single static copy with
|
|
155
|
+
* its fades — byte-identical to the old non-animated walls.
|
|
156
|
+
*/
|
|
157
|
+
export declare function MarqueeWall({ mode, axis: axisProp, reverse, speed, animate, pauseOnHover, fade, fadeColor, fadeSize, copyGap, className, contentClassName, contentStyle, children, sync, trackId, }: MarqueeWallProps): React.JSX.Element;
|
|
158
|
+
export {};
|
|
159
|
+
//# sourceMappingURL=marquee-wall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marquee-wall.d.ts","sourceRoot":"","sources":["../../../src/components/ui/marquee-wall.tsx"],"names":[],"mappings":"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"}
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -64,7 +64,9 @@
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
var _chunkQF3NQW7Ccjs = require('../chunk-QF3NQW7C.cjs');
|
|
68
70
|
require('../chunk-BGD345ZV.cjs');
|
|
69
71
|
require('../chunk-2B6773QM.cjs');
|
|
70
72
|
require('../chunk-SSJNN5BS.cjs');
|
|
@@ -139,5 +141,7 @@ require('../chunk-VRHGVLSL.cjs');
|
|
|
139
141
|
|
|
140
142
|
|
|
141
143
|
|
|
142
|
-
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
exports.GraphQLIntrospector = _chunkQF3NQW7Ccjs.GraphQLIntrospector; exports.NEAR_VIEWPORT_ROOT_MARGIN = _chunkQF3NQW7Ccjs.NEAR_VIEWPORT_ROOT_MARGIN; exports.batchFetchAuthenticatedImages = _chunkQF3NQW7Ccjs.batchFetchAuthenticatedImages; exports.breakpoints = _chunkQF3NQW7Ccjs.breakpoints; exports.clearVariablesParams = _chunkQF3NQW7Ccjs.clearParams; exports.coerceValue = _chunkQF3NQW7Ccjs.coerceValue; exports.configureAuthenticatedImage = _chunkQF3NQW7Ccjs.configureAuthenticatedImage; exports.configureBatchImageFetch = _chunkQF3NQW7Ccjs.configureBatchImageFetch; exports.createSearchParams = _chunkQF3NQW7Ccjs.createSearchParams; exports.extractVariablesFromQuery = _chunkQF3NQW7Ccjs.extractVariablesFromQuery; exports.flattenQueryVariables = _chunkQF3NQW7Ccjs.flattenQueryVariables; exports.getArrayParams = _chunkQF3NQW7Ccjs.getArrayParams; exports.getNestedValue = _chunkQF3NQW7Ccjs.getNestedValue; exports.getRequiredParams = _chunkQF3NQW7Ccjs.getRequiredParams; exports.introspector = _chunkQF3NQW7Ccjs.introspector; exports.isInputObjectType = _chunkQF3NQW7Ccjs.isInputObjectType; exports.isScalarType = _chunkQF3NQW7Ccjs.isScalarType; exports.mergeDefaults = _chunkQF3NQW7Ccjs.mergeDefaults; exports.mergeVariables = _chunkQF3NQW7Ccjs.mergeVariables; exports.setNestedValue = _chunkQF3NQW7Ccjs.setNestedValue; exports.shouldIncludeInUrl = _chunkQF3NQW7Ccjs.shouldIncludeInUrl; exports.toast = _chunkQF3NQW7Ccjs.toast; exports.urlParamsToVariables = _chunkQF3NQW7Ccjs.urlParamsToVariables; exports.useAccessCodeIntegration = _chunkQF3NQW7Ccjs.useAccessCodeIntegration; exports.useApiParams = _chunkQF3NQW7Ccjs.useApiParams; exports.useAuthenticatedImage = _chunkQF3NQW7Ccjs.useAuthenticatedImage; exports.useAutoLimitTags = _chunkQF3NQW7Ccjs.useAutoLimitTags; exports.useBatchImages = _chunkQF3NQW7Ccjs.useBatchImages; exports.useContactSubmission = _chunkQF3NQW7Ccjs.useContactSubmission; exports.useCopyToClipboard = _chunkQF3NQW7Ccjs.useCopyToClipboard; exports.useCursorPaginationState = _chunkQF3NQW7Ccjs.useCursorPaginationState; exports.useDebounce = _chunkQF3NQW7Ccjs.useDebounce; exports.useDeferredError = _chunkQF3NQW7Ccjs.useDeferredError; exports.useFocusTrap = _chunkQF3NQW7Ccjs.useFocusTrap; exports.useHeaderHeight = _chunkQF3NQW7Ccjs.useHeaderHeight; exports.useHorizontalScrollbar = _chunkQF3NQW7Ccjs.useHorizontalScrollbar; exports.useHumanitySignals = _chunkQF3NQW7Ccjs.useHumanitySignals; exports.useImageEdgeColor = _chunkQF3NQW7Ccjs.useImageEdgeColor; exports.useLgUp = _chunkQF3NQW7Ccjs.useLgUp; exports.useLocalStorage = _chunkQF3NQW7Ccjs.useLocalStorage; exports.useMarqueeEngine = _chunkQF3NQW7Ccjs.useMarqueeEngine; exports.useMdUp = _chunkQF3NQW7Ccjs.useMdUp; exports.useMediaQuery = _chunkQF3NQW7Ccjs.useMediaQuery; exports.useMemoizedCallback = _chunkQF3NQW7Ccjs.useMemoizedCallback; exports.useNatsClient = _chunkQF3NQW7Ccjs.useNatsClient; exports.useNearViewport = _chunkQF3NQW7Ccjs.useNearViewport; exports.useNotificationPermission = _chunkQF3NQW7Ccjs.useNotificationPermission; exports.useOgPlaceholderUrl = _chunkQF3NQW7Ccjs.useOgPlaceholderUrl; exports.useOnboardingState = _chunkQF3NQW7Ccjs.useOnboardingState; exports.usePlatformByValue = _chunkQF3NQW7Ccjs.usePlatformByValue; exports.usePlatformConfig = _chunkQF3NQW7Ccjs.usePlatformConfig; exports.usePreventScroll = _chunkQF3NQW7Ccjs.usePreventScroll; exports.useQueryParams = _chunkQF3NQW7Ccjs.useQueryParams; exports.useQuickActionHint = _chunkQF3NQW7Ccjs.useQuickActionHint; exports.useScrollToHash = _chunkQF3NQW7Ccjs.useScrollToHash; exports.useSearch = _chunkQF3NQW7Ccjs.useSearch; exports.useSmUp = _chunkQF3NQW7Ccjs.useSmUp; exports.useSuppressCloneFocus = _chunkQF3NQW7Ccjs.useSuppressCloneFocus; exports.useTablePagination = _chunkQF3NQW7Ccjs.useTablePagination; exports.useThrottle = _chunkQF3NQW7Ccjs.useThrottle; exports.useToast = _chunkQF3NQW7Ccjs.useToast; exports.useValidatePlatform = _chunkQF3NQW7Ccjs.useValidatePlatform; exports.useWindowSize = _chunkQF3NQW7Ccjs.useWindowSize; exports.validateSchema = _chunkQF3NQW7Ccjs.validateSchema; exports.validateVariables = _chunkQF3NQW7Ccjs.validateVariables; exports.variablesToUrlParams = _chunkQF3NQW7Ccjs.variablesToUrlParams;
|
|
143
147
|
//# sourceMappingURL=index.cjs.map
|
package/dist/hooks/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/hooks/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/hooks/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wmIAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/hooks/index.cjs"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
useImageEdgeColor,
|
|
41
41
|
useLgUp,
|
|
42
42
|
useLocalStorage,
|
|
43
|
+
useMarqueeEngine,
|
|
43
44
|
useMdUp,
|
|
44
45
|
useMediaQuery,
|
|
45
46
|
useMemoizedCallback,
|
|
@@ -56,6 +57,7 @@ import {
|
|
|
56
57
|
useScrollToHash,
|
|
57
58
|
useSearch,
|
|
58
59
|
useSmUp,
|
|
60
|
+
useSuppressCloneFocus,
|
|
59
61
|
useTablePagination,
|
|
60
62
|
useThrottle,
|
|
61
63
|
useToast,
|
|
@@ -64,7 +66,7 @@ import {
|
|
|
64
66
|
validateSchema,
|
|
65
67
|
validateVariables,
|
|
66
68
|
variablesToUrlParams
|
|
67
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-MLFFBQ5B.js";
|
|
68
70
|
import "../chunk-OYGFWWLQ.js";
|
|
69
71
|
import "../chunk-KFQXO7QB.js";
|
|
70
72
|
import "../chunk-ZJJERZUA.js";
|
|
@@ -115,6 +117,7 @@ export {
|
|
|
115
117
|
useImageEdgeColor,
|
|
116
118
|
useLgUp,
|
|
117
119
|
useLocalStorage,
|
|
120
|
+
useMarqueeEngine,
|
|
118
121
|
useMdUp,
|
|
119
122
|
useMediaQuery,
|
|
120
123
|
useMemoizedCallback,
|
|
@@ -131,6 +134,7 @@ export {
|
|
|
131
134
|
useScrollToHash,
|
|
132
135
|
useSearch,
|
|
133
136
|
useSmUp,
|
|
137
|
+
useSuppressCloneFocus,
|
|
134
138
|
useTablePagination,
|
|
135
139
|
useThrottle,
|
|
136
140
|
useToast,
|
package/dist/hooks/ui/index.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ export * from './use-header-height';
|
|
|
6
6
|
export * from './use-horizontal-scrollbar';
|
|
7
7
|
export * from './use-image-edge-color';
|
|
8
8
|
export * from './use-local-storage';
|
|
9
|
+
export * from './use-marquee-engine';
|
|
9
10
|
export * from './use-media-query';
|
|
10
11
|
export * from './use-memoized-callback';
|
|
11
12
|
export * from './use-notification-permission';
|
|
12
13
|
export * from './use-onboarding-state';
|
|
13
14
|
export * from './use-search';
|
|
15
|
+
export * from './use-suppress-clone-focus';
|
|
14
16
|
export * from './use-table-pagination';
|
|
15
17
|
export * from './use-throttle';
|
|
16
18
|
export * from './use-window-size';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/ui/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AAKjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/ui/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AAKjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type MutableRefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* THE marquee animation core (single source of truth) — extracted verbatim
|
|
4
|
+
* from <CardsStrip> so every endless-scroll surface (card strips, logo strips,
|
|
5
|
+
* quick-action walls, chip marquees) shares ONE rAF position engine ("unify
|
|
6
|
+
* means delete variations").
|
|
7
|
+
*
|
|
8
|
+
* The engine is axis- and driver-agnostic: it owns a FLOAT position ref, a
|
|
9
|
+
* velocity envelope, seam wrapping, and an optional chevron-style glide; the
|
|
10
|
+
* caller decides what a position "means" via `apply` — writing
|
|
11
|
+
* `scroller.scrollLeft` (CardsStrip: a real scroller the user can also drag)
|
|
12
|
+
* or a `translate` transform (MarqueeWall: decorative tracks, incl. vertical —
|
|
13
|
+
* mandatory inside surfaces that forbid inner scrollers, e.g. the deck's
|
|
14
|
+
* mobile single-fold panels).
|
|
15
|
+
*
|
|
16
|
+
* Engine semantics (do not "simplify"):
|
|
17
|
+
* - Position lives in a FLOAT ref, never read-modify-write from the DOM:
|
|
18
|
+
* scrollLeft reads back rounded values, so sub-pixel increments
|
|
19
|
+
* (speed/fps < 1px) get eaten by rounding — stutter + measurably slower
|
|
20
|
+
* than the configured speed.
|
|
21
|
+
* - Velocity envelope (~250ms time constant) eases between 0 and `speed`
|
|
22
|
+
* instead of binary stop/start — pause decelerates, resume accelerates from
|
|
23
|
+
* the current position (GSAP-marquee behavior; hard cuts read as jank).
|
|
24
|
+
* - Glide consumes a signed remaining-distance, wrapping modulo the copy size
|
|
25
|
+
* each frame, so seam warps are invisible to it (browser smooth-scroll
|
|
26
|
+
* animates toward an ABSOLUTE target and lunges after a warp).
|
|
27
|
+
* - `isPaused` is evaluated every frame — the caller owns the pause-reason
|
|
28
|
+
* set (hover, viewport, tab visibility, suppress windows); the engine only
|
|
29
|
+
* turns it into a smooth velocity target.
|
|
30
|
+
*/
|
|
31
|
+
export interface MarqueeEngineOptions {
|
|
32
|
+
/** Master switch — the rAF runs only while true. On (re)activation the
|
|
33
|
+
* position resyncs from `readBack` when provided. */
|
|
34
|
+
active: boolean;
|
|
35
|
+
/** Cruise speed in px/s. */
|
|
36
|
+
speed: number;
|
|
37
|
+
/** Per-frame pause verdict (caller-owned reason set). `now` is the rAF
|
|
38
|
+
* timestamp, for suppress-until comparisons. */
|
|
39
|
+
isPaused: (now: number) => boolean;
|
|
40
|
+
/** Single-copy size in px (the wrap modulus). Return <= 0 to disable
|
|
41
|
+
* wrapping (position advances unwrapped — callers should size tracks so
|
|
42
|
+
* this never happens while active). */
|
|
43
|
+
getWrapSize: () => number;
|
|
44
|
+
/** Lower bound of the wrap range: positions stay in
|
|
45
|
+
* [wrapMin, wrapMin + wrapSize). Default 0. Scroller drivers with USER
|
|
46
|
+
* scrolling pass their seam-warp buffer here so engine-written positions
|
|
47
|
+
* never enter the re-center zones — an exact-edge warp check is racy
|
|
48
|
+
* against the rAF (the engine nudges the scroller off the edge before the
|
|
49
|
+
* scroll handler samples it → "stuck at the left edge"). */
|
|
50
|
+
getWrapMin?: () => number;
|
|
51
|
+
/** Write the position to the DOM (scrollLeft assignment or transform). */
|
|
52
|
+
apply: (pos: number) => void;
|
|
53
|
+
/** Read the externally-mutated position back (real scrollers: user drag /
|
|
54
|
+
* native smooth scroll move scrollLeft under the engine). Omit for
|
|
55
|
+
* transform drivers — nothing external can move them. */
|
|
56
|
+
readBack?: () => number;
|
|
57
|
+
/** Called at the end of every frame (e.g. hover re-resolution after the
|
|
58
|
+
* track moved under a stationary pointer). */
|
|
59
|
+
onAfterFrame?: () => void;
|
|
60
|
+
}
|
|
61
|
+
export interface MarqueeEngineHandle {
|
|
62
|
+
/** The engine's float position (px along the axis, 0 ≤ pos < wrap while
|
|
63
|
+
* wrapping). Callers may write it together with their own DOM write (seam
|
|
64
|
+
* warp on manual scroll). */
|
|
65
|
+
posRef: MutableRefObject<number>;
|
|
66
|
+
/** Accumulate a signed glide distance (chevron navigation). Runs through
|
|
67
|
+
* the engine's own tween — never native smooth scroll while wrapping. */
|
|
68
|
+
glideBy: (px: number) => void;
|
|
69
|
+
/** Wrap an arbitrary position into [0, wrapSize). */
|
|
70
|
+
wrap: (pos: number) => number;
|
|
71
|
+
}
|
|
72
|
+
export declare function useMarqueeEngine(options: MarqueeEngineOptions): MarqueeEngineHandle;
|
|
73
|
+
//# sourceMappingURL=use-marquee-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-marquee-engine.d.ts","sourceRoot":"","sources":["../../../src/hooks/ui/use-marquee-engine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,oBAAoB;IACnC;0DACsD;IACtD,MAAM,EAAE,OAAO,CAAA;IACf,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb;qDACiD;IACjD,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IAClC;;4CAEwC;IACxC,WAAW,EAAE,MAAM,MAAM,CAAA;IACzB;;;;;iEAK6D;IAC7D,UAAU,CAAC,EAAE,MAAM,MAAM,CAAA;IACzB,0EAA0E;IAC1E,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B;;8DAE0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAA;IACvB;mDAC+C;IAC/C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC;;kCAE8B;IAC9B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAChC;8EAC0E;IAC1E,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,qDAAqD;IACrD,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;CAC9B;AAKD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CA8EnF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep a marquee clone's content pointer-CLICKABLE while taking it out of the
|
|
3
|
+
* accessibility tree and the keyboard tab order. Shared by every endless-loop
|
|
4
|
+
* surface that renders a second track copy (<CardsStrip> managed cells,
|
|
5
|
+
* <MarqueeWall> clone copies).
|
|
6
|
+
*
|
|
7
|
+
* `inert` (the previous approach) does all three at once: a11y-hidden,
|
|
8
|
+
* un-focusable AND un-clickable. That third effect was the "news marquee stops
|
|
9
|
+
* being clickable after you scroll it for a while" bug — the 2-copy endless
|
|
10
|
+
* loop ALWAYS paints clone cards inside the viewport near the copy seam, so a
|
|
11
|
+
* user who manually scrolls and parks there is looking at real-looking cards
|
|
12
|
+
* that silently swallow every click. Clones must therefore stay clickable (a
|
|
13
|
+
* click on ANY visible card must open its link — mouse, ⌘-click, middle-click
|
|
14
|
+
* and context-menu all handled natively by the clone's own anchor).
|
|
15
|
+
*
|
|
16
|
+
* The a11y contract is still met without `inert`: the caller keeps
|
|
17
|
+
* `aria-hidden` on the clone wrapper (out of the a11y tree) and this hook
|
|
18
|
+
* forces every focusable descendant to `tabindex="-1"` (out of the tab order →
|
|
19
|
+
* no duplicate tab stops, no aria-hidden-focus violation). Re-applied on
|
|
20
|
+
* subtree mutation. This is the standard loop-clone treatment used by
|
|
21
|
+
* Swiper/Splide.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useSuppressCloneFocus(active: boolean): import("react").RefObject<HTMLDivElement | null>;
|
|
24
|
+
//# sourceMappingURL=use-suppress-clone-focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-suppress-clone-focus.d.ts","sourceRoot":"","sources":["../../../src/hooks/ui/use-suppress-clone-focus.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,oDA2BpD"}
|