@streamplace/components 0.8.5 → 0.8.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/components/content-metadata/content-metadata-form.js +6 -22
- package/dist/components/content-metadata/content-rights.js +18 -47
- package/dist/components/content-metadata/content-warning-badge.js +42 -0
- package/dist/components/content-metadata/content-warnings.js +15 -48
- package/dist/components/content-metadata/index.js +3 -1
- package/dist/components/mobile-player/ui/viewer-context-menu.js +17 -11
- package/dist/components/ui/checkbox.js +6 -18
- package/dist/components/ui/dropdown.js +16 -11
- package/dist/components/ui/index.js +2 -0
- package/dist/components/ui/primitives/text.js +19 -4
- package/dist/components/ui/select.js +44 -75
- package/dist/hooks/useLivestreamInfo.js +1 -1
- package/dist/streamplace-store/stream.js +11 -9
- package/node-compile-cache/v22.15.0-x64-efe9a9df-0/37be0eec +0 -0
- package/package.json +2 -2
- package/src/components/content-metadata/content-metadata-form.tsx +9 -49
- package/src/components/content-metadata/content-rights.tsx +31 -56
- package/src/components/content-metadata/content-warning-badge.tsx +94 -0
- package/src/components/content-metadata/content-warnings.tsx +46 -58
- package/src/components/content-metadata/index.tsx +2 -0
- package/src/components/mobile-player/ui/viewer-context-menu.tsx +33 -1
- package/src/components/ui/checkbox.tsx +23 -21
- package/src/components/ui/dropdown.tsx +60 -40
- package/src/components/ui/index.ts +2 -0
- package/src/components/ui/primitives/text.tsx +24 -4
- package/src/components/ui/select.tsx +97 -125
- package/src/hooks/useLivestreamInfo.ts +1 -1
- package/src/streamplace-store/stream.tsx +16 -10
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -131,19 +131,18 @@ export function useCreateStreamRecord() {
|
|
|
131
131
|
title,
|
|
132
132
|
customThumbnail,
|
|
133
133
|
submitPost,
|
|
134
|
-
|
|
134
|
+
canonicalUrl,
|
|
135
|
+
notificationSettings,
|
|
135
136
|
}: {
|
|
136
137
|
title: string;
|
|
137
138
|
customThumbnail?: Blob;
|
|
138
139
|
submitPost?: boolean;
|
|
139
|
-
|
|
140
|
+
canonicalUrl?: string;
|
|
141
|
+
notificationSettings?: PlaceStreamLivestream.NotificationSettings;
|
|
140
142
|
}) => {
|
|
141
|
-
if (
|
|
143
|
+
if (typeof submitPost !== "boolean") {
|
|
142
144
|
submitPost = true;
|
|
143
145
|
}
|
|
144
|
-
if (!customUrl) {
|
|
145
|
-
customUrl = null;
|
|
146
|
-
}
|
|
147
146
|
if (!agent) {
|
|
148
147
|
throw new Error("No PDS agent found");
|
|
149
148
|
}
|
|
@@ -152,8 +151,6 @@ export function useCreateStreamRecord() {
|
|
|
152
151
|
throw new Error("No user DID found, assuming not logged in");
|
|
153
152
|
}
|
|
154
153
|
|
|
155
|
-
// Use customUrl if provided, otherwise fall back to the store URL
|
|
156
|
-
const finalUrl = customUrl || url;
|
|
157
154
|
const u = new URL(url);
|
|
158
155
|
|
|
159
156
|
let thumbnail: BlobRef | undefined = undefined;
|
|
@@ -247,13 +244,18 @@ export function useCreateStreamRecord() {
|
|
|
247
244
|
platVersion = getBrowserName(window.navigator.userAgent);
|
|
248
245
|
}
|
|
249
246
|
|
|
247
|
+
const thisUrl = `${url}/${profile.data.handle}`;
|
|
248
|
+
if (!canonicalUrl) {
|
|
249
|
+
canonicalUrl = thisUrl;
|
|
250
|
+
}
|
|
251
|
+
|
|
250
252
|
const record: PlaceStreamLivestream.Record = {
|
|
251
253
|
$type: "place.stream.livestream",
|
|
252
254
|
title: title,
|
|
253
|
-
url:
|
|
255
|
+
url: thisUrl,
|
|
254
256
|
createdAt: new Date().toISOString(),
|
|
255
257
|
// would match up with e.g. https://stream.place/iame.li
|
|
256
|
-
canonicalUrl:
|
|
258
|
+
canonicalUrl: canonicalUrl,
|
|
257
259
|
// user agent style string
|
|
258
260
|
// e.g. `@streamplace/components/0.1.0 (ios, 32.0)`
|
|
259
261
|
agent: `@streamplace/components/${PackageJson.version} (${platform}, ${platVersion})`,
|
|
@@ -261,6 +263,10 @@ export function useCreateStreamRecord() {
|
|
|
261
263
|
thumb: thumbnail,
|
|
262
264
|
};
|
|
263
265
|
|
|
266
|
+
if (notificationSettings) {
|
|
267
|
+
record.notificationSettings = notificationSettings;
|
|
268
|
+
}
|
|
269
|
+
|
|
264
270
|
await agent.com.atproto.repo.createRecord({
|
|
265
271
|
repo: agent.did,
|
|
266
272
|
collection: "place.stream.livestream",
|