@g1cloud/bluesea 5.0.0-beta.20 → 5.0.0-beta.21
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/{BSAlertModal-bXdRoQ4g.js → BSAlertModal-CYU9CQls.js} +1 -1
- package/dist/{BSGridColumnSettingModal-CnqefrIo.js → BSGridColumnSettingModal-ZZsojFuF.js} +1 -1
- package/dist/{BSRichTextMaximizedModal-Dc9sFpvh.js → BSRichTextMaximizedModal-SyLzOqK2.js} +1 -1
- package/dist/{BSYesNoModal-nTiw15vA.js → BSYesNoModal-BnlBSnTl.js} +1 -1
- package/dist/{BSYoutubeInputModal-DN55K-10.js → BSYoutubeInputModal-DoEETszL.js} +7 -2
- package/dist/{ImageInsertModal-999e_ass.js → ImageInsertModal-CB7nCYk5.js} +2 -2
- package/dist/{ImageProperties.vue_vue_type_script_setup_true_lang-Dk8Skxl0.js → ImageProperties.vue_vue_type_script_setup_true_lang-D6zZgPOW.js} +1 -1
- package/dist/{ImagePropertiesModal-D6g2ZYpb.js → ImagePropertiesModal-DhC1BIGM.js} +2 -2
- package/dist/{LinkPropertiesModal-DUAsPJ5g.js → LinkPropertiesModal-CiC7e3lM.js} +1 -1
- package/dist/{TableInsertModal-DuK1nGxQ.js → TableInsertModal-D6pcuU2G.js} +1 -1
- package/dist/{TablePropertiesModal-Dn_ozHTt.js → TablePropertiesModal-dyMd6ysL.js} +1 -1
- package/dist/{VideoInsertModal-CjB8Vfny.js → VideoInsertModal-B1uHQRye.js} +2 -2
- package/dist/{VideoProperties.vue_vue_type_script_setup_true_lang-C41jIi69.js → VideoProperties.vue_vue_type_script_setup_true_lang-CuzZ0FvR.js} +1 -1
- package/dist/{VideoPropertiesModal-CZyluT1C.js → VideoPropertiesModal-CWq4UM9A.js} +2 -2
- package/dist/{YoutubeInsertModal-C3VKZ3MM.js → YoutubeInsertModal-BrhwLQmb.js} +2 -2
- package/dist/{YoutubeProperties.vue_vue_type_script_setup_true_lang-D5zcnp25.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-AiYZ7nOr.js} +1 -1
- package/dist/{YoutubePropertiesModal-VGbyMXuR.js → YoutubePropertiesModal-BcDH9UvU.js} +2 -2
- package/dist/bluesea.js +218 -216
- package/dist/bluesea.umd.cjs +19 -3
- package/dist/component/input/ImageUploadModel.d.ts +2 -0
- package/dist/{index-uI4FYMrx.js → index-D3w5seMa.js} +251 -240
- package/package.json +1 -1
package/dist/bluesea.umd.cjs
CHANGED
|
@@ -34722,17 +34722,26 @@ img.ProseMirror-separator {
|
|
|
34722
34722
|
return "Image";
|
|
34723
34723
|
} else if ((_d = (_c = blueseaConfig.componentConfig.upload) == null ? void 0 : _c.videoFileExt) == null ? void 0 : _d.includes(ext)) {
|
|
34724
34724
|
return "Video";
|
|
34725
|
-
} else if (url.includes("youtube.com") || url.includes("youtu.be")) {
|
|
34725
|
+
} else if (url.includes("youtube.com") || url.includes("youtu.be") || url.includes("youtube-nocookie.com")) {
|
|
34726
34726
|
return "Youtube";
|
|
34727
34727
|
} else {
|
|
34728
34728
|
return "Unknown";
|
|
34729
34729
|
}
|
|
34730
34730
|
};
|
|
34731
34731
|
const extractYoutubeVideoId = (url) => {
|
|
34732
|
-
const regex = /(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|embed|shorts)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
|
|
34732
|
+
const regex = /(?:(?:youtube|youtube-nocookie)\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|embed|shorts)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
|
|
34733
34733
|
const match = url.match(regex);
|
|
34734
34734
|
return match ? match[1] : void 0;
|
|
34735
34735
|
};
|
|
34736
|
+
const isYoutubeNocookieUrl = (url) => {
|
|
34737
|
+
return url.includes("youtube-nocookie.com");
|
|
34738
|
+
};
|
|
34739
|
+
const buildYoutubeUrl = (videoId, nocookie) => {
|
|
34740
|
+
if (nocookie) {
|
|
34741
|
+
return `https://www.youtube-nocookie.com/embed/${videoId}`;
|
|
34742
|
+
}
|
|
34743
|
+
return `https://youtu.be/${videoId}`;
|
|
34744
|
+
};
|
|
34736
34745
|
class MediaObjectUrlStore {
|
|
34737
34746
|
constructor() {
|
|
34738
34747
|
__publicField(this, "createdObjectUrls", []);
|
|
@@ -72459,7 +72468,12 @@ img.ProseMirror-separator {
|
|
|
72459
72468
|
const modalHandle = useModalHandle();
|
|
72460
72469
|
const select = () => {
|
|
72461
72470
|
const videoId = extractYoutubeVideoId(url.value);
|
|
72462
|
-
|
|
72471
|
+
if (videoId) {
|
|
72472
|
+
const nocookie = isYoutubeNocookieUrl(url.value);
|
|
72473
|
+
modelValue.value = buildYoutubeUrl(videoId, nocookie);
|
|
72474
|
+
} else {
|
|
72475
|
+
modelValue.value = void 0;
|
|
72476
|
+
}
|
|
72463
72477
|
modalHandle.close();
|
|
72464
72478
|
};
|
|
72465
72479
|
const close2 = () => {
|
|
@@ -72787,6 +72801,7 @@ img.ProseMirror-separator {
|
|
|
72787
72801
|
exports2.betweenDateFilter = betweenDateFilter;
|
|
72788
72802
|
exports2.betweenFilter = betweenFilter;
|
|
72789
72803
|
exports2.blueseaConfig = blueseaConfig;
|
|
72804
|
+
exports2.buildYoutubeUrl = buildYoutubeUrl;
|
|
72790
72805
|
exports2.cancelProvidedSavePoint = cancelProvidedSavePoint;
|
|
72791
72806
|
exports2.closeAlarm = closeAlarm;
|
|
72792
72807
|
exports2.configureBluesea = configureBluesea;
|
|
@@ -72835,6 +72850,7 @@ img.ProseMirror-separator {
|
|
|
72835
72850
|
exports2.isNullFilter = isNullFilter;
|
|
72836
72851
|
exports2.isTooltipDisplayed = isTooltipDisplayed;
|
|
72837
72852
|
exports2.isValidationFailedError = isValidationFailedError;
|
|
72853
|
+
exports2.isYoutubeNocookieUrl = isYoutubeNocookieUrl;
|
|
72838
72854
|
exports2.likeFilter = likeFilter;
|
|
72839
72855
|
exports2.loadFieldValidator = loadFieldValidator;
|
|
72840
72856
|
exports2.localeBasedExtraItemValidationRules = localeBasedExtraItemValidationRules;
|
|
@@ -5,6 +5,8 @@ export type GuideMessage = Record<number, MultiLangText>;
|
|
|
5
5
|
export type MediaType = 'Image' | 'Video' | 'Youtube' | 'Unknown';
|
|
6
6
|
export declare const getMediaType: (url: string) => MediaType;
|
|
7
7
|
export declare const extractYoutubeVideoId: (url: string) => string | undefined;
|
|
8
|
+
export declare const isYoutubeNocookieUrl: (url: string) => boolean;
|
|
9
|
+
export declare const buildYoutubeUrl: (videoId: string, nocookie: boolean) => string;
|
|
8
10
|
export declare class MediaObjectUrlStore {
|
|
9
11
|
private createdObjectUrls;
|
|
10
12
|
addUrl(url: string): void;
|