@appkit/dek-lib 0.8.3 → 0.9.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/dist/index.es.js CHANGED
@@ -7,7 +7,8 @@ var __publicField = (obj, key, value) => {
7
7
  import * as React$3 from "react";
8
8
  import React__default, { useCallback, useState as useState$1, useEffect as useEffect$1, useRef as useRef$1, useLayoutEffect as useLayoutEffect$1, useMemo, useDebugValue, createContext, forwardRef, isValidElement, createElement, cloneElement, useContext, Fragment, createRef } from "react";
9
9
  import styled, { createGlobalStyle, ThemeProvider } from "styled-components";
10
- import ReactDOM from "react-dom";
10
+ import * as ReactDOM from "react-dom";
11
+ import ReactDOM__default from "react-dom";
11
12
  function _mergeNamespaces(n4, m) {
12
13
  for (var i4 = 0; i4 < m.length; i4++) {
13
14
  const e4 = m[i4];
@@ -964,7 +965,7 @@ class Api {
964
965
  if (!component) {
965
966
  return;
966
967
  }
967
- return component.element();
968
+ return component.element({ plugin });
968
969
  }
969
970
  }
970
971
  }
@@ -978,7 +979,7 @@ class Api {
978
979
  if (!component) {
979
980
  return;
980
981
  }
981
- return component.element();
982
+ return component.element({ plugin });
982
983
  }
983
984
  }
984
985
  }
@@ -33750,7 +33751,7 @@ function EN1() {
33750
33751
  return S;
33751
33752
  }, g = (S, B, t1) => (d(S, B, "default"), t1 && d(t1, B, "default")), L = (S) => d(r4({}, "__esModule", { value: true }), S), y2 = {};
33752
33753
  l2(y2, { a: () => d1, animated: () => d1 }), t2.exports = L(y2);
33753
- var V = Kt(), k = ReactDOM, E = D1(), q = Y0(), U = /^--/;
33754
+ var V = Kt(), k = ReactDOM__default, E = D1(), q = Y0(), U = /^--/;
33754
33755
  function D(S, B) {
33755
33756
  return B == null || typeof B == "boolean" || B === "" ? "" : typeof B == "number" && B !== 0 && !U.test(S) && !(i1.hasOwnProperty(S) && i1[S]) ? B + "px" : ("" + B).trim();
33756
33757
  }
@@ -33829,7 +33830,7 @@ function TN1() {
33829
33830
  a: () => d1,
33830
33831
  animated: () => d1
33831
33832
  }), t2.exports = L(y2);
33832
- var V = Kt(), k = ReactDOM, E = D1(), q = Y0(), U = /^--/;
33833
+ var V = Kt(), k = ReactDOM__default, E = D1(), q = Y0(), U = /^--/;
33833
33834
  function D(S, B) {
33834
33835
  return B == null || typeof B == "boolean" || B === "" ? "" : typeof B == "number" && B !== 0 && !U.test(S) && !(i1.hasOwnProperty(S) && i1[S]) ? B + "px" : ("" + B).trim();
33835
33836
  }
@@ -58159,8 +58160,7 @@ async function fetchUserData(email, password) {
58159
58160
  const state$1 = proxy({
58160
58161
  plugins: {},
58161
58162
  data: null,
58162
- loading: false,
58163
- version: 0
58163
+ loading: false
58164
58164
  });
58165
58165
  let pluginInstances = {};
58166
58166
  function getPluginInstances() {
@@ -58229,7 +58229,7 @@ async function fetchUserPlugins(email, password) {
58229
58229
  result.integrations.push({
58230
58230
  key: "base",
58231
58231
  pluginName: "base",
58232
- pluginVersion: "0.8.2",
58232
+ pluginVersion: "0.9.1",
58233
58233
  pluginConfig: []
58234
58234
  });
58235
58235
  return result;
@@ -58404,7 +58404,7 @@ const Header = ({ height = 70 }) => {
58404
58404
  };
58405
58405
  const About = () => {
58406
58406
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(x0, { padding: 20, direction: "vert", children: [
58407
- /* @__PURE__ */ jsxRuntimeExports.jsx(hF1, { children: `Dek ${"0.8.2"}` }),
58407
+ /* @__PURE__ */ jsxRuntimeExports.jsx(hF1, { children: `Dek ${"0.9.1"}` }),
58408
58408
  /* @__PURE__ */ jsxRuntimeExports.jsx(X4, { children: "From Appkit" })
58409
58409
  ] });
58410
58410
  };
@@ -93755,6 +93755,8 @@ async function loadUserPlugin(name, version2, code) {
93755
93755
  return jsxRuntimeModule;
93756
93756
  case "react":
93757
93757
  return React$3;
93758
+ case "react-dom":
93759
+ return ReactDOM;
93758
93760
  case "@appkit/dek-ui":
93759
93761
  return dekUi;
93760
93762
  }
@@ -94120,7 +94122,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
94120
94122
  this.cancelNextCallback();
94121
94123
  if (nextStatus === ENTERING) {
94122
94124
  if (this.props.unmountOnExit || this.props.mountOnEnter) {
94123
- var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
94125
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default.findDOMNode(this);
94124
94126
  if (node)
94125
94127
  forceReflow(node);
94126
94128
  }
@@ -94138,7 +94140,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
94138
94140
  var _this2 = this;
94139
94141
  var enter = this.props.enter;
94140
94142
  var appearing = this.context ? this.context.isMounting : mounting;
94141
- var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
94143
+ var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM__default.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
94142
94144
  var timeouts = this.getTimeouts();
94143
94145
  var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
94144
94146
  if (!mounting && !enter || config.disabled) {
@@ -94167,7 +94169,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
94167
94169
  var _this3 = this;
94168
94170
  var exit = this.props.exit;
94169
94171
  var timeouts = this.getTimeouts();
94170
- var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
94172
+ var maybeNode = this.props.nodeRef ? void 0 : ReactDOM__default.findDOMNode(this);
94171
94173
  if (!exit || config.disabled) {
94172
94174
  this.safeSetState({
94173
94175
  status: EXITED
@@ -94217,7 +94219,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
94217
94219
  };
94218
94220
  _proto.onTransitionEnd = function onTransitionEnd(timeout2, handler) {
94219
94221
  this.setNextCallback(handler);
94220
- var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
94222
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default.findDOMNode(this);
94221
94223
  var doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener;
94222
94224
  if (!node || doesNotHaveTimeoutOrListener) {
94223
94225
  setTimeout(this.nextCallback, 0);
package/dist/index.umd.js CHANGED
@@ -44,6 +44,7 @@ var __publicField = (obj, key, value) => {
44
44
  return Object.freeze(Object.defineProperty(n4, Symbol.toStringTag, { value: "Module" }));
45
45
  }
46
46
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React$3);
47
+ const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
47
48
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
48
49
  function getDefaultExportFromCjs(x) {
49
50
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -981,7 +982,7 @@ var __publicField = (obj, key, value) => {
981
982
  if (!component) {
982
983
  return;
983
984
  }
984
- return component.element();
985
+ return component.element({ plugin });
985
986
  }
986
987
  }
987
988
  }
@@ -995,7 +996,7 @@ var __publicField = (obj, key, value) => {
995
996
  if (!component) {
996
997
  return;
997
998
  }
998
- return component.element();
999
+ return component.element({ plugin });
999
1000
  }
1000
1001
  }
1001
1002
  }
@@ -58176,8 +58177,7 @@ Arguments: ` + Array.prototype.slice.call(h2).join("") + `
58176
58177
  const state$1 = proxy({
58177
58178
  plugins: {},
58178
58179
  data: null,
58179
- loading: false,
58180
- version: 0
58180
+ loading: false
58181
58181
  });
58182
58182
  let pluginInstances = {};
58183
58183
  function getPluginInstances() {
@@ -58246,7 +58246,7 @@ Arguments: ` + Array.prototype.slice.call(h2).join("") + `
58246
58246
  result.integrations.push({
58247
58247
  key: "base",
58248
58248
  pluginName: "base",
58249
- pluginVersion: "0.8.2",
58249
+ pluginVersion: "0.9.1",
58250
58250
  pluginConfig: []
58251
58251
  });
58252
58252
  return result;
@@ -58421,7 +58421,7 @@ Arguments: ` + Array.prototype.slice.call(h2).join("") + `
58421
58421
  };
58422
58422
  const About = () => {
58423
58423
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(x0, { padding: 20, direction: "vert", children: [
58424
- /* @__PURE__ */ jsxRuntimeExports.jsx(hF1, { children: `Dek ${"0.8.2"}` }),
58424
+ /* @__PURE__ */ jsxRuntimeExports.jsx(hF1, { children: `Dek ${"0.9.1"}` }),
58425
58425
  /* @__PURE__ */ jsxRuntimeExports.jsx(X4, { children: "From Appkit" })
58426
58426
  ] });
58427
58427
  };
@@ -93772,6 +93772,8 @@ Arguments: ` + Array.prototype.slice.call(h2).join("") + `
93772
93772
  return jsxRuntimeModule;
93773
93773
  case "react":
93774
93774
  return React__namespace;
93775
+ case "react-dom":
93776
+ return ReactDOM__namespace;
93775
93777
  case "@appkit/dek-ui":
93776
93778
  return dekUi;
93777
93779
  }
@@ -4,12 +4,10 @@ export type LibraryState = {
4
4
  plugins: Record<string, DekPluginFactory>;
5
5
  data: UserData | null;
6
6
  loading: boolean;
7
- version: number;
8
7
  };
9
8
  declare const state: LibraryState;
10
9
  export declare function getPluginInstances(): Record<string, DekPlugin>;
11
10
  export declare function updateStatePlugins(plugins: Record<string, DekPluginFactory>, instances: Record<string, DekPlugin>): void;
12
11
  export declare function updateStateData(data: UserData | null): void;
13
12
  export declare function updateStateLoading(loading: boolean): void;
14
- export declare function updateStateVersion(): void;
15
13
  export default state;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@appkit/dek-lib",
3
3
  "private": false,
4
- "version": "0.8.3",
4
+ "version": "0.9.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsc && vite build",