promptslide 0.3.5 → 0.3.7
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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +80 -2
- package/dist/index.js +700 -121
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/create.mjs +41 -5
- package/src/commands/publish.mjs +49 -2
- package/src/commands/pull.mjs +29 -0
- package/src/core/annotations/adapters/http.ts +43 -0
- package/src/core/annotations/annotation-form.tsx +82 -0
- package/src/core/annotations/annotation-overlay.tsx +198 -0
- package/src/core/annotations/annotation-panel.tsx +150 -0
- package/src/core/annotations/annotation-pin.tsx +42 -0
- package/src/core/annotations/api.ts +23 -0
- package/src/core/annotations/index.ts +5 -0
- package/src/core/annotations/selectors.ts +76 -0
- package/src/core/annotations/types.ts +47 -0
- package/src/core/annotations/use-annotations.ts +50 -0
- package/src/core/index.ts +4 -0
- package/src/core/slide-deck.tsx +168 -83
- package/src/vite/plugin.mjs +54 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.7](https://github.com/prompticeu/promptslide/compare/promptslide-v0.3.6...promptslide-v0.3.7) (2026-03-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add slide annotation system with persistent storage and pull export ([#78](https://github.com/prompticeu/promptslide/issues/78)) ([c4addbb](https://github.com/prompticeu/promptslide/commit/c4addbba10f53eede84b0c3e1f3f2704a8a7125b))
|
|
9
|
+
* always check registry for publish overwrite scenarios ([#77](https://github.com/prompticeu/promptslide/issues/77)) ([bef4af5](https://github.com/prompticeu/promptslide/commit/bef4af51d397af50baa7ba038fbdf647e0ac5f56))
|
|
10
|
+
* scaffold lockfile with auto-generated publish metadata ([#75](https://github.com/prompticeu/promptslide/issues/75)) ([bc3a7bd](https://github.com/prompticeu/promptslide/commit/bc3a7bd7a6c2871f27e874b12b21978911fe91e0))
|
|
11
|
+
|
|
12
|
+
## [0.3.6](https://github.com/prompticeu/promptslide/compare/promptslide-v0.3.5...promptslide-v0.3.6) (2026-03-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* show organization hint in publish command ([#73](https://github.com/prompticeu/promptslide/issues/73)) ([3002f25](https://github.com/prompticeu/promptslide/commit/3002f255f386a5bf646381808324ebda96c57707))
|
|
18
|
+
|
|
3
19
|
## [0.3.5](https://github.com/prompticeu/promptslide/compare/promptslide-v0.3.4...promptslide-v0.3.5) (2026-03-08)
|
|
4
20
|
|
|
5
21
|
|
package/dist/index.d.ts
CHANGED
|
@@ -376,12 +376,90 @@ interface SlideEmbedProps {
|
|
|
376
376
|
*/
|
|
377
377
|
declare function SlideEmbed({ slides, transition, directionalTransition }: SlideEmbedProps): react_jsx_runtime.JSX.Element;
|
|
378
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Types for the slide annotation system.
|
|
381
|
+
* Annotations are stored as a JSON file in the project root
|
|
382
|
+
* and read by coding agents to act on user feedback.
|
|
383
|
+
*/
|
|
384
|
+
interface AnnotationTarget {
|
|
385
|
+
/** User-assigned data-annotate value, if present on the element */
|
|
386
|
+
dataAnnotate?: string;
|
|
387
|
+
/** Nearby visible text to help locate the annotated area (first 100 chars, not meant to be edited) */
|
|
388
|
+
contentNearPin?: string;
|
|
389
|
+
/** Coordinates as percentage of slide dimensions */
|
|
390
|
+
position: {
|
|
391
|
+
xPercent: number;
|
|
392
|
+
yPercent: number;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
interface Annotation {
|
|
396
|
+
/** Unique identifier */
|
|
397
|
+
id: string;
|
|
398
|
+
/** Slide index (0-based, matching deck-config order) */
|
|
399
|
+
slideIndex: number;
|
|
400
|
+
/** Slide title from SlideConfig (informational, for agent readability) */
|
|
401
|
+
slideTitle: string;
|
|
402
|
+
/** Target element identification */
|
|
403
|
+
target: AnnotationTarget;
|
|
404
|
+
/** The user's feedback text */
|
|
405
|
+
body: string;
|
|
406
|
+
/** ISO 8601 timestamp */
|
|
407
|
+
createdAt: string;
|
|
408
|
+
/** open = needs attention, resolved = agent addressed it */
|
|
409
|
+
status: "open" | "resolved";
|
|
410
|
+
/** Agent's note when resolving */
|
|
411
|
+
resolution?: string;
|
|
412
|
+
}
|
|
413
|
+
interface AnnotationsFile {
|
|
414
|
+
version: 1;
|
|
415
|
+
annotations: Annotation[];
|
|
416
|
+
}
|
|
417
|
+
/** Storage adapter for annotation persistence */
|
|
418
|
+
interface AnnotationStorageAdapter {
|
|
419
|
+
load(): Promise<Annotation[]>;
|
|
420
|
+
add(annotation: Annotation): Promise<void>;
|
|
421
|
+
remove(id: string): Promise<void>;
|
|
422
|
+
/** Optional: subscribe to external state updates (e.g. postMessage from parent) */
|
|
423
|
+
subscribe?(onUpdate: (annotations: Annotation[]) => void): () => void;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
interface AnnotationOverlayProps {
|
|
427
|
+
slides: SlideConfig[];
|
|
428
|
+
currentSlide: number;
|
|
429
|
+
/** Ref to the slide container element (the div wrapping SlideRenderer) */
|
|
430
|
+
slideContainerRef: React.RefObject<HTMLDivElement | null>;
|
|
431
|
+
selectedId: string | null;
|
|
432
|
+
onSelectId: (id: string | null) => void;
|
|
433
|
+
onShowPanel: () => void;
|
|
434
|
+
slideAnnotations: Annotation[];
|
|
435
|
+
addAnnotation: (slideIndex: number, slideTitle: string, target: AnnotationTarget, body: string) => void;
|
|
436
|
+
}
|
|
437
|
+
declare function AnnotationOverlay({ slides, currentSlide, slideContainerRef, selectedId, onSelectId, onShowPanel, slideAnnotations, addAnnotation }: AnnotationOverlayProps): react_jsx_runtime.JSX.Element;
|
|
438
|
+
|
|
439
|
+
declare function useAnnotations(adapter?: AnnotationStorageAdapter): {
|
|
440
|
+
annotations: Annotation[];
|
|
441
|
+
addAnnotation: (slideIndex: number, slideTitle: string, target: AnnotationTarget, body: string) => void;
|
|
442
|
+
deleteAnnotation: (id: string) => void;
|
|
443
|
+
getSlideAnnotations: (slideIndex: number) => Annotation[];
|
|
444
|
+
openCount: number;
|
|
445
|
+
updateAnnotations: (updated: Annotation[]) => void;
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
/** Storage adapter for local Vite dev server (reads/writes annotations.json via middleware) */
|
|
449
|
+
declare function createHttpAdapter(): AnnotationStorageAdapter;
|
|
450
|
+
|
|
379
451
|
interface SlideDeckProps {
|
|
380
452
|
slides: SlideConfig[];
|
|
381
453
|
transition?: SlideTransitionType;
|
|
382
454
|
directionalTransition?: boolean;
|
|
455
|
+
/** Annotation data to display. When provided (even empty array), annotation UI is enabled. When undefined, annotation UI is hidden. */
|
|
456
|
+
annotations?: Annotation[];
|
|
457
|
+
/** Called when the user creates an annotation */
|
|
458
|
+
onAnnotationAdd?: (slideIndex: number, slideTitle: string, target: AnnotationTarget, body: string) => void;
|
|
459
|
+
/** Called when the user deletes an annotation */
|
|
460
|
+
onAnnotationDelete?: (id: string) => void;
|
|
383
461
|
}
|
|
384
|
-
declare function SlideDeck({ slides, transition, directionalTransition }: SlideDeckProps): react_jsx_runtime.JSX.Element;
|
|
462
|
+
declare function SlideDeck({ slides, transition, directionalTransition, annotations, onAnnotationAdd, onAnnotationDelete }: SlideDeckProps): react_jsx_runtime.JSX.Element;
|
|
385
463
|
|
|
386
464
|
interface SlideErrorBoundaryProps {
|
|
387
465
|
slideIndex: number;
|
|
@@ -404,4 +482,4 @@ declare class SlideErrorBoundary extends React$1.Component<SlideErrorBoundaryPro
|
|
|
404
482
|
|
|
405
483
|
declare function cn(...inputs: ClassValue[]): string;
|
|
406
484
|
|
|
407
|
-
export { Animated, AnimatedGroup, AnimationProvider, type AnimationType, DEFAULT_SLIDE_TRANSITION, EASE_DEFAULT, EASE_IN, EASE_MORPH, EASE_OUT, ELEMENT_SLIDE_DISTANCE, MORPH_DURATION, MORPH_TRANSITION, Morph, MorphGroup, MorphItem, MorphText, type NavigationDirection, SLIDE_DIMENSIONS, SLIDE_DISTANCE, SLIDE_TRANSITION, SLIDE_TRANSITION_DURATION, SLIDE_VARIANTS, SPRING_BOUNCY, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER_DELAY, STEP_ANIMATION_DURATION, STEP_TRANSITION, type SlideComponent, type SlideConfig, SlideDeck, SlideEmbed, SlideErrorBoundary, type SlideProps, SlideRenderer, type SlideRendererProps, SlideThemeProvider, type SlideTransitionConfig, type SlideTransitionType, type ThemeConfig, type UseSlideNavigationOptions, type UseSlideNavigationReturn, cn, createDirectionalVariants, directionalSlideX, directionalSlideY, getSlideTransition, getSlideVariants, useAnimationContext, useSlideNavigation, useTheme };
|
|
485
|
+
export { Animated, AnimatedGroup, AnimationProvider, type AnimationType, type Annotation, AnnotationOverlay, type AnnotationStorageAdapter, type AnnotationTarget, type AnnotationsFile, DEFAULT_SLIDE_TRANSITION, EASE_DEFAULT, EASE_IN, EASE_MORPH, EASE_OUT, ELEMENT_SLIDE_DISTANCE, MORPH_DURATION, MORPH_TRANSITION, Morph, MorphGroup, MorphItem, MorphText, type NavigationDirection, SLIDE_DIMENSIONS, SLIDE_DISTANCE, SLIDE_TRANSITION, SLIDE_TRANSITION_DURATION, SLIDE_VARIANTS, SPRING_BOUNCY, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER_DELAY, STEP_ANIMATION_DURATION, STEP_TRANSITION, type SlideComponent, type SlideConfig, SlideDeck, SlideEmbed, SlideErrorBoundary, type SlideProps, SlideRenderer, type SlideRendererProps, SlideThemeProvider, type SlideTransitionConfig, type SlideTransitionType, type ThemeConfig, type UseSlideNavigationOptions, type UseSlideNavigationReturn, cn, createDirectionalVariants, createHttpAdapter, directionalSlideX, directionalSlideY, getSlideTransition, getSlideVariants, useAnimationContext, useAnnotations, useSlideNavigation, useTheme };
|