@mevdragon/vidfarm-devcli 0.20.6 → 0.20.9

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.
Files changed (157) hide show
  1. package/.agents/skills/editor-capabilities/SKILL.md +15 -1
  2. package/.agents/skills/vidfarm-director/SKILL.md +106 -0
  3. package/.agents/skills/vidfarm-director/recipes/find-and-fork-template.md +16 -0
  4. package/.agents/skills/vidfarm-director/recipes/local-edit-render-approve.md +13 -0
  5. package/.agents/skills/vidfarm-director/recipes/onboard-a-new-director.md +13 -0
  6. package/.agents/skills/vidfarm-director/recipes/retheme-template.md +17 -0
  7. package/.agents/skills/vidfarm-director/references/assets-and-sourcing.md +117 -0
  8. package/.agents/skills/vidfarm-director/references/automation-and-local-dev.md +245 -0
  9. package/.agents/skills/vidfarm-director/references/core-workflows.md +273 -0
  10. package/.agents/skills/vidfarm-director/references/editor-workflows.md +365 -0
  11. package/.agents/skills/vidfarm-director/references/onboarding.md +28 -0
  12. package/.agents/skills/vidfarm-director/references/primitives.md +308 -0
  13. package/SKILL.director.md +517 -250
  14. package/dist/src/cli.js +563 -99
  15. package/dist/src/devcli/clips.js +29 -12
  16. package/dist/src/devcli/doctor.js +2 -2
  17. package/dist/src/devcli/local-backend.js +46 -2
  18. package/dist/src/services/clip-curation/cost.js +5 -1
  19. package/dist/src/services/clip-curation/gemini.js +14 -2
  20. package/dist/src/services/clip-curation/hunt.js +56 -0
  21. package/dist/src/services/clip-curation/index.js +1 -1
  22. package/dist/src/services/clip-curation/scan.js +5 -3
  23. package/package.json +30 -10
  24. package/SKILL.platform.md +0 -432
  25. package/demo/README.md +0 -28
  26. package/demo/dist/app.css +0 -1
  27. package/demo/dist/app.js +0 -1850
  28. package/demo/dist/chunks/chunk-DXB73IDG.js +0 -1
  29. package/demo/dist/chunks/chunk-S7OWAJDS.js +0 -36
  30. package/demo/dist/chunks/chunk-VTIBZ6AN.js +0 -1
  31. package/demo/dist/chunks/dist-ADSJKBVE.js +0 -332
  32. package/demo/dist/chunks/domEditingLayers-VZMLL4AP-SGHWPND4.js +0 -1
  33. package/demo/dist/chunks/hyperframes-player-XB65TCD6.js +0 -425
  34. package/demo/dist/chunks/lib-XAQ37YOE.js +0 -1
  35. package/demo/dist/chunks/src-TJ2QYA4U.js +0 -207
  36. package/demo/dist/favicon.ico +0 -0
  37. package/demo/dist/icons/timeline/audio.svg +0 -7
  38. package/demo/dist/icons/timeline/captions.svg +0 -5
  39. package/demo/dist/icons/timeline/composition.svg +0 -12
  40. package/demo/dist/icons/timeline/image.svg +0 -18
  41. package/demo/dist/icons/timeline/music.svg +0 -10
  42. package/demo/dist/icons/timeline/text.svg +0 -3
  43. package/demo/dist/index.html +0 -15
  44. package/dist/src/account-pages-legacy.js +0 -9396
  45. package/dist/src/account-pages.js +0 -61
  46. package/dist/src/app.js +0 -21603
  47. package/dist/src/composition-runtime.js +0 -1053
  48. package/dist/src/config.js +0 -217
  49. package/dist/src/context.js +0 -447
  50. package/dist/src/dev-app-legacy.js +0 -739
  51. package/dist/src/dev-app.js +0 -6
  52. package/dist/src/devcli/migrate-local.js +0 -140
  53. package/dist/src/devcli/sync.js +0 -368
  54. package/dist/src/domain.js +0 -5
  55. package/dist/src/editor-chat-history.js +0 -82
  56. package/dist/src/editor-chat.js +0 -828
  57. package/dist/src/editor-dark-theme.js +0 -1128
  58. package/dist/src/frontend/debug.js +0 -71
  59. package/dist/src/frontend/discover-client.js +0 -130
  60. package/dist/src/frontend/discover-store.js +0 -23
  61. package/dist/src/frontend/file-directory.js +0 -1018
  62. package/dist/src/frontend/flockposter-cache-store.js +0 -124
  63. package/dist/src/frontend/homepage-client.js +0 -446
  64. package/dist/src/frontend/homepage-shared.js +0 -201
  65. package/dist/src/frontend/homepage-store.js +0 -66
  66. package/dist/src/frontend/homepage-view.js +0 -705
  67. package/dist/src/frontend/page-runtime-client.js +0 -132
  68. package/dist/src/frontend/page-runtime-store.js +0 -9
  69. package/dist/src/frontend/sentry.js +0 -42
  70. package/dist/src/frontend/template-editor-chat.js +0 -4181
  71. package/dist/src/help-page.js +0 -346
  72. package/dist/src/homepage.js +0 -1458
  73. package/dist/src/index.js +0 -16
  74. package/dist/src/instrument.js +0 -30
  75. package/dist/src/landing-page.js +0 -384
  76. package/dist/src/page-runtime.js +0 -2
  77. package/dist/src/page-shell.js +0 -1452
  78. package/dist/src/primitive-context.js +0 -416
  79. package/dist/src/primitive-registry.js +0 -3940
  80. package/dist/src/primitive-sdk.js +0 -4
  81. package/dist/src/primitives/hyperframes-media.js +0 -108
  82. package/dist/src/react-page-shell.js +0 -35
  83. package/dist/src/ready-post-schedule-component.js +0 -1540
  84. package/dist/src/registry.js +0 -296
  85. package/dist/src/reskin/agency-page.js +0 -299
  86. package/dist/src/reskin/calendar-page.js +0 -568
  87. package/dist/src/reskin/chat-page.js +0 -942
  88. package/dist/src/reskin/discover-page.js +0 -1788
  89. package/dist/src/reskin/document.js +0 -1587
  90. package/dist/src/reskin/help-page.js +0 -357
  91. package/dist/src/reskin/index-page.js +0 -62
  92. package/dist/src/reskin/inpaint-clipper-page.js +0 -890
  93. package/dist/src/reskin/inpaint-page.js +0 -2554
  94. package/dist/src/reskin/inpaint-video-page.js +0 -1339
  95. package/dist/src/reskin/job-runs-page.js +0 -477
  96. package/dist/src/reskin/library-page.js +0 -1634
  97. package/dist/src/reskin/login-page.js +0 -262
  98. package/dist/src/reskin/portfolio-page.js +0 -687
  99. package/dist/src/reskin/pricing-page.js +0 -390
  100. package/dist/src/reskin/settings-page.js +0 -732
  101. package/dist/src/reskin/theme.js +0 -711
  102. package/dist/src/runtime.js +0 -35
  103. package/dist/src/services/api-call-history.js +0 -249
  104. package/dist/src/services/auth.js +0 -152
  105. package/dist/src/services/billing-pricing.js +0 -39
  106. package/dist/src/services/billing.js +0 -241
  107. package/dist/src/services/cast.js +0 -127
  108. package/dist/src/services/chat-threads.js +0 -92
  109. package/dist/src/services/clip-records.js +0 -250
  110. package/dist/src/services/clip-search.js +0 -77
  111. package/dist/src/services/clip-vectors.js +0 -125
  112. package/dist/src/services/composition-sanitize.js +0 -124
  113. package/dist/src/services/composition-watch.js +0 -79
  114. package/dist/src/services/elevenlabs.js +0 -222
  115. package/dist/src/services/file-directory.js +0 -117
  116. package/dist/src/services/fork-access.js +0 -93
  117. package/dist/src/services/fork-manifest.js +0 -42
  118. package/dist/src/services/ghostcut.js +0 -179
  119. package/dist/src/services/hyperframes.js +0 -3654
  120. package/dist/src/services/job-capacity.js +0 -14
  121. package/dist/src/services/job-logs.js +0 -197
  122. package/dist/src/services/jobs.js +0 -136
  123. package/dist/src/services/local-dynamo.js +0 -0
  124. package/dist/src/services/media-processing.js +0 -766
  125. package/dist/src/services/primitive-media-lambda.js +0 -280
  126. package/dist/src/services/providers.js +0 -2748
  127. package/dist/src/services/rate-limits.js +0 -262
  128. package/dist/src/services/scene-annotations.js +0 -32
  129. package/dist/src/services/serverless-auth.js +0 -382
  130. package/dist/src/services/serverless-jobs.js +0 -1084
  131. package/dist/src/services/serverless-provider-keys.js +0 -409
  132. package/dist/src/services/serverless-records.js +0 -1515
  133. package/dist/src/services/serverless-template-configs.js +0 -75
  134. package/dist/src/services/storage.js +0 -461
  135. package/dist/src/services/swipe-customize.js +0 -437
  136. package/dist/src/services/template-certification.js +0 -413
  137. package/dist/src/services/template-loader.js +0 -99
  138. package/dist/src/services/template-runtime-bundles.js +0 -217
  139. package/dist/src/services/template-sources.js +0 -1017
  140. package/dist/src/services/upstream.js +0 -248
  141. package/dist/src/services/video-normalization.js +0 -2
  142. package/dist/src/services/webhooks.js +0 -62
  143. package/dist/src/template-editor-pages.js +0 -2576
  144. package/dist/src/template-editor-shell.js +0 -2893
  145. package/dist/src/template-sdk.js +0 -4
  146. package/dist/src/worker.js +0 -17
  147. package/public/assets/discover-client-app.js +0 -1
  148. package/public/assets/file-directory-app.js +0 -3
  149. package/public/assets/homepage-app.js +0 -54
  150. package/public/assets/homepage-client-app.js +0 -80
  151. package/public/assets/page-runtime-client-app.js +0 -94
  152. package/public/assets/placeholders/scene-placeholder.png +0 -0
  153. package/src/assets/SELLING_AWARENESS_STAGES.md +0 -579
  154. package/src/assets/SELLING_WITH_HOOKS.md +0 -377
  155. package/src/assets/SELLING_WITH_VSLS.md +0 -606
  156. package/src/assets/favicon.ico +0 -0
  157. package/src/assets/logo-vidfarm.png +0 -0
@@ -1,201 +0,0 @@
1
- export function isVideoPreview(url) {
2
- return Boolean(url && /\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(url));
3
- }
4
- export const POPULAR_INSPIRATION_GROUPS = [
5
- {
6
- label: "Talking Head & Personal",
7
- items: [
8
- { title: "Vlog style", url: "https://vt.tiktok.com/ZSCWTFBSe/" },
9
- { title: "Talking head monologue", url: "https://vt.tiktok.com/ZSCWw9wqf/" },
10
- { title: "AI Avatar presenter", url: "https://vt.tiktok.com/ZSC7RVW1o/" },
11
- { title: "Day in the life", url: "https://www.tiktok.com/@rubygrifiths/video/7657529386131868950" },
12
- { title: "GRWM", url: "https://vt.tiktok.com/ZSCWKv8Xb/" },
13
- { title: "Reaction video", url: "https://vt.tiktok.com/ZSCWEF8Rv/" },
14
- { title: "Q&A", url: "https://vt.tiktok.com/ZSCWExEeV/" },
15
- { title: "Behind the Scenes", url: "https://vt.tiktok.com/ZSCWTFYew/" },
16
- { title: "Story time narrated", url: "https://vt.tiktok.com/ZSCW3kAT5/" },
17
- { title: "VTuber", url: "https://vt.tiktok.com/ZSC7TQyVM/" },
18
- { title: "Female Thirst Trap", url: "https://vt.tiktok.com/ZSCvRLyMf/" },
19
- { title: "Male Thirst Trap", url: "https://vt.tiktok.com/ZSCvdUUE2/" },
20
- { title: "Masked Host", url: "https://vt.tiktok.com/ZSCvdNvxG/" },
21
- { title: "Hot Take", url: "https://vt.tiktok.com/ZSCvewSbB/" }
22
- ]
23
- },
24
- {
25
- label: "Text / Story-Driven",
26
- items: [
27
- { title: "Reddit story + gameplay", url: "https://vt.tiktok.com/ZSCWpeSRy/" },
28
- { title: "Fake text message story", url: "https://vt.tiktok.com/ZSCWov56s/" },
29
- { title: "Twitter/X Thread Video", url: "https://vt.tiktok.com/ZSC7199q6/" },
30
- { title: "Quote / motivational card", url: "https://vt.tiktok.com/ZSC71D9QD/" },
31
- { title: "Facts / did you know", url: "https://vt.tiktok.com/ZSCW3QrKA/" },
32
- { title: "Bible verse / spiritual", url: "https://vt.tiktok.com/ZSCWsP8r7/" },
33
- { title: "Horoscope / Astrology", url: "https://vt.tiktok.com/ZSC71497u/" },
34
- { title: "Minecraft Reddit Brainrot", url: "https://youtube.com/shorts/AmdI56dl1z4" }
35
- ]
36
- },
37
- {
38
- label: "Educational / Explainer",
39
- items: [
40
- { title: "Educational explainer", url: "https://vt.tiktok.com/ZSC7e5fbr/" },
41
- { title: "Whiteboard animation", url: "https://vt.tiktok.com/ZSCWpLa4p/" },
42
- { title: "Kinetic typography", url: "https://vt.tiktok.com/ZSC7dJnJP/" },
43
- { title: "Data viz / Infographic", url: "https://vt.tiktok.com/ZSC7RvdWR/" },
44
- { title: "Science explainer", url: "https://youtu.be/WxmSJbG134k" },
45
- { title: "Vox News Style", url: "https://www.tiktok.com/@vox/video/7619108001424723231" },
46
- { title: "Low Poly Animation", url: "https://vt.tiktok.com/ZSC7RwmGR/" },
47
- { title: "Math tutorial", url: "https://youtu.be/6yYnr8FL1fk" },
48
- { title: "Historic retelling", url: "https://vt.tiktok.com/ZSC7N6Y68/" },
49
- { title: "Book Summary", url: "https://vt.tiktok.com/ZSC7Fmemb/" },
50
- { title: "Documentary Style", url: "https://vt.tiktok.com/ZSC7YBXm9/" },
51
- { title: "Course lecture", url: "https://youtube.com/shorts/QoQUfVEp-d0" },
52
- { title: "Scientific Selling", url: "https://www.tiktok.com/@maxcern/video/7604237124036037919" }
53
- ]
54
- },
55
- {
56
- label: "Product / Marketing",
57
- items: [
58
- { title: "Software product demo", url: "https://vt.tiktok.com/ZSC7rbNcV/" },
59
- { title: "Product commercial", url: "https://vt.tiktok.com/ZSCv6C1Ms/" },
60
- { title: "UGC Creator Ad", url: "https://vt.tiktok.com/ZSC7hwraf/" },
61
- { title: "Product Spin Show", url: "https://vt.tiktok.com/ZSCWsuxxp/" },
62
- { title: "Testimonial", url: "https://vt.tiktok.com/ZSC7kRvxk/" },
63
- { title: "Explainer commercial", url: "https://vt.tiktok.com/ZSC7SEeHA/" },
64
- { title: "Case Study", url: "https://www.tiktok.com/@juliejonesdesigns/video/7298542413948243243" },
65
- { title: "Brand story", url: "https://vt.tiktok.com/ZSC7a7wvb/" },
66
- { title: "Real Estate tour", url: "https://www.instagram.com/reel/DY19EdHGcDk/" },
67
- { title: "Sales pitch", url: "https://www.tiktok.com/@mindfullallie/video/7633917841774742815" },
68
- { title: "Logo reveal / brand intro", url: "https://vt.tiktok.com/ZSC7avGmH/" }
69
- ]
70
- },
71
- {
72
- label: "News / Journalism",
73
- items: [
74
- { title: "News anchor style", url: "https://vt.tiktok.com/ZSC7VtHNS/" },
75
- { title: "Breaking news", url: "https://vt.tiktok.com/ZSCWWUCqS/" },
76
- { title: "Weather Report", url: "https://vt.tiktok.com/ZSCWWBEEY/" },
77
- { title: "Financial / stock update", url: "https://vt.tiktok.com/ZSC7Vt6rP/" },
78
- { title: "Sports scores/recap", url: "https://vt.tiktok.com/ZSC7V7Pqf/" }
79
- ]
80
- },
81
- {
82
- label: "Entertainment / Creative",
83
- items: [
84
- { title: "Anime / manga", url: "https://vt.tiktok.com/ZSC7qnwWn/" },
85
- { title: "Cartoon Animation", url: "https://vt.tiktok.com/ZSC7qvEfe/" },
86
- { title: "Music Video", url: "https://vt.tiktok.com/ZSC7beC8P/" },
87
- { title: "Lyric Video", url: "https://vt.tiktok.com/ZSC7bP5x7/" },
88
- { title: "Meme video", url: "https://vt.tiktok.com/ZSC7g8sEn/" },
89
- { title: "Meme recaptioning", url: "https://vt.tiktok.com/ZSCv6eeKD/" },
90
- { title: "Hype Edit", url: "https://www.tiktok.com/@goldenhype0/video/7645035734901984543" },
91
- { title: "Fantasy Hype Edit", url: "https://www.tiktok.com/@hype.edits/video/7538337237453344013" },
92
- { title: "UGC Comedy", url: "https://www.tiktok.com/@very.manipulative/video/7644074719737646366" },
93
- { title: "Parody", url: "https://vt.tiktok.com/ZSC7g4aa8/" },
94
- { title: "ASMR", url: "https://vt.tiktok.com/ZSCvJvseN/" },
95
- { title: "Cinematic short film", url: "https://vt.tiktok.com/ZSCvJV2mM/" },
96
- { title: "Oddly satisfying", url: "https://vt.tiktok.com/ZSC7gqn9o/" },
97
- { title: "POV video", url: "https://vt.tiktok.com/ZSCveMjMp/" },
98
- { title: "Nostalgia", url: "https://vt.tiktok.com/ZSCv2DALg/" },
99
- { title: "Musical", url: "https://vt.tiktok.com/ZSCvYwKBQ/" },
100
- { title: "Gossip", url: "https://vt.tiktok.com/ZSCvYvrh7/" }
101
- ]
102
- },
103
- {
104
- label: "Data / Analytical",
105
- items: [
106
- { title: "Comparison \"X vs Y\"", url: "https://youtube.com/shorts/jFvemXPxayg" },
107
- { title: "Ranking / Tier List", url: "https://youtube.com/shorts/Ku5xNHs7sAE" },
108
- { title: "Countdown / top 10", url: "https://vt.tiktok.com/ZSC7psUDB/" },
109
- { title: "Poll Results Reveal", url: "https://www.tiktok.com/@carterjstockman/video/7477653012874267947" },
110
- { title: "Stats Comparison", url: "https://www.tiktok.com/@everythingecon/video/7650833928726564118" },
111
- { title: "Leaderboard Reveal", url: "https://vt.tiktok.com/ZSC7sseno/" },
112
- { title: "Sports stat breakdown", url: "https://vt.tiktok.com/ZSCvFUTHN/" },
113
- { title: "Before/after Transformation", url: "https://vt.tiktok.com/ZSC7GRLT2/" }
114
- ]
115
- },
116
- {
117
- label: "Gaming",
118
- items: [
119
- { title: "Gameplay walkthrough", url: "https://vt.tiktok.com/ZSCWWE5X5/" },
120
- { title: "Game review", url: "https://youtube.com/shorts/nrb0t9cRw3g" },
121
- { title: "Game trailer", url: "https://vt.tiktok.com/ZSCW7LqKV/" },
122
- { title: "Esports highlights", url: "https://vt.tiktok.com/ZSC7y4BEF/" }
123
- ]
124
- },
125
- {
126
- label: "Kids / Educational",
127
- items: [
128
- { title: "Nursery Rhyme", url: "https://vt.tiktok.com/ZSC7SWUUr/" },
129
- { title: "Alphabet / counting", url: "https://vt.tiktok.com/ZSCWvhRNd/" },
130
- { title: "Cartoon lesson", url: "https://vt.tiktok.com/ZSC7y9wHp/" },
131
- { title: "Storybook read-along", url: "https://vt.tiktok.com/ZSC7yrnN8/" }
132
- ]
133
- },
134
- {
135
- label: "Ambient / Background",
136
- items: [
137
- { title: "Lo-fi study loop", url: "https://vt.tiktok.com/ZSCWcFgAh/" },
138
- { title: "Nature + Music", url: "https://vt.tiktok.com/ZSCWc4Egr/" },
139
- { title: "Fireplace / rain loop", url: "https://vt.tiktok.com/ZSCWcrF7v/" },
140
- { title: "Aesthetic vibe/mood", url: "https://vt.tiktok.com/ZSCWcK2uQ/" }
141
- ]
142
- },
143
- {
144
- label: "Fitness / Wellness",
145
- items: [
146
- { title: "Workout tutorial", url: "https://vt.tiktok.com/ZSC7fLGUL/" },
147
- { title: "Yoga / meditation", url: "https://vt.tiktok.com/ZSC7fTkJr/" },
148
- { title: "Recipe / cooking", url: "https://vt.tiktok.com/ZSC7ffpcX/" },
149
- { title: "Health tips", url: "https://vt.tiktok.com/ZSC7P6T8y/" }
150
- ]
151
- },
152
- {
153
- label: "Travel / Location",
154
- items: [
155
- { title: "Travel vlog", url: "https://vt.tiktok.com/ZSCWthBcp/" },
156
- { title: "Destination showcase", url: "https://vt.tiktok.com/ZSC7aVDUv/" },
157
- { title: "Review Guides", url: "https://vt.tiktok.com/ZSC7PpXUR/" },
158
- { title: "City tour", url: "https://vt.tiktok.com/ZSC7ajj14/" }
159
- ]
160
- },
161
- {
162
- label: "Interview / Conversation",
163
- items: [
164
- { title: "Interview format", url: "https://vt.tiktok.com/ZSC74xE8A/" },
165
- { title: "Panel discussion", url: "https://vt.tiktok.com/ZSC74xYML/" },
166
- { title: "Debate", url: "https://vt.tiktok.com/ZSCvRpCW1/" },
167
- { title: "Podcast clip", url: "https://www.tiktok.com/@rogantimes04/video/7659533957049961750" },
168
- { title: "Audiogram", url: "https://vt.tiktok.com/ZSCWs6uMm/" },
169
- { title: "Diary Confession", url: "https://vt.tiktok.com/ZSCvRcFAn/" }
170
- ]
171
- },
172
- {
173
- label: "Motion Design",
174
- items: [
175
- { title: "Motion graphics", url: "https://vt.tiktok.com/ZSC7u4VD8/" },
176
- { title: "2D character animation", url: "https://vt.tiktok.com/ZSC7uCayM/" },
177
- { title: "Stop motion", url: "https://vt.tiktok.com/ZSCWseh2r/" },
178
- { title: "Static Fast Forward", url: "https://vt.tiktok.com/ZSC7HRUVa/" },
179
- { title: "Montage Video", url: "https://vt.tiktok.com/ZSCv8QPRY/" },
180
- { title: "Memoirs", url: "https://vt.tiktok.com/ZSCv89bXC/" }
181
- ]
182
- },
183
- {
184
- label: "Hype / Trailer",
185
- items: [
186
- { title: "Trailer / hype video", url: "https://vt.tiktok.com/ZSC7uHkTc/" },
187
- { title: "Event promo", url: "https://vt.tiktok.com/ZSC7uMvBA/" },
188
- { title: "Reveal video", url: "https://vt.tiktok.com/ZSCvNxK7d/" }
189
- ]
190
- },
191
- {
192
- label: "Pure AI",
193
- items: [
194
- { title: "AI Fruit Dramas", url: "https://vt.tiktok.com/ZSCv89Xck/" },
195
- { title: "Surreal AI Characters", url: "https://vt.tiktok.com/ZSCv8nN2K/" },
196
- { title: "Claymation Story", url: "https://vt.tiktok.com/ZSCvLJhAc/" },
197
- { title: "Paper Mache Story", url: "https://www.youtube.com/watch?v=0JKu9TQCLMI" }
198
- ]
199
- }
200
- ];
201
- //# sourceMappingURL=homepage-shared.js.map
@@ -1,66 +0,0 @@
1
- import { createStore } from "zustand/vanilla";
2
- export function createHomepageStore(boot) {
3
- return createStore((set) => ({
4
- templates: boot.templates,
5
- searchQuery: "",
6
- bookmarksOnly: false,
7
- bookmarks: new Set(),
8
- loading: boot.templates.length === 0,
9
- error: null,
10
- view: "feed",
11
- popularTemplates: [],
12
- popularLoading: false,
13
- popularLoaded: false,
14
- popularError: null,
15
- swipeStack: [],
16
- swipeLoading: false,
17
- swipeLoaded: false,
18
- swipeError: null,
19
- swipeCustomizing: 0,
20
- swipeTargetDepth: 5,
21
- swipeProductSet: true,
22
- swipeRefilling: false,
23
- setTemplates: (templates) => set({ templates, loading: false, error: null }),
24
- setSearchQuery: (searchQuery) => set({ searchQuery }),
25
- setBookmarksOnly: (bookmarksOnly) => set({ bookmarksOnly }),
26
- setBookmarks: (bookmarks) => set({ bookmarks: new Set(bookmarks) }),
27
- toggleBookmark: (templateId) => set((state) => {
28
- const next = new Set(state.bookmarks);
29
- if (next.has(templateId)) {
30
- next.delete(templateId);
31
- }
32
- else {
33
- next.add(templateId);
34
- }
35
- return { bookmarks: next };
36
- }),
37
- setLoading: (loading) => set({ loading }),
38
- setError: (error) => set({ error, loading: false }),
39
- setView: (view) => set({ view }),
40
- setPopularTemplates: (popularTemplates) => set({ popularTemplates, popularLoading: false, popularLoaded: true, popularError: null }),
41
- setPopularLoading: (popularLoading) => set({ popularLoading }),
42
- setPopularError: (popularError) => set({ popularError, popularLoading: false }),
43
- setSwipeLoading: (swipeLoading) => set({ swipeLoading }),
44
- setSwipeError: (swipeError) => set({ swipeError, swipeLoading: false }),
45
- setSwipeStack: (swipeStack, meta) => set({
46
- swipeStack,
47
- swipeLoading: false,
48
- swipeLoaded: true,
49
- swipeError: null,
50
- ...(meta?.customizing !== undefined ? { swipeCustomizing: meta.customizing } : {}),
51
- ...(meta?.targetDepth !== undefined ? { swipeTargetDepth: meta.targetDepth } : {}),
52
- ...(meta?.productSet !== undefined ? { swipeProductSet: meta.productSet } : {})
53
- }),
54
- setSwipeMeta: (meta) => set({
55
- ...(meta.customizing !== undefined ? { swipeCustomizing: meta.customizing } : {}),
56
- ...(meta.targetDepth !== undefined ? { swipeTargetDepth: meta.targetDepth } : {}),
57
- ...(meta.productSet !== undefined ? { swipeProductSet: meta.productSet } : {})
58
- }),
59
- appendSwipeCard: (card) => set((state) => (state.swipeStack.some((existing) => existing.id === card.id)
60
- ? {}
61
- : { swipeStack: [...state.swipeStack, card] })),
62
- removeSwipeCard: (id) => set((state) => ({ swipeStack: state.swipeStack.filter((card) => card.id !== id) })),
63
- setSwipeRefilling: (swipeRefilling) => set({ swipeRefilling })
64
- }));
65
- }
66
- //# sourceMappingURL=homepage-store.js.map