@lionrapid/core 0.3.0-beta.0 → 0.3.1

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.
@@ -3495,7 +3495,7 @@ var _NetworkRepository = class _NetworkRepository {
3495
3495
  logger.debug("API base URL is not set");
3496
3496
  throw new NetworkError("API base URL is not set");
3497
3497
  }
3498
- const url = this.withDraftsParam(this.buildUrl("getTranslation", { key }));
3498
+ const url = this.buildUrl("getTranslation", { key });
3499
3499
  logger.debug(`API GET: ${url}`);
3500
3500
  try {
3501
3501
  const response = await this.makeRequest(url, "GET");
@@ -3531,7 +3531,7 @@ var _NetworkRepository = class _NetworkRepository {
3531
3531
  logger.debug("API base URL is not set");
3532
3532
  throw new NetworkError("API base URL is not set");
3533
3533
  }
3534
- const url = this.withDraftsParam(this.buildUrl("getTranslation", { key }));
3534
+ const url = this.buildUrl("getTranslation", { key });
3535
3535
  logger.debug(`API GET ContentUnit: ${url}`);
3536
3536
  try {
3537
3537
  const response = await this.makeRequest(url, "GET");
@@ -3572,7 +3572,7 @@ var _NetworkRepository = class _NetworkRepository {
3572
3572
  logger.debug("API base URL is not set");
3573
3573
  throw new NetworkError("API base URL is not set");
3574
3574
  }
3575
- const url = this.withDraftsParam(this.buildUrl("getNamespace", { locale, namespace }));
3575
+ const url = this.buildUrl("getNamespace", { locale, namespace });
3576
3576
  logger.debug(`API GET Namespace: ${url}`);
3577
3577
  const namespaceKey = `${locale}:${namespace}`;
3578
3578
  try {
@@ -3686,7 +3686,7 @@ var _NetworkRepository = class _NetworkRepository {
3686
3686
  logger.debug("API base URL is not set");
3687
3687
  throw new NetworkError("API base URL is not set");
3688
3688
  }
3689
- const url = this.withDraftsParam(this.buildUrl("getNamespace", { locale, namespace }));
3689
+ const url = this.buildUrl("getNamespace", { locale, namespace });
3690
3690
  logger.debug(`API GET Namespace ContentUnits: ${url}`);
3691
3691
  const namespaceKey = `${locale}:${namespace}`;
3692
3692
  try {
@@ -3898,26 +3898,6 @@ var _NetworkRepository = class _NetworkRepository {
3898
3898
  }
3899
3899
  return `${baseUrl}${path}`;
3900
3900
  }
3901
- /**
3902
- * Check whether the current page is running inside an active visual-editor
3903
- * session. The editor JS sets `__lr_editor_active=1` as a session cookie
3904
- * when its JWT is established; we read it here so client-side translation
3905
- * fetches request draft content too, matching what the edge proxy does
3906
- * server-side. Outside a browser (Node/SSR) this is always false.
3907
- */
3908
- isEditorPreviewSession() {
3909
- if (typeof document === "undefined") return false;
3910
- return document.cookie.split("; ").some((c) => c === "__lr_editor_active=1");
3911
- }
3912
- /**
3913
- * Append `include_drafts=true` to a built URL when an editor session is
3914
- * active. Leaves the URL unchanged for normal visitors so the delivery
3915
- * gate continues to apply in production.
3916
- */
3917
- withDraftsParam(url) {
3918
- if (!this.isEditorPreviewSession()) return url;
3919
- return url + (url.includes("?") ? "&" : "?") + "include_drafts=true";
3920
- }
3921
3901
  /**
3922
3902
  * Make HTTP request with timeout and headers
3923
3903
  */