@shumai-one/shumai 0.2.3 → 0.3.1

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 (162) hide show
  1. package/bin/{chunk-2aamsc5v.js → chunk-08dr94gp.js} +1 -1
  2. package/bin/{chunk-g21jxrt9.js → chunk-08mxv0sm.js} +2 -2
  3. package/bin/{chunk-jqh8kavv.js → chunk-0ed7h2xm.js} +1 -1
  4. package/bin/{chunk-ygz6pawn.js → chunk-0t4z17qr.js} +1 -1
  5. package/bin/{chunk-9h3ds7rn.js → chunk-1d22tysv.js} +2 -2
  6. package/bin/{chunk-0aj303as.js → chunk-1dawjfk8.js} +2 -2
  7. package/bin/chunk-1nh6xgek.js +2 -0
  8. package/bin/chunk-20y3wte3.js +2 -0
  9. package/bin/{chunk-thsbcbay.js → chunk-2ynx0den.js} +1 -1
  10. package/bin/{chunk-2aascrtb.js → chunk-31a3k77j.js} +1 -1
  11. package/bin/{chunk-srn8t0v7.js → chunk-31mjcykb.js} +2 -2
  12. package/bin/{chunk-gtrc5ka2.js → chunk-3jdef7n4.js} +1 -1
  13. package/bin/{chunk-b8js74jk.js → chunk-3rcc5s99.js} +2 -2
  14. package/bin/{chunk-t3t6021k.js → chunk-3t7mjvdv.js} +2 -2
  15. package/bin/{chunk-mzg1h07d.js → chunk-4ahve1nf.js} +1 -1
  16. package/bin/{chunk-nrwna4ha.js → chunk-4hdx2tv0.js} +1 -1
  17. package/bin/chunk-4p7xpfey.js +2 -0
  18. package/bin/{chunk-dm2w12rc.js → chunk-5e1xqaj4.js} +2 -2
  19. package/bin/chunk-5f81c951.js +1 -0
  20. package/bin/chunk-5s7c0qww.js +1 -0
  21. package/bin/{chunk-e52nga6c.js → chunk-5vqan9c4.js} +2 -2
  22. package/bin/{chunk-re0b7sj7.js → chunk-5zntjzxw.js} +1 -1
  23. package/bin/{chunk-2dsmsa6a.js → chunk-6a2eb3b5.js} +1 -1
  24. package/bin/chunk-6gy7c4d7.js +1 -0
  25. package/bin/chunk-7d4scsf6.js +1 -0
  26. package/bin/chunk-7d5kep8c.js +2 -0
  27. package/bin/{chunk-w7dn1m95.js → chunk-7eycsyk6.js} +1 -1
  28. package/bin/{chunk-e7ndw3hg.js → chunk-7jjc175m.js} +3 -3
  29. package/bin/{chunk-77r8w95d.js → chunk-7y8dng8t.js} +2 -2
  30. package/bin/{chunk-qksb0v3c.js → chunk-8m6zg15c.js} +2 -2
  31. package/bin/chunk-8n60m9x3.js +1 -0
  32. package/bin/{chunk-rtngbgpk.js → chunk-8qyke29r.js} +1 -1
  33. package/bin/chunk-8yz1expv.js +307 -0
  34. package/bin/{chunk-4qpa7b5t.js → chunk-90et6bwm.js} +1 -1
  35. package/bin/{chunk-hr97a5j5.js → chunk-9p2d0mk1.js} +1 -1
  36. package/bin/{chunk-c45rh4hk.js → chunk-a10tf0d8.js} +1 -1
  37. package/bin/{chunk-262hkppb.js → chunk-a76c5r3c.js} +2 -2
  38. package/bin/chunk-a9t667xv.js +1 -0
  39. package/bin/{chunk-ta7bfdrn.js → chunk-amsb41z5.js} +1 -1
  40. package/bin/{chunk-46ar48f9.js → chunk-arpna31w.js} +1 -1
  41. package/bin/{chunk-zzx99j8t.js → chunk-b10meywb.js} +1 -1
  42. package/bin/chunk-b1e3tec3.js +62 -0
  43. package/bin/chunk-bdjhb77e.js +2 -0
  44. package/bin/{chunk-8dqq1fk0.js → chunk-bmqw3j2d.js} +1 -1
  45. package/bin/{chunk-ybhgmvxa.js → chunk-c3fvs0bv.js} +2 -2
  46. package/bin/{chunk-fbte2rmd.js → chunk-c5my1b3k.js} +1 -1
  47. package/bin/{chunk-3rmc8nz6.js → chunk-dhekxndw.js} +1 -1
  48. package/bin/{chunk-g8th86na.js → chunk-dwaj1yn4.js} +1 -1
  49. package/bin/{chunk-cxhmr356.js → chunk-dwswqq3g.js} +1 -1
  50. package/bin/{chunk-15sefy5t.js → chunk-ejfmxjw6.js} +2 -2
  51. package/bin/chunk-er1rb6yj.js +1 -0
  52. package/bin/chunk-etces6ff.js +2 -0
  53. package/bin/{chunk-s1n39qte.js → chunk-etqpzc9e.js} +1 -1
  54. package/bin/{chunk-n4meg9wb.js → chunk-f8cn9m28.js} +1 -1
  55. package/bin/{chunk-fcvtgx1y.js → chunk-fdpjw17x.js} +1 -1
  56. package/bin/{chunk-29tx9qe2.js → chunk-g2dk56e7.js} +1 -1
  57. package/bin/{chunk-pxw97qbq.js → chunk-gn8snrnk.js} +1 -1
  58. package/bin/chunk-gqh4ttjh.js +3 -0
  59. package/bin/{chunk-14fh4s1a.js → chunk-gvn079hy.js} +2 -2
  60. package/bin/chunk-h270n69j.js +7 -0
  61. package/bin/{chunk-1xpec5r8.js → chunk-h2wsm7h3.js} +2 -2
  62. package/bin/{chunk-kfhtk3eh.js → chunk-hfp4hpca.js} +2 -2
  63. package/bin/{chunk-7we7ex0m.js → chunk-hrzm70wg.js} +1 -1
  64. package/bin/{chunk-bs0fjz3w.js → chunk-hz31j0hk.js} +2 -2
  65. package/bin/{chunk-wfx81mfv.js → chunk-j0p1peav.js} +2 -2
  66. package/bin/{chunk-s46zwr4p.js → chunk-jm6bxtzt.js} +1 -1
  67. package/bin/{chunk-9ab6k4rq.js → chunk-k20bhxed.js} +1 -1
  68. package/bin/{chunk-q09dfja5.js → chunk-k9w6mk9d.js} +2 -2
  69. package/bin/chunk-kgb16ggd.css +1 -0
  70. package/bin/{chunk-31baz5n0.js → chunk-m4py21f3.js} +1 -1
  71. package/bin/{chunk-dghtwyq1.js → chunk-mahxw48e.js} +2 -2
  72. package/bin/{chunk-ymeycphq.js → chunk-mcxsk75h.js} +3 -3
  73. package/bin/chunk-mqbxagfd.js +2 -0
  74. package/bin/{chunk-mqjzmn0e.js → chunk-na2nympm.js} +1 -1
  75. package/bin/{chunk-qwg2e3wr.js → chunk-nqh128dt.js} +2 -2
  76. package/bin/chunk-nr89225z.js +2 -0
  77. package/bin/chunk-nrf5r23d.js +1 -0
  78. package/bin/{chunk-e3s3rz2e.js → chunk-nt9tfjx6.js} +2 -2
  79. package/bin/chunk-nzy3pjjm.js +15 -0
  80. package/bin/{chunk-d3wmdjze.js → chunk-p396vw9h.js} +1 -1
  81. package/bin/{chunk-nhsqp8jc.js → chunk-p9xfyqh1.js} +2 -2
  82. package/bin/{chunk-nnkkem25.js → chunk-pgae67hk.js} +2 -2
  83. package/bin/chunk-ph11924k.js +1 -0
  84. package/bin/{chunk-yj4x7tpw.js → chunk-ph3e1bpp.js} +2 -2
  85. package/bin/{chunk-dqgv5yy1.js → chunk-pj0fgb2x.js} +1 -1
  86. package/bin/{chunk-925q4paa.js → chunk-pp072ksj.js} +1 -1
  87. package/bin/{chunk-ztmj61z9.js → chunk-q5cdjzbv.js} +1 -1
  88. package/bin/{chunk-88fg1sw7.js → chunk-qc6dmzn0.js} +2 -2
  89. package/bin/{chunk-6xg65n5y.js → chunk-qgq96tbp.js} +1 -1
  90. package/bin/{chunk-xcwbg4w9.js → chunk-qmtvy2j4.js} +2 -2
  91. package/bin/{chunk-9h027f50.js → chunk-qvgc9e08.js} +1 -1
  92. package/bin/chunk-rfh4ppaa.js +1 -0
  93. package/bin/chunk-rrhq3t4s.js +1 -0
  94. package/bin/{chunk-891h8br6.js → chunk-s05f0v9t.js} +1 -1
  95. package/bin/{chunk-wc8sc9r9.js → chunk-s7qpj715.js} +1 -1
  96. package/bin/{chunk-8wqfkm4c.js → chunk-sf6fwvrs.js} +1 -1
  97. package/bin/chunk-sr9bty78.js +1 -0
  98. package/bin/{chunk-9avkn3x1.js → chunk-ss45w8ks.js} +2 -2
  99. package/bin/{chunk-8qg47kj6.js → chunk-t2txvzkp.js} +1 -1
  100. package/bin/{chunk-bd71dp4j.js → chunk-td54rdfj.js} +1 -1
  101. package/bin/{chunk-0rxhc7ka.js → chunk-tsncwscz.js} +2 -2
  102. package/bin/chunk-vb9m47z9.js +1 -0
  103. package/bin/{chunk-3qks722n.js → chunk-ve7v8wtv.js} +2 -2
  104. package/bin/{chunk-922nnh39.js → chunk-vf066xwh.js} +1 -1
  105. package/bin/{chunk-97jzve52.js → chunk-vgb8bzcg.js} +2 -2
  106. package/bin/{chunk-js9yf457.js → chunk-vnfmh5ke.js} +2 -2
  107. package/bin/{chunk-6zascpcz.js → chunk-vt4zpasm.js} +1 -1
  108. package/bin/{chunk-j8qtab70.js → chunk-vy24ncn2.js} +1 -1
  109. package/bin/{chunk-w88219ex.js → chunk-w3a50kz8.js} +1 -1
  110. package/bin/{chunk-zemrvz79.js → chunk-w9w5301f.js} +2 -2
  111. package/bin/{chunk-fz88kkk1.js → chunk-wap08p4j.js} +2 -2
  112. package/bin/{chunk-d2vxmn9v.js → chunk-wny0qagx.js} +1 -1
  113. package/bin/{chunk-7hsgmjpa.js → chunk-wqhk76de.js} +2 -2
  114. package/bin/{chunk-5t6c3038.js → chunk-wr5byz6r.js} +1 -1
  115. package/bin/chunk-wrz9e73c.js +2 -0
  116. package/bin/{chunk-0qkj838r.js → chunk-ws07a9kv.js} +1 -1
  117. package/bin/{chunk-7b17fb36.js → chunk-x5dcgk62.js} +1 -1
  118. package/bin/{chunk-898q6x3q.js → chunk-xawwxdq9.js} +2 -2
  119. package/bin/{chunk-m4zpf9gg.js → chunk-y2nw8rbx.js} +2 -2
  120. package/bin/{chunk-hkbybhww.js → chunk-y9ttm07y.js} +1 -1
  121. package/bin/chunk-yahb7wan.js +2 -0
  122. package/bin/{chunk-5d2q46mx.js → chunk-zg0vm233.js} +1 -1
  123. package/bin/chunk-zhd2mkbr.js +1 -0
  124. package/bin/{chunk-dgat7wqv.js → chunk-zs9b0f3z.js} +2 -2
  125. package/bin/{chunk-mnfqdxms.js → chunk-zx9cv3t8.js} +1 -1
  126. package/bin/{chunk-1wm57c6y.js → chunk-zxpef55w.js} +3 -3
  127. package/bin/shumai-app.html +1 -1
  128. package/bin/shumai-app.js +293 -225
  129. package/package.json +8 -8
  130. package/prisma/migrations/20260728024147_add_agent_session_entry_columns/migration.sql +14 -0
  131. package/prisma/migrations/20260728024205_migrate_agent_session_entry_data/migration.sql +12 -0
  132. package/prisma/migrations/20260728031230_remove_agent_session_entry_legacy_entry_column/migration.sql +8 -0
  133. package/prisma/migrations/20260729073910_change_agent_session_asset_on_delete_to_set_null/migration.sql +5 -0
  134. package/prisma/migrations/20260729114346_asset_size_byte_bigint/migration.sql +2 -0
  135. package/prisma/migrations/20260729114659_ai_usage_tokens_bigint/migration.sql +5 -0
  136. package/prisma/schema.prisma +18 -12
  137. package/bin/chunk-0xbf8bcg.js +0 -2
  138. package/bin/chunk-23d3968z.js +0 -2
  139. package/bin/chunk-2a9n3dhx.js +0 -1
  140. package/bin/chunk-3hzj13pj.js +0 -1
  141. package/bin/chunk-3n1rezd0.js +0 -2
  142. package/bin/chunk-5vkf99sk.js +0 -1
  143. package/bin/chunk-6z65xd0w.js +0 -3
  144. package/bin/chunk-8tf6kgdj.js +0 -2
  145. package/bin/chunk-av71yjaa.js +0 -1
  146. package/bin/chunk-b73ktdmd.js +0 -320
  147. package/bin/chunk-carknytp.js +0 -1
  148. package/bin/chunk-chkx04mw.js +0 -1
  149. package/bin/chunk-crt1e1w1.js +0 -2
  150. package/bin/chunk-gswbc6y9.js +0 -2
  151. package/bin/chunk-hnhq0dh9.js +0 -1
  152. package/bin/chunk-j0c7d9y1.js +0 -1
  153. package/bin/chunk-jyzegph4.js +0 -1
  154. package/bin/chunk-kr06nrbx.js +0 -2
  155. package/bin/chunk-nyhqy6q2.js +0 -62
  156. package/bin/chunk-s8t74q9m.js +0 -1
  157. package/bin/chunk-se8rgwp8.js +0 -1
  158. package/bin/chunk-tm6z4hkd.css +0 -1
  159. package/bin/chunk-wckjyvtb.js +0 -5
  160. package/bin/chunk-wsyg4rwg.js +0 -2
  161. package/bin/chunk-wtjc4565.js +0 -1
  162. package/bin/chunk-y79r28gd.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shumai-one/shumai",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "A fullstack AI-powered media workspace and workflow engine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "@prisma/client": "7.8.0",
16
16
  "@prisma/adapter-pg": "7.8.0",
17
17
  "pg": "8.21.0",
18
- "sharp": "0.35.3",
18
+ "sharp": "0.34.5",
19
19
  "pino": "10.3.1",
20
20
  "pino-pretty": "13.1.3",
21
21
  "@temporalio/activity": "1.17.2",
@@ -27,12 +27,12 @@
27
27
  "zod": "4.4.3"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@shumai-one/shumai-darwin-arm64": "0.2.3",
31
- "@shumai-one/shumai-darwin-x64": "0.2.3",
32
- "@shumai-one/shumai-linux-arm64": "0.2.3",
33
- "@shumai-one/shumai-linux-x64": "0.2.3",
34
- "@shumai-one/shumai-win32-arm64": "0.2.3",
35
- "@shumai-one/shumai-win32-x64": "0.2.3"
30
+ "@shumai-one/shumai-darwin-arm64": "0.3.1",
31
+ "@shumai-one/shumai-darwin-x64": "0.3.1",
32
+ "@shumai-one/shumai-linux-arm64": "0.3.1",
33
+ "@shumai-one/shumai-linux-x64": "0.3.1",
34
+ "@shumai-one/shumai-win32-arm64": "0.3.1",
35
+ "@shumai-one/shumai-win32-x64": "0.3.1"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -0,0 +1,14 @@
1
+ -- AlterTable
2
+ ALTER TABLE "agent_session_entries" ADD COLUMN "asset_id" TEXT,
3
+ ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
4
+ ADD COLUMN "data" JSONB,
5
+ ADD COLUMN "parent_id" TEXT,
6
+ ADD COLUMN "type" TEXT,
7
+ ALTER COLUMN "session_id" DROP NOT NULL,
8
+ ALTER COLUMN "entry" DROP NOT NULL;
9
+
10
+ -- CreateIndex
11
+ CREATE INDEX "agent_session_entries_parent_id_idx" ON "agent_session_entries"("parent_id");
12
+
13
+ -- CreateIndex
14
+ CREATE INDEX "agent_session_entries_asset_id_idx" ON "agent_session_entries"("asset_id");
@@ -0,0 +1,12 @@
1
+ -- Migrate existing entry JSON data to new columns
2
+ UPDATE agent_session_entries
3
+ SET
4
+ type = entry->>'type',
5
+ parent_id = entry->>'parentId',
6
+ asset_id = (SELECT s.asset_id FROM agent_sessions s WHERE s.id = agent_session_entries.session_id),
7
+ created_at = CASE
8
+ WHEN entry->>'timestamp' IS NOT NULL THEN (entry->>'timestamp')::timestamptz
9
+ ELSE created_at
10
+ END,
11
+ data = (entry::jsonb - 'id' - 'type' - 'parentId' - 'timestamp')::text::json
12
+ WHERE entry IS NOT NULL;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `entry` on the `agent_session_entries` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "agent_session_entries" DROP COLUMN "entry";
@@ -0,0 +1,5 @@
1
+ -- DropForeignKey
2
+ ALTER TABLE "agent_sessions" DROP CONSTRAINT "agent_sessions_asset_id_fkey";
3
+
4
+ -- AddForeignKey
5
+ ALTER TABLE "agent_sessions" ADD CONSTRAINT "agent_sessions_asset_id_fkey" FOREIGN KEY ("asset_id") REFERENCES "assets"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "assets" ALTER COLUMN "size_byte" SET DATA TYPE BIGINT;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "ai_usages" ALTER COLUMN "input_tokens" SET DATA TYPE BIGINT,
3
+ ALTER COLUMN "output_tokens" SET DATA TYPE BIGINT,
4
+ ALTER COLUMN "cache_read_tokens" SET DATA TYPE BIGINT,
5
+ ALTER COLUMN "total_tokens" SET DATA TYPE BIGINT;
@@ -374,7 +374,7 @@ model Asset {
374
374
  type AssetType
375
375
  mediaType String? @map("media_type")
376
376
  fileCount Int @default(0) @map("file_count")
377
- sizeByte Int @default(0) @map("size_byte")
377
+ sizeByte BigInt @default(0) @map("size_byte")
378
378
  status AssetStatus
379
379
  transcodeTaskId String? @map("transcode_task_id")
380
380
  /// [MediaInfo]
@@ -708,7 +708,7 @@ model AgentSession {
708
708
  cwd String
709
709
  leafId String? @map("leaf_id")
710
710
  assetId String? @map("asset_id")
711
- asset Asset? @relation("AssetToAgentSession", fields: [assetId], references: [id], onDelete: Cascade)
711
+ asset Asset? @relation("AssetToAgentSession", fields: [assetId], references: [id], onDelete: SetNull)
712
712
  userCommentId String? @map("user_comment_id")
713
713
  type AgentSessionType @default(comment)
714
714
  name String?
@@ -722,14 +722,20 @@ model AgentSession {
722
722
  }
723
723
 
724
724
  model AgentSessionEntry {
725
- id String @id // Uses ULID generated by pi-coding-agent
726
- sessionId String @map("session_id")
727
- session AgentSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
728
- /// [PiSessionEntry]
729
- entry Json
725
+ id String @id // Uses ULID generated by pi-coding-agent
726
+ sessionId String? @map("session_id")
727
+ session AgentSession? @relation(fields: [sessionId], references: [id], onDelete: Cascade)
728
+ assetId String? @map("asset_id")
729
+ type String?
730
+ parentId String? @map("parent_id")
731
+ /// [PiSessionEntryData]
732
+ data Json?
733
+ createdAt DateTime @default(now()) @map("created_at")
730
734
 
731
- @@map("agent_session_entries")
732
735
  @@index([sessionId])
736
+ @@index([parentId])
737
+ @@index([assetId])
738
+ @@map("agent_session_entries")
733
739
  }
734
740
 
735
741
  model UserMetadata {
@@ -822,10 +828,10 @@ model AiUsage {
822
828
  teamId String @map("team_id")
823
829
  userId String? @map("user_id")
824
830
  periodStart DateTime @map("period_start")
825
- inputTokens Int @default(0) @map("input_tokens")
826
- outputTokens Int @default(0) @map("output_tokens")
827
- cacheReadTokens Int @default(0) @map("cache_read_tokens")
828
- totalTokens Int @default(0) @map("total_tokens")
831
+ inputTokens BigInt @default(0) @map("input_tokens")
832
+ outputTokens BigInt @default(0) @map("output_tokens")
833
+ cacheReadTokens BigInt @default(0) @map("cache_read_tokens")
834
+ totalTokens BigInt @default(0) @map("total_tokens")
829
835
  cost Float @default(0) @map("cost")
830
836
  createdAt DateTime @default(now()) @map("created_at")
831
837
  updatedAt DateTime @updatedAt @map("updated_at")
@@ -1,2 +0,0 @@
1
- import{Qg as n}from"./chunk-gswbc6y9.js";import{Tj as o,gk as l,oh as e,ph as d}from"./chunk-nyhqy6q2.js";function u({...t}){return e(o.Root,{"data-slot":"alert-dialog",...t})}function s({...t}){return e(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function g({className:t,...a}){return e(o.Overlay,{"data-slot":"alert-dialog-overlay",className:l("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",t),...a})}function f({className:t,size:a="default",...i}){return d(s,{children:[e(g,{}),e(o.Content,{"data-slot":"alert-dialog-content","data-size":a,className:l("group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",t),...i})]})}function P({className:t,...a}){return e("div",{"data-slot":"alert-dialog-header",className:l("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),...a})}function A({className:t,...a}){return e("div",{"data-slot":"alert-dialog-footer",className:l("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),...a})}function D({className:t,...a}){return e(o.Title,{"data-slot":"alert-dialog-title",className:l("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),...a})}function v({className:t,...a}){return e(o.Description,{"data-slot":"alert-dialog-description",className:l("text-sm text-muted-foreground",t),...a})}function z({className:t,variant:a="default",size:i="default",...r}){return e(n,{variant:a,size:i,asChild:!0,children:e(o.Action,{"data-slot":"alert-dialog-action",className:l(t),...r})})}function C({className:t,variant:a="outline",size:i="default",...r}){return e(n,{variant:a,size:i,asChild:!0,children:e(o.Cancel,{"data-slot":"alert-dialog-cancel",className:l(t),...r})})}
2
- export{u as _a,f as $a,P as ab,A as bb,D as cb,v as db,z as eb,C as fb};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pb as a}from"./chunk-e52nga6c.js";import"./chunk-0qkj838r.js";export default a();
@@ -1 +0,0 @@
1
- import{g as v}from"./chunk-6xg65n5y.js";import"./chunk-6zascpcz.js";import"./chunk-b73ktdmd.js";import"./chunk-wckjyvtb.js";import"./chunk-crt1e1w1.js";import"./chunk-wsyg4rwg.js";import"./chunk-nhsqp8jc.js";import"./chunk-srn8t0v7.js";import"./chunk-kfhtk3eh.js";import"./chunk-kr06nrbx.js";import"./chunk-b8js74jk.js";import"./chunk-0xbf8bcg.js";import"./chunk-dm2w12rc.js";import"./chunk-15sefy5t.js";import"./chunk-77r8w95d.js";import"./chunk-t3t6021k.js";import"./chunk-nnkkem25.js";import"./chunk-1xpec5r8.js";import"./chunk-0rxhc7ka.js";import"./chunk-3n1rezd0.js";import"./chunk-fz88kkk1.js";import"./chunk-dghtwyq1.js";import"./chunk-gswbc6y9.js";import{Gh as q,oh as k}from"./chunk-nyhqy6q2.js";import"./chunk-0qkj838r.js";function B(){let{shareId:w,folderId:A}=C.useParams();return k(v,{shareId:w,initialFolderId:A})}var C=q("/share/$shareId/folders/$folderId")({component:B});export{C as Route};
@@ -1 +0,0 @@
1
- import{h as RB,i as bB}from"./chunk-6zascpcz.js";import{k as gB}from"./chunk-8dqq1fk0.js";import{p as LB,s as MB}from"./chunk-b73ktdmd.js";import{O as NB}from"./chunk-crt1e1w1.js";import"./chunk-wsyg4rwg.js";import{Va as DB}from"./chunk-srn8t0v7.js";import"./chunk-kfhtk3eh.js";import"./chunk-b8js74jk.js";import"./chunk-0xbf8bcg.js";import{Af as kB}from"./chunk-3qks722n.js";import"./chunk-77r8w95d.js";import{hg as VB,ig as wB}from"./chunk-nnkkem25.js";import"./chunk-0rxhc7ka.js";import{og as $B,pg as EB}from"./chunk-3n1rezd0.js";import"./chunk-fz88kkk1.js";import"./chunk-dghtwyq1.js";import{bh as PB}from"./chunk-gswbc6y9.js";import{Bh as qB,Dh as YB,Gh as TB,Mi as _B,Sh as q,ai as p,gk as UB,kh as d,mh as XB,mk as yB,nh as zB,ni as ZB,oh as G,ph as D,qh as HB,th as j,vh as QB}from"./chunk-nyhqy6q2.js";import{Vk as KB}from"./chunk-0qkj838r.js";var $=KB(XB(),1);var tB=({item:J})=>{if(J.preview?.thumbnailUrl)return G("img",{src:J.preview.thumbnailUrl,alt:"Preview",className:"w-full h-full object-cover"});if(J.preview?.proxyType==="audio"||J.proxyType==="audio")return G("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:G(ZB,{className:"w-5 h-5 text-muted-foreground"})});return G("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:G(_B,{className:"w-5 h-5 text-muted-foreground"})})},OB=({projectId:J,currentAssetId:X,parentFolderId:Q,initialFiles:_,initialNextCursor:w})=>{let{ref:z,inView:k}=$B({threshold:0,rootMargin:"200px"}),T=$.useRef(null),N=$.useRef(!1),[O,y]=$.useState(_),[Z,R]=$.useState(w),[b,S]=$.useState(!!w),[L,P]=$.useState(!1);return $.useEffect(()=>{y(_),R(w),S(!!w),N.current=!1},[_,w]),$.useEffect(()=>{(async()=>{if(!Z||L||!k||!b)return;P(!0);try{let W=await q.api.folders[":folderId"].search.$post({param:{folderId:Q},json:{assetType:"file",after:Z,first:200,recursively:!1,conditions:[]}});if(!W.ok)throw Error("Failed to fetch next page");let g=await W.json(),M=g.data||[];y((f)=>[...f,...M]),R(g.pageInfo?.cursor||void 0),S(!!g.pageInfo?.cursor&&M.length>0)}catch(W){console.error("Error fetching next page:",W)}finally{P(!1)}})()},[k,Z,b,L,Q]),$.useEffect(()=>{N.current=!1},[X]),$.useEffect(()=>{if(O.some((W)=>W?.id===X)&&T.current&&!N.current)T.current.scrollIntoView({block:"center",inline:"center",behavior:"smooth"}),N.current=!0},[O,X]),G("div",{className:"h-24 md:h-full w-full md:w-24 bg-gray-100 dark:bg-gray-950 flex flex-row md:flex-col flex-shrink-0 select-none",children:D("div",{className:"flex-1 overflow-x-auto overflow-y-hidden md:overflow-y-auto md:overflow-x-hidden px-4 md:px-0 py-2 md:py-4 flex flex-row md:flex-col items-center gap-3 no-scrollbar",children:[O.map((H)=>{if(!H)return null;let W=H.id===X;return G("div",{ref:H.id===X?T:null,className:"flex-shrink-0",children:G(YB,{to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:H.id},search:{version:void 0},className:UB("rounded-lg border overflow-hidden flex items-center justify-center transition-all bg-muted/30 block",W?"w-[62px] h-[62px] opacity-100":"w-[52px] h-[52px] opacity-60 hover:opacity-100"),children:G(tB,{item:H})})},H.id)}),b&&G("div",{ref:z,className:"px-2 md:px-0 py-2 md:py-4 flex justify-center items-center h-full md:w-full flex-shrink-0",children:L&&G(p,{className:"h-5 w-5 animate-spin text-muted-foreground"})})]})})};var Y=KB(XB(),1);function eB(){let{projectId:J,fileId:X}=WB.useParams(),Q=WB.useSearch(),_=Q.version,w=Q.start,z=_||X,k=Q.cmpLeft,T=Q.cmpRight,N=Q.cmpActive??"left",O=!!Q.compare&&!!k&&!!T,y=Y.useRef(null),{teamId:Z,ensureTeamIdForProject:R}=PB(),[b,S]=Y.useState(360),[L,P]=Y.useState([]),{fileViewRightSidebarCollapsed:H}=EB(),{isChatbotOpen:W}=wB(),[g,M]=Y.useState(0),[f,C]=Y.useState(null),[l,AB]=Y.useState(null),[xB,jB]=Y.useState(void 0),[A,I]=Y.useState({show:!1,files:[],nextCursor:void 0,folderId:void 0}),SB=q.api.files[":fileId"].metadata.$patch,{mutate:CB}=QB({mutationFn:async(B)=>{let K=await SB(B);if(!K.ok)throw Error("Failed to patch metadata");return await K.json()}}),hB=HB(),{members:FB,fetchMembers:n}=NB();Y.useEffect(()=>{R(J)},[J,R]),Y.useEffect(()=>{if(Z)n(Z,!0)},[Z,n]);let{data:o,isLoading:vB,isError:pB,isFetching:fB}=j({queryKey:["files",X],queryFn:async()=>{let B=await q.api.files[":fileId"].$get({param:{fileId:X}});if(!B.ok)throw Error("Failed to fetch stack");return await B.json()},enabled:!!Z,placeholderData:d}),{data:IB,isLoading:mB,isError:uB,isFetching:cB}=j({queryKey:["files",_],queryFn:async()=>{let B=await q.api.files[":fileId"].$get({param:{fileId:_}});if(!B.ok)throw Error("Failed to fetch version");return await B.json()},enabled:!!Z&&!!_,placeholderData:d}),{data:dB}=j({queryKey:["version_stacks",X,"versions"],queryFn:async()=>{let B=await q.api.version_stacks[":stackId"].versions.$get({param:{stackId:X}});if(!B.ok)throw Error("Failed to fetch versions");return await B.json()},enabled:!!J&&!!X&&(!!_||O)}),{data:x}=j({queryKey:["projects",J],queryFn:async()=>{let B=await q.api.projects[":projectId"].$get({param:{projectId:J}});if(!B.ok)throw Error("Failed to fetch project");return await B.json()}}),h=qB(),{setProjectState:a,clearProjectState:r}=VB(),lB=vB||!!_&&mB,nB=pB||!!_&&uB,oB=fB||!!_&&cB,U=IB||o,V=_?dB:o?.versionStack?.versions;Y.useEffect(()=>{if(U&&x&&Z)a({teamId:Z,projectId:J,projectName:x.name??"",ancestorFolders:U.ancestorFolders??[],currentAsset:{name:U.name,type:"file",version:V?V.find((B)=>B.id===z)?.version??V.length:void 0,proxyType:U.proxyType},isRootFolder:!1,fileId:X,downloadInfo:{originalKey:U.media?.original?.key,videoTranscodes:U.media?.videoTranscodes?.map((B)=>({key:B.key,width:B.width,height:B.height,isRaw:B.isRaw}))},versions:V,compareMode:O,canCompareVersions:(V?.length??0)>=2,onCompareVersions:()=>{let B=LB(V);if(!B)return;h({to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:X},search:(K)=>({...K,version:void 0,compare:!0,cmpLeft:B.left.id,cmpRight:B.right.id,cmpActive:"left"})})},onFolderClick:(B)=>{h({to:"/projects/$projectId/folders/$folderId",params:{projectId:J,folderId:B}})}});return()=>r()},[Z,J,x,U,V,z,X,O,a,r,h]);let E=U?.ancestorFolders?.[0]?.id??x?.rootFolder??"";if(Y.useEffect(()=>{if(!E||!z)return;if(A.folderId===E)return;let B=!0;return(async()=>{try{let F="",t=!1,e=[],BB=void 0;for(let GB=0;GB<5;GB++){let JB=await q.api.folders[":folderId"].search.$post({param:{folderId:E},json:{assetType:"file",after:F,first:200,recursively:!1,conditions:[]}});if(!JB.ok)throw Error("Failed to search parent folder for carousel");let v=await JB.json(),c=v.data||[];if(e.push(...c),c.some((sB)=>sB.id===z)){t=!0,BB=v.pageInfo?.cursor||void 0;break}if(!v.pageInfo?.cursor||c.length<200)break;F=v.pageInfo.cursor}if(B)if(t)I({show:!0,files:e,nextCursor:BB,folderId:E});else I({show:!1,files:[],nextCursor:void 0,folderId:E})}catch(F){if(console.error(F),B)I({show:!1,files:[],nextCursor:void 0,folderId:E})}})(),()=>{B=!1}},[E,z,A.folderId]),Y.useEffect(()=>{M(0),C(null),P([])},[U?.id]),Y.useEffect(()=>{C(null),P([])},[l?.id]),lB&&!U)return G(kB,{});if(nB||!U||!x||!Z)return G("div",{children:yB.file_not_found()});let m=O?l:U,i=m?.id??z,aB=(B,K)=>{if(!Z)return;CB({param:{fileId:i},json:[{key:B,value:K}]},{onSuccess:()=>{hB.invalidateQueries({queryKey:["files",i]})}})},u=(B)=>{h({to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:X},search:(K)=>({...K,...B})})},rB=()=>{u({compare:void 0,cmpLeft:void 0,cmpRight:void 0,cmpActive:void 0,version:N==="left"?k:T})},iB=(B)=>{C(B.id||null);let K=B.annotations;if(K&&K.length>0)P(K);else P([]);if(O){if(B.second!==null&&B.second!==void 0)jB({second:B.second,nonce:Date.now()});return}if(B.second!==null&&B.second!==void 0)y.current?.seekTo(B.second),y.current?.pause();else if(K&&K.length>0)y.current?.pause()},s=()=>{P([]),C(null)};return G("div",{className:"h-full flex flex-1 flex-col bg-background",children:D("div",{className:"h-full flex flex-1 overflow-hidden",children:[D("div",{className:"flex-1 relative",children:[oB&&!O&&G("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/50",children:G(p,{className:"h-8 w-8 animate-spin text-foreground"})}),O&&k&&T?G(bB,{versions:V??[],leftId:k,rightId:T,activeSide:N,annotations:L,seekRequest:xB,onActiveSideChange:(B)=>u({cmpActive:B}),onSwitchVersion:(B,K)=>u(B==="left"?{cmpLeft:K}:{cmpRight:K}),onExit:rB,onActiveAssetChange:AB,onPlay:s,onTimeUpdate:M}):G(RB,{file:U,mediaControllerRef:y,onPlay:s,onTimeUpdate:M,annotations:L,startTime:w,children:A.show&&G(OB,{projectId:J,currentAssetId:z,parentFolderId:E,initialFiles:A.files,initialNextCursor:A.nextCursor})})]}),(!H||W)&&D(zB,{children:[G(DB,{onResize:(B)=>{S((K)=>Math.max(300,Math.min(600,K-B)))},className:"hidden md:block"}),G("div",{style:{width:b},className:"flex-shrink-0 bg-background flex flex-col",children:W?G(gB,{projectId:J,contextAssetId:z}):G(MB,{teamId:Z,projectId:J,file:m,onSaveField:aB,members:FB,onCommentSelect:iB,currentTime:g,onTyping:()=>{if(O)return;y.current?.pause()},selectedCommentId:f,hideAnnotationControl:m?.proxyType==="audio"})})]})]})})}var WB=TB("/projects/$projectId/files/$fileId")({component:eB});export{WB as Route};
@@ -1,2 +0,0 @@
1
- import{Lh as g,Nh as _,Oh as h,gk as a,mh as x,oh as v}from"./chunk-nyhqy6q2.js";import{Vk as M}from"./chunk-0qkj838r.js";var m=M(x(),1),J=M(x(),1),N=M(x(),1);var T=new Map,W=new WeakMap,O=0,I;function w(S){if(!S)return"0";if(W.has(S))return W.get(S);return O+=1,W.set(S,O.toString()),W.get(S)}function p(S){return Object.keys(S).sort().filter((d)=>S[d]!==void 0).map((d)=>{return`${d}_${d==="root"?w(S.root):S[d]}`}).toString()}function k(S){let d=p(S),C=T.get(d);if(!C){let f=new Map,q,F=new IntersectionObserver((D)=>{D.forEach((L)=>{var U;let G=L.isIntersecting&&q.some((A)=>L.intersectionRatio>=A);if(S.trackVisibility&&typeof L.isVisible>"u")L.isVisible=G;[...(U=f.get(L.target))!=null?U:[]].forEach((A)=>{A(G,L)})})},S);q=F.thresholds||(Array.isArray(S.threshold)?S.threshold:[S.threshold||0]),C={id:d,observer:F,elements:f},T.set(d,C)}return C}function V(S,d,C={},f=I){if(typeof window.IntersectionObserver>"u"&&f!==void 0){let U=S.getBoundingClientRect();return d(f,{isIntersecting:f,target:S,intersectionRatio:typeof C.threshold==="number"?C.threshold:0,time:0,boundingClientRect:U,intersectionRect:U,rootBounds:U}),()=>{}}let{id:q,observer:F,elements:D}=k(C),L=D.get(S)||[];if(!D.has(S))D.set(S,L);return L.push(d),F.observe(S),function(){if(L.splice(L.indexOf(d),1),L.length===0)D.delete(S),F.unobserve(S);if(D.size===0)F.disconnect(),T.delete(q)}}function y({threshold:S,delay:d,trackVisibility:C,rootMargin:f,root:q,triggerOnce:F,skip:D,initialInView:L,fallbackInView:U,onChange:G}={}){var A;let[K,b]=J.useState(null),X=J.useRef(G),H=J.useRef(L),[Y,j]=J.useState({inView:!!L,entry:void 0});X.current=G,J.useEffect(()=>{if(H.current===void 0)H.current=L;if(D||!K)return;let B;return B=V(K,(Q,$)=>{let u=H.current;if(H.current=Q,u===void 0&&!Q)return;if(j({inView:Q,entry:$}),X.current)X.current(Q,$);if($.isIntersecting&&F&&B)B(),B=void 0},{root:q,rootMargin:f,threshold:S,trackVisibility:C,delay:d},U),()=>{if(B)B()}},[Array.isArray(S)?S.toString():S,K,q,f,F,D,C,U,d]);let Z=(A=Y.entry)==null?void 0:A.target,E=J.useRef(void 0);if(!K&&Z&&!F&&!D&&E.current!==Z)E.current=Z,j({inView:!!L,entry:void 0}),H.current=L;let z=[b,Y.inView,Y.entry];return z.ref=z[0],z.inView=z[1],z.entry=z[2],z}var P,R,l=(R=(P=("useInsertionEffect"in N)?N.useInsertionEffect:void 0)!=null?P:N.useLayoutEffect)!=null?R:N.useEffect;var o=g()(h((S)=>({fileViewLeftSidebarCollapsed:!0,setFileViewLeftSidebarCollapsed:(d)=>S({fileViewLeftSidebarCollapsed:d}),fileViewRightSidebarCollapsed:!1,setFileViewRightSidebarCollapsed:(d)=>S({fileViewRightSidebarCollapsed:d}),fileListLeftSidebarCollapsed:!1,setFileListLeftSidebarCollapsed:(d)=>S({fileListLeftSidebarCollapsed:d}),fileListRightSidebarCollapsed:!0,setFileListRightSidebarCollapsed:(d)=>S({fileListRightSidebarCollapsed:d}),shareConfigLeftSidebarCollapsed:!1,setShareConfigLeftSidebarCollapsed:(d)=>S({shareConfigLeftSidebarCollapsed:d}),shareConfigRightSidebarCollapsed:!1,setShareConfigRightSidebarCollapsed:(d)=>S({shareConfigRightSidebarCollapsed:d}),viewModes:{},setViewMode:(d,C)=>S((f)=>({viewModes:{...f.viewModes,[d]:C}})),videoTimeDisplayMode:"standard",setVideoTimeDisplayMode:(d)=>S({videoTimeDisplayMode:d})}),{name:"ui-storage",storage:_(()=>localStorage)}));function n({className:S,...d}){return v("div",{"data-slot":"skeleton",className:a("animate-pulse rounded-md bg-accent",S),...d})}
2
- export{y as og,o as pg,n as qg};
@@ -1 +0,0 @@
1
- import{a as r,b as a,c as s,d as E,e as $,f as q}from"./chunk-wc8sc9r9.js";import{fa as j}from"./chunk-nhsqp8jc.js";import{Va as t}from"./chunk-srn8t0v7.js";import"./chunk-kfhtk3eh.js";import{Za as x}from"./chunk-b8js74jk.js";import"./chunk-0xbf8bcg.js";import{jf as l}from"./chunk-wfx81mfv.js";import{zf as o}from"./chunk-3qks722n.js";import{og as d,pg as i}from"./chunk-3n1rezd0.js";import{Qg as m,bh as h}from"./chunk-gswbc6y9.js";import{Bh as C,Gh as P,Gi as b,Ki as g,Qh as B,Sh as A,Xi as I,ai as f,hk as p,ik as c,jk as n,mh as qG,mk as X,nh as k,oh as G,ph as K,qh as y,ti as T,uh as L,uj as u,vh as F,wh as S}from"./chunk-nyhqy6q2.js";import{Vk as $G}from"./chunk-0qkj838r.js";var _=$G(qG(),1);var OG=(Y)=>{if(!Y)return"??";return Y.split(" ").map((O)=>O[0]).slice(0,2).join("").toUpperCase()};function zG(){let{projectId:Y}=BG.useParams(),{teamId:O,ensureTeamIdForProject:U}=h(),e=y(),GG=C();_.useEffect(()=>{U(Y)},[Y,U]);let{data:M}=L(l(Y)),D=M?.rootFolder,[JG,KG]=_.useState(240),{shareConfigLeftSidebarCollapsed:Q,setShareConfigLeftSidebarCollapsed:XG}=i(),{data:V,isLoading:YG,fetchNextPage:R,hasNextPage:v,isFetchingNextPage:W}=S({queryKey:["shares",Y],queryFn:async({pageParam:J})=>{let Z=await A.api.projects[":projectId"].shares.$get({param:{projectId:Y},query:{first:"20",after:J}});if(!Z.ok)throw Error("Failed to fetch share links");return await Z.json()},initialPageParam:"",getNextPageParam:(J)=>J.pageInfo?.cursor||void 0,enabled:!!Y}),{ref:ZG,inView:w}=d();_.useEffect(()=>{if(w&&v&&!W)R()},[w,v,W,R]);let H=_.useMemo(()=>V?.pages.flatMap((J)=>J.data)||[],[V]),{mutate:_G}=F({mutationFn:async({id:J,isDisabled:Z})=>{let z=await A.api.shares[":shareId"].$put({param:{shareId:J},json:{isDisabled:Z}});if(!z.ok)throw Error("Failed to update share link");return await z.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["shares",Y]}),B.success(X.share_link_status_updated())},onError:(J)=>{B.error(X.error_message({message:J.message}))}});if(!O||!D||!M)return G(o,{});let N=(J)=>{let Z=`${window.location.origin}/share/${J}`;navigator.clipboard.writeText(Z),B.success(X.link_copied())};return G("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:K("div",{className:"flex flex-1 overflow-hidden relative",children:[!Q&&G("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>XG(!0)}),!Q&&K(k,{children:[G("div",{className:"bg-background",style:{width:JG},children:G(j,{teamId:O,projectId:Y,projectName:M.name??"",rootFolderId:D})}),G(t,{onResize:(J)=>{KG((Z)=>Math.max(180,Math.min(400,Z+J)))},className:"hidden md:block"})]}),K("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[G("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:K("div",{className:"flex items-center gap-2",children:[G(u,{className:"h-5 w-5 text-primary"}),G("h1",{className:"font-bold text-lg text-foreground",children:X.all_share_links()})]})}),G("div",{className:"flex-1 overflow-y-auto p-6",children:YG?G("div",{className:"flex justify-center items-center h-64",children:G("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):H.length===0?K("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[G(I,{className:"h-10 w-10 text-muted-foreground/50"}),G("p",{children:X.no_share_links_yet()})]}):K("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[K(r,{children:[G(a,{children:K(E,{className:"hover:bg-transparent bg-muted/20",children:[G($,{className:"font-semibold px-4 py-3",children:X.name()}),G($,{className:"font-semibold px-4 py-3",children:X.public_link()}),G($,{className:"font-semibold px-4 py-3",children:X.creator()}),G($,{className:"font-semibold px-4 py-3 w-[150px]",children:X.created_date()}),G($,{className:"font-semibold px-4 py-3 text-right w-[120px]",children:X.active()})]})}),G(s,{children:H.map((J)=>{let Z=`${window.location.origin}/share/${J.id}`;return K(E,{className:"hover:bg-muted/10 transition-colors",children:[G(q,{className:"font-medium px-4 py-3.5",children:G("span",{className:"cursor-pointer hover:underline text-foreground",onClick:()=>GG({to:"/projects/$projectId/shares/$shareId",params:{projectId:Y,shareId:J.id}}),children:J.name})}),G(q,{className:"px-4 py-3.5 max-w-[300px]",children:K("div",{className:"flex items-center gap-2 group",children:[G("span",{className:"truncate text-xs font-mono bg-muted/50 text-muted-foreground px-2 py-1 rounded-md border border-border cursor-pointer hover:bg-muted transition-colors flex-1",onClick:()=>N(J.id),title:X.click_to_copy_link(),children:Z}),G(m,{variant:"ghost",size:"icon-sm",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>N(J.id),children:G(b,{className:"h-3.5 w-3.5"})}),G("a",{href:Z,target:"_blank",rel:"noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center",children:G(g,{className:"h-3.5 w-3.5"})})]})}),G(q,{className:"px-4 py-3.5",children:K("div",{className:"flex items-center gap-2",children:[K(p,{className:"h-6 w-6",children:[J.creator?.image&&G(c,{src:J.creator.image,alt:J.creator.name,className:"object-cover"}),G(n,{className:"text-[10px]",children:OG(J.creator?.name)})]}),G("span",{className:"text-sm font-medium text-foreground truncate max-w-[150px]",children:J.creator?.name||X.unknown()})]})}),G(q,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:K("div",{className:"flex items-center gap-2",children:[G(T,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),G("span",{children:new Date(J.createdAt).toLocaleDateString()})]})}),G(q,{className:"px-4 py-3.5 text-right",children:G("div",{className:"flex justify-end",children:G(x,{checked:!J.isDisabled,onCheckedChange:(z)=>_G({id:J.id,isDisabled:!z})})})})]},J.id)})})]}),G("div",{ref:ZG,className:"h-10 w-full flex items-center justify-center",children:W&&G(f,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var BG=P("/projects/$projectId/shares/")({component:zG});export{BG as Route};