@playdrop/playdrop-cli 0.7.15 → 0.7.17

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