@playdrop/playdrop-cli 0.7.13 → 0.7.16
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/config/client-meta.json +1 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +461 -444
- package/node_modules/@playdrop/ai-client/package.json +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +903 -882
- package/node_modules/@playdrop/api-client/dist/core/errors.js +69 -45
- package/node_modules/@playdrop/api-client/dist/core/request.js +188 -159
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +516 -491
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +40 -14
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +480 -462
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +439 -419
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +696 -676
- package/node_modules/@playdrop/api-client/dist/domains/auth.js +346 -320
- package/node_modules/@playdrop/api-client/dist/domains/comments.js +124 -98
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.js +91 -65
- package/node_modules/@playdrop/api-client/dist/domains/me.js +71 -45
- package/node_modules/@playdrop/api-client/dist/domains/payments.js +407 -386
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +144 -118
- package/node_modules/@playdrop/api-client/dist/domains/search.js +117 -104
- package/node_modules/@playdrop/api-client/dist/domains/tags.js +188 -162
- package/node_modules/@playdrop/api-client/dist/index.js +993 -552
- package/node_modules/@playdrop/api-client/package.json +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +341 -308
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +55 -29
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +856 -858
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +267 -261
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +64 -15
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +89 -63
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +81 -56
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +112 -86
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +45 -17
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +160 -136
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +582 -584
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +123 -97
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +207 -182
- package/node_modules/@playdrop/boxel-three/dist/src/types.js +15 -1
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +451 -425
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +109 -84
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +127 -106
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +73 -51
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +97 -79
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +29 -7
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +80 -60
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +41 -19
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +72 -50
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +69 -47
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +129 -109
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +40 -18
- package/node_modules/@playdrop/boxel-three/package.json +1 -1
- package/node_modules/@playdrop/config/client-meta.json +1 -1
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/api.js +289 -203
- package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
- package/node_modules/@playdrop/types/dist/app.js +91 -45
- package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
- package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
- package/node_modules/@playdrop/types/dist/asset.js +186 -108
- package/node_modules/@playdrop/types/dist/content-license.js +49 -15
- package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
- package/node_modules/@playdrop/types/dist/ecs.js +102 -82
- package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
- package/node_modules/@playdrop/types/dist/entity.js +63 -53
- package/node_modules/@playdrop/types/dist/graph.js +116 -80
- package/node_modules/@playdrop/types/dist/index.js +47 -20
- package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
- package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
- package/node_modules/@playdrop/types/dist/realtime.js +27 -7
- package/node_modules/@playdrop/types/dist/version.js +182 -124
- package/node_modules/@playdrop/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,129 +1,207 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var asset_exports = {};
|
|
19
|
+
__export(asset_exports, {
|
|
20
|
+
ASSET_BROWSE_KIND_VALUES: () => ASSET_BROWSE_KIND_VALUES,
|
|
21
|
+
ASSET_CATEGORY_VALUES: () => ASSET_CATEGORY_VALUES,
|
|
22
|
+
ASSET_FORMAT_VALUES: () => ASSET_FORMAT_VALUES,
|
|
23
|
+
ASSET_LIST_SORT_VALUES: () => ASSET_LIST_SORT_VALUES,
|
|
24
|
+
ASSET_SOURCE_KIND_VALUES: () => ASSET_SOURCE_KIND_VALUES,
|
|
25
|
+
ASSET_SUBCATEGORIES_BY_CATEGORY: () => ASSET_SUBCATEGORIES_BY_CATEGORY,
|
|
26
|
+
ASSET_SUBCATEGORY_DEFINITIONS: () => ASSET_SUBCATEGORY_DEFINITIONS,
|
|
27
|
+
ASSET_SUBCATEGORY_DEFINITIONS_BY_KEY: () => ASSET_SUBCATEGORY_DEFINITIONS_BY_KEY,
|
|
28
|
+
ASSET_SUBCATEGORY_SLUG_REGEX: () => ASSET_SUBCATEGORY_SLUG_REGEX,
|
|
29
|
+
ASSET_VISIBILITY_VALUES: () => ASSET_VISIBILITY_VALUES,
|
|
30
|
+
MODEL_3D_ASSET_SUBCATEGORY_VALUES: () => MODEL_3D_ASSET_SUBCATEGORY_VALUES,
|
|
31
|
+
PLAYDROP_SPEECH_MAX_WORDS: () => PLAYDROP_SPEECH_MAX_WORDS,
|
|
32
|
+
PLAYDROP_SPEECH_VOICE_IDS: () => PLAYDROP_SPEECH_VOICE_IDS,
|
|
33
|
+
countSpeechWords: () => countSpeechWords,
|
|
34
|
+
getAssetSubcategoryDefinition: () => getAssetSubcategoryDefinition,
|
|
35
|
+
getBoxelManifestRole: () => getBoxelManifestRole,
|
|
36
|
+
getRequiredModel3DFileRoles: () => getRequiredModel3DFileRoles,
|
|
37
|
+
isAssetCategory: () => isAssetCategory,
|
|
38
|
+
isAssetFormat: () => isAssetFormat,
|
|
39
|
+
isAssetSourceKind: () => isAssetSourceKind,
|
|
40
|
+
isAssetVisibility: () => isAssetVisibility,
|
|
41
|
+
isBoxelAssetFormat: () => isBoxelAssetFormat,
|
|
42
|
+
isKnownAssetSubcategory: () => isKnownAssetSubcategory,
|
|
43
|
+
isModel3DAssetSubcategory: () => isModel3DAssetSubcategory,
|
|
44
|
+
isValidAssetSubcategorySlug: () => isValidAssetSubcategorySlug,
|
|
45
|
+
isVoxAssetFormat: () => isVoxAssetFormat,
|
|
46
|
+
normalizeAssetSubcategory: () => normalizeAssetSubcategory,
|
|
47
|
+
normalizeSpeechText: () => normalizeSpeechText
|
|
48
|
+
});
|
|
49
|
+
module.exports = __toCommonJS(asset_exports);
|
|
50
|
+
const ASSET_CATEGORY_VALUES = ["IMAGE", "VIDEO", "AUDIO", "SPRITESHEET", "MODEL_3D", "CUSTOM"];
|
|
51
|
+
const ASSET_BROWSE_KIND_VALUES = ["images", "music", "sfx", "speech", "videos", "3d"];
|
|
52
|
+
const ASSET_FORMAT_VALUES = [
|
|
53
|
+
"PNG",
|
|
54
|
+
"JPEG",
|
|
55
|
+
"WEBP",
|
|
56
|
+
"GIF",
|
|
57
|
+
"ASEPRITE",
|
|
58
|
+
"MP4",
|
|
59
|
+
"WEBM",
|
|
60
|
+
"MP3",
|
|
61
|
+
"WAV",
|
|
62
|
+
"OGG",
|
|
63
|
+
"GLTF",
|
|
64
|
+
"GLB",
|
|
65
|
+
"PLAYDROP_BOXEL_JSON",
|
|
66
|
+
"VOX",
|
|
67
|
+
"CUSTOM"
|
|
19
68
|
];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
69
|
+
const ASSET_VISIBILITY_VALUES = ["PRIVATE", "PUBLIC"];
|
|
70
|
+
const ASSET_SOURCE_KIND_VALUES = ["UPLOAD", "AI", "APP_EMBEDDED", "IMPORT"];
|
|
71
|
+
const PLAYDROP_SPEECH_MAX_WORDS = 40;
|
|
72
|
+
const PLAYDROP_SPEECH_VOICE_IDS = [
|
|
73
|
+
"default_narrator",
|
|
74
|
+
"warm_storyteller_m",
|
|
75
|
+
"neutral_guide",
|
|
76
|
+
"confident_guide_f",
|
|
77
|
+
"casual_companion_m",
|
|
78
|
+
"atmospheric_storyteller_f",
|
|
79
|
+
"energetic_host_m",
|
|
80
|
+
"bright_creator_f"
|
|
32
81
|
];
|
|
33
|
-
|
|
34
|
-
|
|
82
|
+
function normalizeSpeechText(input) {
|
|
83
|
+
return input.trim();
|
|
35
84
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
85
|
+
function countSpeechWords(input) {
|
|
86
|
+
const normalized = normalizeSpeechText(input);
|
|
87
|
+
return normalized.match(/\S+/g)?.length ?? 0;
|
|
39
88
|
}
|
|
40
|
-
const MODEL_3D_FORMATS = [
|
|
41
|
-
const BOXEL_REQUIRED_FILE_ROLES = [
|
|
42
|
-
const VOX_REQUIRED_FILE_ROLES = [
|
|
43
|
-
const GLTF_REQUIRED_FILE_ROLES = [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
89
|
+
const MODEL_3D_FORMATS = ["GLB", "GLTF", "PLAYDROP_BOXEL_JSON", "VOX"];
|
|
90
|
+
const BOXEL_REQUIRED_FILE_ROLES = ["primary", "mesh", "preview"];
|
|
91
|
+
const VOX_REQUIRED_FILE_ROLES = ["primary", "boxel", "mesh", "preview"];
|
|
92
|
+
const GLTF_REQUIRED_FILE_ROLES = ["primary"];
|
|
93
|
+
const ASSET_SUBCATEGORY_DEFINITIONS = [
|
|
94
|
+
{ category: "IMAGE", subcategory: "generic", formats: ["PNG", "JPEG", "WEBP", "GIF"], label: "Image" },
|
|
95
|
+
{ category: "SPRITESHEET", subcategory: "generic", formats: ["ASEPRITE", "PNG"], label: "Spritesheet" },
|
|
96
|
+
{ category: "VIDEO", subcategory: "generic", formats: ["MP4", "WEBM"], label: "Video" },
|
|
97
|
+
{ category: "AUDIO", subcategory: "music", formats: ["MP3", "WAV", "OGG"], label: "Music" },
|
|
98
|
+
{ category: "AUDIO", subcategory: "sfx", formats: ["MP3", "WAV", "OGG"], label: "SFX" },
|
|
99
|
+
{ category: "AUDIO", subcategory: "speech", formats: ["MP3"], label: "Speech" },
|
|
100
|
+
{ category: "AUDIO", subcategory: "generic", formats: ["MP3", "WAV", "OGG"], label: "Audio" },
|
|
101
|
+
{ category: "MODEL_3D", subcategory: "generic", formats: MODEL_3D_FORMATS, label: "3D Model" },
|
|
102
|
+
{ category: "MODEL_3D", subcategory: "avatar", formats: MODEL_3D_FORMATS, label: "Avatar" },
|
|
103
|
+
{ category: "MODEL_3D", subcategory: "humanoid", formats: MODEL_3D_FORMATS, label: "Humanoid" },
|
|
104
|
+
{ category: "MODEL_3D", subcategory: "creature", formats: MODEL_3D_FORMATS, label: "Creature" },
|
|
105
|
+
{ category: "MODEL_3D", subcategory: "block", formats: MODEL_3D_FORMATS, label: "Block" }
|
|
57
106
|
];
|
|
58
|
-
|
|
59
|
-
|
|
107
|
+
const ASSET_SUBCATEGORY_SLUG_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
108
|
+
const MODEL_3D_ASSET_SUBCATEGORY_VALUES = ["generic", "avatar", "humanoid", "creature", "block"];
|
|
60
109
|
const MODEL_3D_ASSET_SUBCATEGORY_SET = new Set(MODEL_3D_ASSET_SUBCATEGORY_VALUES);
|
|
61
|
-
|
|
62
|
-
|
|
110
|
+
function isModel3DAssetSubcategory(category, subcategory) {
|
|
111
|
+
return category === "MODEL_3D" && MODEL_3D_ASSET_SUBCATEGORY_SET.has(normalizeAssetSubcategory(subcategory));
|
|
63
112
|
}
|
|
64
|
-
|
|
65
|
-
|
|
113
|
+
function isBoxelAssetFormat(format) {
|
|
114
|
+
return format === "PLAYDROP_BOXEL_JSON";
|
|
66
115
|
}
|
|
67
|
-
|
|
68
|
-
|
|
116
|
+
function isVoxAssetFormat(format) {
|
|
117
|
+
return format === "VOX";
|
|
69
118
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
119
|
+
function getRequiredModel3DFileRoles(format) {
|
|
120
|
+
if (format === "PLAYDROP_BOXEL_JSON") {
|
|
121
|
+
return BOXEL_REQUIRED_FILE_ROLES;
|
|
122
|
+
}
|
|
123
|
+
if (format === "VOX") {
|
|
124
|
+
return VOX_REQUIRED_FILE_ROLES;
|
|
125
|
+
}
|
|
126
|
+
if (format === "GLB" || format === "GLTF") {
|
|
127
|
+
return GLTF_REQUIRED_FILE_ROLES;
|
|
128
|
+
}
|
|
129
|
+
return [];
|
|
81
130
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
131
|
+
function getBoxelManifestRole(format) {
|
|
132
|
+
if (format === "PLAYDROP_BOXEL_JSON") {
|
|
133
|
+
return "primary";
|
|
134
|
+
}
|
|
135
|
+
if (format === "VOX") {
|
|
136
|
+
return "boxel";
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
90
139
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
.map((definition) => definition.subcategory);
|
|
96
|
-
return acc;
|
|
140
|
+
const ASSET_SUBCATEGORY_DEFINITIONS_BY_KEY = Object.fromEntries(ASSET_SUBCATEGORY_DEFINITIONS.map((definition) => [`${definition.category}:${definition.subcategory}`, definition]));
|
|
141
|
+
const ASSET_SUBCATEGORIES_BY_CATEGORY = ASSET_CATEGORY_VALUES.reduce((acc, category) => {
|
|
142
|
+
acc[category] = ASSET_SUBCATEGORY_DEFINITIONS.filter((definition) => definition.category === category).map((definition) => definition.subcategory);
|
|
143
|
+
return acc;
|
|
97
144
|
}, {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
145
|
+
IMAGE: [],
|
|
146
|
+
VIDEO: [],
|
|
147
|
+
AUDIO: [],
|
|
148
|
+
SPRITESHEET: [],
|
|
149
|
+
MODEL_3D: [],
|
|
150
|
+
CUSTOM: []
|
|
104
151
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
152
|
+
const ASSET_LIST_SORT_VALUES = ["recent", "likes", "remixes", "comments"];
|
|
153
|
+
function isAssetCategory(value) {
|
|
154
|
+
return typeof value === "string" && ASSET_CATEGORY_VALUES.includes(value);
|
|
108
155
|
}
|
|
109
|
-
|
|
110
|
-
|
|
156
|
+
function isAssetFormat(value) {
|
|
157
|
+
return typeof value === "string" && ASSET_FORMAT_VALUES.includes(value);
|
|
111
158
|
}
|
|
112
|
-
|
|
113
|
-
|
|
159
|
+
function isAssetVisibility(value) {
|
|
160
|
+
return typeof value === "string" && ASSET_VISIBILITY_VALUES.includes(value);
|
|
114
161
|
}
|
|
115
|
-
|
|
116
|
-
|
|
162
|
+
function isAssetSourceKind(value) {
|
|
163
|
+
return typeof value === "string" && ASSET_SOURCE_KIND_VALUES.includes(value);
|
|
117
164
|
}
|
|
118
|
-
|
|
119
|
-
|
|
165
|
+
function isValidAssetSubcategorySlug(value) {
|
|
166
|
+
return typeof value === "string" && ASSET_SUBCATEGORY_SLUG_REGEX.test(value.trim());
|
|
120
167
|
}
|
|
121
|
-
|
|
122
|
-
|
|
168
|
+
function normalizeAssetSubcategory(value) {
|
|
169
|
+
return value.trim().toLowerCase();
|
|
123
170
|
}
|
|
124
|
-
|
|
125
|
-
|
|
171
|
+
function isKnownAssetSubcategory(category, subcategory) {
|
|
172
|
+
return ASSET_SUBCATEGORIES_BY_CATEGORY[category].includes(subcategory);
|
|
126
173
|
}
|
|
127
|
-
|
|
128
|
-
|
|
174
|
+
function getAssetSubcategoryDefinition(category, subcategory) {
|
|
175
|
+
return ASSET_SUBCATEGORY_DEFINITIONS_BY_KEY[`${category}:${subcategory}`] ?? null;
|
|
129
176
|
}
|
|
177
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
178
|
+
0 && (module.exports = {
|
|
179
|
+
ASSET_BROWSE_KIND_VALUES,
|
|
180
|
+
ASSET_CATEGORY_VALUES,
|
|
181
|
+
ASSET_FORMAT_VALUES,
|
|
182
|
+
ASSET_LIST_SORT_VALUES,
|
|
183
|
+
ASSET_SOURCE_KIND_VALUES,
|
|
184
|
+
ASSET_SUBCATEGORIES_BY_CATEGORY,
|
|
185
|
+
ASSET_SUBCATEGORY_DEFINITIONS,
|
|
186
|
+
ASSET_SUBCATEGORY_DEFINITIONS_BY_KEY,
|
|
187
|
+
ASSET_SUBCATEGORY_SLUG_REGEX,
|
|
188
|
+
ASSET_VISIBILITY_VALUES,
|
|
189
|
+
MODEL_3D_ASSET_SUBCATEGORY_VALUES,
|
|
190
|
+
PLAYDROP_SPEECH_MAX_WORDS,
|
|
191
|
+
PLAYDROP_SPEECH_VOICE_IDS,
|
|
192
|
+
countSpeechWords,
|
|
193
|
+
getAssetSubcategoryDefinition,
|
|
194
|
+
getBoxelManifestRole,
|
|
195
|
+
getRequiredModel3DFileRoles,
|
|
196
|
+
isAssetCategory,
|
|
197
|
+
isAssetFormat,
|
|
198
|
+
isAssetSourceKind,
|
|
199
|
+
isAssetVisibility,
|
|
200
|
+
isBoxelAssetFormat,
|
|
201
|
+
isKnownAssetSubcategory,
|
|
202
|
+
isModel3DAssetSubcategory,
|
|
203
|
+
isValidAssetSubcategorySlug,
|
|
204
|
+
isVoxAssetFormat,
|
|
205
|
+
normalizeAssetSubcategory,
|
|
206
|
+
normalizeSpeechText
|
|
207
|
+
});
|
|
@@ -1,18 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var content_license_exports = {};
|
|
19
|
+
__export(content_license_exports, {
|
|
20
|
+
CONTENT_LICENSE_VALUES: () => CONTENT_LICENSE_VALUES,
|
|
21
|
+
DEFAULT_CONTENT_LICENSE: () => DEFAULT_CONTENT_LICENSE,
|
|
22
|
+
isContentLicense: () => isContentLicense,
|
|
23
|
+
isOpenContentLicense: () => isOpenContentLicense,
|
|
24
|
+
parseContentLicense: () => parseContentLicense
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(content_license_exports);
|
|
27
|
+
const CONTENT_LICENSE_VALUES = ["CLOSED", "PLAYDROP", "MIT", "CC0"];
|
|
28
|
+
const DEFAULT_CONTENT_LICENSE = "PLAYDROP";
|
|
29
|
+
function isContentLicense(value) {
|
|
30
|
+
if (typeof value !== "string") {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return CONTENT_LICENSE_VALUES.includes(value.trim().toUpperCase());
|
|
8
34
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
35
|
+
function parseContentLicense(value) {
|
|
36
|
+
if (typeof value !== "string") {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const normalized = value.trim().toUpperCase();
|
|
40
|
+
return isContentLicense(normalized) ? normalized : null;
|
|
15
41
|
}
|
|
16
|
-
|
|
17
|
-
|
|
42
|
+
function isOpenContentLicense(value) {
|
|
43
|
+
return value === "MIT" || value === "CC0";
|
|
18
44
|
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
CONTENT_LICENSE_VALUES,
|
|
48
|
+
DEFAULT_CONTENT_LICENSE,
|
|
49
|
+
isContentLicense,
|
|
50
|
+
isOpenContentLicense,
|
|
51
|
+
parseContentLicense
|
|
52
|
+
});
|
|
@@ -1,37 +1,65 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var creator_public_image_exports = {};
|
|
19
|
+
__export(creator_public_image_exports, {
|
|
20
|
+
resolveCreatorPublicImageCandidate: () => resolveCreatorPublicImageCandidate,
|
|
21
|
+
resolveCreatorPublicImageUrl: () => resolveCreatorPublicImageUrl
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(creator_public_image_exports);
|
|
1
24
|
function normalizeUrl(value) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
25
|
+
if (typeof value !== "string") {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const trimmed = value.trim();
|
|
29
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
7
30
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
const xProfileImageUrl = normalizeUrl(profile.xProfileImageUrl);
|
|
13
|
-
if (xProfileImageUrl) {
|
|
14
|
-
return {
|
|
15
|
-
kind: "x-profile-image",
|
|
16
|
-
url: xProfileImageUrl,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const googleProfileImageUrl = normalizeUrl(profile.googleProfileImageUrl);
|
|
20
|
-
if (googleProfileImageUrl) {
|
|
21
|
-
return {
|
|
22
|
-
kind: "google-profile-image",
|
|
23
|
-
url: googleProfileImageUrl,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const profileAssetPreviewUrl = normalizeUrl(profile.profileAssetPreviewUrl);
|
|
27
|
-
if (profileAssetPreviewUrl) {
|
|
28
|
-
return {
|
|
29
|
-
kind: "profile-asset-preview",
|
|
30
|
-
url: profileAssetPreviewUrl,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
31
|
+
function resolveCreatorPublicImageCandidate(profile) {
|
|
32
|
+
if (!profile) {
|
|
33
33
|
return null;
|
|
34
|
+
}
|
|
35
|
+
const xProfileImageUrl = normalizeUrl(profile.xProfileImageUrl);
|
|
36
|
+
if (xProfileImageUrl) {
|
|
37
|
+
return {
|
|
38
|
+
kind: "x-profile-image",
|
|
39
|
+
url: xProfileImageUrl
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const googleProfileImageUrl = normalizeUrl(profile.googleProfileImageUrl);
|
|
43
|
+
if (googleProfileImageUrl) {
|
|
44
|
+
return {
|
|
45
|
+
kind: "google-profile-image",
|
|
46
|
+
url: googleProfileImageUrl
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const profileAssetPreviewUrl = normalizeUrl(profile.profileAssetPreviewUrl);
|
|
50
|
+
if (profileAssetPreviewUrl) {
|
|
51
|
+
return {
|
|
52
|
+
kind: "profile-asset-preview",
|
|
53
|
+
url: profileAssetPreviewUrl
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
34
57
|
}
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
function resolveCreatorPublicImageUrl(profile) {
|
|
59
|
+
return resolveCreatorPublicImageCandidate(profile)?.url ?? null;
|
|
37
60
|
}
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
resolveCreatorPublicImageCandidate,
|
|
64
|
+
resolveCreatorPublicImageUrl
|
|
65
|
+
});
|