@open-slide/core 1.15.3 → 1.17.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/README.md +1 -1
- package/dist/{build-DaL4Gjn-.js → build-D7-fnqn8.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-CCHio3pk.js → config-CSgUUnlv.js} +1 -9
- package/dist/{dev-DLRQoCkT.js → dev-BkJdG_0u.js} +1 -1
- package/dist/index.d.ts +15 -14
- package/dist/index.js +8 -5
- package/dist/{preview-D3qVGc0S.js → preview-CC_DNgvi.js} +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +9 -9
- package/skills/apply-comments/SKILL.md +7 -8
- package/skills/create-slide/SKILL.md +9 -9
- package/skills/create-theme/SKILL.md +8 -5
- package/skills/current-slide/SKILL.md +1 -1
- package/skills/slide-authoring/SKILL.md +40 -315
- package/skills/slide-authoring/references/assets.md +52 -0
- package/skills/slide-authoring/references/design-system.md +48 -0
- package/skills/slide-authoring/references/morph.md +67 -0
- package/skills/slide-authoring/references/page-numbers.md +16 -0
- package/skills/slide-authoring/references/steps.md +43 -0
- package/skills/slide-authoring/references/transitions.md +175 -0
- package/skills/slide-authoring/references/webfonts.md +20 -0
- package/src/app/components/inspector/inspect-overlay.tsx +1 -1
- package/src/app/components/{shared-element.tsx → morph-element.tsx} +8 -13
- package/src/app/components/slide-transition-layer.tsx +61 -57
- package/src/app/lib/step-context.tsx +9 -1
- package/src/app/lib/transition.ts +2 -2
- package/src/app/lib/use-click-page-navigation.ts +1 -1
- package/src/app/lib/use-wheel-page-navigation.ts +1 -1
- package/src/app/routes/slide.tsx +1 -1
|
@@ -41,6 +41,7 @@ type StepHostContextValue = {
|
|
|
41
41
|
reportRevealed: (id: object, revealed: number) => void;
|
|
42
42
|
entryDirection: EntryDirection;
|
|
43
43
|
controlled: boolean;
|
|
44
|
+
isActivePage: boolean;
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
const GLOBAL_KEY = '__open_slide_step_host_context__';
|
|
@@ -163,13 +164,20 @@ export function StepHost({
|
|
|
163
164
|
},
|
|
164
165
|
entryDirection,
|
|
165
166
|
controlled: controlledRevealed != null,
|
|
167
|
+
isActivePage,
|
|
166
168
|
}),
|
|
167
|
-
[entryDirection, controlledRevealed, distributeControlled, notifyAggregate],
|
|
169
|
+
[entryDirection, controlledRevealed, distributeControlled, notifyAggregate, isActivePage],
|
|
168
170
|
);
|
|
169
171
|
|
|
170
172
|
return <StepHostContext.Provider value={value}>{children}</StepHostContext.Provider>;
|
|
171
173
|
}
|
|
172
174
|
|
|
175
|
+
// Hostless mounts (thumbnails, overview grid, print/export) are never the
|
|
176
|
+
// audience-facing instance, so no provider means false.
|
|
177
|
+
export function useIsActivePage(): boolean {
|
|
178
|
+
return useContext(StepHostContext)?.isActivePage ?? false;
|
|
179
|
+
}
|
|
180
|
+
|
|
173
181
|
export type StepsProps = PropsWithChildren;
|
|
174
182
|
|
|
175
183
|
export function Steps({ children }: StepsProps) {
|
|
@@ -12,10 +12,10 @@ export type SlideTransition = {
|
|
|
12
12
|
easing?: string;
|
|
13
13
|
enter?: TransitionPhase;
|
|
14
14
|
exit?: TransitionPhase;
|
|
15
|
-
|
|
15
|
+
morph?: boolean | MorphTransition;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export type
|
|
18
|
+
export type MorphTransition = {
|
|
19
19
|
duration?: number;
|
|
20
20
|
easing?: string;
|
|
21
21
|
delay?: number;
|
|
@@ -7,7 +7,7 @@ const NAV_PASSTHROUGH =
|
|
|
7
7
|
'a, button, input, textarea, select, label, summary, iframe, video, audio, embed, object, [role="button"], [role="link"], [contenteditable="true"], [data-osd-interactive], [data-osd-chrome]';
|
|
8
8
|
|
|
9
9
|
type UseClickPageNavigationOptions<T extends HTMLElement> = {
|
|
10
|
-
ref: RefObject<T>;
|
|
10
|
+
ref: RefObject<T | null>;
|
|
11
11
|
enabled?: boolean;
|
|
12
12
|
/** Fraction of the width on each side that navigates; the center is inert. */
|
|
13
13
|
edgeRatio?: number;
|
package/src/app/routes/slide.tsx
CHANGED