@croct/plug 0.17.3 → 0.18.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.
package/constants.cjs CHANGED
@@ -28,7 +28,7 @@ const CDN_URL = "https://cdn.croct.io/js/v1/lib/plug.js";
28
28
  const PLAYGROUND_ORIGIN = "https://play.croct.com";
29
29
  const PLAYGROUND_CONNECT_URL = "https://play.croct.com/connect.html";
30
30
  const PREVIEW_WIDGET_ORIGIN = "https://cdn.croct.io";
31
- const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.17.3.html";
31
+ const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.18.1.html";
32
32
  // Annotate the CommonJS export names for ESM import in node:
33
33
  0 && (module.exports = {
34
34
  CDN_URL,
package/constants.d.cts CHANGED
@@ -2,6 +2,6 @@ declare const CDN_URL = "https://cdn.croct.io/js/v1/lib/plug.js";
2
2
  declare const PLAYGROUND_ORIGIN = "https://play.croct.com";
3
3
  declare const PLAYGROUND_CONNECT_URL = "https://play.croct.com/connect.html";
4
4
  declare const PREVIEW_WIDGET_ORIGIN = "https://cdn.croct.io";
5
- declare const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.17.3.html";
5
+ declare const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.18.1.html";
6
6
 
7
7
  export { CDN_URL, PLAYGROUND_CONNECT_URL, PLAYGROUND_ORIGIN, PREVIEW_WIDGET_ORIGIN, PREVIEW_WIDGET_URL };
package/constants.d.ts CHANGED
@@ -2,6 +2,6 @@ declare const CDN_URL = "https://cdn.croct.io/js/v1/lib/plug.js";
2
2
  declare const PLAYGROUND_ORIGIN = "https://play.croct.com";
3
3
  declare const PLAYGROUND_CONNECT_URL = "https://play.croct.com/connect.html";
4
4
  declare const PREVIEW_WIDGET_ORIGIN = "https://cdn.croct.io";
5
- declare const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.17.3.html";
5
+ declare const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.18.1.html";
6
6
 
7
7
  export { CDN_URL, PLAYGROUND_CONNECT_URL, PLAYGROUND_ORIGIN, PREVIEW_WIDGET_ORIGIN, PREVIEW_WIDGET_URL };
package/constants.js CHANGED
@@ -2,7 +2,7 @@ const CDN_URL = "https://cdn.croct.io/js/v1/lib/plug.js";
2
2
  const PLAYGROUND_ORIGIN = "https://play.croct.com";
3
3
  const PLAYGROUND_CONNECT_URL = "https://play.croct.com/connect.html";
4
4
  const PREVIEW_WIDGET_ORIGIN = "https://cdn.croct.io";
5
- const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.17.3.html";
5
+ const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.18.1.html";
6
6
  export {
7
7
  CDN_URL,
8
8
  PLAYGROUND_CONNECT_URL,
package/index.cjs CHANGED
@@ -21,4 +21,4 @@ __export(index_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(index_exports);
23
23
  var import_plug = require('./plug.cjs');
24
- var index_default = new import_plug.GlobalPlug();
24
+ var index_default = import_plug.GlobalPlug.GLOBAL;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GlobalPlug } from "./plug.js";
2
- var index_default = new GlobalPlug();
2
+ var index_default = GlobalPlug.GLOBAL;
3
3
  export {
4
4
  index_default as default
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croct/plug",
3
- "version": "0.17.3",
3
+ "version": "0.18.1",
4
4
  "description": "A fully-featured devkit for building natively personalized applications.",
5
5
  "license": "MIT",
6
6
  "author": {
package/plug.cjs CHANGED
@@ -37,7 +37,7 @@ function detectAppId() {
37
37
  }
38
38
  return new URL(script.src).searchParams.get("appId");
39
39
  }
40
- class GlobalPlug {
40
+ const _GlobalPlug = class _GlobalPlug {
41
41
  constructor() {
42
42
  this.pluginFactories = {
43
43
  playground: import_playground.factory,
@@ -272,7 +272,9 @@ class GlobalPlug {
272
272
  logger.info("\u{1F50C} Croct has been unplugged.");
273
273
  }
274
274
  }
275
- }
275
+ };
276
+ _GlobalPlug.GLOBAL = new _GlobalPlug();
277
+ let GlobalPlug = _GlobalPlug;
276
278
  // Annotate the CommonJS export names for ESM import in node:
277
279
  0 && (module.exports = {
278
280
  GlobalPlug
package/plug.d.cts CHANGED
@@ -53,6 +53,7 @@ interface Plug {
53
53
  unplug(): Promise<void>;
54
54
  }
55
55
  declare class GlobalPlug implements Plug {
56
+ static readonly GLOBAL: GlobalPlug;
56
57
  private pluginFactories;
57
58
  private instance?;
58
59
  private plugins;
package/plug.d.ts CHANGED
@@ -53,6 +53,7 @@ interface Plug {
53
53
  unplug(): Promise<void>;
54
54
  }
55
55
  declare class GlobalPlug implements Plug {
56
+ static readonly GLOBAL: GlobalPlug;
56
57
  private pluginFactories;
57
58
  private instance?;
58
59
  private plugins;
package/plug.js CHANGED
@@ -15,7 +15,7 @@ function detectAppId() {
15
15
  }
16
16
  return new URL(script.src).searchParams.get("appId");
17
17
  }
18
- class GlobalPlug {
18
+ const _GlobalPlug = class _GlobalPlug {
19
19
  constructor() {
20
20
  this.pluginFactories = {
21
21
  playground: playgroundPluginFactory,
@@ -250,7 +250,9 @@ class GlobalPlug {
250
250
  logger.info("\u{1F50C} Croct has been unplugged.");
251
251
  }
252
252
  }
253
- }
253
+ };
254
+ _GlobalPlug.GLOBAL = new _GlobalPlug();
255
+ let GlobalPlug = _GlobalPlug;
254
256
  export {
255
257
  GlobalPlug
256
258
  };