@objectifthunes/limestone-sdk 0.1.6 → 0.1.8
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/animations/confetti/confetti.d.ts +4 -0
- package/dist/animations/confetti/confetti.d.ts.map +1 -0
- package/dist/animations/confetti/confetti.js +10 -0
- package/dist/animations/confetti/confetti.js.map +1 -0
- package/dist/animations/confetti/index.d.ts +4 -0
- package/dist/animations/confetti/index.d.ts.map +1 -0
- package/dist/animations/confetti/index.js +3 -0
- package/dist/animations/confetti/index.js.map +1 -0
- package/dist/animations/confetti/types.d.ts +24 -0
- package/dist/animations/confetti/types.d.ts.map +1 -0
- package/dist/animations/confetti/types.js +2 -0
- package/dist/animations/confetti/types.js.map +1 -0
- package/dist/animations/confetti/use-confetti.d.ts +4 -0
- package/dist/animations/confetti/use-confetti.d.ts.map +1 -0
- package/dist/animations/confetti/use-confetti.js +35 -0
- package/dist/animations/confetti/use-confetti.js.map +1 -0
- package/dist/animations/error-shake/error-shake.d.ts +4 -0
- package/dist/animations/error-shake/error-shake.d.ts.map +1 -0
- package/dist/animations/error-shake/error-shake.js +10 -0
- package/dist/animations/error-shake/error-shake.js.map +1 -0
- package/dist/animations/error-shake/index.d.ts +4 -0
- package/dist/animations/error-shake/index.d.ts.map +1 -0
- package/dist/animations/error-shake/index.js +3 -0
- package/dist/animations/error-shake/index.js.map +1 -0
- package/dist/animations/error-shake/types.d.ts +14 -0
- package/dist/animations/error-shake/types.d.ts.map +1 -0
- package/dist/animations/error-shake/types.js +2 -0
- package/dist/animations/error-shake/types.js.map +1 -0
- package/dist/animations/error-shake/use-error-shake.d.ts +4 -0
- package/dist/animations/error-shake/use-error-shake.d.ts.map +1 -0
- package/dist/animations/error-shake/use-error-shake.js +15 -0
- package/dist/animations/error-shake/use-error-shake.js.map +1 -0
- package/dist/animations/index.d.ts +4 -0
- package/dist/animations/index.d.ts.map +1 -1
- package/dist/animations/index.js +2 -0
- package/dist/animations/index.js.map +1 -1
- package/dist/components/data-display/activity-ring/activity-ring.d.ts +4 -0
- package/dist/components/data-display/activity-ring/activity-ring.d.ts.map +1 -0
- package/dist/components/data-display/activity-ring/activity-ring.js +10 -0
- package/dist/components/data-display/activity-ring/activity-ring.js.map +1 -0
- package/dist/components/data-display/activity-ring/index.d.ts +4 -0
- package/dist/components/data-display/activity-ring/index.d.ts.map +1 -0
- package/dist/components/data-display/activity-ring/index.js +3 -0
- package/dist/components/data-display/activity-ring/index.js.map +1 -0
- package/dist/components/data-display/activity-ring/types.d.ts +35 -0
- package/dist/components/data-display/activity-ring/types.d.ts.map +1 -0
- package/dist/components/data-display/activity-ring/types.js +2 -0
- package/dist/components/data-display/activity-ring/types.js.map +1 -0
- package/dist/components/data-display/activity-ring/use-activity-ring.d.ts +4 -0
- package/dist/components/data-display/activity-ring/use-activity-ring.d.ts.map +1 -0
- package/dist/components/data-display/activity-ring/use-activity-ring.js +61 -0
- package/dist/components/data-display/activity-ring/use-activity-ring.js.map +1 -0
- package/dist/components/data-display/chart/chart.d.ts +4 -0
- package/dist/components/data-display/chart/chart.d.ts.map +1 -0
- package/dist/components/data-display/chart/chart.js +10 -0
- package/dist/components/data-display/chart/chart.js.map +1 -0
- package/dist/components/data-display/chart/index.d.ts +4 -0
- package/dist/components/data-display/chart/index.d.ts.map +1 -0
- package/dist/components/data-display/chart/index.js +3 -0
- package/dist/components/data-display/chart/index.js.map +1 -0
- package/dist/components/data-display/chart/types.d.ts +86 -0
- package/dist/components/data-display/chart/types.d.ts.map +1 -0
- package/dist/components/data-display/chart/types.js +2 -0
- package/dist/components/data-display/chart/types.js.map +1 -0
- package/dist/components/data-display/chart/use-chart.d.ts +4 -0
- package/dist/components/data-display/chart/use-chart.d.ts.map +1 -0
- package/dist/components/data-display/chart/use-chart.js +172 -0
- package/dist/components/data-display/chart/use-chart.js.map +1 -0
- package/dist/components/data-display/countdown-timer/countdown-timer.d.ts +4 -0
- package/dist/components/data-display/countdown-timer/countdown-timer.d.ts.map +1 -0
- package/dist/components/data-display/countdown-timer/countdown-timer.js +10 -0
- package/dist/components/data-display/countdown-timer/countdown-timer.js.map +1 -0
- package/dist/components/data-display/countdown-timer/index.d.ts +4 -0
- package/dist/components/data-display/countdown-timer/index.d.ts.map +1 -0
- package/dist/components/data-display/countdown-timer/index.js +3 -0
- package/dist/components/data-display/countdown-timer/index.js.map +1 -0
- package/dist/components/data-display/countdown-timer/types.d.ts +37 -0
- package/dist/components/data-display/countdown-timer/types.d.ts.map +1 -0
- package/dist/components/data-display/countdown-timer/types.js +2 -0
- package/dist/components/data-display/countdown-timer/types.js.map +1 -0
- package/dist/components/data-display/countdown-timer/use-countdown-timer.d.ts +4 -0
- package/dist/components/data-display/countdown-timer/use-countdown-timer.d.ts.map +1 -0
- package/dist/components/data-display/countdown-timer/use-countdown-timer.js +81 -0
- package/dist/components/data-display/countdown-timer/use-countdown-timer.js.map +1 -0
- package/dist/components/data-display/credit-card-display/credit-card-display.d.ts +4 -0
- package/dist/components/data-display/credit-card-display/credit-card-display.d.ts.map +1 -0
- package/dist/components/data-display/credit-card-display/credit-card-display.js +10 -0
- package/dist/components/data-display/credit-card-display/credit-card-display.js.map +1 -0
- package/dist/components/data-display/credit-card-display/index.d.ts +4 -0
- package/dist/components/data-display/credit-card-display/index.d.ts.map +1 -0
- package/dist/components/data-display/credit-card-display/index.js +3 -0
- package/dist/components/data-display/credit-card-display/index.js.map +1 -0
- package/dist/components/data-display/credit-card-display/types.d.ts +41 -0
- package/dist/components/data-display/credit-card-display/types.d.ts.map +1 -0
- package/dist/components/data-display/credit-card-display/types.js +2 -0
- package/dist/components/data-display/credit-card-display/types.js.map +1 -0
- package/dist/components/data-display/credit-card-display/use-credit-card-display.d.ts +4 -0
- package/dist/components/data-display/credit-card-display/use-credit-card-display.d.ts.map +1 -0
- package/dist/components/data-display/credit-card-display/use-credit-card-display.js +72 -0
- package/dist/components/data-display/credit-card-display/use-credit-card-display.js.map +1 -0
- package/dist/components/data-display/data-table/data-table.d.ts +4 -0
- package/dist/components/data-display/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-display/data-table/data-table.js +10 -0
- package/dist/components/data-display/data-table/data-table.js.map +1 -0
- package/dist/components/data-display/data-table/index.d.ts +4 -0
- package/dist/components/data-display/data-table/index.d.ts.map +1 -0
- package/dist/components/data-display/data-table/index.js +3 -0
- package/dist/components/data-display/data-table/index.js.map +1 -0
- package/dist/components/data-display/data-table/types.d.ts +51 -0
- package/dist/components/data-display/data-table/types.d.ts.map +1 -0
- package/dist/components/data-display/data-table/types.js +2 -0
- package/dist/components/data-display/data-table/types.js.map +1 -0
- package/dist/components/data-display/data-table/use-data-table.d.ts +4 -0
- package/dist/components/data-display/data-table/use-data-table.d.ts.map +1 -0
- package/dist/components/data-display/data-table/use-data-table.js +75 -0
- package/dist/components/data-display/data-table/use-data-table.js.map +1 -0
- package/dist/components/data-display/index.d.ts +10 -0
- package/dist/components/data-display/index.d.ts.map +1 -1
- package/dist/components/data-display/index.js +5 -0
- package/dist/components/data-display/index.js.map +1 -1
- package/dist/components/index.d.ts +15 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +9 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/calendar/calendar.d.ts +4 -0
- package/dist/components/inputs/calendar/calendar.d.ts.map +1 -0
- package/dist/components/inputs/calendar/calendar.js +10 -0
- package/dist/components/inputs/calendar/calendar.js.map +1 -0
- package/dist/components/inputs/calendar/index.d.ts +4 -0
- package/dist/components/inputs/calendar/index.d.ts.map +1 -0
- package/dist/components/inputs/calendar/index.js +3 -0
- package/dist/components/inputs/calendar/index.js.map +1 -0
- package/dist/components/inputs/calendar/types.d.ts +52 -0
- package/dist/components/inputs/calendar/types.d.ts.map +1 -0
- package/dist/components/inputs/calendar/types.js +2 -0
- package/dist/components/inputs/calendar/types.js.map +1 -0
- package/dist/components/inputs/calendar/use-calendar.d.ts +4 -0
- package/dist/components/inputs/calendar/use-calendar.d.ts.map +1 -0
- package/dist/components/inputs/calendar/use-calendar.js +192 -0
- package/dist/components/inputs/calendar/use-calendar.js.map +1 -0
- package/dist/components/inputs/index.d.ts +4 -0
- package/dist/components/inputs/index.d.ts.map +1 -1
- package/dist/components/inputs/index.js +2 -0
- package/dist/components/inputs/index.js.map +1 -1
- package/dist/components/inputs/signature-pad/index.d.ts +4 -0
- package/dist/components/inputs/signature-pad/index.d.ts.map +1 -0
- package/dist/components/inputs/signature-pad/index.js +3 -0
- package/dist/components/inputs/signature-pad/index.js.map +1 -0
- package/dist/components/inputs/signature-pad/signature-pad.d.ts +4 -0
- package/dist/components/inputs/signature-pad/signature-pad.d.ts.map +1 -0
- package/dist/components/inputs/signature-pad/signature-pad.js +10 -0
- package/dist/components/inputs/signature-pad/signature-pad.js.map +1 -0
- package/dist/components/inputs/signature-pad/types.d.ts +47 -0
- package/dist/components/inputs/signature-pad/types.d.ts.map +1 -0
- package/dist/components/inputs/signature-pad/types.js +2 -0
- package/dist/components/inputs/signature-pad/types.js.map +1 -0
- package/dist/components/inputs/signature-pad/use-signature-pad.d.ts +4 -0
- package/dist/components/inputs/signature-pad/use-signature-pad.d.ts.map +1 -0
- package/dist/components/inputs/signature-pad/use-signature-pad.js +60 -0
- package/dist/components/inputs/signature-pad/use-signature-pad.js.map +1 -0
- package/dist/components/interactive/drag-to-reorder/drag-to-reorder.d.ts +4 -0
- package/dist/components/interactive/drag-to-reorder/drag-to-reorder.d.ts.map +1 -0
- package/dist/components/interactive/drag-to-reorder/drag-to-reorder.js +10 -0
- package/dist/components/interactive/drag-to-reorder/drag-to-reorder.js.map +1 -0
- package/dist/components/interactive/drag-to-reorder/index.d.ts +4 -0
- package/dist/components/interactive/drag-to-reorder/index.d.ts.map +1 -0
- package/dist/components/interactive/drag-to-reorder/index.js +3 -0
- package/dist/components/interactive/drag-to-reorder/index.js.map +1 -0
- package/dist/components/interactive/drag-to-reorder/types.d.ts +24 -0
- package/dist/components/interactive/drag-to-reorder/types.d.ts.map +1 -0
- package/dist/components/interactive/drag-to-reorder/types.js +2 -0
- package/dist/components/interactive/drag-to-reorder/types.js.map +1 -0
- package/dist/components/interactive/drag-to-reorder/use-drag-to-reorder.d.ts +4 -0
- package/dist/components/interactive/drag-to-reorder/use-drag-to-reorder.d.ts.map +1 -0
- package/dist/components/interactive/drag-to-reorder/use-drag-to-reorder.js +44 -0
- package/dist/components/interactive/drag-to-reorder/use-drag-to-reorder.js.map +1 -0
- package/dist/components/interactive/index.d.ts +10 -0
- package/dist/components/interactive/index.d.ts.map +1 -1
- package/dist/components/interactive/index.js +5 -0
- package/dist/components/interactive/index.js.map +1 -1
- package/dist/components/interactive/page-view/index.d.ts +4 -0
- package/dist/components/interactive/page-view/index.d.ts.map +1 -0
- package/dist/components/interactive/page-view/index.js +3 -0
- package/dist/components/interactive/page-view/index.js.map +1 -0
- package/dist/components/interactive/page-view/page-view.d.ts +4 -0
- package/dist/components/interactive/page-view/page-view.d.ts.map +1 -0
- package/dist/components/interactive/page-view/page-view.js +10 -0
- package/dist/components/interactive/page-view/page-view.js.map +1 -0
- package/dist/components/interactive/page-view/types.d.ts +24 -0
- package/dist/components/interactive/page-view/types.d.ts.map +1 -0
- package/dist/components/interactive/page-view/types.js +2 -0
- package/dist/components/interactive/page-view/types.js.map +1 -0
- package/dist/components/interactive/page-view/use-page-view.d.ts +4 -0
- package/dist/components/interactive/page-view/use-page-view.d.ts.map +1 -0
- package/dist/components/interactive/page-view/use-page-view.js +45 -0
- package/dist/components/interactive/page-view/use-page-view.js.map +1 -0
- package/dist/components/interactive/parallax-header/index.d.ts +4 -0
- package/dist/components/interactive/parallax-header/index.d.ts.map +1 -0
- package/dist/components/interactive/parallax-header/index.js +3 -0
- package/dist/components/interactive/parallax-header/index.js.map +1 -0
- package/dist/components/interactive/parallax-header/parallax-header.d.ts +4 -0
- package/dist/components/interactive/parallax-header/parallax-header.d.ts.map +1 -0
- package/dist/components/interactive/parallax-header/parallax-header.js +10 -0
- package/dist/components/interactive/parallax-header/parallax-header.js.map +1 -0
- package/dist/components/interactive/parallax-header/types.d.ts +16 -0
- package/dist/components/interactive/parallax-header/types.d.ts.map +1 -0
- package/dist/components/interactive/parallax-header/types.js +2 -0
- package/dist/components/interactive/parallax-header/types.js.map +1 -0
- package/dist/components/interactive/parallax-header/use-parallax-header.d.ts +4 -0
- package/dist/components/interactive/parallax-header/use-parallax-header.d.ts.map +1 -0
- package/dist/components/interactive/parallax-header/use-parallax-header.js +24 -0
- package/dist/components/interactive/parallax-header/use-parallax-header.js.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/index.d.ts +4 -0
- package/dist/components/interactive/pinch-to-zoom/index.d.ts.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/index.js +3 -0
- package/dist/components/interactive/pinch-to-zoom/index.js.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/pinch-to-zoom.d.ts +4 -0
- package/dist/components/interactive/pinch-to-zoom/pinch-to-zoom.d.ts.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/pinch-to-zoom.js +10 -0
- package/dist/components/interactive/pinch-to-zoom/pinch-to-zoom.js.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/types.d.ts +25 -0
- package/dist/components/interactive/pinch-to-zoom/types.d.ts.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/types.js +2 -0
- package/dist/components/interactive/pinch-to-zoom/types.js.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/use-pinch-to-zoom.d.ts +4 -0
- package/dist/components/interactive/pinch-to-zoom/use-pinch-to-zoom.d.ts.map +1 -0
- package/dist/components/interactive/pinch-to-zoom/use-pinch-to-zoom.js +38 -0
- package/dist/components/interactive/pinch-to-zoom/use-pinch-to-zoom.js.map +1 -0
- package/dist/components/interactive/pull-to-refresh/index.d.ts +4 -0
- package/dist/components/interactive/pull-to-refresh/index.d.ts.map +1 -0
- package/dist/components/interactive/pull-to-refresh/index.js +3 -0
- package/dist/components/interactive/pull-to-refresh/index.js.map +1 -0
- package/dist/components/interactive/pull-to-refresh/pull-to-refresh.d.ts +4 -0
- package/dist/components/interactive/pull-to-refresh/pull-to-refresh.d.ts.map +1 -0
- package/dist/components/interactive/pull-to-refresh/pull-to-refresh.js +10 -0
- package/dist/components/interactive/pull-to-refresh/pull-to-refresh.js.map +1 -0
- package/dist/components/interactive/pull-to-refresh/types.d.ts +21 -0
- package/dist/components/interactive/pull-to-refresh/types.d.ts.map +1 -0
- package/dist/components/interactive/pull-to-refresh/types.js +2 -0
- package/dist/components/interactive/pull-to-refresh/types.js.map +1 -0
- package/dist/components/interactive/pull-to-refresh/use-pull-to-refresh.d.ts +4 -0
- package/dist/components/interactive/pull-to-refresh/use-pull-to-refresh.d.ts.map +1 -0
- package/dist/components/interactive/pull-to-refresh/use-pull-to-refresh.js +28 -0
- package/dist/components/interactive/pull-to-refresh/use-pull-to-refresh.js.map +1 -0
- package/dist/components/social/comment-thread/comment-thread.d.ts +3 -0
- package/dist/components/social/comment-thread/comment-thread.d.ts.map +1 -0
- package/dist/components/social/comment-thread/comment-thread.js +88 -0
- package/dist/components/social/comment-thread/comment-thread.js.map +1 -0
- package/dist/components/social/comment-thread/index.d.ts +4 -0
- package/dist/components/social/comment-thread/index.d.ts.map +1 -0
- package/dist/components/social/comment-thread/index.js +3 -0
- package/dist/components/social/comment-thread/index.js.map +1 -0
- package/dist/components/social/comment-thread/types.d.ts +47 -0
- package/dist/components/social/comment-thread/types.d.ts.map +1 -0
- package/dist/components/social/comment-thread/types.js +2 -0
- package/dist/components/social/comment-thread/types.js.map +1 -0
- package/dist/components/social/comment-thread/use-comment-thread.d.ts +4 -0
- package/dist/components/social/comment-thread/use-comment-thread.d.ts.map +1 -0
- package/dist/components/social/comment-thread/use-comment-thread.js +100 -0
- package/dist/components/social/comment-thread/use-comment-thread.js.map +1 -0
- package/dist/components/social/index.d.ts +11 -0
- package/dist/components/social/index.d.ts.map +1 -0
- package/dist/components/social/index.js +6 -0
- package/dist/components/social/index.js.map +1 -0
- package/dist/components/social/mention-input/index.d.ts +4 -0
- package/dist/components/social/mention-input/index.d.ts.map +1 -0
- package/dist/components/social/mention-input/index.js +3 -0
- package/dist/components/social/mention-input/index.js.map +1 -0
- package/dist/components/social/mention-input/mention-input.d.ts +3 -0
- package/dist/components/social/mention-input/mention-input.d.ts.map +1 -0
- package/dist/components/social/mention-input/mention-input.js +50 -0
- package/dist/components/social/mention-input/mention-input.js.map +1 -0
- package/dist/components/social/mention-input/types.d.ts +46 -0
- package/dist/components/social/mention-input/types.d.ts.map +1 -0
- package/dist/components/social/mention-input/types.js +2 -0
- package/dist/components/social/mention-input/types.js.map +1 -0
- package/dist/components/social/mention-input/use-mention-input.d.ts +4 -0
- package/dist/components/social/mention-input/use-mention-input.d.ts.map +1 -0
- package/dist/components/social/mention-input/use-mention-input.js +124 -0
- package/dist/components/social/mention-input/use-mention-input.js.map +1 -0
- package/dist/components/social/presence-indicator/index.d.ts +4 -0
- package/dist/components/social/presence-indicator/index.d.ts.map +1 -0
- package/dist/components/social/presence-indicator/index.js +3 -0
- package/dist/components/social/presence-indicator/index.js.map +1 -0
- package/dist/components/social/presence-indicator/presence-indicator.d.ts +3 -0
- package/dist/components/social/presence-indicator/presence-indicator.d.ts.map +1 -0
- package/dist/components/social/presence-indicator/presence-indicator.js +17 -0
- package/dist/components/social/presence-indicator/presence-indicator.js.map +1 -0
- package/dist/components/social/presence-indicator/types.d.ts +24 -0
- package/dist/components/social/presence-indicator/types.d.ts.map +1 -0
- package/dist/components/social/presence-indicator/types.js +2 -0
- package/dist/components/social/presence-indicator/types.js.map +1 -0
- package/dist/components/social/presence-indicator/use-presence-indicator.d.ts +4 -0
- package/dist/components/social/presence-indicator/use-presence-indicator.d.ts.map +1 -0
- package/dist/components/social/presence-indicator/use-presence-indicator.js +60 -0
- package/dist/components/social/presence-indicator/use-presence-indicator.js.map +1 -0
- package/dist/components/social/reaction-picker/index.d.ts +4 -0
- package/dist/components/social/reaction-picker/index.d.ts.map +1 -0
- package/dist/components/social/reaction-picker/index.js +3 -0
- package/dist/components/social/reaction-picker/index.js.map +1 -0
- package/dist/components/social/reaction-picker/reaction-picker.d.ts +11 -0
- package/dist/components/social/reaction-picker/reaction-picker.d.ts.map +1 -0
- package/dist/components/social/reaction-picker/reaction-picker.js +25 -0
- package/dist/components/social/reaction-picker/reaction-picker.js.map +1 -0
- package/dist/components/social/reaction-picker/types.d.ts +41 -0
- package/dist/components/social/reaction-picker/types.d.ts.map +1 -0
- package/dist/components/social/reaction-picker/types.js +2 -0
- package/dist/components/social/reaction-picker/types.js.map +1 -0
- package/dist/components/social/reaction-picker/use-reaction-picker.d.ts +4 -0
- package/dist/components/social/reaction-picker/use-reaction-picker.d.ts.map +1 -0
- package/dist/components/social/reaction-picker/use-reaction-picker.js +93 -0
- package/dist/components/social/reaction-picker/use-reaction-picker.js.map +1 -0
- package/dist/components/social/story-row/index.d.ts +4 -0
- package/dist/components/social/story-row/index.d.ts.map +1 -0
- package/dist/components/social/story-row/index.js +3 -0
- package/dist/components/social/story-row/index.js.map +1 -0
- package/dist/components/social/story-row/story-row.d.ts +13 -0
- package/dist/components/social/story-row/story-row.d.ts.map +1 -0
- package/dist/components/social/story-row/story-row.js +29 -0
- package/dist/components/social/story-row/story-row.js.map +1 -0
- package/dist/components/social/story-row/types.d.ts +37 -0
- package/dist/components/social/story-row/types.d.ts.map +1 -0
- package/dist/components/social/story-row/types.js +2 -0
- package/dist/components/social/story-row/types.js.map +1 -0
- package/dist/components/social/story-row/use-story-row.d.ts +4 -0
- package/dist/components/social/story-row/use-story-row.d.ts.map +1 -0
- package/dist/components/social/story-row/use-story-row.js +71 -0
- package/dist/components/social/story-row/use-story-row.js.map +1 -0
- package/dist/index.d.ts +16 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-view.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/page-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAQ/E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../theme/context.js';
|
|
4
|
+
import { usePageView } from './use-page-view.js';
|
|
5
|
+
export function PageView(props) {
|
|
6
|
+
const { tokens } = useTheme();
|
|
7
|
+
const { containerStyle, accessibilityProps } = usePageView(tokens, props);
|
|
8
|
+
return createElement(View, { style: containerStyle, ...accessibilityProps, testID: props.testID });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=page-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-view.js","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/page-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE1E,OAAO,aAAa,CAClB,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,kBAAkB,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CACvE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BoxStyleProps } from '../../types.js';
|
|
2
|
+
import type { ResolvedBoxStyle } from '../../use-component-style.js';
|
|
3
|
+
export type IndicatorVariant = 'dot' | 'line';
|
|
4
|
+
export interface PageViewProps extends BoxStyleProps {
|
|
5
|
+
pages: unknown[];
|
|
6
|
+
activeIndex?: number;
|
|
7
|
+
onPageChange?: (index: number) => void;
|
|
8
|
+
showIndicator?: boolean;
|
|
9
|
+
indicatorVariant?: IndicatorVariant;
|
|
10
|
+
testID?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UsePageViewResult {
|
|
13
|
+
containerStyle: ResolvedBoxStyle;
|
|
14
|
+
scrollStyle: ResolvedBoxStyle;
|
|
15
|
+
getPageStyle: (index: number) => ResolvedBoxStyle;
|
|
16
|
+
indicatorContainerStyle: ResolvedBoxStyle;
|
|
17
|
+
getIndicatorDotStyle: (index: number, activeIndex: number) => ResolvedBoxStyle;
|
|
18
|
+
pageCount: number;
|
|
19
|
+
accessibilityProps: {
|
|
20
|
+
accessibilityRole: 'scrollbar';
|
|
21
|
+
accessibilityLabel: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,gBAAgB,CAAC;IACjC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,CAAC;IAClD,uBAAuB,EAAE,gBAAgB,CAAC;IAC1C,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,gBAAgB,CAAC;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE;QAClB,iBAAiB,EAAE,WAAW,CAAC;QAC/B,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ThemeTokens } from '../../../theme/tokens.js';
|
|
2
|
+
import type { PageViewProps, UsePageViewResult } from './types.js';
|
|
3
|
+
export declare function usePageView(tokens: ThemeTokens, props: PageViewProps): UsePageViewResult;
|
|
4
|
+
//# sourceMappingURL=use-page-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-page-view.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/use-page-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGnE,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,aAAa,GACnB,iBAAiB,CAyDnB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function usePageView(tokens, props) {
|
|
2
|
+
const { pages, activeIndex = 0, indicatorVariant = 'dot', } = props;
|
|
3
|
+
const pageCount = pages.length;
|
|
4
|
+
const containerStyle = {
|
|
5
|
+
flex: 1,
|
|
6
|
+
};
|
|
7
|
+
const scrollStyle = {
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
};
|
|
10
|
+
const getPageStyle = (_index) => ({
|
|
11
|
+
flex: 1,
|
|
12
|
+
width: '100%',
|
|
13
|
+
});
|
|
14
|
+
const indicatorContainerStyle = {
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
paddingVertical: tokens.spacing.sm,
|
|
19
|
+
gap: tokens.spacing.xs,
|
|
20
|
+
};
|
|
21
|
+
const getIndicatorDotStyle = (index, currentActiveIndex) => {
|
|
22
|
+
const isActive = index === currentActiveIndex;
|
|
23
|
+
if (indicatorVariant === 'line') {
|
|
24
|
+
return isActive
|
|
25
|
+
? { width: 24, height: 3, borderRadius: 2, backgroundColor: tokens.colors.primary }
|
|
26
|
+
: { width: 8, height: 3, borderRadius: 2, backgroundColor: tokens.colors.muted };
|
|
27
|
+
}
|
|
28
|
+
return isActive
|
|
29
|
+
? { width: 8, height: 8, borderRadius: 4, backgroundColor: tokens.colors.primary }
|
|
30
|
+
: { width: 6, height: 6, borderRadius: 3, backgroundColor: tokens.colors.muted };
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
containerStyle,
|
|
34
|
+
scrollStyle,
|
|
35
|
+
getPageStyle,
|
|
36
|
+
indicatorContainerStyle,
|
|
37
|
+
getIndicatorDotStyle,
|
|
38
|
+
pageCount,
|
|
39
|
+
accessibilityProps: {
|
|
40
|
+
accessibilityRole: 'scrollbar',
|
|
41
|
+
accessibilityLabel: `Page ${activeIndex + 1} of ${pageCount}`,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=use-page-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-page-view.js","sourceRoot":"","sources":["../../../../src/components/interactive/page-view/use-page-view.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CACzB,MAAmB,EACnB,KAAoB;IAEpB,MAAM,EACJ,KAAK,EACL,WAAW,GAAG,CAAC,EACf,gBAAgB,GAAG,KAAK,GACzB,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;IAE/B,MAAM,cAAc,GAAqB;QACvC,IAAI,EAAE,CAAC;KACR,CAAC;IAEF,MAAM,WAAW,GAAqB;QACpC,aAAa,EAAE,KAAK;KACrB,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC;QAC1D,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;KACd,CAAC,CAAC;IAEH,MAAM,uBAAuB,GAAqB;QAChD,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAClC,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;KACvB,CAAC;IAEF,MAAM,oBAAoB,GAAG,CAC3B,KAAa,EACb,kBAA0B,EACR,EAAE;QACpB,MAAM,QAAQ,GAAG,KAAK,KAAK,kBAAkB,CAAC;QAC9C,IAAI,gBAAgB,KAAK,MAAM,EAAE,CAAC;YAChC,OAAO,QAAQ;gBACb,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;gBACnF,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACrF,CAAC;QACD,OAAO,QAAQ;YACb,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YAClF,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrF,CAAC,CAAC;IAEF,OAAO;QACL,cAAc;QACd,WAAW;QACX,YAAY;QACZ,uBAAuB;QACvB,oBAAoB;QACpB,SAAS;QACT,kBAAkB,EAAE;YAClB,iBAAiB,EAAE,WAAW;YAC9B,kBAAkB,EAAE,QAAQ,WAAW,GAAG,CAAC,OAAO,SAAS,EAAE;SAC9D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallax-header.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/parallax-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAQ3F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../theme/context.js';
|
|
4
|
+
import { useParallaxHeader } from './use-parallax-header.js';
|
|
5
|
+
export function ParallaxHeader(props) {
|
|
6
|
+
const { tokens } = useTheme();
|
|
7
|
+
const { containerStyle } = useParallaxHeader(tokens, props);
|
|
8
|
+
return createElement(View, { style: containerStyle, testID: props.testID });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=parallax-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallax-header.js","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/parallax-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE5D,OAAO,aAAa,CAClB,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAChD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxStyleProps } from '../../types.js';
|
|
2
|
+
import type { ResolvedBoxStyle } from '../../use-component-style.js';
|
|
3
|
+
export interface ParallaxHeaderProps extends BoxStyleProps {
|
|
4
|
+
scrollY: number;
|
|
5
|
+
imageHeight?: number;
|
|
6
|
+
parallaxFactor?: number;
|
|
7
|
+
testID?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UseParallaxHeaderResult {
|
|
10
|
+
containerStyle: ResolvedBoxStyle;
|
|
11
|
+
imageStyle: ResolvedBoxStyle;
|
|
12
|
+
overlayGradientColors: [string, string];
|
|
13
|
+
overscrollScale: number;
|
|
14
|
+
isCompact: boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,gBAAgB,CAAC;IACjC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ThemeTokens } from '../../../theme/tokens.js';
|
|
2
|
+
import type { ParallaxHeaderProps, UseParallaxHeaderResult } from './types.js';
|
|
3
|
+
export declare function useParallaxHeader(_tokens: ThemeTokens, props: ParallaxHeaderProps): UseParallaxHeaderResult;
|
|
4
|
+
//# sourceMappingURL=use-parallax-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-parallax-header.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/use-parallax-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG/E,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,mBAAmB,GACzB,uBAAuB,CAgCzB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function useParallaxHeader(_tokens, props) {
|
|
2
|
+
const { scrollY, imageHeight = 300, parallaxFactor = 0.5, } = props;
|
|
3
|
+
const containerStyle = {
|
|
4
|
+
height: imageHeight,
|
|
5
|
+
overflow: 'hidden',
|
|
6
|
+
};
|
|
7
|
+
const translateY = scrollY * parallaxFactor * -1;
|
|
8
|
+
const oversizedHeight = imageHeight * (1 + parallaxFactor);
|
|
9
|
+
const imageStyle = {
|
|
10
|
+
height: oversizedHeight,
|
|
11
|
+
transform: [{ translateY }],
|
|
12
|
+
};
|
|
13
|
+
const overscrollScale = 1 + Math.max(0, -scrollY) / imageHeight;
|
|
14
|
+
const isCompact = scrollY > imageHeight * 0.7;
|
|
15
|
+
const overlayGradientColors = ['transparent', 'rgba(0,0,0,0.4)'];
|
|
16
|
+
return {
|
|
17
|
+
containerStyle,
|
|
18
|
+
imageStyle,
|
|
19
|
+
overlayGradientColors,
|
|
20
|
+
overscrollScale,
|
|
21
|
+
isCompact,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=use-parallax-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-parallax-header.js","sourceRoot":"","sources":["../../../../src/components/interactive/parallax-header/use-parallax-header.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,iBAAiB,CAC/B,OAAoB,EACpB,KAA0B;IAE1B,MAAM,EACJ,OAAO,EACP,WAAW,GAAG,GAAG,EACjB,cAAc,GAAG,GAAG,GACrB,GAAG,KAAK,CAAC;IAEV,MAAM,cAAc,GAAqB;QACvC,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,QAAQ;KACnB,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,CAAC,CAAC,CAAC;IACjD,MAAM,eAAe,GAAG,WAAW,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC;IAE3D,MAAM,UAAU,GAAqB;QACnC,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;KACR,CAAC;IAEtB,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC;IAChE,MAAM,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,GAAG,CAAC;IAE9C,MAAM,qBAAqB,GAAqB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAEnF,OAAO;QACL,cAAc;QACd,UAAU;QACV,qBAAqB;QACrB,eAAe;QACf,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinch-to-zoom.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/pinch-to-zoom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAQrF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../theme/context.js';
|
|
4
|
+
import { usePinchToZoom } from './use-pinch-to-zoom.js';
|
|
5
|
+
export function PinchToZoom(props) {
|
|
6
|
+
const { tokens } = useTheme();
|
|
7
|
+
const { containerStyle, accessibilityProps } = usePinchToZoom(tokens, props);
|
|
8
|
+
return createElement(View, { style: containerStyle, ...accessibilityProps });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=pinch-to-zoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinch-to-zoom.js","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/pinch-to-zoom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE7E,OAAO,aAAa,CAClB,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,kBAAkB,EAAE,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BoxStyleProps } from '../../types.js';
|
|
2
|
+
import type { ResolvedBoxStyle } from '../../use-component-style.js';
|
|
3
|
+
export interface PinchToZoomProps extends BoxStyleProps {
|
|
4
|
+
minScale?: number;
|
|
5
|
+
maxScale?: number;
|
|
6
|
+
doubleTapScale?: number;
|
|
7
|
+
accessibilityLabel?: string;
|
|
8
|
+
testID?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UsePinchToZoomResult {
|
|
11
|
+
containerStyle: ResolvedBoxStyle;
|
|
12
|
+
contentStyle: ResolvedBoxStyle;
|
|
13
|
+
scale: number;
|
|
14
|
+
focalPoint: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
isZoomed: boolean;
|
|
19
|
+
resetZoomStyle: ResolvedBoxStyle;
|
|
20
|
+
accessibilityProps: {
|
|
21
|
+
accessibilityLabel: string;
|
|
22
|
+
accessibilityHint: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,gBAAgB,CAAC;IACjC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,gBAAgB,CAAC;IACjC,kBAAkB,EAAE;QAClB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ThemeTokens } from '../../../theme/tokens.js';
|
|
2
|
+
import type { PinchToZoomProps, UsePinchToZoomResult } from './types.js';
|
|
3
|
+
export declare function usePinchToZoom(tokens: ThemeTokens, props: PinchToZoomProps): UsePinchToZoomResult;
|
|
4
|
+
//# sourceMappingURL=use-pinch-to-zoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pinch-to-zoom.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/use-pinch-to-zoom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGzE,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,gBAAgB,GACtB,oBAAoB,CA8CtB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export function usePinchToZoom(tokens, props) {
|
|
2
|
+
const { minScale = 1, maxScale = 3, accessibilityLabel = 'Zoomable content', } = props;
|
|
3
|
+
const scale = minScale;
|
|
4
|
+
const focalPoint = { x: 0, y: 0 };
|
|
5
|
+
const isZoomed = scale > 1.05;
|
|
6
|
+
const containerStyle = {
|
|
7
|
+
overflow: 'hidden',
|
|
8
|
+
};
|
|
9
|
+
const contentStyle = {
|
|
10
|
+
transform: [
|
|
11
|
+
{ scale },
|
|
12
|
+
{ translateX: focalPoint.x },
|
|
13
|
+
{ translateY: focalPoint.y },
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
const resetZoomStyle = {
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
bottom: tokens.spacing.md,
|
|
19
|
+
right: tokens.spacing.md,
|
|
20
|
+
backgroundColor: tokens.colors.card,
|
|
21
|
+
borderRadius: tokens.radii.full,
|
|
22
|
+
padding: tokens.spacing.sm,
|
|
23
|
+
};
|
|
24
|
+
void maxScale;
|
|
25
|
+
return {
|
|
26
|
+
containerStyle,
|
|
27
|
+
contentStyle,
|
|
28
|
+
scale,
|
|
29
|
+
focalPoint,
|
|
30
|
+
isZoomed,
|
|
31
|
+
resetZoomStyle,
|
|
32
|
+
accessibilityProps: {
|
|
33
|
+
accessibilityLabel,
|
|
34
|
+
accessibilityHint: 'Pinch to zoom. Double-tap to toggle zoom.',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=use-pinch-to-zoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pinch-to-zoom.js","sourceRoot":"","sources":["../../../../src/components/interactive/pinch-to-zoom/use-pinch-to-zoom.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,KAAuB;IAEvB,MAAM,EACJ,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,CAAC,EACZ,kBAAkB,GAAG,kBAAkB,GACxC,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,QAAQ,CAAC;IACvB,MAAM,UAAU,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAClC,MAAM,QAAQ,GAAG,KAAK,GAAG,IAAI,CAAC;IAE9B,MAAM,cAAc,GAAqB;QACvC,QAAQ,EAAE,QAAQ;KACnB,CAAC;IAEF,MAAM,YAAY,GAAqB;QACrC,SAAS,EAAE;YACT,EAAE,KAAK,EAAE;YACT,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE;YAC5B,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE;SAC7B;KACkB,CAAC;IAEtB,MAAM,cAAc,GAAqB;QACvC,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QACzB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI;QACnC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;KAC3B,CAAC;IAEF,KAAK,QAAQ,CAAC;IAEd,OAAO;QACL,cAAc;QACd,YAAY;QACZ,KAAK;QACL,UAAU;QACV,QAAQ;QACR,cAAc;QACd,kBAAkB,EAAE;YAClB,kBAAkB;YAClB,iBAAiB,EAAE,2CAA2C;SAC/D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pull-to-refresh.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/pull-to-refresh.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAQzF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../theme/context.js';
|
|
4
|
+
import { usePullToRefresh } from './use-pull-to-refresh.js';
|
|
5
|
+
export function PullToRefresh(props) {
|
|
6
|
+
const { tokens } = useTheme();
|
|
7
|
+
const { containerStyle, accessibilityProps } = usePullToRefresh(tokens, props);
|
|
8
|
+
return createElement(View, { style: containerStyle, ...accessibilityProps });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=pull-to-refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pull-to-refresh.js","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/pull-to-refresh.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE/E,OAAO,aAAa,CAClB,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,kBAAkB,EAAE,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BoxStyleProps } from '../../types.js';
|
|
2
|
+
import type { ResolvedBoxStyle } from '../../use-component-style.js';
|
|
3
|
+
export interface PullToRefreshProps extends BoxStyleProps {
|
|
4
|
+
refreshing: boolean;
|
|
5
|
+
onRefresh: () => void;
|
|
6
|
+
pullDistance?: number;
|
|
7
|
+
accessibilityLabel?: string;
|
|
8
|
+
testID?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UsePullToRefreshResult {
|
|
11
|
+
containerStyle: ResolvedBoxStyle;
|
|
12
|
+
indicatorContainerStyle: ResolvedBoxStyle;
|
|
13
|
+
pullProgress: number;
|
|
14
|
+
isRefreshing: boolean;
|
|
15
|
+
indicatorSize: number;
|
|
16
|
+
accessibilityProps: {
|
|
17
|
+
accessibilityLabel: string;
|
|
18
|
+
accessibilityLiveRegion: 'polite';
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,gBAAgB,CAAC;IACjC,uBAAuB,EAAE,gBAAgB,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE;QAClB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,uBAAuB,EAAE,QAAQ,CAAC;KACnC,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ThemeTokens } from '../../../theme/tokens.js';
|
|
2
|
+
import type { PullToRefreshProps, UsePullToRefreshResult } from './types.js';
|
|
3
|
+
export declare function usePullToRefresh(_tokens: ThemeTokens, props: PullToRefreshProps): UsePullToRefreshResult;
|
|
4
|
+
//# sourceMappingURL=use-pull-to-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pull-to-refresh.d.ts","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/use-pull-to-refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAG7E,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,kBAAkB,GACxB,sBAAsB,CAkCxB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function usePullToRefresh(_tokens, props) {
|
|
2
|
+
const { refreshing, pullDistance = 80, accessibilityLabel = 'Pull to refresh', } = props;
|
|
3
|
+
const indicatorSize = Math.max(24, Math.min(48, pullDistance * 0.4));
|
|
4
|
+
const containerStyle = {
|
|
5
|
+
flex: 1,
|
|
6
|
+
};
|
|
7
|
+
const indicatorContainerStyle = {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
top: 0,
|
|
10
|
+
left: 0,
|
|
11
|
+
right: 0,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
height: pullDistance,
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
containerStyle,
|
|
18
|
+
indicatorContainerStyle,
|
|
19
|
+
pullProgress: 0,
|
|
20
|
+
isRefreshing: refreshing,
|
|
21
|
+
indicatorSize,
|
|
22
|
+
accessibilityProps: {
|
|
23
|
+
accessibilityLabel,
|
|
24
|
+
accessibilityLiveRegion: 'polite',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=use-pull-to-refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pull-to-refresh.js","sourceRoot":"","sources":["../../../../src/components/interactive/pull-to-refresh/use-pull-to-refresh.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gBAAgB,CAC9B,OAAoB,EACpB,KAAyB;IAEzB,MAAM,EACJ,UAAU,EACV,YAAY,GAAG,EAAE,EACjB,kBAAkB,GAAG,iBAAiB,GACvC,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC;IAErE,MAAM,cAAc,GAAqB;QACvC,IAAI,EAAE,CAAC;KACR,CAAC;IAEF,MAAM,uBAAuB,GAAqB;QAChD,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,MAAM,EAAE,YAAY;KACrB,CAAC;IAEF,OAAO;QACL,cAAc;QACd,uBAAuB;QACvB,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,UAAU;QACxB,aAAa;QACb,kBAAkB,EAAE;YAClB,kBAAkB;YAClB,uBAAuB,EAAE,QAAQ;SAClC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CommentThreadProps } from './types.js';
|
|
2
|
+
export declare function CommentThread(props: CommentThreadProps): import("react").DetailedReactHTMLElement<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
3
|
+
//# sourceMappingURL=comment-thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-thread.d.ts","sourceRoot":"","sources":["../../../../src/components/social/comment-thread/comment-thread.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAW,MAAM,YAAY,CAAC;AAsK9D,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qHAkCtD"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { View, Text, Image, Pressable, ScrollView } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../theme/context.js';
|
|
4
|
+
import { useCommentThread } from './use-comment-thread.js';
|
|
5
|
+
function CommentItem({ comment, depth, hookResult, tokens, onReply, onLike, onAuthorPress, }) {
|
|
6
|
+
const { commentStyle, getIndentStyle, threadLineStyle, avatarContainerStyle, avatarSize, authorStyle, textStyle, timestampStyle, likeButtonStyle, likeCountStyle, replyButtonStyle, replyButtonTextStyle, maxDepth, showAvatars, showThreadLines, } = hookResult;
|
|
7
|
+
const indentStyle = getIndentStyle(depth);
|
|
8
|
+
const liked = comment.liked ?? false;
|
|
9
|
+
const likes = comment.likes ?? 0;
|
|
10
|
+
const hasReplies = comment.replies && comment.replies.length > 0;
|
|
11
|
+
const initialsText = comment.author
|
|
12
|
+
.trim()
|
|
13
|
+
.split(/\s+/)
|
|
14
|
+
.map((p) => p[0])
|
|
15
|
+
.slice(0, 2)
|
|
16
|
+
.join('')
|
|
17
|
+
.toUpperCase();
|
|
18
|
+
return createElement(View, { key: comment.id }, createElement(View, { style: { ...commentStyle, ...indentStyle } }, showAvatars
|
|
19
|
+
? createElement(View, { style: avatarContainerStyle }, comment.avatar
|
|
20
|
+
? createElement(Image, {
|
|
21
|
+
source: { uri: comment.avatar },
|
|
22
|
+
style: {
|
|
23
|
+
width: avatarSize,
|
|
24
|
+
height: avatarSize,
|
|
25
|
+
borderRadius: tokens.radii.full,
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
: createElement(View, {
|
|
29
|
+
style: {
|
|
30
|
+
width: avatarSize,
|
|
31
|
+
height: avatarSize,
|
|
32
|
+
borderRadius: tokens.radii.full,
|
|
33
|
+
backgroundColor: tokens.colors.muted,
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
},
|
|
37
|
+
}, createElement(Text, {
|
|
38
|
+
style: {
|
|
39
|
+
fontSize: tokens.typography.sizes.xs,
|
|
40
|
+
color: tokens.colors.foreground,
|
|
41
|
+
fontWeight: tokens.typography.weights.semibold,
|
|
42
|
+
},
|
|
43
|
+
}, initialsText)), showThreadLines && hasReplies
|
|
44
|
+
? createElement(View, { style: threadLineStyle })
|
|
45
|
+
: null)
|
|
46
|
+
: null, createElement(View, { style: { flex: 1 } }, createElement(View, { style: { flexDirection: 'row', alignItems: 'center' } }, createElement(Pressable, { onPress: () => onAuthorPress?.(comment.author) }, createElement(Text, { style: authorStyle }, comment.author)), createElement(Text, { style: timestampStyle }, comment.timestamp)), createElement(Text, { style: textStyle }, comment.text), createElement(View, { style: { flexDirection: 'row', marginTop: tokens.spacing.xs } }, createElement(Pressable, {
|
|
47
|
+
style: likeButtonStyle,
|
|
48
|
+
onPress: () => onLike?.(comment.id, !liked),
|
|
49
|
+
}, createElement(Text, {
|
|
50
|
+
style: {
|
|
51
|
+
fontSize: tokens.typography.sizes.xs,
|
|
52
|
+
color: liked ? tokens.colors.primary : tokens.colors.mutedForeground,
|
|
53
|
+
},
|
|
54
|
+
}, liked ? '♥' : '♡'), likes > 0
|
|
55
|
+
? createElement(Text, { style: likeCountStyle }, String(likes))
|
|
56
|
+
: null), createElement(Pressable, {
|
|
57
|
+
style: replyButtonStyle,
|
|
58
|
+
onPress: () => onReply?.(comment.id),
|
|
59
|
+
}, createElement(Text, { style: replyButtonTextStyle }, 'Reply'))))), ...(comment.replies && depth < maxDepth
|
|
60
|
+
? comment.replies.map((reply) => createElement(CommentItem, {
|
|
61
|
+
key: reply.id,
|
|
62
|
+
comment: reply,
|
|
63
|
+
depth: depth + 1,
|
|
64
|
+
hookResult,
|
|
65
|
+
tokens,
|
|
66
|
+
onReply,
|
|
67
|
+
onLike,
|
|
68
|
+
onAuthorPress,
|
|
69
|
+
}))
|
|
70
|
+
: []));
|
|
71
|
+
}
|
|
72
|
+
export function CommentThread(props) {
|
|
73
|
+
const { tokens } = useTheme();
|
|
74
|
+
const { comments, onReply, onLike, onAuthorPress, bg: _bg, p: _p, px: _px, py: _py, pt: _pt, pb: _pb, pl: _pl, pr: _pr, m: _m, mx: _mx, my: _my, mt: _mt, mb: _mb, ml: _ml, mr: _mr, rounded: _r, shadow: _sh, flex: _f, row: _row, center: _cen, w: _w, h: _h, borderWidth: _bw, borderColor: _bc, opacity: _op, overflow: _ov, position: _pos, top: _top, bottom: _bot, left: _left, right: _right, zIndex: _zi, ...rest } = props;
|
|
75
|
+
const hookResult = useCommentThread(tokens, props);
|
|
76
|
+
const { containerStyle, accessibilityProps } = hookResult;
|
|
77
|
+
return createElement(ScrollView, { style: containerStyle, ...accessibilityProps, ...rest }, ...comments.map((comment) => createElement(CommentItem, {
|
|
78
|
+
key: comment.id,
|
|
79
|
+
comment,
|
|
80
|
+
depth: 0,
|
|
81
|
+
hookResult,
|
|
82
|
+
tokens,
|
|
83
|
+
onReply,
|
|
84
|
+
onLike,
|
|
85
|
+
onAuthorPress,
|
|
86
|
+
})));
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=comment-thread.js.map
|