@asiyst/sdk 0.1.29 → 0.1.31

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/index.d.cts CHANGED
@@ -218,6 +218,7 @@ interface AvatarAnimation {
218
218
  loopMode?: string;
219
219
  durationMs?: number;
220
220
  assetUrl?: string | null;
221
+ integrity?: string;
221
222
  }
222
223
  interface AvatarBranding {
223
224
  siteLogoUrl?: string | null;
@@ -229,6 +230,8 @@ interface ProjectConfig {
229
230
  avatar: string;
230
231
  avatarId?: string;
231
232
  assetUrl?: string;
233
+ modelFormat?: "fbx" | "glb";
234
+ assetIntegrity?: string;
232
235
  thumbnailUrl?: string | null;
233
236
  publishedVersion?: string;
234
237
  animations?: AvatarAnimation[];
@@ -248,6 +251,7 @@ interface ProjectConfig {
248
251
  rules: AvatarRuntimeRule[];
249
252
  dataSources: AvatarDataSource[];
250
253
  elementSelectors: Record<string, string>;
254
+ maxMessageChars?: number;
251
255
  }
252
256
  interface Rect {
253
257
  x: number;
@@ -465,6 +469,7 @@ interface ParsedGlbMesh {
465
469
  interface LoadedGlbAsset {
466
470
  format: "glb";
467
471
  url: string;
472
+ buffer: ArrayBuffer;
468
473
  json: Record<string, unknown>;
469
474
  bin: Uint8Array;
470
475
  meshes: ParsedGlbMesh[];
@@ -496,13 +501,15 @@ interface LoadedFbxAsset {
496
501
  }
497
502
  type LoadedAvatarAsset = LoadedFbxAsset | LoadedGlbAsset | LoadedImageAsset | LoadedManifestAsset;
498
503
  declare class AssetLoader {
499
- private inFlightController;
504
+ private readonly inFlightControllers;
500
505
  private readonly createdObjectUrls;
501
506
  private readonly inFlightLoads;
502
507
  private readonly cachedAssets;
503
508
  load(assetUrl: string, options?: {
504
509
  signal?: AbortSignal;
505
510
  timeoutMs?: number;
511
+ integrity?: string;
512
+ expectedFormat?: "fbx" | "glb";
506
513
  }): Promise<LoadedAvatarAsset>;
507
514
  private performLoad;
508
515
  isFbxBuffer(buffer: ArrayBuffer): boolean;
@@ -625,6 +632,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
625
632
  loadAsset(config: ProjectConfig, metricsTracker?: AvatarMetricsTracker): Promise<boolean>;
626
633
  renderLoader(): void;
627
634
  private renderLoadedAsset;
635
+ private renderLoadingPlaceholder;
628
636
  private renderFallback;
629
637
  setPosition(x: number, y: number, animate: boolean): void;
630
638
  setFacing(direction: "left" | "right"): void;
package/dist/index.d.ts CHANGED
@@ -218,6 +218,7 @@ interface AvatarAnimation {
218
218
  loopMode?: string;
219
219
  durationMs?: number;
220
220
  assetUrl?: string | null;
221
+ integrity?: string;
221
222
  }
222
223
  interface AvatarBranding {
223
224
  siteLogoUrl?: string | null;
@@ -229,6 +230,8 @@ interface ProjectConfig {
229
230
  avatar: string;
230
231
  avatarId?: string;
231
232
  assetUrl?: string;
233
+ modelFormat?: "fbx" | "glb";
234
+ assetIntegrity?: string;
232
235
  thumbnailUrl?: string | null;
233
236
  publishedVersion?: string;
234
237
  animations?: AvatarAnimation[];
@@ -248,6 +251,7 @@ interface ProjectConfig {
248
251
  rules: AvatarRuntimeRule[];
249
252
  dataSources: AvatarDataSource[];
250
253
  elementSelectors: Record<string, string>;
254
+ maxMessageChars?: number;
251
255
  }
252
256
  interface Rect {
253
257
  x: number;
@@ -465,6 +469,7 @@ interface ParsedGlbMesh {
465
469
  interface LoadedGlbAsset {
466
470
  format: "glb";
467
471
  url: string;
472
+ buffer: ArrayBuffer;
468
473
  json: Record<string, unknown>;
469
474
  bin: Uint8Array;
470
475
  meshes: ParsedGlbMesh[];
@@ -496,13 +501,15 @@ interface LoadedFbxAsset {
496
501
  }
497
502
  type LoadedAvatarAsset = LoadedFbxAsset | LoadedGlbAsset | LoadedImageAsset | LoadedManifestAsset;
498
503
  declare class AssetLoader {
499
- private inFlightController;
504
+ private readonly inFlightControllers;
500
505
  private readonly createdObjectUrls;
501
506
  private readonly inFlightLoads;
502
507
  private readonly cachedAssets;
503
508
  load(assetUrl: string, options?: {
504
509
  signal?: AbortSignal;
505
510
  timeoutMs?: number;
511
+ integrity?: string;
512
+ expectedFormat?: "fbx" | "glb";
506
513
  }): Promise<LoadedAvatarAsset>;
507
514
  private performLoad;
508
515
  isFbxBuffer(buffer: ArrayBuffer): boolean;
@@ -625,6 +632,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
625
632
  loadAsset(config: ProjectConfig, metricsTracker?: AvatarMetricsTracker): Promise<boolean>;
626
633
  renderLoader(): void;
627
634
  private renderLoadedAsset;
635
+ private renderLoadingPlaceholder;
628
636
  private renderFallback;
629
637
  setPosition(x: number, y: number, animate: boolean): void;
630
638
  setFacing(direction: "left" | "right"): void;