@scalemule/nextjs 0.1.63 → 0.1.65

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/audio.js CHANGED
@@ -48,12 +48,14 @@ function normalizeWord(raw) {
48
48
  return raw.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, "");
49
49
  }
50
50
  var SKIPPED_TAGS = /* @__PURE__ */ new Set(["SCRIPT", "STYLE", "NOSCRIPT", "TEMPLATE"]);
51
+ var SKIPPED_CONTENT = "[data-entity-card], [data-sm-narration-skip], [data-sm-narration-layer]";
51
52
  function collectDomWords(root) {
52
53
  const doc = root.ownerDocument ?? root;
53
54
  const walker = doc.createTreeWalker(root, 4, {
54
55
  acceptNode(node) {
55
56
  const parent = node.parentElement;
56
57
  if (parent && SKIPPED_TAGS.has(parent.tagName)) return 2;
58
+ if (parent?.closest(SKIPPED_CONTENT)) return 2;
57
59
  return 1;
58
60
  }
59
61
  });
@@ -441,7 +443,7 @@ function PlayerSession({
441
443
  highlightAbort.current = controller;
442
444
  setHighlightBusy(true);
443
445
  try {
444
- const resp = await fetch(narration.timingsUrl, { signal: controller.signal });
446
+ const resp = await fetch(narration.timingsUrl, { signal: controller.signal, cache: "no-store" });
445
447
  if (!resp.ok) throw new Error(`timings ${resp.status}`);
446
448
  const timings = parseTimingsPayload(await resp.json());
447
449
  const target = document.getElementById(narration.targetId);
@@ -1810,7 +1812,7 @@ function useArticleNarration(track, narration) {
1810
1812
  const timeout = setTimeout(() => controller.abort(), 15e3);
1811
1813
  void (async () => {
1812
1814
  try {
1813
- const response = await fetch(narration.timingsUrl, { signal: controller.signal });
1815
+ const response = await fetch(narration.timingsUrl, { signal: controller.signal, cache: "no-store" });
1814
1816
  if (!response.ok) return;
1815
1817
  const timings = parseTimingsPayload(await response.json());
1816
1818
  const target = document.getElementById(narration.targetId);
package/dist/audio.mjs CHANGED
@@ -18,12 +18,14 @@ function normalizeWord(raw) {
18
18
  return raw.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, "");
19
19
  }
20
20
  var SKIPPED_TAGS = /* @__PURE__ */ new Set(["SCRIPT", "STYLE", "NOSCRIPT", "TEMPLATE"]);
21
+ var SKIPPED_CONTENT = "[data-entity-card], [data-sm-narration-skip], [data-sm-narration-layer]";
21
22
  function collectDomWords(root) {
22
23
  const doc = root.ownerDocument ?? root;
23
24
  const walker = doc.createTreeWalker(root, 4, {
24
25
  acceptNode(node) {
25
26
  const parent = node.parentElement;
26
27
  if (parent && SKIPPED_TAGS.has(parent.tagName)) return 2;
28
+ if (parent?.closest(SKIPPED_CONTENT)) return 2;
27
29
  return 1;
28
30
  }
29
31
  });
@@ -411,7 +413,7 @@ function PlayerSession({
411
413
  highlightAbort.current = controller;
412
414
  setHighlightBusy(true);
413
415
  try {
414
- const resp = await fetch(narration.timingsUrl, { signal: controller.signal });
416
+ const resp = await fetch(narration.timingsUrl, { signal: controller.signal, cache: "no-store" });
415
417
  if (!resp.ok) throw new Error(`timings ${resp.status}`);
416
418
  const timings = parseTimingsPayload(await resp.json());
417
419
  const target = document.getElementById(narration.targetId);
@@ -1789,7 +1791,7 @@ function useArticleNarration(track, narration) {
1789
1791
  const timeout = setTimeout(() => controller.abort(), 15e3);
1790
1792
  void (async () => {
1791
1793
  try {
1792
- const response = await fetch(narration.timingsUrl, { signal: controller.signal });
1794
+ const response = await fetch(narration.timingsUrl, { signal: controller.signal, cache: "no-store" });
1793
1795
  if (!response.ok) return;
1794
1796
  const timings = parseTimingsPayload(await response.json());
1795
1797
  const target = document.getElementById(narration.targetId);
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ac as StorageAdapter, A as ApiError } from './index-CEi5Nd4L.mjs';
1
+ import { ac as StorageAdapter, A as ApiError } from './index-Sm43YPgb.mjs';
2
2
 
3
3
  /**
4
4
  * ScaleMule API Client
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ac as StorageAdapter, A as ApiError } from './index-CEi5Nd4L.js';
1
+ import { ac as StorageAdapter, A as ApiError } from './index-Sm43YPgb.js';
2
2
 
3
3
  /**
4
4
  * ScaleMule API Client
@@ -178,6 +178,12 @@ interface RegisterRequest {
178
178
  website?: string;
179
179
  company?: string;
180
180
  hp_field?: string;
181
+ /**
182
+ * Token from an account invitation link. When ScaleMule challenges a sign-up
183
+ * (for example a first-time browser), a pending invitation addressed to this
184
+ * email lets the registration through. It does not accept the invitation.
185
+ */
186
+ invitation_token?: string;
181
187
  }
182
188
  interface LoginRequest {
183
189
  challenge_token?: string;
@@ -178,6 +178,12 @@ interface RegisterRequest {
178
178
  website?: string;
179
179
  company?: string;
180
180
  hp_field?: string;
181
+ /**
182
+ * Token from an account invitation link. When ScaleMule challenges a sign-up
183
+ * (for example a first-time browser), a pending invitation addressed to this
184
+ * email lets the registration through. It does not accept the invitation.
185
+ */
186
+ invitation_token?: string;
181
187
  }
182
188
  interface LoginRequest {
183
189
  challenge_token?: string;
package/dist/index.d.mts CHANGED
@@ -6,8 +6,8 @@ import { MoneyClient } from '@scalemule/money';
6
6
  export { MoneyClient, MoneyClientConfig, createMoneyClient } from '@scalemule/money';
7
7
  import { ScaleMuleClient } from './client.mjs';
8
8
  export { ClientConfig, RequestOptions, createClient } from './client.mjs';
9
- import { S as ScaleMuleConfig, U as User, L as LoginResponse, A as ApiError$1, a as UseAuthReturn, b as UseBillingReturn, c as ListFilesParams, d as UseContentReturn, e as UseUserReturn, f as UseAnalyticsOptions, g as UseAnalyticsReturn } from './index-CEi5Nd4L.mjs';
10
- export { h as AccountBalance, i as AnalyticsEvent, j as ApiResponse, k as AuthLoginResponse, B as BatchTrackRequest, l as BillingPayment, m as BillingPayout, n as BillingRefund, o as BillingTransaction, C as ChangeEmailRequest, p as ChangePasswordRequest, q as ClientContext, r as ConnectedAccount, s as CookieLoginResponse, t as CookieOAuthCallbackResponse, D as DeviceFingerprint, u as DeviceInfo, E as EnhancedAnalyticsEvent, F as ForgotPasswordRequest, K as KnownAccountInfo, v as LinkedAccount, w as ListFilesResponse, x as LoginDeviceInfo, y as LoginRequest, z as LoginResponseWithMFA, G as LoginRiskInfo, M as MFAChallengeResponse, H as MFAMethod, I as MFASMSSetupResponse, J as MFASetupRequest, N as MFAStatus, O as MFATOTPSetupResponse, P as MFAVerifyRequest, Q as OAuthCallbackRequest, R as OAuthCallbackResponse, T as OAuthConfig, V as OAuthProvider, W as OAuthStartResponse, X as PageViewData, Y as PayoutSchedule, Z as PhoneLoginRequest, _ as PhoneSendCodeRequest, $ as PhoneVerifyRequest, a0 as Profile, a1 as ProxyBearerLoginResponse, a2 as RefreshResponse, a3 as RegisterRequest, a4 as ResetPasswordRequest, a5 as ScaleMuleApiError, a6 as ScaleMuleEnvironment, a7 as Session, a8 as SignedUploadCompleteRequest, a9 as SignedUploadRequest, aa as SignedUploadResponse, ab as SignedUploadUrl, ac as StorageAdapter, ad as StorageFile, ae as TrackEventResponse, af as TransactionSummary, ag as UTMParams, ah as UpdateProfileRequest, ai as UploadOptions, aj as UploadResponse, ak as VerifyEmailRequest } from './index-CEi5Nd4L.mjs';
9
+ import { S as ScaleMuleConfig, U as User, L as LoginResponse, A as ApiError$1, a as UseAuthReturn, b as UseBillingReturn, c as ListFilesParams, d as UseContentReturn, e as UseUserReturn, f as UseAnalyticsOptions, g as UseAnalyticsReturn } from './index-Sm43YPgb.mjs';
10
+ export { h as AccountBalance, i as AnalyticsEvent, j as ApiResponse, k as AuthLoginResponse, B as BatchTrackRequest, l as BillingPayment, m as BillingPayout, n as BillingRefund, o as BillingTransaction, C as ChangeEmailRequest, p as ChangePasswordRequest, q as ClientContext, r as ConnectedAccount, s as CookieLoginResponse, t as CookieOAuthCallbackResponse, D as DeviceFingerprint, u as DeviceInfo, E as EnhancedAnalyticsEvent, F as ForgotPasswordRequest, K as KnownAccountInfo, v as LinkedAccount, w as ListFilesResponse, x as LoginDeviceInfo, y as LoginRequest, z as LoginResponseWithMFA, G as LoginRiskInfo, M as MFAChallengeResponse, H as MFAMethod, I as MFASMSSetupResponse, J as MFASetupRequest, N as MFAStatus, O as MFATOTPSetupResponse, P as MFAVerifyRequest, Q as OAuthCallbackRequest, R as OAuthCallbackResponse, T as OAuthConfig, V as OAuthProvider, W as OAuthStartResponse, X as PageViewData, Y as PayoutSchedule, Z as PhoneLoginRequest, _ as PhoneSendCodeRequest, $ as PhoneVerifyRequest, a0 as Profile, a1 as ProxyBearerLoginResponse, a2 as RefreshResponse, a3 as RegisterRequest, a4 as ResetPasswordRequest, a5 as ScaleMuleApiError, a6 as ScaleMuleEnvironment, a7 as Session, a8 as SignedUploadCompleteRequest, a9 as SignedUploadRequest, aa as SignedUploadResponse, ab as SignedUploadUrl, ac as StorageAdapter, ad as StorageFile, ae as TrackEventResponse, af as TransactionSummary, ag as UTMParams, ah as UpdateProfileRequest, ai as UploadOptions, aj as UploadResponse, ak as VerifyEmailRequest } from './index-Sm43YPgb.mjs';
11
11
 
12
12
  /**
13
13
  * Tri-state file visibility — `'private' | 'app_public' | 'anonymous_visible'`.
package/dist/index.d.ts CHANGED
@@ -6,8 +6,8 @@ import { MoneyClient } from '@scalemule/money';
6
6
  export { MoneyClient, MoneyClientConfig, createMoneyClient } from '@scalemule/money';
7
7
  import { ScaleMuleClient } from './client.js';
8
8
  export { ClientConfig, RequestOptions, createClient } from './client.js';
9
- import { S as ScaleMuleConfig, U as User, L as LoginResponse, A as ApiError$1, a as UseAuthReturn, b as UseBillingReturn, c as ListFilesParams, d as UseContentReturn, e as UseUserReturn, f as UseAnalyticsOptions, g as UseAnalyticsReturn } from './index-CEi5Nd4L.js';
10
- export { h as AccountBalance, i as AnalyticsEvent, j as ApiResponse, k as AuthLoginResponse, B as BatchTrackRequest, l as BillingPayment, m as BillingPayout, n as BillingRefund, o as BillingTransaction, C as ChangeEmailRequest, p as ChangePasswordRequest, q as ClientContext, r as ConnectedAccount, s as CookieLoginResponse, t as CookieOAuthCallbackResponse, D as DeviceFingerprint, u as DeviceInfo, E as EnhancedAnalyticsEvent, F as ForgotPasswordRequest, K as KnownAccountInfo, v as LinkedAccount, w as ListFilesResponse, x as LoginDeviceInfo, y as LoginRequest, z as LoginResponseWithMFA, G as LoginRiskInfo, M as MFAChallengeResponse, H as MFAMethod, I as MFASMSSetupResponse, J as MFASetupRequest, N as MFAStatus, O as MFATOTPSetupResponse, P as MFAVerifyRequest, Q as OAuthCallbackRequest, R as OAuthCallbackResponse, T as OAuthConfig, V as OAuthProvider, W as OAuthStartResponse, X as PageViewData, Y as PayoutSchedule, Z as PhoneLoginRequest, _ as PhoneSendCodeRequest, $ as PhoneVerifyRequest, a0 as Profile, a1 as ProxyBearerLoginResponse, a2 as RefreshResponse, a3 as RegisterRequest, a4 as ResetPasswordRequest, a5 as ScaleMuleApiError, a6 as ScaleMuleEnvironment, a7 as Session, a8 as SignedUploadCompleteRequest, a9 as SignedUploadRequest, aa as SignedUploadResponse, ab as SignedUploadUrl, ac as StorageAdapter, ad as StorageFile, ae as TrackEventResponse, af as TransactionSummary, ag as UTMParams, ah as UpdateProfileRequest, ai as UploadOptions, aj as UploadResponse, ak as VerifyEmailRequest } from './index-CEi5Nd4L.js';
9
+ import { S as ScaleMuleConfig, U as User, L as LoginResponse, A as ApiError$1, a as UseAuthReturn, b as UseBillingReturn, c as ListFilesParams, d as UseContentReturn, e as UseUserReturn, f as UseAnalyticsOptions, g as UseAnalyticsReturn } from './index-Sm43YPgb.js';
10
+ export { h as AccountBalance, i as AnalyticsEvent, j as ApiResponse, k as AuthLoginResponse, B as BatchTrackRequest, l as BillingPayment, m as BillingPayout, n as BillingRefund, o as BillingTransaction, C as ChangeEmailRequest, p as ChangePasswordRequest, q as ClientContext, r as ConnectedAccount, s as CookieLoginResponse, t as CookieOAuthCallbackResponse, D as DeviceFingerprint, u as DeviceInfo, E as EnhancedAnalyticsEvent, F as ForgotPasswordRequest, K as KnownAccountInfo, v as LinkedAccount, w as ListFilesResponse, x as LoginDeviceInfo, y as LoginRequest, z as LoginResponseWithMFA, G as LoginRiskInfo, M as MFAChallengeResponse, H as MFAMethod, I as MFASMSSetupResponse, J as MFASetupRequest, N as MFAStatus, O as MFATOTPSetupResponse, P as MFAVerifyRequest, Q as OAuthCallbackRequest, R as OAuthCallbackResponse, T as OAuthConfig, V as OAuthProvider, W as OAuthStartResponse, X as PageViewData, Y as PayoutSchedule, Z as PhoneLoginRequest, _ as PhoneSendCodeRequest, $ as PhoneVerifyRequest, a0 as Profile, a1 as ProxyBearerLoginResponse, a2 as RefreshResponse, a3 as RegisterRequest, a4 as ResetPasswordRequest, a5 as ScaleMuleApiError, a6 as ScaleMuleEnvironment, a7 as Session, a8 as SignedUploadCompleteRequest, a9 as SignedUploadRequest, aa as SignedUploadResponse, ab as SignedUploadUrl, ac as StorageAdapter, ad as StorageFile, ae as TrackEventResponse, af as TransactionSummary, ag as UTMParams, ah as UpdateProfileRequest, ai as UploadOptions, aj as UploadResponse, ak as VerifyEmailRequest } from './index-Sm43YPgb.js';
11
11
 
12
12
  /**
13
13
  * Tri-state file visibility — `'private' | 'app_public' | 'anonymous_visible'`.
@@ -1440,7 +1440,7 @@ function createAuthRoutes(config = {}) {
1440
1440
  switch (path) {
1441
1441
  // ==================== Register ====================
1442
1442
  case "register": {
1443
- const { email, password, full_name, username, phone, publication_code, website, company, hp_field } = body;
1443
+ const { email, password, full_name, username, phone, publication_code, website, company, hp_field, invitation_token } = body;
1444
1444
  if (!email || !password) {
1445
1445
  return errorResponse("VALIDATION_ERROR", "Email and password required", 400);
1446
1446
  }
@@ -1460,7 +1460,18 @@ function createAuthRoutes(config = {}) {
1460
1460
  }
1461
1461
  let registeredUser;
1462
1462
  try {
1463
- registeredUser = await sm.auth.register({ email, password, full_name, username, phone }, { clientContext });
1463
+ registeredUser = await sm.auth.register(
1464
+ {
1465
+ email,
1466
+ password,
1467
+ full_name,
1468
+ username,
1469
+ phone,
1470
+ // Lets an invited person through a first-visit trust challenge.
1471
+ ...typeof invitation_token === "string" && invitation_token ? { invitation_token } : {}
1472
+ },
1473
+ { clientContext }
1474
+ );
1464
1475
  } catch (err) {
1465
1476
  const apiErr = err instanceof ScaleMuleApiError ? err : null;
1466
1477
  return errorResponse(
@@ -1438,7 +1438,7 @@ function createAuthRoutes(config = {}) {
1438
1438
  switch (path) {
1439
1439
  // ==================== Register ====================
1440
1440
  case "register": {
1441
- const { email, password, full_name, username, phone, publication_code, website, company, hp_field } = body;
1441
+ const { email, password, full_name, username, phone, publication_code, website, company, hp_field, invitation_token } = body;
1442
1442
  if (!email || !password) {
1443
1443
  return errorResponse("VALIDATION_ERROR", "Email and password required", 400);
1444
1444
  }
@@ -1458,7 +1458,18 @@ function createAuthRoutes(config = {}) {
1458
1458
  }
1459
1459
  let registeredUser;
1460
1460
  try {
1461
- registeredUser = await sm.auth.register({ email, password, full_name, username, phone }, { clientContext });
1461
+ registeredUser = await sm.auth.register(
1462
+ {
1463
+ email,
1464
+ password,
1465
+ full_name,
1466
+ username,
1467
+ phone,
1468
+ // Lets an invited person through a first-visit trust challenge.
1469
+ ...typeof invitation_token === "string" && invitation_token ? { invitation_token } : {}
1470
+ },
1471
+ { clientContext }
1472
+ );
1462
1473
  } catch (err) {
1463
1474
  const apiErr = err instanceof ScaleMuleApiError ? err : null;
1464
1475
  return errorResponse(
@@ -1,6 +1,6 @@
1
- import { S as ServerConfig } from '../webhook-handler-CJm0sIZG.mjs';
2
- export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-CJm0sIZG.mjs';
3
- import { q as ClientContext, A as ApiError } from '../index-CEi5Nd4L.mjs';
1
+ import { S as ServerConfig } from '../webhook-handler-363gMdVs.mjs';
2
+ export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-363gMdVs.mjs';
3
+ import { q as ClientContext, A as ApiError } from '../index-Sm43YPgb.mjs';
4
4
  export { L as LedveryRoutesConfig, a as LedverySessionData, S as SM_LEDVERY_ACCESS_TOKEN_COOKIE, b as SM_LEDVERY_ID_TOKEN_COOKIE, c as SM_LEDVERY_NONCE_COOKIE, d as SM_LEDVERY_PKCE_VERIFIER_COOKIE, e as SM_LEDVERY_STATE_COOKIE, f as createLedveryRoutes, g as getLedverySession } from '../ledvery-CxPzZpxP.mjs';
5
5
  import { NextRequest, NextResponse } from 'next/server';
6
6
  import '@scalemule/sdk';
@@ -1,6 +1,6 @@
1
- import { S as ServerConfig } from '../webhook-handler-CnQe9hm5.js';
2
- export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-CnQe9hm5.js';
3
- import { q as ClientContext, A as ApiError } from '../index-CEi5Nd4L.js';
1
+ import { S as ServerConfig } from '../webhook-handler-Cglm2AVC.js';
2
+ export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-Cglm2AVC.js';
3
+ import { q as ClientContext, A as ApiError } from '../index-Sm43YPgb.js';
4
4
  export { L as LedveryRoutesConfig, a as LedverySessionData, S as SM_LEDVERY_ACCESS_TOKEN_COOKIE, b as SM_LEDVERY_ID_TOKEN_COOKIE, c as SM_LEDVERY_NONCE_COOKIE, d as SM_LEDVERY_PKCE_VERIFIER_COOKIE, e as SM_LEDVERY_STATE_COOKIE, f as createLedveryRoutes, g as getLedverySession } from '../ledvery-CxPzZpxP.js';
5
5
  import { NextRequest, NextResponse } from 'next/server';
6
6
  import '@scalemule/sdk';
@@ -1611,7 +1611,7 @@ function createAuthRoutes(config = {}) {
1611
1611
  switch (path) {
1612
1612
  // ==================== Register ====================
1613
1613
  case "register": {
1614
- const { email, password, full_name, username, phone, publication_code, website, company, hp_field } = body;
1614
+ const { email, password, full_name, username, phone, publication_code, website, company, hp_field, invitation_token } = body;
1615
1615
  if (!email || !password) {
1616
1616
  return errorResponse("VALIDATION_ERROR", "Email and password required", 400);
1617
1617
  }
@@ -1631,7 +1631,18 @@ function createAuthRoutes(config = {}) {
1631
1631
  }
1632
1632
  let registeredUser;
1633
1633
  try {
1634
- registeredUser = await sm.auth.register({ email, password, full_name, username, phone }, { clientContext });
1634
+ registeredUser = await sm.auth.register(
1635
+ {
1636
+ email,
1637
+ password,
1638
+ full_name,
1639
+ username,
1640
+ phone,
1641
+ // Lets an invited person through a first-visit trust challenge.
1642
+ ...typeof invitation_token === "string" && invitation_token ? { invitation_token } : {}
1643
+ },
1644
+ { clientContext }
1645
+ );
1635
1646
  } catch (err) {
1636
1647
  const apiErr = err instanceof ScaleMuleApiError ? err : null;
1637
1648
  return errorResponse(
@@ -1609,7 +1609,7 @@ function createAuthRoutes(config = {}) {
1609
1609
  switch (path) {
1610
1610
  // ==================== Register ====================
1611
1611
  case "register": {
1612
- const { email, password, full_name, username, phone, publication_code, website, company, hp_field } = body;
1612
+ const { email, password, full_name, username, phone, publication_code, website, company, hp_field, invitation_token } = body;
1613
1613
  if (!email || !password) {
1614
1614
  return errorResponse("VALIDATION_ERROR", "Email and password required", 400);
1615
1615
  }
@@ -1629,7 +1629,18 @@ function createAuthRoutes(config = {}) {
1629
1629
  }
1630
1630
  let registeredUser;
1631
1631
  try {
1632
- registeredUser = await sm.auth.register({ email, password, full_name, username, phone }, { clientContext });
1632
+ registeredUser = await sm.auth.register(
1633
+ {
1634
+ email,
1635
+ password,
1636
+ full_name,
1637
+ username,
1638
+ phone,
1639
+ // Lets an invited person through a first-visit trust challenge.
1640
+ ...typeof invitation_token === "string" && invitation_token ? { invitation_token } : {}
1641
+ },
1642
+ { clientContext }
1643
+ );
1633
1644
  } catch (err) {
1634
1645
  const apiErr = err instanceof ScaleMuleApiError ? err : null;
1635
1646
  return errorResponse(
@@ -1,4 +1,4 @@
1
- export { g as createWebhookHandler } from '../webhook-handler-CJm0sIZG.mjs';
1
+ export { g as createWebhookHandler } from '../webhook-handler-363gMdVs.mjs';
2
2
  import '@scalemule/sdk';
3
3
  import '@scalemule/money';
4
- import '../index-CEi5Nd4L.mjs';
4
+ import '../index-Sm43YPgb.mjs';
@@ -1,4 +1,4 @@
1
- export { g as createWebhookHandler } from '../webhook-handler-CnQe9hm5.js';
1
+ export { g as createWebhookHandler } from '../webhook-handler-Cglm2AVC.js';
2
2
  import '@scalemule/sdk';
3
3
  import '@scalemule/money';
4
- import '../index-CEi5Nd4L.js';
4
+ import '../index-Sm43YPgb.js';
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { U as User, A as ApiError, ad as StorageFile } from './index-CEi5Nd4L.mjs';
3
+ import { U as User, A as ApiError, ad as StorageFile } from './index-Sm43YPgb.mjs';
4
4
 
5
5
  interface MockUserOptions {
6
6
  id?: string;
package/dist/testing.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { U as User, A as ApiError, ad as StorageFile } from './index-CEi5Nd4L.js';
3
+ import { U as User, A as ApiError, ad as StorageFile } from './index-Sm43YPgb.js';
4
4
 
5
5
  interface MockUserOptions {
6
6
  id?: string;
@@ -1,6 +1,6 @@
1
1
  import { ExperimentAssignment } from '@scalemule/sdk';
2
2
  import { MoneyClient } from '@scalemule/money';
3
- import { A as ApiError, a3 as RegisterRequest, q as ClientContext, U as User, L as LoginResponse, y as LoginRequest, c as ListFilesParams, w as ListFilesResponse, ad as StorageFile, aj as UploadResponse } from './index-CEi5Nd4L.mjs';
3
+ import { A as ApiError, a3 as RegisterRequest, q as ClientContext, U as User, L as LoginResponse, y as LoginRequest, c as ListFilesParams, w as ListFilesResponse, ad as StorageFile, aj as UploadResponse } from './index-Sm43YPgb.mjs';
4
4
 
5
5
  /**
6
6
  * Server-Side ScaleMule Client
@@ -1,6 +1,6 @@
1
1
  import { ExperimentAssignment } from '@scalemule/sdk';
2
2
  import { MoneyClient } from '@scalemule/money';
3
- import { A as ApiError, a3 as RegisterRequest, q as ClientContext, U as User, L as LoginResponse, y as LoginRequest, c as ListFilesParams, w as ListFilesResponse, ad as StorageFile, aj as UploadResponse } from './index-CEi5Nd4L.js';
3
+ import { A as ApiError, a3 as RegisterRequest, q as ClientContext, U as User, L as LoginResponse, y as LoginRequest, c as ListFilesParams, w as ListFilesResponse, ad as StorageFile, aj as UploadResponse } from './index-Sm43YPgb.js';
4
4
 
5
5
  /**
6
6
  * Server-Side ScaleMule Client
@@ -100,6 +100,12 @@ import { ArticleAudioControls } from '@scalemule/nextjs/audio'
100
100
  ```
101
101
 
102
102
  Keep the existing article body with `id="article-narration-body"`. Mounting an
103
+ inline Event/Place card does not add its text to narration: the highlighter skips
104
+ `data-entity-card` elements. Mark any other non-spoken block with
105
+ `data-sm-narration-skip`. Timings are fetched without browser cache because an
106
+ article URL can acquire a newer recording after an editorial correction.
107
+
108
+ Mounting an
103
109
  article never selects or starts its audio. Listen selects it; Add to queue
104
110
  appends without interrupting playback. Identity is `(publicationId, id)` so IDs
105
111
  in different publications do not collide. The queue deduplicates entries and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/nextjs",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "ScaleMule SDK for Next.js applications - authentication, storage, and user management",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",