@uniformdev/context-devtools 19.213.1-alpha.14 → 19.214.1-alpha.10

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/esm/index.js CHANGED
@@ -2225,142 +2225,7 @@ function EmbeddedContextDevTools({ context, initialSettings }) {
2225
2225
  }
2226
2226
  ) : /* @__PURE__ */ jsx28("p", { children: "Unable to find Uniform Context. Ensure the devtools plugin is activated." });
2227
2227
  }
2228
-
2229
- // src/components/ToggleEmbeddedContextDevTools.tsx
2230
- import { css as css14 } from "@emotion/react";
2231
- import { Button as Button9, Callout, Paragraph, Theme as DesignSystemTheme2 } from "@uniformdev/design-system";
2232
- import * as React7 from "react";
2233
- import { useLocalStorage } from "react-use";
2234
-
2235
- // src/components/EmbedToggleButton/EmbedToggleButton.tsx
2236
- import { css as css13 } from "@emotion/react";
2237
- import { jsx as jsx29, jsxs as jsxs18 } from "@emotion/react/jsx-runtime";
2238
- var btnStyle2 = css13`
2239
- align-items: center;
2240
- border-radius: var(--rounded-full);
2241
- background: var(--brand-secondary-5);
2242
- border: none;
2243
- box-shadow: var(--shadow-base);
2244
- color: var(--white);
2245
- cursor: pointer;
2246
- display: flex;
2247
- justify-content: center;
2248
- position: fixed;
2249
- bottom: var(--spacing-base);
2250
- right: var(--spacing-base);
2251
- z-index: 20;
2252
- width: 52px;
2253
- height: 52px;
2254
- transform: scale(0.9);
2255
- transition: transform 0.25s ease-in-out;
2256
- &:hover {
2257
- transform: scale(1);
2258
- }
2259
- & svg {
2260
- display: block;
2261
- max-width: 100%;
2262
- height: auto;
2263
- }
2264
- `;
2265
- var EmbedToggleButton = ({ ...props }) => {
2266
- return /* @__PURE__ */ jsxs18("button", { type: "button", css: btnStyle2, ...props, children: [
2267
- /* @__PURE__ */ jsx29("span", { hidden: true, children: "Uniform devtools" }),
2268
- /* @__PURE__ */ jsxs18("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2269
- /* @__PURE__ */ jsx29(
2270
- "path",
2271
- {
2272
- d: "M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",
2273
- fill: "currentColor"
2274
- }
2275
- ),
2276
- /* @__PURE__ */ jsx29(
2277
- "path",
2278
- {
2279
- d: "M7.61197 18.3608L8.97136 16.9124L8.97086 16.8933L3.87657 12.1121L8.66699 7.00798L7.20868 5.63928L1.04956 12.2017L7.61197 18.3608Z",
2280
- fill: "currentColor"
2281
- }
2282
- ),
2283
- /* @__PURE__ */ jsx29(
2284
- "path",
2285
- {
2286
- d: "M16.388 18.3608L15.0286 16.9124L15.0291 16.8933L20.1234 12.1121L15.333 7.00798L16.7913 5.63928L22.9504 12.2017L16.388 18.3608Z",
2287
- fill: "currentColor"
2288
- }
2289
- )
2290
- ] })
2291
- ] });
2292
- };
2293
-
2294
- // src/components/ToggleEmbeddedContextDevTools.tsx
2295
- import { jsx as jsx30, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
2296
- var localChromex = "dblgnkbknchechcibdojfdoeeodhmgbd";
2297
- var prodChromex = "dcmlokofjljnfjcknpmhjocogllfbhkg";
2298
- function ToggleEmbeddedContextDevTools(props) {
2299
- const [devtoolsOpen, setDevtoolsOpen] = React7.useState(false);
2300
- const [contextValue, setContextValue] = React7.useState(props.context);
2301
- const [extensionExists, setExtensionExists] = React7.useState(false);
2302
- const [isUniformInlineDevtoolsDisabled, setUniformInlineDevtoolsDisabled] = useLocalStorage(
2303
- "isUniformInlineDevtoolsDisabled",
2304
- false
2305
- );
2306
- React7.useEffect(() => {
2307
- if (!props.context && typeof document !== "undefined") {
2308
- setContextValue(window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__);
2309
- }
2310
- }, [props.context]);
2311
- React7.useEffect(() => {
2312
- [prodChromex, localChromex].map((extensionId) => {
2313
- const img = new Image();
2314
- img.src = `chrome-extension://${extensionId}/icons/uniform-logo.png`;
2315
- img.onload = () => setExtensionExists(true);
2316
- });
2317
- }, []);
2318
- if (isUniformInlineDevtoolsDisabled) {
2319
- return null;
2320
- }
2321
- return contextValue ? /* @__PURE__ */ jsxs19("div", { children: [
2322
- /* @__PURE__ */ jsx30(DesignSystemTheme2, { disableGlobalReset: true, disableReset: true }),
2323
- /* @__PURE__ */ jsx30(Theme, {}),
2324
- /* @__PURE__ */ jsx30(EmbedToggleButton, { onClick: () => setDevtoolsOpen((prev) => !prev) }),
2325
- devtoolsOpen ? /* @__PURE__ */ jsx30(
2326
- "div",
2327
- {
2328
- css: css14`
2329
- box-shadow: var(--shadow-base);
2330
- position: fixed;
2331
- bottom: 82px;
2332
- right: var(--spacing-base);
2333
- z-index: var(--z-10);
2334
- max-width: var(--site-width);
2335
- `,
2336
- children: extensionExists ? /* @__PURE__ */ jsx30(
2337
- "div",
2338
- {
2339
- css: css14`
2340
- padding: var(--spacing-md);
2341
- `,
2342
- children: /* @__PURE__ */ jsxs19(Callout, { type: "danger", title: "This functionality is disabled.", children: [
2343
- /* @__PURE__ */ jsx30(Paragraph, { children: "We detected you already use the Uniform Context browser extension. Using both tools is not supported. Please use the functionality of the browser extension instead." }),
2344
- /* @__PURE__ */ jsx30(
2345
- Button9,
2346
- {
2347
- css: css14`
2348
- margin-top: var(--spacing-md);
2349
- `,
2350
- buttonType: "destructive",
2351
- onClick: () => setUniformInlineDevtoolsDisabled(true),
2352
- children: "Disabled inline tools"
2353
- }
2354
- )
2355
- ] })
2356
- }
2357
- ) : /* @__PURE__ */ jsx30(EmbeddedContextDevTools, { ...props })
2358
- }
2359
- ) : null
2360
- ] }) : /* @__PURE__ */ jsx30("p", { children: "Unable to find Uniform Context. Ensure the devtools plugin is activated." });
2361
- }
2362
2228
  export {
2363
2229
  ContextDevTools,
2364
- EmbeddedContextDevTools,
2365
- ToggleEmbeddedContextDevTools
2230
+ EmbeddedContextDevTools
2366
2231
  };
package/dist/index.d.mts CHANGED
@@ -75,10 +75,10 @@ type EmbeddedContextDevToolsProps = {
75
75
  /** Initial settings for the devtools. */
76
76
  initialSettings?: DevToolsSettings;
77
77
  };
78
- /** @deprecated Renders Uniform Context DevTools in an embedded state (as a React component that can be an island on a demo page, for example) */
78
+ /**
79
+ * Renders Uniform Context DevTools in an embedded state (as a React component that can be an island on a demo page, for example)
80
+ * @deprecated not intended for public usage
81
+ */
79
82
  declare function EmbeddedContextDevTools({ context, initialSettings }: EmbeddedContextDevToolsProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
80
83
 
81
- /** Renders Uniform Context DevTools in an embedded state (as a React component that can be an island on a demo page, for example) */
82
- declare function ToggleEmbeddedContextDevTools(props: EmbeddedContextDevToolsProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
83
-
84
- export { ContextDevTools, type ContextDevToolsProps, type ContextDevToolsRouteProps, type DevToolsSettings, EmbeddedContextDevTools, type EmbeddedContextDevToolsProps, type Override, ToggleEmbeddedContextDevTools };
84
+ export { ContextDevTools, type ContextDevToolsProps, type ContextDevToolsRouteProps, type DevToolsSettings, EmbeddedContextDevTools, type EmbeddedContextDevToolsProps, type Override };
package/dist/index.d.ts CHANGED
@@ -75,10 +75,10 @@ type EmbeddedContextDevToolsProps = {
75
75
  /** Initial settings for the devtools. */
76
76
  initialSettings?: DevToolsSettings;
77
77
  };
78
- /** @deprecated Renders Uniform Context DevTools in an embedded state (as a React component that can be an island on a demo page, for example) */
78
+ /**
79
+ * Renders Uniform Context DevTools in an embedded state (as a React component that can be an island on a demo page, for example)
80
+ * @deprecated not intended for public usage
81
+ */
79
82
  declare function EmbeddedContextDevTools({ context, initialSettings }: EmbeddedContextDevToolsProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
80
83
 
81
- /** Renders Uniform Context DevTools in an embedded state (as a React component that can be an island on a demo page, for example) */
82
- declare function ToggleEmbeddedContextDevTools(props: EmbeddedContextDevToolsProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
83
-
84
- export { ContextDevTools, type ContextDevToolsProps, type ContextDevToolsRouteProps, type DevToolsSettings, EmbeddedContextDevTools, type EmbeddedContextDevToolsProps, type Override, ToggleEmbeddedContextDevTools };
84
+ export { ContextDevTools, type ContextDevToolsProps, type ContextDevToolsRouteProps, type DevToolsSettings, EmbeddedContextDevTools, type EmbeddedContextDevToolsProps, type Override };
package/dist/index.js CHANGED
@@ -31,8 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  ContextDevTools: () => ContextDevTools,
34
- EmbeddedContextDevTools: () => EmbeddedContextDevTools,
35
- ToggleEmbeddedContextDevTools: () => ToggleEmbeddedContextDevTools
34
+ EmbeddedContextDevTools: () => EmbeddedContextDevTools
36
35
  });
37
36
  module.exports = __toCommonJS(src_exports);
38
37
 
@@ -2256,143 +2255,8 @@ function EmbeddedContextDevTools({ context, initialSettings }) {
2256
2255
  }
2257
2256
  ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: "Unable to find Uniform Context. Ensure the devtools plugin is activated." });
2258
2257
  }
2259
-
2260
- // src/components/ToggleEmbeddedContextDevTools.tsx
2261
- var import_react20 = require("@emotion/react");
2262
- var import_design_system14 = require("@uniformdev/design-system");
2263
- var React7 = __toESM(require("react"));
2264
- var import_react_use4 = require("react-use");
2265
-
2266
- // src/components/EmbedToggleButton/EmbedToggleButton.tsx
2267
- var import_react19 = require("@emotion/react");
2268
- var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
2269
- var btnStyle2 = import_react19.css`
2270
- align-items: center;
2271
- border-radius: var(--rounded-full);
2272
- background: var(--brand-secondary-5);
2273
- border: none;
2274
- box-shadow: var(--shadow-base);
2275
- color: var(--white);
2276
- cursor: pointer;
2277
- display: flex;
2278
- justify-content: center;
2279
- position: fixed;
2280
- bottom: var(--spacing-base);
2281
- right: var(--spacing-base);
2282
- z-index: 20;
2283
- width: 52px;
2284
- height: 52px;
2285
- transform: scale(0.9);
2286
- transition: transform 0.25s ease-in-out;
2287
- &:hover {
2288
- transform: scale(1);
2289
- }
2290
- & svg {
2291
- display: block;
2292
- max-width: 100%;
2293
- height: auto;
2294
- }
2295
- `;
2296
- var EmbedToggleButton = ({ ...props }) => {
2297
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("button", { type: "button", css: btnStyle2, ...props, children: [
2298
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { hidden: true, children: "Uniform devtools" }),
2299
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2300
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2301
- "path",
2302
- {
2303
- d: "M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",
2304
- fill: "currentColor"
2305
- }
2306
- ),
2307
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2308
- "path",
2309
- {
2310
- d: "M7.61197 18.3608L8.97136 16.9124L8.97086 16.8933L3.87657 12.1121L8.66699 7.00798L7.20868 5.63928L1.04956 12.2017L7.61197 18.3608Z",
2311
- fill: "currentColor"
2312
- }
2313
- ),
2314
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2315
- "path",
2316
- {
2317
- d: "M16.388 18.3608L15.0286 16.9124L15.0291 16.8933L20.1234 12.1121L15.333 7.00798L16.7913 5.63928L22.9504 12.2017L16.388 18.3608Z",
2318
- fill: "currentColor"
2319
- }
2320
- )
2321
- ] })
2322
- ] });
2323
- };
2324
-
2325
- // src/components/ToggleEmbeddedContextDevTools.tsx
2326
- var import_jsx_runtime29 = require("@emotion/react/jsx-runtime");
2327
- var localChromex = "dblgnkbknchechcibdojfdoeeodhmgbd";
2328
- var prodChromex = "dcmlokofjljnfjcknpmhjocogllfbhkg";
2329
- function ToggleEmbeddedContextDevTools(props) {
2330
- const [devtoolsOpen, setDevtoolsOpen] = React7.useState(false);
2331
- const [contextValue, setContextValue] = React7.useState(props.context);
2332
- const [extensionExists, setExtensionExists] = React7.useState(false);
2333
- const [isUniformInlineDevtoolsDisabled, setUniformInlineDevtoolsDisabled] = (0, import_react_use4.useLocalStorage)(
2334
- "isUniformInlineDevtoolsDisabled",
2335
- false
2336
- );
2337
- React7.useEffect(() => {
2338
- if (!props.context && typeof document !== "undefined") {
2339
- setContextValue(window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__);
2340
- }
2341
- }, [props.context]);
2342
- React7.useEffect(() => {
2343
- [prodChromex, localChromex].map((extensionId) => {
2344
- const img = new Image();
2345
- img.src = `chrome-extension://${extensionId}/icons/uniform-logo.png`;
2346
- img.onload = () => setExtensionExists(true);
2347
- });
2348
- }, []);
2349
- if (isUniformInlineDevtoolsDisabled) {
2350
- return null;
2351
- }
2352
- return contextValue ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
2353
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_design_system14.Theme, { disableGlobalReset: true, disableReset: true }),
2354
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Theme, {}),
2355
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EmbedToggleButton, { onClick: () => setDevtoolsOpen((prev) => !prev) }),
2356
- devtoolsOpen ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2357
- "div",
2358
- {
2359
- css: import_react20.css`
2360
- box-shadow: var(--shadow-base);
2361
- position: fixed;
2362
- bottom: 82px;
2363
- right: var(--spacing-base);
2364
- z-index: var(--z-10);
2365
- max-width: var(--site-width);
2366
- `,
2367
- children: extensionExists ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2368
- "div",
2369
- {
2370
- css: import_react20.css`
2371
- padding: var(--spacing-md);
2372
- `,
2373
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_design_system14.Callout, { type: "danger", title: "This functionality is disabled.", children: [
2374
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_design_system14.Paragraph, { children: "We detected you already use the Uniform Context browser extension. Using both tools is not supported. Please use the functionality of the browser extension instead." }),
2375
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2376
- import_design_system14.Button,
2377
- {
2378
- css: import_react20.css`
2379
- margin-top: var(--spacing-md);
2380
- `,
2381
- buttonType: "destructive",
2382
- onClick: () => setUniformInlineDevtoolsDisabled(true),
2383
- children: "Disabled inline tools"
2384
- }
2385
- )
2386
- ] })
2387
- }
2388
- ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EmbeddedContextDevTools, { ...props })
2389
- }
2390
- ) : null
2391
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: "Unable to find Uniform Context. Ensure the devtools plugin is activated." });
2392
- }
2393
2258
  // Annotate the CommonJS export names for ESM import in node:
2394
2259
  0 && (module.exports = {
2395
2260
  ContextDevTools,
2396
- EmbeddedContextDevTools,
2397
- ToggleEmbeddedContextDevTools
2261
+ EmbeddedContextDevTools
2398
2262
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context-devtools",
3
- "version": "19.213.1-alpha.14+c4550ca9ec",
3
+ "version": "19.214.1-alpha.10+98dac3377a",
4
4
  "description": "Uniform Context developer tools components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -31,11 +31,10 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@emotion/react": "11.11.3",
34
- "@uniformdev/context": "19.213.1-alpha.14+c4550ca9ec",
35
- "@uniformdev/design-system": "19.213.1-alpha.14+c4550ca9ec",
34
+ "@uniformdev/context": "19.214.1-alpha.10+98dac3377a",
35
+ "@uniformdev/design-system": "19.214.1-alpha.10+98dac3377a",
36
36
  "formik": "^2.2.9",
37
37
  "react-use": "^17.4.0",
38
- "reakit": "^1.3.11",
39
38
  "yup": "^0.32.11"
40
39
  },
41
40
  "files": [
@@ -44,5 +43,5 @@
44
43
  "publishConfig": {
45
44
  "access": "public"
46
45
  },
47
- "gitHead": "c4550ca9ec413c467d404842e7873f0087b4e403"
46
+ "gitHead": "98dac3377a8313b1d70d0b02632a6a7192f2409c"
48
47
  }