@uniformdev/context-devtools 17.6.1-alpha.60 → 17.7.1-alpha.140

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
@@ -214,7 +214,7 @@ import{jsx as g}from"@emotion/react";import*as b from"react";import{css as Mt}fr
214
214
  cursor: not-allowed;
215
215
  color: var(--gray-200);
216
216
  }
217
- `,hn=Z`
217
+ `,jn=Z`
218
218
  margin: var(--spacing-base) 0;
219
219
  `,et=Z`
220
220
  color: var(--brand-secondary-1);
@@ -227,10 +227,10 @@ import{jsx as g}from"@emotion/react";import*as b from"react";import{css as Mt}fr
227
227
  flex: 1 100%;
228
228
  font-weight: var(--fw-bold);
229
229
  margin: 0 0 var(--spacing-sm);
230
- `,bn=Z`
230
+ `,_n=Z`
231
231
  color: var(--gray-600);
232
232
  font-size: var(--fs-sm);
233
- `,xn=Z`
233
+ `,Gn=Z`
234
234
  color: var(--brand-secondary-5);
235
235
  display: block;
236
236
  `,ot=Z`
@@ -488,7 +488,7 @@ to {
488
488
  max-width: 100%;
489
489
  height: auto;
490
490
  }
491
- `,Ft=({...e})=>Qt("button",{type:"button",css:pr,...e,children:[De("span",{hidden:!0,children:"Uniform devtools"}),Qt("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[De("path",{d:"M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",fill:"currentColor"}),De("path",{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",fill:"currentColor"}),De("path",{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",fill:"currentColor"})]})]});import{jsx as A,jsxs as qt}from"@emotion/react/jsx-runtime";var hr="dblgnkbknchechcibdojfdoeeodhmgbd",br="dcmlokofjljnfjcknpmhjocogllfbhkg";function Os(e){let[o,r]=U.useState(!1),[t,n]=U.useState(e.context),[s,l]=U.useState(!1),[d,p]=fr("isUniformInlineDevtoolsDisabled",!1);return U.useEffect(()=>{!e.context&&typeof document!="undefined"&&n(window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__)},[e.context]),U.useEffect(()=>{[br,hr].map(m=>{let i=new Image;i.src=`chrome-extension://${m}/icons/uniform-logo.png`,i.onload=()=>l(!0)})},[]),d?null:t?qt("div",{children:[A(vr,{}),A(le,{}),A(Ft,{onClick:()=>r(m=>!m)}),o?A("div",{css:Ee`
491
+ `,Ft=({...e})=>Qt("button",{type:"button",css:pr,...e,children:[De("span",{hidden:!0,children:"Uniform devtools"}),Qt("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[De("path",{d:"M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",fill:"currentColor"}),De("path",{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",fill:"currentColor"}),De("path",{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",fill:"currentColor"})]})]});import{jsx as A,jsxs as qt}from"@emotion/react/jsx-runtime";var hr="dblgnkbknchechcibdojfdoeeodhmgbd",br="dcmlokofjljnfjcknpmhjocogllfbhkg";function Za(e){let[o,r]=U.useState(!1),[t,n]=U.useState(e.context),[s,l]=U.useState(!1),[d,p]=fr("isUniformInlineDevtoolsDisabled",!1);return U.useEffect(()=>{!e.context&&typeof document!="undefined"&&n(window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__)},[e.context]),U.useEffect(()=>{[br,hr].map(m=>{let i=new Image;i.src=`chrome-extension://${m}/icons/uniform-logo.png`,i.onload=()=>l(!0)})},[]),d?null:t?qt("div",{children:[A(vr,{}),A(le,{}),A(Ft,{onClick:()=>r(m=>!m)}),o?A("div",{css:Ee`
492
492
  box-shadow: var(--shadow-base);
493
493
  position: fixed;
494
494
  bottom: 82px;
@@ -499,4 +499,4 @@ to {
499
499
  padding: var(--spacing-md);
500
500
  `,children:qt(ur,{type:"danger",title:"This functionality is disabled.",children:[A(gr,{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."}),A(mr,{css:Ee`
501
501
  margin-top: var(--spacing-md);
502
- `,buttonType:"secondary",onClick:()=>p(!0),children:"Disabled inline tools"})]})}):A(Bt,{...e})}):null]}):A("p",{children:"Unable to find Uniform Context. Ensure the devtools plugin is activated."})}export{Et as ContextDevTools,Bt as EmbeddedContextDevTools,Os as ToggleEmbeddedContextDevTools};
502
+ `,buttonType:"secondary",onClick:()=>p(!0),children:"Disabled inline tools"})]})}):A(Bt,{...e})}):null]}):A("p",{children:"Unable to find Uniform Context. Ensure the devtools plugin is activated."})}export{Et as ContextDevTools,Bt as EmbeddedContextDevTools,Za as ToggleEmbeddedContextDevTools};
package/dist/index.d.ts CHANGED
@@ -3,11 +3,11 @@ import { VisitorData, OutputSeverity, DevToolsState, DevToolsActions, Context }
3
3
  import { ManifestV2 } from '@uniformdev/context/*';
4
4
  import { DimensionDisplayData, Quirk } from '@uniformdev/context/api';
5
5
 
6
- declare type FullDimensionData = DimensionDisplayData & {
6
+ type FullDimensionData = DimensionDisplayData & {
7
7
  cap: number;
8
8
  str: number;
9
9
  };
10
- declare type DimensionIndexData = Record<string, FullDimensionData>;
10
+ type DimensionIndexData = Record<string, FullDimensionData>;
11
11
  /**
12
12
  * Fetches dimension data in an indexed object from Uniform API
13
13
  * If incomplete data is sent, returns empty index.
@@ -18,12 +18,12 @@ declare function useDimensionIndex({ apiHost, apiKey, projectId }: DevToolsSetti
18
18
  index: DimensionIndexData;
19
19
  };
20
20
 
21
- declare type QuirkIndexHookType = {
21
+ type QuirkIndexHookType = {
22
22
  loading: boolean;
23
23
  error: Error | undefined;
24
24
  index: QuirksIndexData;
25
25
  };
26
- declare type QuirksIndexData = Record<string, Quirk & {
26
+ type QuirksIndexData = Record<string, Quirk & {
27
27
  value: string | undefined;
28
28
  }>;
29
29
  /**
@@ -32,12 +32,12 @@ declare type QuirksIndexData = Record<string, Quirk & {
32
32
  */
33
33
  declare function useQuirkIndex({ apiHost, apiKey, projectId }: DevToolsSettings, quirksData: VisitorData['quirks']): QuirkIndexHookType;
34
34
 
35
- declare type Override<T> = {
35
+ type Override<T> = {
36
36
  initial: T;
37
37
  override: T;
38
38
  };
39
39
  /** Settings for the DevTools. Stored **per-origin**. */
40
- declare type DevToolsSettings = {
40
+ type DevToolsSettings = {
41
41
  apiKey?: string;
42
42
  projectId?: string;
43
43
  apiHost?: string;
@@ -49,20 +49,20 @@ declare type DevToolsSettings = {
49
49
  scoreOverrides?: Record<string, Override<number>>;
50
50
  quirkOverrides?: Record<string, Override<string>>;
51
51
  };
52
- declare type ContextDevToolsProps = {
52
+ type ContextDevToolsProps = {
53
53
  state: DevToolsState;
54
54
  actions: DevToolsActions;
55
55
  settings: DevToolsSettings;
56
56
  saveSettings: (settings: DevToolsSettings) => void | Promise<void>;
57
57
  clearAllExtensionData: () => void | Promise<void>;
58
58
  };
59
- declare type ContextDevToolsRouteProps = ContextDevToolsProps & {
59
+ type ContextDevToolsRouteProps = ContextDevToolsProps & {
60
60
  dimensionIndex: ReturnType<typeof useDimensionIndex>;
61
61
  quirksIndex: ReturnType<typeof useQuirkIndex>;
62
62
  };
63
63
  declare function ContextDevTools(props: ContextDevToolsProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
64
64
 
65
- declare type EmbeddedContextDevToolsProps = {
65
+ type EmbeddedContextDevToolsProps = {
66
66
  /**
67
67
  * Pass a Context instance to connect to DevTools.
68
68
  * This is optional, and defaults to a context instance registered in `window`
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var to=Object.create;var me=Object.defineProperty;var oo=Object.getOwnPropertyDescriptor;var ro=Object.getOwnPropertyNames;var no=Object.getPrototypeOf,io=Object.prototype.hasOwnProperty;var so=(e,o)=>{for(var r in o)me(e,r,{get:o[r],enumerable:!0})},et=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of ro(o))!io.call(e,n)&&n!==r&&me(e,n,{get:()=>o[n],enumerable:!(t=oo(o,n))||t.enumerable});return e};var F=(e,o,r)=>(r=e!=null?to(no(e)):{},et(o||!e||!e.__esModule?me(r,"default",{value:e,enumerable:!0}):r,e)),ao=e=>et(me({},"__esModule",{value:!0}),e);var Qo={};so(Qo,{ContextDevTools:()=>Ye,EmbeddedContextDevTools:()=>Xe,ToggleEmbeddedContextDevTools:()=>Bo});module.exports=ao(Qo);var u=require("@emotion/react"),y=F(require("react"));var We=require("@emotion/react"),Wt=require("@uniformdev/design-system");var K=require("@uniformdev/context/api"),tt=F(require("react")),ot=require("react-use");function rt({apiHost:e,apiKey:o,projectId:r},t){let{loading:n,error:s,value:l}=(0,ot.useAsync)(async()=>{if(!o||!r)return d;let m=(await new K.UncachedDimensionClient({projectId:r,apiKey:o,apiHost:e||void 0}).get()).dimensions,i={};return m.map(a=>{var c,f,g,h,C,T,D,G;if(i[a.dim]={...(0,K.computeDimensionDefinitionDisplayData)(a),cap:a.cap,str:(h=(g=(f=(c=t==null?void 0:t.project.pz)==null?void 0:c.sig)==null?void 0:f[a.dim])==null?void 0:g.str)!=null?h:50},i[a.dim].type==="Enrichment"){let $=a.dim.split("_")[0];i[a.dim].cap=(G=(D=(T=(C=t==null?void 0:t.project.pz)==null?void 0:C.enr)==null?void 0:T[$])==null?void 0:D.cap)!=null?G:100}}),i},[e,o,r]),d=tt.useMemo(()=>{var m,i,a,c;let p={};return t&&(Object.entries((i=(m=t==null?void 0:t.project.pz)==null?void 0:m.sig)!=null?i:{}).map(([f,g])=>{let h=(0,K.computeDimensionDisplayData)(f,t);h&&(p[f]={...g,...h})}),Object.entries((c=(a=t==null?void 0:t.project.pz)==null?void 0:a.enr)!=null?c:{}).map(([f,g])=>{var T;let h=(0,K.computeDimensionDisplayData)(f,t),C={cap:(T=g.cap)!=null?T:100,str:10};h&&(p[f]={...h,cap:C.cap,str:C.str})}),l&&Object.entries(l).map(([f,g])=>{p[f]={...p[f],...g}})),p},[t,l]);return{loading:n,error:s,index:d}}var nt=require("@uniformdev/context/api"),it=require("react"),st=require("react-use");function at({apiHost:e,apiKey:o,projectId:r},t){let{loading:n,error:s,value:l}=(0,st.useAsync)(async()=>{if(!o||!r)return{};let m=await new nt.UncachedQuirkClient({projectId:r,apiKey:o,apiHost:e||void 0}).get(),i={};return m.quirks.map(a=>{i[a.id]={...a,value:t[a.id]}}),i},[e,o,r]),d=(0,it.useMemo)(()=>{let p={};return Object.entries(t).map(([m,i])=>p[m]={value:i,id:m,name:m}),l&&Object.entries(l).map(([m,i])=>p[m]={...i,value:t[m]}),p},[t,l]);return{loading:n,error:s,index:d}}var ue=require("react"),co=require("@emotion/react/jsx-runtime"),ct=(0,ue.createContext)({settings:{},saveSettings:()=>{}}),ge=()=>(0,ue.useContext)(ct),lt=({children:e,settings:o,saveSettings:r})=>(0,co.jsx)(ct.Provider,{value:{settings:o,saveSettings:r},children:e});var lo=require("@emotion/react/jsx-runtime");function ve(){return(0,lo.jsx)("style",{children:`
1
+ "use strict";var lo=Object.create;var ve=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var mo=Object.getOwnPropertyNames;var uo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var vo=(e,o)=>{for(var r in o)ve(e,r,{get:o[r],enumerable:!0})},tt=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of mo(o))!go.call(e,n)&&n!==r&&ve(e,n,{get:()=>o[n],enumerable:!(t=po(o,n))||t.enumerable});return e};var q=(e,o,r)=>(r=e!=null?lo(uo(e)):{},tt(o||!e||!e.__esModule?ve(r,"default",{value:e,enumerable:!0}):r,e)),fo=e=>tt(ve({},"__esModule",{value:!0}),e);var Qo={};vo(Qo,{ContextDevTools:()=>Ye,EmbeddedContextDevTools:()=>et,ToggleEmbeddedContextDevTools:()=>Bo});module.exports=fo(Qo);var u=require("@emotion/react"),y=q(require("react"));var We=require("@emotion/react"),io=require("@uniformdev/design-system");var W=require("@uniformdev/context/api"),ot=q(require("react")),rt=require("react-use");function nt({apiHost:e,apiKey:o,projectId:r},t){let{loading:n,error:s,value:l}=(0,rt.useAsync)(async()=>{if(!o||!r)return d;let m=(await new W.UncachedDimensionClient({projectId:r,apiKey:o,apiHost:e||void 0}).get()).dimensions,i={};return m.map(a=>{var c,f,g,h,w,T,D,$;if(i[a.dim]={...(0,W.computeDimensionDefinitionDisplayData)(a),cap:a.cap,str:(h=(g=(f=(c=t==null?void 0:t.project.pz)==null?void 0:c.sig)==null?void 0:f[a.dim])==null?void 0:g.str)!=null?h:50},i[a.dim].type==="Enrichment"){let K=a.dim.split("_")[0];i[a.dim].cap=($=(D=(T=(w=t==null?void 0:t.project.pz)==null?void 0:w.enr)==null?void 0:T[K])==null?void 0:D.cap)!=null?$:100}}),i},[e,o,r]),d=ot.useMemo(()=>{var m,i,a,c;let p={};return t&&(Object.entries((i=(m=t==null?void 0:t.project.pz)==null?void 0:m.sig)!=null?i:{}).map(([f,g])=>{let h=(0,W.computeDimensionDisplayData)(f,t);h&&(p[f]={...g,...h})}),Object.entries((c=(a=t==null?void 0:t.project.pz)==null?void 0:a.enr)!=null?c:{}).map(([f,g])=>{var T;let h=(0,W.computeDimensionDisplayData)(f,t),w={cap:(T=g.cap)!=null?T:100,str:10};h&&(p[f]={...h,cap:w.cap,str:w.str})}),l&&Object.entries(l).map(([f,g])=>{p[f]={...p[f],...g}})),p},[t,l]);return{loading:n,error:s,index:d}}var it=require("@uniformdev/context/api"),st=require("react"),at=require("react-use");function ct({apiHost:e,apiKey:o,projectId:r},t){let{loading:n,error:s,value:l}=(0,at.useAsync)(async()=>{if(!o||!r)return{};let m=await new it.UncachedQuirkClient({projectId:r,apiKey:o,apiHost:e||void 0}).get(),i={};return m.quirks.map(a=>{i[a.id]={...a,value:t[a.id]}}),i},[e,o,r]),d=(0,st.useMemo)(()=>{let p={};return Object.entries(t).map(([m,i])=>p[m]={value:i,id:m,name:m}),l&&Object.entries(l).map(([m,i])=>p[m]={...i,value:t[m]}),p},[t,l]);return{loading:n,error:s,index:d}}var fe=require("react"),pt=require("@emotion/react/jsx-runtime"),lt=(0,fe.createContext)({settings:{},saveSettings:()=>{}}),he=()=>(0,fe.useContext)(lt),dt=({children:e,settings:o,saveSettings:r})=>(0,pt.jsx)(lt.Provider,{value:{settings:o,saveSettings:r},children:e});var mt=require("@emotion/react/jsx-runtime");function be(){return(0,mt.jsx)("style",{children:`
2
2
  :root {
3
3
  --site-width: 700px;
4
4
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  --min-height: 450px;
10
10
  }
11
- `})}var Ne=require("@uniformdev/design-system");var W=require("@emotion/react"),fe=W.css`
11
+ `})}var Ne=require("@uniformdev/design-system");var Y=require("@emotion/react"),xe=Y.css`
12
12
  background-color: var(--gray-100);
13
13
  padding: var(--spacing-base) var(--spacing-md);
14
14
  margin: var(--spacing-base) 0;
@@ -16,21 +16,21 @@
16
16
  &:first-of-type {
17
17
  margin: 0 0 var(--spacing-base);
18
18
  }
19
- `,dt=W.css`
19
+ `,ut=Y.css`
20
20
  background: var(--gray-100)
21
21
  url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 2C8.44771 2 8 2.44772 8 3V5C8 5.55228 8.44771 6 9 6C9.55229 6 10 5.55228 10 5V3C10 2.44772 9.55229 2 9 2ZM8 9H16V11C16 13.2091 14.2091 15 12 15C9.79086 15 8 13.2091 8 11V9ZM13 16.917C15.8377 16.441 18 13.973 18 11V7H6V11C6 13.973 8.16229 16.441 11 16.917V22C11 22.5523 11.4477 23 12 23C12.5523 23 13 22.5523 13 22V16.917ZM14 3C14 2.44772 14.4477 2 15 2C15.5523 2 16 2.44772 16 3V5C16 5.55228 15.5523 6 15 6C14.4477 6 14 5.55228 14 5V3Z' fill='%232ecdb4' /%3E%3C/svg%3E")
22
22
  no-repeat var(--spacing-sm) var(--spacing-base);
23
23
  padding: var(--spacing-base) var(--spacing-xl);
24
- `,he=W.css`
24
+ `,ye=Y.css`
25
25
  color: var(--brand-secondary-1);
26
26
  margin: 0;
27
27
  font-size: var(--fs-base);
28
28
  font-weight: var(--fw-bold);
29
- `,be=W.css`
29
+ `,Ce=Y.css`
30
30
  color: var(--brand-secondary-1);
31
31
  margin: var(--spacing-xs) 0 0;
32
32
  font-size: var(--fs-sm);
33
- `,pt=W.css`
33
+ `,gt=Y.css`
34
34
  align-items: center;
35
35
  border: none;
36
36
  background: transparent
@@ -50,17 +50,17 @@
50
50
  &:hover {
51
51
  opacity: 0.6;
52
52
  }
53
- `,xe=W.css`
53
+ `,we=Y.css`
54
54
  display: flex;
55
55
  margin: var(--spacing-sm) 0 0;
56
56
  gap: var(--spacing-base);
57
- `;var B=require("@emotion/react/jsx-runtime"),Ze=({settings:e,saveSettings:o})=>{let r=()=>{o({...e,route:"/connect"})},t=()=>{o({...e,ignoreApiKeyPrompt:!0})},n=e.route==="/connect",s=!(e!=null&&e.apiKey);return!e.ignoreApiKeyPrompt&&s&&!n?(0,B.jsxs)("div",{css:[fe,dt],children:[(0,B.jsx)("h2",{css:he,children:"Connect to a Uniform Project"}),(0,B.jsx)("p",{css:be,children:"This allows reading human-readable labels for the dimensions."}),(0,B.jsxs)("div",{css:xe,children:[(0,B.jsx)(Ne.Button,{buttonType:"secondary",onClick:r,children:"Connect this site"}),(0,B.jsx)(Ne.Button,{buttonType:"ghost",onClick:t,children:"Skip for now"})]}),(0,B.jsx)("button",{type:"button",css:pt,title:"close",onClick:t,children:(0,B.jsx)("span",{hidden:!0,children:"Close"})})]}):null};var E=require("@emotion/react");var mt=require("@emotion/react"),po=require("@emotion/react/jsx-runtime"),ut=()=>{var r;let e=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"&&((r=chrome==null?void 0:chrome.runtime)==null?void 0:r.getManifest()),o=e?e==null?void 0:e.version:"DEV";return(0,po.jsx)("div",{css:mt.css`
57
+ `;var E=require("@emotion/react/jsx-runtime"),Ze=({settings:e,saveSettings:o})=>{let r=()=>{o({...e,route:"/connect"})},t=()=>{o({...e,ignoreApiKeyPrompt:!0})},n=e.route==="/connect",s=!(e!=null&&e.apiKey);return!e.ignoreApiKeyPrompt&&s&&!n?(0,E.jsxs)("div",{css:[xe,ut],children:[(0,E.jsx)("h2",{css:ye,children:"Connect to a Uniform Project"}),(0,E.jsx)("p",{css:Ce,children:"This allows reading human-readable labels for the dimensions."}),(0,E.jsxs)("div",{css:we,children:[(0,E.jsx)(Ne.Button,{buttonType:"secondary",onClick:r,children:"Connect this site"}),(0,E.jsx)(Ne.Button,{buttonType:"ghost",onClick:t,children:"Skip for now"})]}),(0,E.jsx)("button",{type:"button",css:gt,title:"close",onClick:t,children:(0,E.jsx)("span",{hidden:!0,children:"Close"})})]}):null};var A=require("@emotion/react");var vt=require("@emotion/react"),ht=require("@emotion/react/jsx-runtime"),ft=()=>{var r;let e=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"&&((r=chrome==null?void 0:chrome.runtime)==null?void 0:r.getManifest()),o=e?e==null?void 0:e.version:"DEV";return(0,ht.jsx)("div",{css:vt.css`
58
58
  font-size: var(--fs-sm);
59
59
  color: var(--gray-400);
60
60
  position: absolute;
61
61
  bottom: 2px;
62
62
  right: 5px;
63
- `,children:`v${o}`})};var uo=require("@emotion/react/jsx-runtime"),mo=({route:e,children:o,className:r})=>{let{settings:t,saveSettings:n}=ge();return(0,uo.jsx)("a",{href:"",className:r,onClick:s=>{s.preventDefault(),n({...t,route:e})},children:o})},oe=mo;var w=require("@emotion/react/jsx-runtime"),go=[{title:"Dimensions",href:"/dimensions",icon:`<svg
63
+ `,children:`v${o}`})};var bt=require("@emotion/react/jsx-runtime"),ho=({route:e,children:o,className:r})=>{let{settings:t,saveSettings:n}=he();return(0,bt.jsx)("a",{href:"",className:r,onClick:s=>{s.preventDefault(),n({...t,route:e})},children:o})},ne=ho;var C=require("@emotion/react/jsx-runtime"),bo=[{title:"Dimensions",href:"/dimensions",icon:`<svg
64
64
  width="24"
65
65
  height="24"
66
66
  viewBox="0 0 24 24"
@@ -98,29 +98,29 @@
98
98
  </svg>`},{title:"Settings",href:"/settings",icon:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
99
99
  <path d="M19.1469 12.716C19.1986 12.2636 19.201 11.8069 19.1539 11.354L21.7429 9.474C21.8681 9.3822 21.9548 9.24723 21.9862 9.0952C22.0176 8.94316 21.9915 8.78489 21.9129 8.651L19.9939 5.399C19.9182 5.26986 19.7985 5.17231 19.6568 5.1242C19.515 5.07608 19.3606 5.08063 19.2219 5.137L16.3599 6.292C15.9237 5.9578 15.4502 5.67525 14.9489 5.45L14.5739 2.545C14.5547 2.39441 14.4813 2.25598 14.3673 2.15566C14.2534 2.05534 14.1068 1.99999 13.9549 2H10.0859C9.93402 1.99997 9.78728 2.05527 9.67317 2.15558C9.55906 2.25588 9.48539 2.39432 9.46595 2.545L9.09395 5.433C8.63957 5.63249 8.20723 5.87882 7.80395 6.168L5.00895 4.954C4.87173 4.89484 4.71787 4.88672 4.57519 4.9311C4.4325 4.97549 4.3104 5.06945 4.23095 5.196L2.22195 8.398C2.1396 8.52998 2.10934 8.68789 2.13707 8.84096C2.1648 8.99403 2.24854 9.1313 2.37195 9.226L4.86795 11.142C4.83172 11.4266 4.81302 11.7131 4.81195 12C4.81195 12.18 4.82095 12.362 4.83795 12.558L2.26495 14.375C2.13766 14.4647 2.04844 14.5987 2.01478 14.7508C1.98112 14.9028 2.00543 15.0619 2.08295 15.197L3.95695 18.474C4.11095 18.742 4.43695 18.857 4.72595 18.746L7.56095 17.644C8.00795 17.997 8.49195 18.294 9.00795 18.53L9.33795 21.396C9.37495 21.709 9.63795 21.946 9.95195 21.95L13.8169 22H13.8249C14.1349 22 14.3989 21.771 14.4439 21.463L14.8549 18.59C15.3703 18.3674 15.8579 18.0855 16.3079 17.75L19.1279 18.93C19.4129 19.05 19.7419 18.944 19.9029 18.679L21.8669 15.452C21.9477 15.319 21.976 15.1608 21.9464 15.0081C21.9168 14.8554 21.8315 14.7192 21.7069 14.626L19.1469 12.716ZM11.9999 15C10.3459 15 8.99995 13.655 8.99995 12C8.99995 10.346 10.3449 9 11.9999 9C13.6539 9 14.9999 10.345 14.9999 12C14.9999 13.654 13.6539 15 11.9999 15Z" fill="white"/>
100
100
  </svg>
101
- `}],vo=`<svg width="24" height="24" fill="white" viewBox="0 0 122.88 116.67" xmlns="http://www.w3.org/2000/svg">
101
+ `}],xo=`<svg width="24" height="24" fill="white" viewBox="0 0 122.88 116.67" xmlns="http://www.w3.org/2000/svg">
102
102
  <g>
103
103
  <path d="M84.55,116.66c2.49,0,4.53-1.99,4.53-4.41V88.08c1.55-13.03,7.27-9.16,14-5.13 c16.27,9.74,27.08-15.88,13.93-23.78c-10.32-6.2-14.79,4.46-22.35,3.36c-2.92-0.43-4.95-3.5-5.59-8.17V36.9 c0-2.43-2.04-4.41-4.53-4.41H63.73c-17.18-2.12-1.93-11.37-1.93-19.98C61.81,5.6,55.38,0,47.45,0c-7.92,0-15.19,5.6-15.19,12.51 c0,8.12,15.78,17.86-1.64,19.98H4.53C2.04,32.49,0,34.47,0,36.9v17.42c1.33,7.43,6.49,9.15,13.1,4.25 c2.23-1.66,5.99-3.59,8.71-3.59c7.09,0,12.85,6.25,12.85,13.96S28.91,84.6,21.81,84.6c-2.53,0-4.89-0.8-6.89-2.19 c0,0.59-12.4-10.85-14.92,3.15v26.71c0,2.43,2.04,4.41,4.53,4.41c13.97,0,27.92,0,41.88-0.01c0.55-2.55-1.24-5.47-2.92-8 c-13.22-19.93,38.21-21.92,24.99,0.62c-0.65,1.11-1.3,2.19-1.8,3.24c-0.63,1.31-1.05,2.91-0.96,4.14L84.55,116.66L84.55,116.66z"></path>
104
104
  </g>
105
- </svg>`,gt=({...e})=>{var t,n;let o=s=>{var d;let l="active";return!((d=e.settings)!=null&&d.route)&&s==="/dimensions"||e.settings.route===s?l:""},r=Boolean(typeof window!="undefined"&&((n=(t=window.chrome)==null?void 0:t.runtime)==null?void 0:n.id));return(0,w.jsxs)("nav",{css:E.css`
105
+ </svg>`,xt=({...e})=>{var t,n;let o=s=>{var d;let l="active";return!((d=e.settings)!=null&&d.route)&&s==="/dimensions"||e.settings.route===s?l:""},r=Boolean(typeof window!="undefined"&&((n=(t=window.chrome)==null?void 0:t.runtime)==null?void 0:n.id));return(0,C.jsxs)("nav",{css:A.css`
106
106
  background: var(--brand-secondary-1);
107
107
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-md);
108
108
  min-width: 200px;
109
109
  display: flex;
110
110
  flex-direction: column;
111
111
  position: relative;
112
- `,children:[(0,w.jsx)("a",{css:E.css`
112
+ `,children:[(0,C.jsx)("a",{css:A.css`
113
113
  flex-grow: 0;
114
114
  display: inline-block;
115
115
  margin: 0 var(--spacing-base);
116
- `,href:"https://uniform.dev/",children:(0,w.jsxs)("svg",{css:{display:"block"},width:"120",height:"38",viewBox:"0 0 120 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,w.jsxs)("g",{clipPath:"url(#clip0_41_612)",children:[(0,w.jsx)("path",{d:"M8.82261 3.73315L0 8.82209V18.9999L8.82261 13.911L17.6474 8.82209L8.82261 3.73315Z",fill:"#83C6E1"}),(0,w.jsx)("path",{d:"M8.82261 24.089V13.9111L0 19.0001V29.1779L8.82261 34.2669L17.6474 29.1779V19.0001L8.82261 24.089Z",fill:"#438FD5"}),(0,w.jsx)("path",{d:"M17.6474 8.82202L8.82263 13.911L17.6474 18.9999V29.1777L26.47 24.0888V13.911L17.6474 8.82202Z",fill:"#F4220B"}),(0,w.jsx)("path",{d:"M64.6069 13.9025H67.8036V25.5528H64.6069V13.9025ZM64.4902 8.5415H67.9181V11.7348H64.4902V8.5415ZM72.5153 10.1025V13.9025H70.3691V16.6272H72.5153V25.5528H75.7119V16.6272H78.2774V13.9025H75.7119V11.2684H78.2774V8.5415H75.2213L72.5153 10.1025ZM83.1059 13.7859L80.3999 15.3469V24.1084L83.1059 25.6694H88.0748L90.7808 24.1084V15.3469L88.0748 13.7859H83.1059ZM87.5842 22.9425H83.5943V16.5106H87.5842V22.9425ZM97.4723 14.8611L95.8103 13.9025H94.2779V25.5528H97.4745V16.6272H101.486V13.9025H99.1344L97.4723 14.8611ZM55.713 13.7859L53.8499 14.8611L51.9847 13.7859H50.7289V25.5528H53.9256V16.5106H57.9133V25.5528H61.1099V15.3469L58.4039 13.7859H55.713ZM44.0353 22.9425H40.0454V13.9025H36.851V24.1084L39.557 25.6694H42.3753L44.0309 24.7129L44.0331 24.7151L44.0353 24.7129V24.7151L45.6887 25.6694H47.2297V13.9025H44.0353V22.9425ZM117.51 13.7859H115.271L113.079 15.0425L110.909 13.7859H108.67L107.015 14.7402L105.359 13.7859H103.818V25.5528H107.015V16.5106H110.421V25.5528H113.615V16.5106H117.022V25.5528H120.216V15.3469L117.51 13.7859Z",fill:"white"})]}),(0,w.jsx)("defs",{children:(0,w.jsx)("clipPath",{id:"clip0_41_612",children:(0,w.jsx)("rect",{width:"120",height:"38",fill:"white"})})})]})}),(0,w.jsx)("ul",{css:E.css`
116
+ `,href:"https://uniform.dev/",children:(0,C.jsxs)("svg",{css:{display:"block"},width:"120",height:"38",viewBox:"0 0 120 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,C.jsxs)("g",{clipPath:"url(#clip0_41_612)",children:[(0,C.jsx)("path",{d:"M8.82261 3.73315L0 8.82209V18.9999L8.82261 13.911L17.6474 8.82209L8.82261 3.73315Z",fill:"#83C6E1"}),(0,C.jsx)("path",{d:"M8.82261 24.089V13.9111L0 19.0001V29.1779L8.82261 34.2669L17.6474 29.1779V19.0001L8.82261 24.089Z",fill:"#438FD5"}),(0,C.jsx)("path",{d:"M17.6474 8.82202L8.82263 13.911L17.6474 18.9999V29.1777L26.47 24.0888V13.911L17.6474 8.82202Z",fill:"#F4220B"}),(0,C.jsx)("path",{d:"M64.6069 13.9025H67.8036V25.5528H64.6069V13.9025ZM64.4902 8.5415H67.9181V11.7348H64.4902V8.5415ZM72.5153 10.1025V13.9025H70.3691V16.6272H72.5153V25.5528H75.7119V16.6272H78.2774V13.9025H75.7119V11.2684H78.2774V8.5415H75.2213L72.5153 10.1025ZM83.1059 13.7859L80.3999 15.3469V24.1084L83.1059 25.6694H88.0748L90.7808 24.1084V15.3469L88.0748 13.7859H83.1059ZM87.5842 22.9425H83.5943V16.5106H87.5842V22.9425ZM97.4723 14.8611L95.8103 13.9025H94.2779V25.5528H97.4745V16.6272H101.486V13.9025H99.1344L97.4723 14.8611ZM55.713 13.7859L53.8499 14.8611L51.9847 13.7859H50.7289V25.5528H53.9256V16.5106H57.9133V25.5528H61.1099V15.3469L58.4039 13.7859H55.713ZM44.0353 22.9425H40.0454V13.9025H36.851V24.1084L39.557 25.6694H42.3753L44.0309 24.7129L44.0331 24.7151L44.0353 24.7129V24.7151L45.6887 25.6694H47.2297V13.9025H44.0353V22.9425ZM117.51 13.7859H115.271L113.079 15.0425L110.909 13.7859H108.67L107.015 14.7402L105.359 13.7859H103.818V25.5528H107.015V16.5106H110.421V25.5528H113.615V16.5106H117.022V25.5528H120.216V15.3469L117.51 13.7859Z",fill:"white"})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"clip0_41_612",children:(0,C.jsx)("rect",{width:"120",height:"38",fill:"white"})})})]})}),(0,C.jsx)("ul",{css:A.css`
117
117
  display: flex;
118
118
  flex-flow: column nowrap;
119
119
  padding: 0;
120
120
  margin: 0;
121
121
  list-style-type: none;
122
122
  flex-grow: 1;
123
- `,children:go.map((s,l)=>{var p,m,i,a;let d=0;return s.href==="/overrides"&&Object.keys((p=e.settings.scoreOverrides)!=null?p:{}).length>0&&(d=Object.keys((m=e.settings.scoreOverrides)!=null?m:{}).length),s.href==="/quirks"&&Object.keys((i=e.settings.quirkOverrides)!=null?i:{}).length>0&&(d=Object.keys((a=e.settings.quirkOverrides)!=null?a:{}).length),(0,w.jsx)("li",{css:E.css`
123
+ `,children:bo.map((s,l)=>{var p,m,i,a;let d=0;return s.href==="/overrides"&&Object.keys((p=e.settings.scoreOverrides)!=null?p:{}).length>0&&(d=Object.keys((m=e.settings.scoreOverrides)!=null?m:{}).length),s.href==="/quirks"&&Object.keys((i=e.settings.quirkOverrides)!=null?i:{}).length>0&&(d=Object.keys((a=e.settings.quirkOverrides)!=null?a:{}).length),(0,C.jsx)("li",{css:A.css`
124
124
  padding: 0;
125
125
  margin: 0;
126
126
  list-style-type: none;
@@ -128,7 +128,7 @@
128
128
  &:last-of-type {
129
129
  margin-top: auto;
130
130
  }
131
- `,children:(0,w.jsxs)(oe,{css:E.css`
131
+ `,children:(0,C.jsxs)(ne,{css:A.css`
132
132
  align-items: center;
133
133
  border-radius: var(--rounded-base);
134
134
  display: flex;
@@ -142,10 +142,10 @@
142
142
  &.active {
143
143
  background: var(--gray-700);
144
144
  }
145
- `,className:o(s.href),route:s.href,children:[(0,w.jsx)("i",{css:E.css`
145
+ `,className:o(s.href),route:s.href,children:[(0,C.jsx)("i",{css:A.css`
146
146
  align-items: center;
147
147
  display: flex;
148
- `,dangerouslySetInnerHTML:{__html:s.icon}}),s.title,d?(0,w.jsx)("span",{css:E.css`
148
+ `,dangerouslySetInnerHTML:{__html:s.icon}}),s.title,d?(0,C.jsx)("span",{css:A.css`
149
149
  font-size: var(--fs-xxs);
150
150
  display: inline-block;
151
151
  width: 12px;
@@ -154,7 +154,7 @@
154
154
  background-color: var(--red-tooltip);
155
155
  text-align: center;
156
156
  line-height: 12px;
157
- `,children:d}):null]})},l)})}),!r&&(0,w.jsxs)("a",{target:"_blank",href:"https://chrome.google.com/webstore/detail/uniform-context/dcmlokofjljnfjcknpmhjocogllfbhkg",css:E.css`
157
+ `,children:d}):null]})},l)})}),!r&&(0,C.jsxs)("a",{target:"_blank",href:"https://chrome.google.com/webstore/detail/uniform-context/dcmlokofjljnfjcknpmhjocogllfbhkg",css:A.css`
158
158
  align-items: center;
159
159
  border-radius: var(--rounded-base);
160
160
  display: flex;
@@ -169,14 +169,14 @@
169
169
  &.active {
170
170
  background: var(--gray-700);
171
171
  }
172
- `,rel:"noreferrer",children:[(0,w.jsx)("i",{css:E.css`
172
+ `,rel:"noreferrer",children:[(0,C.jsx)("i",{css:A.css`
173
173
  align-items: center;
174
174
  display: flex;
175
- `,dangerouslySetInnerHTML:{__html:vo}}),"Install Chrome Extension"]}),(0,w.jsx)(ut,{})]})};var Ht=require("@uniformdev/design-system"),X=require("formik"),ie=F(require("yup"));function ce({scores:e,scoreOverrides:o}){let r=[];return o?(Object.entries(o).forEach(([t,n])=>{var d;let s=(d=e[t])!=null?d:0;if(s===n.override)return;let l=n.override-s;r.push({type:"modscoreS",data:{dimension:t,delta:l}})}),r):[]}function ye({quirks:e,quirkOverrides:o}){let r={};if(!!o)return Object.entries(o).forEach(([t,n])=>{e[t]!==n.override&&(r[t]=n.override)}),Object.keys(r).length>0?r:void 0}var Ce=require("@uniformdev/context");function vt({manifest:e,visitor:o,override:r}){let t=new Ce.Context({manifest:e,transitionStore:new ze({initialData:o})}),n={...t.scores};t.storage.updateData([r]);let l={...{...t.scores}};return Object.entries(l).forEach(([d,p])=>{n[d]===p&&delete l[d]}),l}var ze=class extends Ce.TransitionDataStore{async handleDelete(){}async handleUpdateData(){}};var Y=require("@emotion/react"),ft=F(require("react")),H=require("@emotion/react/jsx-runtime"),ht=(0,Y.css)({willChange:"height"}),fo=Y.css`
175
+ `,dangerouslySetInnerHTML:{__html:xo}}),"Install Chrome Extension"]}),(0,C.jsx)(ft,{})]})};var Zt=require("@uniformdev/design-system"),te=require("formik"),se=q(require("yup"));function le({scores:e,scoreOverrides:o}){let r=[];return o?(Object.entries(o).forEach(([t,n])=>{var d;let s=(d=e[t])!=null?d:0;if(s===n.override)return;let l=n.override-s;r.push({type:"modscoreS",data:{dimension:t,delta:l}})}),r):[]}function ke({quirks:e,quirkOverrides:o}){let r={};if(!!o)return Object.entries(o).forEach(([t,n])=>{e[t]!==n.override&&(r[t]=n.override)}),Object.keys(r).length>0?r:void 0}var Te=require("@uniformdev/context");function yt({manifest:e,visitor:o,override:r}){let t=new Te.Context({manifest:e,transitionStore:new ze({initialData:o})}),n={...t.scores};t.storage.updateData([r]);let l={...{...t.scores}};return Object.entries(l).forEach(([d,p])=>{n[d]===p&&delete l[d]}),l}var ze=class extends Te.TransitionDataStore{async handleDelete(){}async handleUpdateData(){}};var J=require("@emotion/react"),Ct=q(require("react")),H=require("@emotion/react/jsx-runtime"),wt=(0,J.css)({willChange:"height"}),yo=J.css`
176
176
  border-bottom: 2px solid var(--brand-secondary-1);
177
177
  font-size: var(--fs-base);
178
178
  margin: 0;
179
- `,ho=Y.css`
179
+ `,Co=J.css`
180
180
  align-items: center;
181
181
  border: none;
182
182
  background: none;
@@ -186,24 +186,24 @@
186
186
  padding: var(--spacing-sm) 0;
187
187
  font-weight: var(--fw-bold);
188
188
  justify-content: space-between;
189
- `,bo=Y.css`
189
+ `,wo=J.css`
190
190
  align-self: center;
191
- `,xo=Y.css`
191
+ `,ko=J.css`
192
192
  transform: rotate(-180deg);
193
- `,we=({children:e})=>(0,H.jsx)("div",{css:[ht],children:e}),ke=({title:e,children:o})=>{let[r,t]=ft.useState(!1),n=e.split(" ").join("-").toLocaleLowerCase();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("h3",{css:fo,children:(0,H.jsxs)("button",{"aria-expanded":r,css:ho,title:e,id:n,"aria-controls":`${n}-section`,onClick:()=>t(s=>!s),type:"button",children:[e,(0,H.jsx)("i",{css:[bo,r?xo:void 0],children:(0,H.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,H.jsx)("path",{d:"M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z",fill:"currentColor"})})})]})}),(0,H.jsx)("div",{id:`${n}-section`,css:[ht,Y.css`
193
+ `,De=({children:e})=>(0,H.jsx)("div",{css:[wt],children:e}),Se=({title:e,children:o})=>{let[r,t]=Ct.useState(!1),n=e.split(" ").join("-").toLocaleLowerCase();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("h3",{css:yo,children:(0,H.jsxs)("button",{"aria-expanded":r,css:Co,title:e,id:n,"aria-controls":`${n}-section`,onClick:()=>t(s=>!s),type:"button",children:[e,(0,H.jsx)("i",{css:[wo,r?ko:void 0],children:(0,H.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,H.jsx)("path",{d:"M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z",fill:"currentColor"})})})]})}),(0,H.jsx)("div",{id:`${n}-section`,css:[wt,J.css`
194
194
  padding: var(--spacing-sm) 0;
195
- `],role:"region","aria-labelledby":n,children:r?o:null})]})};var bt=require("@emotion/react"),yo=require("@emotion/react/jsx-runtime"),q=({children:e,...o})=>(0,yo.jsx)("fieldset",{css:bt.css`
195
+ `],role:"region","aria-labelledby":n,children:r?o:null})]})};var kt=require("@emotion/react"),Tt=require("@emotion/react/jsx-runtime"),N=({children:e,...o})=>(0,Tt.jsx)("fieldset",{css:kt.css`
196
196
  border: none;
197
197
  padding: 0;
198
198
  & legend {
199
199
  margin-bottom: var(--spacing-base);
200
200
  }
201
- `,...o,children:e});var xt=require("@emotion/react"),Co=require("@emotion/react/jsx-runtime"),re=({children:e})=>(0,Co.jsx)("legend",{css:xt.css`
201
+ `,...o,children:e});var Dt=require("@emotion/react"),St=require("@emotion/react/jsx-runtime"),ie=({children:e})=>(0,St.jsx)("legend",{css:Dt.css`
202
202
  font-size: var(--fs-md);
203
203
  font-weight: var(--fw-bold);
204
204
  border-bottom: 1px solid var(--gray-400);
205
205
  width: 100%;
206
- `,children:e});var Te=require("@uniformdev/design-system");var wo=require("@emotion/react/jsx-runtime"),Ue=e=>({field:o,form:r,meta:t,...n})=>(0,wo.jsx)(e,{...o,...n,errorMessage:r.errors[o.name]});var De=Ue(Te.Input),yt=Ue(Te.InputSelect);var Se=require("@uniformdev/design-system");var N=require("@emotion/react"),Ct=N.css`
206
+ `,children:e});var Le=require("@uniformdev/design-system");var Lt=require("@emotion/react/jsx-runtime"),Ue=e=>({field:o,form:r,meta:t,...n})=>(0,Lt.jsx)(e,{...o,...n,errorMessage:r.errors[o.name]});var Oe=Ue(Le.Input),Ot=Ue(Le.InputSelect);var Re=require("@uniformdev/design-system");var Z=require("@emotion/react"),Rt=Z.css`
207
207
  background: var(--white);
208
208
  border: 1px solid var(--gray-500);
209
209
  border-radius: var(--rounded-base);
@@ -214,26 +214,26 @@
214
214
  cursor: not-allowed;
215
215
  color: var(--gray-200);
216
216
  }
217
- `,yr=N.css`
217
+ `,Qr=Z.css`
218
218
  margin: var(--spacing-base) 0;
219
- `,wt=N.css`
219
+ `,Vt=Z.css`
220
220
  color: var(--brand-secondary-1);
221
221
  display: flex;
222
222
  flex-direction: column;
223
223
  margin: 0 0 var(--spacing-sm);
224
- `,kt=N.css`
224
+ `,Pt=Z.css`
225
225
  color: var(--brand-secondary-1);
226
226
  display: block;
227
227
  flex: 1 100%;
228
228
  font-weight: var(--fw-bold);
229
229
  margin: 0 0 var(--spacing-sm);
230
- `,Cr=N.css`
230
+ `,Fr=Z.css`
231
231
  color: var(--gray-600);
232
232
  font-size: var(--fs-sm);
233
- `,wr=N.css`
233
+ `,qr=Z.css`
234
234
  color: var(--brand-secondary-5);
235
235
  display: block;
236
- `,Tt=N.css`
236
+ `,It=Z.css`
237
237
  flex-direction: row;
238
238
  flex-wrap: wrap;
239
239
 
@@ -301,23 +301,23 @@
301
301
  flex: 1 0 20%;
302
302
  padding: 10px;
303
303
  }
304
- `;var Z=require("@emotion/react/jsx-runtime"),Dt=({field:e,form:o,meta:r,...t})=>{var m,i;let{label:n,caption:s,min:l=0,max:d=100,step:p}=t;return(0,Z.jsxs)("div",{children:[(0,Z.jsxs)("label",{css:[wt,Tt],children:[(0,Z.jsx)("span",{css:kt,children:n}),(0,Z.jsx)("input",{type:"range",min:l,max:d,step:p,...e,value:(m=e.value)!=null?m:0}),(0,Z.jsx)("span",{className:"value-display",children:(i=e.value)!=null?i:0})]}),s?(0,Z.jsx)(Se.Caption,{children:s}):null,o.touched[e.name]&&o.errors[e.name]?(0,Z.jsx)(Se.ErrorMessage,{message:o.errors[e.name]}):null]})};var Lt=require("@emotion/react"),Do=require("@emotion/react/jsx-runtime"),ko=`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
304
+ `;var Q=require("@emotion/react/jsx-runtime"),Ht=({field:e,form:o,meta:r,...t})=>{var m,i;let{label:n,caption:s,min:l=0,max:d=100,step:p}=t;return(0,Q.jsxs)("div",{children:[(0,Q.jsxs)("label",{css:[Vt,It],children:[(0,Q.jsx)("span",{css:Pt,children:n}),(0,Q.jsx)("input",{type:"range",min:l,max:d,step:p,...e,value:(m=e.value)!=null?m:0}),(0,Q.jsx)("span",{className:"value-display",children:(i=e.value)!=null?i:0})]}),s?(0,Q.jsx)(Re.Caption,{children:s}):null,o.touched[e.name]&&o.errors[e.name]?(0,Q.jsx)(Re.ErrorMessage,{message:o.errors[e.name]}):null]})};var Et=require("@emotion/react"),Bt=require("@emotion/react/jsx-runtime"),To=`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
305
305
  <path d="M4.2 7.2C4.53137 7.2 4.8 6.93137 4.8 6.6C4.8 6.26863 4.53137 6 4.2 6C3.86863 6 3.6 6.26863 3.6 6.6C3.6 6.93137 3.86863 7.2 4.2 7.2Z" fill="#828282"/>
306
306
  <path d="M8.4 6.6C8.4 6.93137 8.13137 7.2 7.8 7.2C7.46863 7.2 7.2 6.93137 7.2 6.6C7.2 6.26863 7.46863 6 7.8 6C8.13137 6 8.4 6.26863 8.4 6.6Z" fill="#828282"/>
307
307
  <path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM6 10.8C8.65097 10.8 10.8 8.65097 10.8 6C10.8 5.49824 10.723 5.01447 10.5802 4.55984C10.0795 4.69533 9.55274 4.76763 9.00913 4.76763C6.77526 4.76763 4.82652 3.54683 3.79366 1.73601C2.25282 2.53492 1.2 4.14451 1.2 6C1.2 8.65097 3.34903 10.8 6 10.8Z" fill="#828282"/>
308
- </svg>`,To=`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
308
+ </svg>`,Do=`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
309
309
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.59995 5.05775C4.9254 5.05775 5.99992 3.98325 5.99992 2.65778C5.99992 1.33232 4.9254 0.257812 3.59995 0.257812C2.27448 0.257812 1.19998 1.33232 1.19998 2.65778C1.19998 3.98325 2.27448 5.05775 3.59995 5.05775ZM3.59999 3.85777C4.26272 3.85777 4.79997 3.32052 4.79997 2.65778C4.79997 1.99505 4.26272 1.4578 3.59999 1.4578C2.93725 1.4578 2.4 1.99505 2.4 2.65778C2.4 3.32052 2.93725 3.85777 3.59999 3.85777Z" fill="#828282"/>
310
310
  <path d="M5.39993 6.8577C5.73131 6.8577 5.99993 7.12632 5.99993 7.45769V11.0576H7.19991V7.45769C7.19991 6.46356 6.39406 5.65771 5.39993 5.65771H1.79998C0.80588 5.65771 0 6.46356 0 7.45769V11.0576H1.19999V7.45769C1.19999 7.12632 1.46861 6.8577 1.79998 6.8577H5.39993Z" fill="#828282"/>
311
311
  <path d="M11.9999 5.05762H8.3999V6.2576H11.9999V5.05762Z" fill="#828282"/>
312
312
  <path d="M8.3999 7.45752H11.9999V8.6575H8.3999V7.45752Z" fill="#828282"/>
313
313
  <path d="M11.9999 2.65771H8.3999V3.8577H11.9999V2.65771Z" fill="#828282"/>
314
- </svg>`,St=`<svg width="15" height="11" viewBox="0 0 15 11" fill="none" xmlns="http://www.w3.org/2000/svg">
314
+ </svg>`,Mt=`<svg width="15" height="11" viewBox="0 0 15 11" fill="none" xmlns="http://www.w3.org/2000/svg">
315
315
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.113 3.12646C8.16729 3.12646 9.02195 3.98113 9.02195 5.03541C9.02195 5.86658 8.49075 6.57368 7.74932 6.83573V10.1259H6.47669V6.83573C5.73526 6.57368 5.20405 5.86658 5.20405 5.03541C5.20405 3.98113 6.05872 3.12646 7.113 3.12646ZM7.113 4.39909C7.46443 4.39909 7.74932 4.68398 7.74932 5.03541C7.74932 5.38684 7.46443 5.67172 7.113 5.67172C6.76158 5.67172 6.47669 5.38684 6.47669 5.03541C6.47669 4.68398 6.76158 4.39909 7.113 4.39909Z" fill="#828282"/>
316
316
  <path d="M3.96336 1.88578C3.15733 2.69183 2.65879 3.80537 2.65879 5.03535C2.65879 6.42093 3.29145 7.65875 4.28366 8.47569L5.1895 7.56984C4.42501 6.98876 3.93142 6.06969 3.93142 5.03535C3.93142 4.1568 4.28752 3.36142 4.86325 2.78567L3.96336 1.88578Z" fill="#828282"/>
317
317
  <path d="M9.36269 2.7856C9.93846 3.36136 10.2946 4.15676 10.2946 5.03535C10.2946 6.06973 9.80096 6.98882 9.03643 7.5699L9.94228 8.47575C10.9345 7.65881 11.5672 6.42096 11.5672 5.03535C11.5672 3.80533 11.0687 2.69177 10.2626 1.88571L9.36269 2.7856Z" fill="#828282"/>
318
318
  <path d="M0.113525 5.03534C0.113525 3.10251 0.896953 1.35266 2.16359 0.0860049L3.06347 0.985892C2.02714 2.02224 1.38616 3.45394 1.38616 5.03534C1.38616 6.61674 2.02714 8.04844 3.06347 9.08479L2.16358 9.98468C0.89695 8.71802 0.113525 6.96817 0.113525 5.03534Z" fill="#828282"/>
319
319
  <path d="M12.0624 9.98474C13.329 8.71809 14.1125 6.96821 14.1125 5.03534C14.1125 3.10248 13.329 1.3526 12.0624 0.0859375L11.1625 0.985824C12.1988 2.02218 12.8398 3.4539 12.8398 5.03534C12.8398 6.61678 12.1988 8.0485 11.1625 9.08486L12.0624 9.98474Z" fill="#828282"/>
320
- </svg>`,Ot=({type:e})=>{let o="";switch(e){case"Audience":o=ko;break;case"Signal":o=St;break;case"Intent":o=St;break;case"Enrichment":o=To;break}return(0,Do.jsx)("i",{css:Lt.css`
320
+ </svg>`,At=({type:e})=>{let o="";switch(e){case"Audience":o=To;break;case"Signal":o=Mt;break;case"Intent":o=Mt;break;case"Enrichment":o=Do;break}return(0,Bt.jsx)("i",{css:Et.css`
321
321
  align-items: center;
322
322
  display: inline-block;
323
323
  `,dangerouslySetInnerHTML:{__html:o}})};var P=require("@emotion/react"),So=P.keyframes`from {
@@ -376,47 +376,47 @@ to {
376
376
  input {
377
377
  padding: var(--spacing-sm);
378
378
  }
379
- `};var A=require("@emotion/react"),ne=require("@emotion/react/jsx-runtime"),Le=({children:e})=>(0,ne.jsx)("table",{css:A.css`
379
+ `};var B=require("@emotion/react"),X=require("@emotion/react/jsx-runtime"),Ve=({children:e})=>(0,X.jsx)("table",{css:B.css`
380
380
  border-collapse: collapse;
381
381
  display: table;
382
382
  width: 100%;
383
383
  font-size: var(--fs-sm);
384
- `,children:e}),Rt=({children:e})=>(0,ne.jsx)("thead",{css:A.css`
384
+ `,children:e}),Qt=({children:e})=>(0,X.jsx)("thead",{css:B.css`
385
385
  background: var(--gray-50);
386
386
  text-align: left;
387
387
  & tr {
388
388
  border-bottom: 1px solid var(--gray-200);
389
389
  }
390
- `,children:e}),Oe=({children:e})=>(0,ne.jsx)("tbody",{children:e}),le=({border:e,children:o})=>(0,ne.jsx)("tr",{css:e?A.css`
390
+ `,children:e}),Pe=({children:e})=>(0,X.jsx)("tbody",{children:e}),de=({border:e,children:o})=>(0,X.jsx)("tr",{css:e?B.css`
391
391
  border-bottom: 1px solid var(--gray-200);
392
392
  &:where(:last-child) {
393
393
  border: none;
394
394
  }
395
- `:void 0,children:o}),Re=({children:e,width:o})=>(0,ne.jsx)("th",{css:A.css`
395
+ `:void 0,children:o}),Ie=({children:e,width:o})=>(0,X.jsx)("th",{css:B.css`
396
396
  outline: none;
397
397
  padding: var(--spacing-sm);
398
398
  width: ${o!=null?o:"auto"};
399
- `,children:e});function Lo(e){switch(e){case"light":return A.css`
399
+ `,children:e});function Lo(e){switch(e){case"light":return B.css`
400
400
  color: var(--gray-400);
401
- `;case"dark":return A.css`
401
+ `;case"dark":return B.css`
402
402
  color: var(--brand-secondary-1);
403
- `}}function Oo(e){return A.css`
403
+ `}}function Oo(e){return B.css`
404
404
  text-align: ${e};
405
- `}var z=({alignment:e="left",border:o,color:r="dark",children:t})=>(0,ne.jsx)("td",{css:[A.css`
405
+ `}var z=({alignment:e="left",border:o,color:r="dark",children:t})=>(0,X.jsx)("td",{css:[B.css`
406
406
  padding: var(--spacing-base);
407
407
  max-width: 180px;
408
408
  overflow-wrap: break-word;
409
409
  position: relative;
410
- `,Lo(r),Oo(e),o?A.css`
410
+ `,Lo(r),Oo(e),o?B.css`
411
411
  border-left: 1px solid var(--gray-200);
412
- `:void 0],children:t});var Ve=require("@emotion/react"),Vt=Ve.css`
412
+ `:void 0],children:t});var He=require("@emotion/react"),Ft=He.css`
413
413
  position: relative;
414
414
  display: inline-block;
415
415
  font-size: var(--fs-base);
416
- `,Pt=Ve.css`
416
+ `,qt=He.css`
417
417
  display: block;
418
418
  text-decoration: line-through;
419
- `,It=Ve.css`
419
+ `,Nt=He.css`
420
420
  position: absolute;
421
421
  width: 6px;
422
422
  height: 6px;
@@ -424,7 +424,7 @@ to {
424
424
  top: 9px;
425
425
  background: var(--red-tooltip);
426
426
  border-radius: 3px;
427
- `;var O=require("@emotion/react/jsx-runtime"),Ro=({dimensionIndex:e,dimensions:o,disableEditOverride:r,onClick:t,preemptiveOverrides:n})=>{var d;let{settings:s}=ge(),l=(d=n!=null?n:s.scoreOverrides)!=null?d:{};return(0,O.jsx)(Le,{children:(0,O.jsx)(Oe,{children:Object.entries(o).sort(([p],[m])=>p.localeCompare(m)).map(([p,m])=>{var h;let{dim:i,name:a,type:c,category:f}=(h=e[p])!=null?h:{name:p,dim:p,type:void 0,category:void 0},g=l[i];return(0,O.jsxs)(le,{children:[(0,O.jsxs)(z,{children:[g!==void 0?(0,O.jsx)("s",{css:Pt,children:g.initial}):null,(0,O.jsxs)("b",{css:Vt,children:[m,g!==void 0&&(0,O.jsx)("i",{css:It})]})]}),(0,O.jsx)(z,{children:(0,O.jsxs)("div",{onClick:()=>t==null?void 0:t(i),css:t?{cursor:"pointer"}:void 0,children:[(0,O.jsx)("span",{css:b.divider,role:"presentation"}),(0,O.jsxs)("div",{children:[(0,O.jsx)(Ot,{type:c})," ",c]}),(0,O.jsxs)("strong",{children:[f?`${f}:`:""," ",a]})]})}),(0,O.jsx)(z,{alignment:"right",color:"light",children:g!==void 0&&!r?(0,O.jsx)(oe,{route:`/overrides/${i}`,children:"Edit override"}):null})]},i)})})})},J=Ro;var R=require("@emotion/react/jsx-runtime"),Vo=ie.object({dimension:ie.string(),score:ie.number()}),je=({settings:e,saveSettings:o,state:r,actions:t,dimensionIndex:{index:n}})=>{var p,m;let s=e.route?[...e.route.matchAll(/overrides\/(?!.*add)(\w+)?/g)]:[],l=s[0]?s[0][1]:"";if(!((p=r.manifest.project.pz)!=null&&p.sig))return(0,R.jsx)("p",{children:"Error, manifest is broken or there is no signal to override."});let d=Object.entries(n).filter(([,i])=>i.type!=="Audience"&&i.type!=="Intent").map(([i,a])=>{let c=a.type?`${a.type}: `:"",f=a.category?`${a.category} - `:"",g=`${c}${f}${a.name}`;return{value:i,label:g}});return d.unshift({value:"",label:"Choose dimension to override"}),(0,R.jsx)(X.Formik,{initialValues:{dimension:l,score:(m=r.scores[l])!=null?m:0},validate:i=>{let a={};return(i.score===r.scores[i.dimension]||i.score===0&&!r.scores[l])&&(a.score="You have to modify current score value"),a},validationSchema:Vo,enableReinitialize:!0,validateOnChange:!1,validateOnBlur:!1,onSubmit:async i=>{var h,C,T,D,G,$;let a=(C=(h=n[i.dimension])==null?void 0:h.cap)!=null?C:0,c=Math.min(i.score,a),f={...e,scoreOverrides:{...e.scoreOverrides,[i.dimension]:{initial:($=(G=(D=(T=e.scoreOverrides)==null?void 0:T[i.dimension])==null?void 0:D.initial)!=null?G:r.scores[i.dimension])!=null?$:0,override:c}},route:"/overrides"};await o(f);let g=ce({scores:r.scores,scoreOverrides:f.scoreOverrides});t.rawUpdate(g)},children:({isSubmitting:i,values:a,setFieldValue:c})=>{var T;let f=vt({manifest:r.manifest,visitor:r.data,override:{type:"modscore",data:{dimension:a.dimension,delta:a.score-((T=r.scores[a.dimension])!=null?T:0)}}}),g=Object.entries(r.scores).reduce((D,[G,$])=>(D[G]={initial:$,override:$},D),{}),h={max:100,step:50};n[a.dimension]&&(h.max=n[a.dimension].cap,h.step=n[a.dimension].str);let C=a.score&&Object.keys(f).length>0;return(0,R.jsxs)(X.Form,{css:b.page,children:[(0,R.jsx)("h1",{css:b.title,children:"Override Dimension"}),(0,R.jsx)(X.Field,{component:yt,label:"Dimension",id:"dimension",name:"dimension",options:d,disabled:i,onChange:D=>{c("score",0,!1),c("dimension",D.target.value)}}),(0,R.jsx)("p",{css:b.text,children:(0,R.jsx)("small",{children:"Audiences and Intents are aggregated from other dimension scores and cannot be overridden directly."})}),a.dimension?(0,R.jsx)(X.Field,{component:Dt,name:"score",label:"Score",disabled:i,max:h.max,step:h.step,caption:`Range: 0 - ${h.max} in increments of ${h.step}`}):null,(0,R.jsxs)(q,{disabled:i,css:{marginBottom:"2rem"},children:[C?(0,R.jsx)(we,{children:(0,R.jsx)(ke,{title:`Impacted Dimensions (${Object.keys(f).length})`,children:(0,R.jsx)(J,{preemptiveOverrides:g,dimensionIndex:n,dimensions:f,disableEditOverride:!0})})}):null,(0,R.jsx)(Ht.Button,{type:"submit",css:b.submitButton,disabled:i,children:"Save"}),(0,R.jsx)(oe,{route:"/overrides",css:b.cancelButton,children:"Cancel"})]})]})}})};var _e=require("@uniformdev/design-system"),Et=require("@uniformdev/design-system"),At=F(require("react"));async function Pe({actions:e,saveSettings:o,scores:r,settings:t}){var d,p;let n=(d=t.scoreOverrides)!=null?d:{},s={...n},l=[];for(let m of Object.keys(n)){let i=n==null?void 0:n[m];delete s[m],l.push({type:"modscoreS",data:{dimension:m,delta:i.initial-((p=r[m])!=null?p:0)}})}await o({...t,scoreOverrides:s}),await e.rawUpdate(l)}async function Mt({quirk:e,settings:o,saveSettings:r,actions:t}){var l;let n=(l=o.quirkOverrides)==null?void 0:l[e];if(!n)return;let s={...o.quirkOverrides};delete s[e],await r({...o,quirkOverrides:s}),await t.rawUpdate([{type:"setquirk",data:{key:e,value:n.initial}}])}var de=require("@emotion/react/jsx-runtime"),se=({title:e,text:o,buttonGroup:r,children:t})=>(0,de.jsxs)("div",{css:fe,children:[(0,de.jsx)("h2",{css:he,children:e}),(0,de.jsx)("p",{css:be,children:o}),t,r?(0,de.jsx)("div",{css:xe,children:r}):null]});var S=require("@emotion/react/jsx-runtime"),Bt=({dimensionIndex:{index:e},state:{scores:o,data:r},actions:t,saveSettings:n,settings:s})=>{let l=At.useMemo(()=>{let i={};return Object.keys(e).filter(a=>!o[a]).map(a=>{i[e[a].dim]=0}),i},[o,e]),d=Object.keys(o).length,p=d+Object.keys(l).length,m=()=>{t.rawUpdate([{type:"setcontrol",data:!r.controlGroup}])};return(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)("article",{css:b.page,children:[(0,S.jsxs)("div",{css:b.headingGroup,children:[(0,S.jsxs)("h2",{css:b.title,children:["Dimensions",(0,S.jsxs)("small",{children:[d," active of ",p]})]}),(0,S.jsx)("div",{css:b.reset,children:(0,S.jsx)(_e.Button,{buttonType:"ghost",onClick:()=>Pe({actions:t,saveSettings:n,scores:o,settings:s}).then(t.forget),children:"clear all dimensions"})}),(0,S.jsx)(Et.Switch,{name:"controlGroup",label:"Control Group",onChange:m,checked:r.controlGroup})]}),d>0?(0,S.jsx)(J,{dimensionIndex:e,dimensions:o}):(0,S.jsx)(se,{title:r.controlGroup?"In control group":"No active dimensions",text:r.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have score in any dimensions yet.",buttonGroup:r.controlGroup?(0,S.jsx)(_e.Button,{buttonType:"secondary",onClick:m,children:"Exit control group"}):null}),(0,S.jsx)(we,{children:(0,S.jsx)(ke,{title:`Inactive Dimensions (${Object.keys(l).length})`,children:(0,S.jsx)(J,{dimensionIndex:e,dimensions:l})})})]})})};var Qt=require("@uniformdev/design-system"),Ge=require("@uniformdev/design-system");var V=require("@emotion/react/jsx-runtime"),Ft=({dimensionIndex:{index:e},state:{data:o,scores:r},actions:t,settings:n,saveSettings:s})=>{var a;let l=(a=n.scoreOverrides)!=null?a:{},d=Object.keys(l).length,p=c=>(c==null||c.preventDefault(),s({...n,route:"/overrides/add"})),m=()=>{t.rawUpdate([{type:"setcontrol",data:!o.controlGroup}])},i={};return Object.entries(r).map(([c,f])=>{l[c]!==void 0&&(i[c]=f)}),(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)("article",{css:b.page,children:[(0,V.jsxs)("div",{css:b.headingGroup,children:[(0,V.jsx)("h2",{css:b.title,children:"What if?"}),(0,V.jsx)("div",{css:b.reset,children:(0,V.jsx)(Ge.Button,{buttonType:"ghost",onClick:()=>Pe({actions:t,settings:n,saveSettings:s,scores:r}),children:"delete all overrides"})}),(0,V.jsx)(Qt.AddButton,{onClick:p})]}),(0,V.jsx)("p",{children:"Override dimension scores to test personalization"}),d>0?(0,V.jsx)(J,{dimensionIndex:e,dimensions:i,onClick:c=>s({...n,route:`/overrides/${c}`})}):(0,V.jsx)(se,{title:o.controlGroup?"In control group":"No overrides",text:o.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have any dimension overrides yet.",buttonGroup:o.controlGroup?(0,V.jsx)(Ge.Button,{buttonType:"secondary",onClick:m,children:"Exit control group"}):null})]})})};var pe=require("@uniformdev/design-system"),Nt=require("react");var He=require("@uniformdev/design-system"),Me=require("react");var Ie=require("@emotion/react/jsx-runtime"),Po=({name:e,value:o,submit:r})=>{let[t,n]=(0,Me.useState)(o!=null?o:"");return(0,Me.useEffect)(()=>{n(o!=null?o:"")},[o]),(0,Ie.jsxs)("div",{css:{display:"flex",gap:"var(--spacing-sm)"},children:[(0,Ie.jsx)(He.Input,{type:"text",css:[Ct],name:e,value:t,onChange:d=>{n(d.target.value)}}),(0,Ie.jsx)(He.Button,{buttonType:"primary",disabled:t===o,size:"sm",onClick:()=>r(e,t!=null?t:""),children:"Save"})]})},qt=Po;var x=require("@emotion/react/jsx-runtime"),Zt=({...e})=>{let{state:{data:{quirks:o}},quirksIndex:{index:r},settings:t,saveSettings:n,actions:s}=e,[l,d]=(0,Nt.useState)(""),p;l&&(p=r[l]);let m=async(i,a)=>{var g,h,C;d("");let c={...t,quirkOverrides:{...t.quirkOverrides,[i]:{initial:(C=(h=(g=t.quirkOverrides)==null?void 0:g[i])==null?void 0:h.initial)!=null?C:o[i],override:a}}};await n(c);let f=ye({quirks:o,quirkOverrides:c.quirkOverrides});await s.update({quirks:f})};return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("article",{css:[b.page,b.quirks],children:[(0,x.jsx)("h1",{css:b.title,children:"Quirks"}),(0,x.jsx)("p",{css:b.text,children:"Keys defined in Uniform and their current, programmatically defined values for this visit."}),Object.keys(r).length?(0,x.jsxs)(Le,{children:[(0,x.jsx)(Rt,{children:(0,x.jsxs)(le,{children:[(0,x.jsx)(Re,{width:"30%",children:"Key"}),(0,x.jsx)(Re,{width:"50%",children:"Value"}),(0,x.jsx)(Re,{width:"20%",children:""})]})}),(0,x.jsx)(Oe,{children:Object.values(r).map(({name:i,value:a,id:c})=>{var h,C,T;let f=(C=(h=t.quirkOverrides)==null?void 0:h[i])==null?void 0:C.initial,g=[];return p&&p.options&&(g=p.options.map(D=>({value:D.value,label:D.name}))),(0,x.jsxs)(le,{border:"bottom",children:[(0,x.jsx)(z,{children:(0,x.jsx)("strong",{children:i})}),(0,x.jsxs)(z,{children:[l!==c?(0,x.jsxs)("div",{onClick:()=>{d(c)},children:[f?(0,x.jsx)("div",{children:(0,x.jsx)("s",{children:f})}):null,a]}):null,l===c&&p&&(0,x.jsx)(x.Fragment,{children:p.options?(0,x.jsx)(pe.InputSelect,{showLabel:!1,label:`Change ${i}`,defaultOption:`Change ${i}`,name:c,onChange:D=>m(D.target.name,D.target.value),options:g}):(0,x.jsx)(qt,{name:c,value:a,submit:m})})]}),(0,x.jsx)(z,{children:l?null:(T=t.quirkOverrides)!=null&&T[c]?(0,x.jsx)(pe.Button,{buttonType:"ghost",onClick:()=>{Mt({quirk:c,settings:t,saveSettings:n,actions:s})},children:(0,x.jsx)("small",{children:"Clear Override"})}):(0,x.jsx)(pe.Button,{buttonType:"ghost",onClick:()=>{d(c)},children:(0,x.jsx)("small",{children:"Override"})})})]},c)})})]}):(0,x.jsx)(se,{title:"No quirks configured",text:"There are currently no quirks setup. Try to connect to Uniform API to load additional information about Quirks and Quirks without defined value."})]})})};var $e=require("@uniformdev/design-system"),Ke=require("@uniformdev/design-system");var k=require("@emotion/react/jsx-runtime"),zt=({settings:e,saveSettings:o,actions:r,state:{data:t},clearAllExtensionData:n})=>(0,k.jsxs)("article",{css:[b.page,{display:"flex",flexDirection:"column",gap:"var(--spacing-base)"}],children:[(0,k.jsx)("h1",{css:b.title,children:"Settings"}),(0,k.jsxs)(q,{children:[(0,k.jsx)(re,{children:"Data Connection"}),(0,k.jsx)($e.Button,{buttonType:"tertiary",onClick:()=>{o({...e,route:"/connect"})},children:"Manage Connection to Uniform"})]}),(0,k.jsxs)(q,{children:[(0,k.jsx)(re,{children:"Storage Consent"}),(0,k.jsx)(Ke.Switch,{label:"Store visitor data",id:"consent-mode",name:"consentMode",checked:t.consent,onChange:s=>{r.rawUpdate([{type:"consent",data:s.currentTarget.checked}]),o({...e,consentMode:s.currentTarget.checked})}}),(0,k.jsx)("p",{children:(0,k.jsx)("small",{children:"Enabling storage consent allows storing behavior in this browser for personalization across sessions. Only affects this browser. Personalization works with this disabled, but dimension scores are lost on refresh."})})]}),(0,k.jsxs)(q,{children:[(0,k.jsx)(re,{children:"Logging"}),(0,k.jsx)(Ke.Switch,{label:"Write Uniform Context diagnostic logs to browser console",id:"logging",name:"logging",checked:e.logLevel==="debug",onChange:s=>o({...e,logLevel:s.currentTarget.checked?"debug":"none"})})]}),(0,k.jsxs)(q,{children:[(0,k.jsx)(re,{children:"Clear extension storage"}),(0,k.jsx)($e.Button,{onClick:()=>{n()},children:"Clear"}),(0,k.jsx)("p",{children:(0,k.jsx)("small",{children:"May be necessary when you have multiple different sites on the same domain name (e.g. http://localhost:3000) and there are some conflicts or other unexpected behaviour."})})]})]});var Ut=require("@uniformdev/context"),Ee=require("@uniformdev/context/api"),M=require("@uniformdev/design-system"),U=require("formik"),j=F(require("react"));var v=require("@emotion/react/jsx-runtime");function jt(e){let[o,r]=j.useState(e.currentData?"c":"qc"),[t,n]=j.useState(void 0),[s,l]=j.useState(void 0),d=j.useCallback(async i=>{let a=new Ee.UncachedManifestClient(i);n(void 0);try{let c=await a.get({preview:!0});return l({manifest:c,target:i}),c}catch(c){if(c instanceof Ee.ApiClientError){c.statusCode===403?n("API key is valid but does not have Context > Read Drafts permission, or the API key does not have permissions to the project, or the project does not exist."):n(c.errorMessage);return}if("message"in c){c.message==="Failed to fetch"?n("A network error occurred. Ensure the API host is valid."):n(c.message);return}n(JSON.stringify(c,null,2));return}},[]);j.useEffect(()=>{!e.currentData||d(e.currentData)},[d,e.currentData]);let p=async i=>{await d(i)&&(r("c"),await e.onConnect(i))},m=()=>{confirm("Disconnect from Uniform? Make sure to save your API key if you want to reconnect.")&&(r("qc"),l(void 0),n(void 0),e.onConnect(null))};return(0,v.jsxs)("div",{children:[t?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(M.ErrorMessage,{message:t}),(0,v.jsx)(M.Button,{buttonType:"secondary",type:"button",onClick:m,children:"Clear old/broken settings"})]}):null,o==="qc"||o==="mc"?(0,v.jsx)(Io,{...e,state:o,setState:r,onConnect:p}):(0,v.jsx)("div",{children:s?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("p",{children:["Connected to"," ",(0,v.jsx)("a",{href:`${s==null?void 0:s.target.apiHost}/projects/${s==null?void 0:s.target.projectId}`,target:"_blank",rel:"noopener noreferrer",css:{textDecoration:"underline"},children:(0,v.jsx)("strong",{children:s==null?void 0:s.manifest.project.name})})," ",(0,v.jsxs)("small",{children:["(",s==null?void 0:s.manifest.project.id,")"]})]}),(0,v.jsx)(M.Button,{buttonType:"secondary",type:"button",onClick:m,children:"Disconnect"})]}):null})]})}function Io({setState:e,state:o,currentData:r,onConnect:t}){var n,s,l;return(0,v.jsx)("div",{children:(0,v.jsx)(U.Formik,{initialValues:{apiHost:(n=r==null?void 0:r.apiHost)!=null?n:"https://uniform.app",apiKey:(s=r==null?void 0:r.apiKey)!=null?s:"",projectId:(l=r==null?void 0:r.projectId)!=null?l:"",qc:""},onSubmit:t,children:({setFieldValue:d,setFieldError:p,errors:{qc:m},isSubmitting:i})=>(0,v.jsx)(U.Form,{children:(0,v.jsx)("fieldset",{css:{display:"flex",flexDirection:"column",gap:"var(--spacing-base)"},children:o==="qc"?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{children:(0,v.jsx)(M.Input,{placeholder:"Paste Quick Connect Code Here",caption:"Copy the Quick Connect code after creating an API key in Uniform.",errorMessage:m,onChange:a=>{try{let c=(0,Ut.parseQuickConnect)(a.currentTarget.value);d("apiHost",c.apiHost),d("apiKey",c.apiKey),d("projectId",c.projectId)}catch(c){p("qc",c.message)}}})}),(0,v.jsxs)("section",{css:{display:"flex",gap:"var(--spacing-sm)"},children:[(0,v.jsx)(M.Button,{type:"submit",buttonType:"primary",disabled:i,children:i?"Verifying...":"Connect"}),(0,v.jsx)(M.Button,{type:"button",buttonType:"ghost",onClick:()=>e("mc"),disabled:i,children:"Connect Manually"})]})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{children:(0,v.jsx)(U.Field,{component:De,label:"API Key",name:"apiKey",caption:"Generate an API key in your Uniform team settings."})}),(0,v.jsx)("div",{children:(0,v.jsx)(U.Field,{component:De,label:"Project ID",name:"projectId",caption:"Available to copy after generating an API key"})}),(0,v.jsx)("div",{children:(0,v.jsx)(U.Field,{component:De,label:"API Host",name:"apiHost",caption:"Use a non-standard Uniform API endpoint. Most people will not not need this option."})}),(0,v.jsxs)("section",{css:{display:"flex",gap:"var(--spacing-sm)"},children:[(0,v.jsx)(M.Button,{type:"submit",buttonType:"primary",disabled:i,children:i?"Verifying...":"Connect"}),(0,v.jsx)(M.Button,{type:"button",buttonType:"ghost",onClick:()=>e("qc"),disabled:i,children:"Use Quick Connect"})]})]})})})})})}var ae=require("@emotion/react/jsx-runtime"),_t=({settings:e,saveSettings:o})=>{let r=e.apiKey&&e.projectId?{apiKey:e.apiKey,projectId:e.projectId,apiHost:e.apiHost}:void 0;return(0,ae.jsxs)("article",{css:b.page,children:[(0,ae.jsx)("h1",{css:b.title,children:"Connect to a Uniform Project"}),(0,ae.jsx)("p",{css:b.text,children:(0,ae.jsx)("small",{children:"Adding an API key and project ID enables human-readable dimension labels to be shown. You must have access to the Uniform project to do this."})}),(0,ae.jsx)(jt,{onConnect:async t=>{t?await o({...e,apiKey:t.apiKey,projectId:t.projectId,apiHost:t.apiHost}):await o({...e,apiKey:void 0,projectId:void 0,apiHost:void 0})},currentData:r})]})};var Be=require("react"),Gt=require("react-use");var Ae=require("@emotion/react/jsx-runtime"),$t=()=>{let[e,o]=(0,Be.useState)(!1),r=(0,Gt.useMountedState)();return(0,Be.useEffect)(()=>{setTimeout(()=>{r()&&o(!0)},1e3)},[r]),e?(0,Ae.jsxs)("article",{css:b.page,children:[(0,Ae.jsx)("h1",{children:"Loading..."}),(0,Ae.jsx)("p",{children:"Connecting to Uniform API for complete data."})]}):null};var Qe=require("@emotion/react/jsx-runtime"),Kt=()=>(0,Qe.jsxs)("article",{children:[(0,Qe.jsx)("h1",{children:"Something when wrong"}),(0,Qe.jsx)("p",{children:"We could not find the page you're looking for."})]});var L=require("@emotion/react/jsx-runtime"),Ho=We.css`
427
+ `;var O=require("@emotion/react/jsx-runtime"),Ro=({dimensionIndex:e,dimensions:o,disableEditOverride:r,onClick:t,preemptiveOverrides:n})=>{var d;let{settings:s}=he(),l=(d=n!=null?n:s.scoreOverrides)!=null?d:{};return(0,O.jsx)(Ve,{children:(0,O.jsx)(Pe,{children:Object.entries(o).sort(([p],[m])=>p.localeCompare(m)).map(([p,m])=>{var h;let{dim:i,name:a,type:c,category:f}=(h=e[p])!=null?h:{name:p,dim:p,type:void 0,category:void 0},g=l[i];return(0,O.jsxs)(de,{children:[(0,O.jsxs)(z,{children:[g!==void 0?(0,O.jsx)("s",{css:qt,children:g.initial}):null,(0,O.jsxs)("b",{css:Ft,children:[m,g!==void 0&&(0,O.jsx)("i",{css:Nt})]})]}),(0,O.jsx)(z,{children:(0,O.jsxs)("div",{onClick:()=>t==null?void 0:t(i),css:t?{cursor:"pointer"}:void 0,children:[(0,O.jsx)("span",{css:b.divider,role:"presentation"}),(0,O.jsxs)("div",{children:[(0,O.jsx)(At,{type:c})," ",c]}),(0,O.jsxs)("strong",{children:[f?`${f}:`:""," ",a]})]})}),(0,O.jsx)(z,{alignment:"right",color:"light",children:g!==void 0&&!r?(0,O.jsx)(ne,{route:`/overrides/${i}`,children:"Edit override"}):null})]},i)})})})},ee=Ro;var R=require("@emotion/react/jsx-runtime"),Vo=se.object({dimension:se.string(),score:se.number()}),je=({settings:e,saveSettings:o,state:r,actions:t,dimensionIndex:{index:n}})=>{var p,m;let s=e.route?[...e.route.matchAll(/overrides\/(?!.*add)(\w+)?/g)]:[],l=s[0]?s[0][1]:"";if(!((p=r.manifest.project.pz)!=null&&p.sig))return(0,R.jsx)("p",{children:"Error, manifest is broken or there is no signal to override."});let d=Object.entries(n).filter(([,i])=>i.type!=="Audience"&&i.type!=="Intent").map(([i,a])=>{let c=a.type?`${a.type}: `:"",f=a.category?`${a.category} - `:"",g=`${c}${f}${a.name}`;return{value:i,label:g}});return d.unshift({value:"",label:"Choose dimension to override"}),(0,R.jsx)(te.Formik,{initialValues:{dimension:l,score:(m=r.scores[l])!=null?m:0},validate:i=>{let a={};return(i.score===r.scores[i.dimension]||i.score===0&&!r.scores[l])&&(a.score="You have to modify current score value"),a},validationSchema:Vo,enableReinitialize:!0,validateOnChange:!1,validateOnBlur:!1,onSubmit:async i=>{var h,w,T,D,$,K;let a=(w=(h=n[i.dimension])==null?void 0:h.cap)!=null?w:0,c=Math.min(i.score,a),f={...e,scoreOverrides:{...e.scoreOverrides,[i.dimension]:{initial:(K=($=(D=(T=e.scoreOverrides)==null?void 0:T[i.dimension])==null?void 0:D.initial)!=null?$:r.scores[i.dimension])!=null?K:0,override:c}},route:"/overrides"};await o(f);let g=le({scores:r.scores,scoreOverrides:f.scoreOverrides});t.rawUpdate(g)},children:({isSubmitting:i,values:a,setFieldValue:c})=>{var T;let f=yt({manifest:r.manifest,visitor:r.data,override:{type:"modscore",data:{dimension:a.dimension,delta:a.score-((T=r.scores[a.dimension])!=null?T:0)}}}),g=Object.entries(r.scores).reduce((D,[$,K])=>(D[$]={initial:K,override:K},D),{}),h={max:100,step:50};n[a.dimension]&&(h.max=n[a.dimension].cap,h.step=n[a.dimension].str);let w=a.score&&Object.keys(f).length>0;return(0,R.jsxs)(te.Form,{css:b.page,children:[(0,R.jsx)("h1",{css:b.title,children:"Override Dimension"}),(0,R.jsx)(te.Field,{component:Ot,label:"Dimension",id:"dimension",name:"dimension",options:d,disabled:i,onChange:D=>{c("score",0,!1),c("dimension",D.target.value)}}),(0,R.jsx)("p",{css:b.text,children:(0,R.jsx)("small",{children:"Audiences and Intents are aggregated from other dimension scores and cannot be overridden directly."})}),a.dimension?(0,R.jsx)(te.Field,{component:Ht,name:"score",label:"Score",disabled:i,max:h.max,step:h.step,caption:`Range: 0 - ${h.max} in increments of ${h.step}`}):null,(0,R.jsxs)(N,{disabled:i,css:{marginBottom:"2rem"},children:[w?(0,R.jsx)(De,{children:(0,R.jsx)(Se,{title:`Impacted Dimensions (${Object.keys(f).length})`,children:(0,R.jsx)(ee,{preemptiveOverrides:g,dimensionIndex:n,dimensions:f,disableEditOverride:!0})})}):null,(0,R.jsx)(Zt.Button,{type:"submit",css:b.submitButton,disabled:i,children:"Save"}),(0,R.jsx)(ne,{route:"/overrides",css:b.cancelButton,children:"Cancel"})]})]})}})};var _e=require("@uniformdev/design-system"),Ut=require("@uniformdev/design-system"),jt=q(require("react"));async function Me({actions:e,saveSettings:o,scores:r,settings:t}){var d,p;let n=(d=t.scoreOverrides)!=null?d:{},s={...n},l=[];for(let m of Object.keys(n)){let i=n==null?void 0:n[m];delete s[m],l.push({type:"modscoreS",data:{dimension:m,delta:i.initial-((p=r[m])!=null?p:0)}})}await o({...t,scoreOverrides:s}),await e.rawUpdate(l)}async function zt({quirk:e,settings:o,saveSettings:r,actions:t}){var l;let n=(l=o.quirkOverrides)==null?void 0:l[e];if(!n)return;let s={...o.quirkOverrides};delete s[e],await r({...o,quirkOverrides:s}),await t.rawUpdate([{type:"setquirk",data:{key:e,value:n.initial}}])}var ae=require("@emotion/react/jsx-runtime"),ce=({title:e,text:o,buttonGroup:r,children:t})=>(0,ae.jsxs)("div",{css:xe,children:[(0,ae.jsx)("h2",{css:ye,children:e}),(0,ae.jsx)("p",{css:Ce,children:o}),t,r?(0,ae.jsx)("div",{css:we,children:r}):null]});var S=require("@emotion/react/jsx-runtime"),_t=({dimensionIndex:{index:e},state:{scores:o,data:r},actions:t,saveSettings:n,settings:s})=>{let l=jt.useMemo(()=>{let i={};return Object.keys(e).filter(a=>!o[a]).map(a=>{i[e[a].dim]=0}),i},[o,e]),d=Object.keys(o).length,p=d+Object.keys(l).length,m=()=>{t.rawUpdate([{type:"setcontrol",data:!r.controlGroup}])};return(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)("article",{css:b.page,children:[(0,S.jsxs)("div",{css:b.headingGroup,children:[(0,S.jsxs)("h2",{css:b.title,children:["Dimensions",(0,S.jsxs)("small",{children:[d," active of ",p]})]}),(0,S.jsx)("div",{css:b.reset,children:(0,S.jsx)(_e.Button,{buttonType:"ghost",onClick:()=>Me({actions:t,saveSettings:n,scores:o,settings:s}).then(t.forget),children:"clear all dimensions"})}),(0,S.jsx)(Ut.Switch,{name:"controlGroup",label:"Control Group",onChange:m,checked:r.controlGroup})]}),d>0?(0,S.jsx)(ee,{dimensionIndex:e,dimensions:o}):(0,S.jsx)(ce,{title:r.controlGroup?"In control group":"No active dimensions",text:r.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have score in any dimensions yet.",buttonGroup:r.controlGroup?(0,S.jsx)(_e.Button,{buttonType:"secondary",onClick:m,children:"Exit control group"}):null}),(0,S.jsx)(De,{children:(0,S.jsx)(Se,{title:`Inactive Dimensions (${Object.keys(l).length})`,children:(0,S.jsx)(ee,{dimensionIndex:e,dimensions:l})})})]})})};var Gt=require("@uniformdev/design-system"),Ge=require("@uniformdev/design-system");var V=require("@emotion/react/jsx-runtime"),$t=({dimensionIndex:{index:e},state:{data:o,scores:r},actions:t,settings:n,saveSettings:s})=>{var a;let l=(a=n.scoreOverrides)!=null?a:{},d=Object.keys(l).length,p=c=>(c==null||c.preventDefault(),s({...n,route:"/overrides/add"})),m=()=>{t.rawUpdate([{type:"setcontrol",data:!o.controlGroup}])},i={};return Object.entries(r).map(([c,f])=>{l[c]!==void 0&&(i[c]=f)}),(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)("article",{css:b.page,children:[(0,V.jsxs)("div",{css:b.headingGroup,children:[(0,V.jsx)("h2",{css:b.title,children:"What if?"}),(0,V.jsx)("div",{css:b.reset,children:(0,V.jsx)(Ge.Button,{buttonType:"ghost",onClick:()=>Me({actions:t,settings:n,saveSettings:s,scores:r}),children:"delete all overrides"})}),(0,V.jsx)(Gt.AddButton,{onClick:p})]}),(0,V.jsx)("p",{children:"Override dimension scores to test personalization"}),d>0?(0,V.jsx)(ee,{dimensionIndex:e,dimensions:i,onClick:c=>s({...n,route:`/overrides/${c}`})}):(0,V.jsx)(ce,{title:o.controlGroup?"In control group":"No overrides",text:o.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have any dimension overrides yet.",buttonGroup:o.controlGroup?(0,V.jsx)(Ge.Button,{buttonType:"secondary",onClick:m,children:"Exit control group"}):null})]})})};var me=require("@uniformdev/design-system"),Wt=require("react");var Ee=require("@uniformdev/design-system"),Ae=require("react");var pe=require("@emotion/react/jsx-runtime"),Po=({name:e,value:o,submit:r})=>{let[t,n]=(0,Ae.useState)(o!=null?o:"");return(0,Ae.useEffect)(()=>{n(o!=null?o:"")},[o]),(0,pe.jsxs)("div",{css:{display:"flex",gap:"var(--spacing-sm)"},children:[(0,pe.jsx)(Ee.Input,{type:"text",css:[Rt],name:e,value:t,onChange:d=>{n(d.target.value)}}),(0,pe.jsx)(Ee.Button,{buttonType:"primary",disabled:t===o,size:"sm",onClick:()=>r(e,t!=null?t:""),children:"Save"})]})},Kt=Po;var x=require("@emotion/react/jsx-runtime"),Yt=({...e})=>{let{state:{data:{quirks:o}},quirksIndex:{index:r},settings:t,saveSettings:n,actions:s}=e,[l,d]=(0,Wt.useState)(""),p;l&&(p=r[l]);let m=async(i,a)=>{var g,h,w;d("");let c={...t,quirkOverrides:{...t.quirkOverrides,[i]:{initial:(w=(h=(g=t.quirkOverrides)==null?void 0:g[i])==null?void 0:h.initial)!=null?w:o[i],override:a}}};await n(c);let f=ke({quirks:o,quirkOverrides:c.quirkOverrides});await s.update({quirks:f})};return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("article",{css:[b.page,b.quirks],children:[(0,x.jsx)("h1",{css:b.title,children:"Quirks"}),(0,x.jsx)("p",{css:b.text,children:"Keys defined in Uniform and their current, programmatically defined values for this visit."}),Object.keys(r).length?(0,x.jsxs)(Ve,{children:[(0,x.jsx)(Qt,{children:(0,x.jsxs)(de,{children:[(0,x.jsx)(Ie,{width:"30%",children:"Key"}),(0,x.jsx)(Ie,{width:"50%",children:"Value"}),(0,x.jsx)(Ie,{width:"20%",children:""})]})}),(0,x.jsx)(Pe,{children:Object.values(r).map(({name:i,value:a,id:c})=>{var h,w,T;let f=(w=(h=t.quirkOverrides)==null?void 0:h[i])==null?void 0:w.initial,g=[];return p&&p.options&&(g=p.options.map(D=>({value:D.value,label:D.name}))),(0,x.jsxs)(de,{border:"bottom",children:[(0,x.jsx)(z,{children:(0,x.jsx)("strong",{children:i})}),(0,x.jsxs)(z,{children:[l!==c?(0,x.jsxs)("div",{onClick:()=>{d(c)},children:[f?(0,x.jsx)("div",{children:(0,x.jsx)("s",{children:f})}):null,a]}):null,l===c&&p&&(0,x.jsx)(x.Fragment,{children:p.options?(0,x.jsx)(me.InputSelect,{showLabel:!1,label:`Change ${i}`,defaultOption:`Change ${i}`,name:c,onChange:D=>m(D.target.name,D.target.value),options:g}):(0,x.jsx)(Kt,{name:c,value:a,submit:m})})]}),(0,x.jsx)(z,{children:l?null:(T=t.quirkOverrides)!=null&&T[c]?(0,x.jsx)(me.Button,{buttonType:"ghost",onClick:()=>{zt({quirk:c,settings:t,saveSettings:n,actions:s})},children:(0,x.jsx)("small",{children:"Clear Override"})}):(0,x.jsx)(me.Button,{buttonType:"ghost",onClick:()=>{d(c)},children:(0,x.jsx)("small",{children:"Override"})})})]},c)})})]}):(0,x.jsx)(ce,{title:"No quirks configured",text:"There are currently no quirks setup. Try to connect to Uniform API to load additional information about Quirks and Quirks without defined value."})]})})};var $e=require("@uniformdev/design-system"),Ke=require("@uniformdev/design-system");var k=require("@emotion/react/jsx-runtime"),Jt=({settings:e,saveSettings:o,actions:r,state:{data:t},clearAllExtensionData:n})=>(0,k.jsxs)("article",{css:[b.page,{display:"flex",flexDirection:"column",gap:"var(--spacing-base)"}],children:[(0,k.jsx)("h1",{css:b.title,children:"Settings"}),(0,k.jsxs)(N,{children:[(0,k.jsx)(ie,{children:"Data Connection"}),(0,k.jsx)($e.Button,{buttonType:"tertiary",onClick:()=>{o({...e,route:"/connect"})},children:"Manage Connection to Uniform"})]}),(0,k.jsxs)(N,{children:[(0,k.jsx)(ie,{children:"Storage Consent"}),(0,k.jsx)(Ke.Switch,{label:"Store visitor data",id:"consent-mode",name:"consentMode",checked:t.consent,onChange:s=>{r.rawUpdate([{type:"consent",data:s.currentTarget.checked}]),o({...e,consentMode:s.currentTarget.checked})}}),(0,k.jsx)("p",{children:(0,k.jsx)("small",{children:"Enabling storage consent allows storing behavior in this browser for personalization across sessions. Only affects this browser. Personalization works with this disabled, but dimension scores are lost on refresh."})})]}),(0,k.jsxs)(N,{children:[(0,k.jsx)(ie,{children:"Logging"}),(0,k.jsx)(Ke.Switch,{label:"Write Uniform Context diagnostic logs to browser console",id:"logging",name:"logging",checked:e.logLevel==="debug",onChange:s=>o({...e,logLevel:s.currentTarget.checked?"debug":"none"})})]}),(0,k.jsxs)(N,{children:[(0,k.jsx)(ie,{children:"Clear extension storage"}),(0,k.jsx)($e.Button,{onClick:()=>{n()},children:"Clear"}),(0,k.jsx)("p",{children:(0,k.jsx)("small",{children:"May be necessary when you have multiple different sites on the same domain name (e.g. http://localhost:3000) and there are some conflicts or other unexpected behaviour."})})]})]});var Xt=require("@uniformdev/context"),Be=require("@uniformdev/context/api"),M=require("@uniformdev/design-system"),U=require("formik"),j=q(require("react"));var v=require("@emotion/react/jsx-runtime");function eo(e){let[o,r]=j.useState(e.currentData?"c":"qc"),[t,n]=j.useState(void 0),[s,l]=j.useState(void 0),d=j.useCallback(async i=>{let a=new Be.UncachedManifestClient(i);n(void 0);try{let c=await a.get({preview:!0});return l({manifest:c,target:i}),c}catch(c){if(c instanceof Be.ApiClientError){c.statusCode===403?n("API key is valid but does not have Context > Read Drafts permission, or the API key does not have permissions to the project, or the project does not exist."):n(c.errorMessage);return}if("message"in c){c.message==="Failed to fetch"?n("A network error occurred. Ensure the API host is valid."):n(c.message);return}n(JSON.stringify(c,null,2));return}},[]);j.useEffect(()=>{!e.currentData||d(e.currentData)},[d,e.currentData]);let p=async i=>{await d(i)&&(r("c"),await e.onConnect(i))},m=()=>{confirm("Disconnect from Uniform? Make sure to save your API key if you want to reconnect.")&&(r("qc"),l(void 0),n(void 0),e.onConnect(null))};return(0,v.jsxs)("div",{children:[t?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(M.ErrorMessage,{message:t}),(0,v.jsx)(M.Button,{buttonType:"secondary",type:"button",onClick:m,children:"Clear old/broken settings"})]}):null,o==="qc"||o==="mc"?(0,v.jsx)(Io,{...e,state:o,setState:r,onConnect:p}):(0,v.jsx)("div",{children:s?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("p",{children:["Connected to"," ",(0,v.jsx)("a",{href:`${s==null?void 0:s.target.apiHost}/projects/${s==null?void 0:s.target.projectId}`,target:"_blank",rel:"noopener noreferrer",css:{textDecoration:"underline"},children:(0,v.jsx)("strong",{children:s==null?void 0:s.manifest.project.name})})," ",(0,v.jsxs)("small",{children:["(",s==null?void 0:s.manifest.project.id,")"]})]}),(0,v.jsx)(M.Button,{buttonType:"secondary",type:"button",onClick:m,children:"Disconnect"})]}):null})]})}function Io({setState:e,state:o,currentData:r,onConnect:t}){var n,s,l;return(0,v.jsx)("div",{children:(0,v.jsx)(U.Formik,{initialValues:{apiHost:(n=r==null?void 0:r.apiHost)!=null?n:"https://uniform.app",apiKey:(s=r==null?void 0:r.apiKey)!=null?s:"",projectId:(l=r==null?void 0:r.projectId)!=null?l:"",qc:""},onSubmit:t,children:({setFieldValue:d,setFieldError:p,errors:{qc:m},isSubmitting:i})=>(0,v.jsx)(U.Form,{children:(0,v.jsx)("fieldset",{css:{display:"flex",flexDirection:"column",gap:"var(--spacing-base)"},children:o==="qc"?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{children:(0,v.jsx)(M.Input,{placeholder:"Paste Quick Connect Code Here",caption:"Copy the Quick Connect code after creating an API key in Uniform.",errorMessage:m,onChange:a=>{try{let c=(0,Xt.parseQuickConnect)(a.currentTarget.value);d("apiHost",c.apiHost),d("apiKey",c.apiKey),d("projectId",c.projectId)}catch(c){p("qc",c.message)}}})}),(0,v.jsxs)("section",{css:{display:"flex",gap:"var(--spacing-sm)"},children:[(0,v.jsx)(M.Button,{type:"submit",buttonType:"primary",disabled:i,children:i?"Verifying...":"Connect"}),(0,v.jsx)(M.Button,{type:"button",buttonType:"ghost",onClick:()=>e("mc"),disabled:i,children:"Connect Manually"})]})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{children:(0,v.jsx)(U.Field,{component:Oe,label:"API Key",name:"apiKey",caption:"Generate an API key in your Uniform team settings."})}),(0,v.jsx)("div",{children:(0,v.jsx)(U.Field,{component:Oe,label:"Project ID",name:"projectId",caption:"Available to copy after generating an API key"})}),(0,v.jsx)("div",{children:(0,v.jsx)(U.Field,{component:Oe,label:"API Host",name:"apiHost",caption:"Use a non-standard Uniform API endpoint. Most people will not not need this option."})}),(0,v.jsxs)("section",{css:{display:"flex",gap:"var(--spacing-sm)"},children:[(0,v.jsx)(M.Button,{type:"submit",buttonType:"primary",disabled:i,children:i?"Verifying...":"Connect"}),(0,v.jsx)(M.Button,{type:"button",buttonType:"ghost",onClick:()=>e("qc"),disabled:i,children:"Use Quick Connect"})]})]})})})})})}var oe=require("@emotion/react/jsx-runtime"),to=({settings:e,saveSettings:o})=>{let r=e.apiKey&&e.projectId?{apiKey:e.apiKey,projectId:e.projectId,apiHost:e.apiHost}:void 0;return(0,oe.jsxs)("article",{css:b.page,children:[(0,oe.jsx)("h1",{css:b.title,children:"Connect to a Uniform Project"}),(0,oe.jsx)("p",{css:b.text,children:(0,oe.jsx)("small",{children:"Adding an API key and project ID enables human-readable dimension labels to be shown. You must have access to the Uniform project to do this."})}),(0,oe.jsx)(eo,{onConnect:async t=>{t?await o({...e,apiKey:t.apiKey,projectId:t.projectId,apiHost:t.apiHost}):await o({...e,apiKey:void 0,projectId:void 0,apiHost:void 0})},currentData:r})]})};var Qe=require("react"),oo=require("react-use");var ue=require("@emotion/react/jsx-runtime"),ro=()=>{let[e,o]=(0,Qe.useState)(!1),r=(0,oo.useMountedState)();return(0,Qe.useEffect)(()=>{setTimeout(()=>{r()&&o(!0)},1e3)},[r]),e?(0,ue.jsxs)("article",{css:b.page,children:[(0,ue.jsx)("h1",{children:"Loading..."}),(0,ue.jsx)("p",{children:"Connecting to Uniform API for complete data."})]}):null};var ge=require("@emotion/react/jsx-runtime"),no=()=>(0,ge.jsxs)("article",{children:[(0,ge.jsx)("h1",{children:"Something when wrong"}),(0,ge.jsx)("p",{children:"We could not find the page you're looking for."})]});var L=require("@emotion/react/jsx-runtime"),Ho=We.css`
428
428
  background: var(--white);
429
429
  padding: var(--spacing-base);
430
430
  overflow-y: auto;
@@ -453,7 +453,7 @@ to {
453
453
  &::-webkit-scrollbar-thumb:hover {
454
454
  background: var(--gray-500);
455
455
  }
456
- `;function Ye(e){let o=rt(e.settings,e.state.manifest),r=at(e.settings,e.state.data.quirks),t={...e,dimensionIndex:o,quirksIndex:r},n=()=>{var s;if(o.loading||r.loading)return(0,L.jsx)($t,{});if(e.settings.route&&e.settings.route.match(/overrides\/\w+/))return(0,L.jsx)(je,{...t});switch((s=e.settings)==null?void 0:s.route){case void 0:case"/":case"/dimensions":return(0,L.jsx)(Bt,{...t});case"/overrides":return(0,L.jsx)(Ft,{...t});case"/overrides/add":return(0,L.jsx)(je,{...t});case"/quirks":return(0,L.jsx)(Zt,{...t});case"/settings":return(0,L.jsx)(zt,{...t});case"/connect":return(0,L.jsx)(_t,{...t});default:return(0,L.jsx)(Kt,{})}};return(0,L.jsxs)(lt,{settings:e.settings,saveSettings:e.saveSettings,children:[(0,L.jsx)(Wt.Theme,{}),(0,L.jsx)(ve,{}),(0,L.jsxs)("div",{css:We.css`
456
+ `;function Ye(e){let o=nt(e.settings,e.state.manifest),r=ct(e.settings,e.state.data.quirks),t={...e,dimensionIndex:o,quirksIndex:r},n=()=>{var s;if(o.loading||r.loading)return(0,L.jsx)(ro,{});if(e.settings.route&&e.settings.route.match(/overrides\/\w+/))return(0,L.jsx)(je,{...t});switch((s=e.settings)==null?void 0:s.route){case void 0:case"/":case"/dimensions":return(0,L.jsx)(_t,{...t});case"/overrides":return(0,L.jsx)($t,{...t});case"/overrides/add":return(0,L.jsx)(je,{...t});case"/quirks":return(0,L.jsx)(Yt,{...t});case"/settings":return(0,L.jsx)(Jt,{...t});case"/connect":return(0,L.jsx)(to,{...t});default:return(0,L.jsx)(no,{})}};return(0,L.jsxs)(dt,{settings:e.settings,saveSettings:e.saveSettings,children:[(0,L.jsx)(io.Theme,{}),(0,L.jsx)(be,{}),(0,L.jsxs)("div",{css:We.css`
457
457
  display: grid;
458
458
  grid-template-columns: 200px auto;
459
459
  font-weight: var(--fs-base);
@@ -462,7 +462,7 @@ to {
462
462
  line-height: var(--base-line-height);
463
463
  height: var(--min-height);
464
464
  min-width: var(--site-width);
465
- `,children:[(0,L.jsx)(gt,{...e}),(0,L.jsxs)("main",{css:Ho,children:[(0,L.jsx)(Ze,{...e}),n()]})]})]})}var Fe=require("@uniformdev/context"),Q=F(require("react"));var Yt=require("@emotion/react/jsx-runtime"),Je="embeddedUniformDevToolsSettings";function Xe({context:e,initialSettings:o}){let r=e!=null?e:typeof window!="undefined"?window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__:void 0,t=r!=null?r:new Fe.Context({manifest:{project:{}}}),[n,s]=Q.useState({data:t.storage.data,manifest:t.manifest.data,scores:t.scores,personalizations:[],tests:[]}),[l,d]=Q.useState(o!=null?o:{});Q.useEffect(()=>{var c;let a=(0,Fe.createDebugConsoleLogDrain)((c=l.logLevel)!=null?c:"none");return t.events.on("log",a),()=>{t.events.off("log",a)}},[l,t]),Q.useEffect(()=>{let a=()=>{let g=window.localStorage.getItem(Je)||"{}",h=JSON.parse(g),C=ye({quirks:t.storage.data.quirks,quirkOverrides:h.quirkOverrides});C&&(console.log("Applying overridden quirks:",C),t.update({quirks:C}));let T=ce({scores:t.scores,scoreOverrides:h.scoreOverrides});T.length&&(console.log("Applying overridden scores:",T),t.storage.updateData(T)),s(D=>({...D,scores:t.scores,data:t.storage.data,manifest:t.manifest.data}))},c=g=>{!g.changed||s(h=>({...h,personalizations:[...h.personalizations,g]}))},f=g=>{!g.variantAssigned||s(h=>({...h,tests:[...h.tests,g]}))};return t.events.on("personalizationResult",c),t.events.on("testResult",f),t.storage.events.on("*",a),()=>{t.storage.events.off("*",a),t.events.off("personalizationResult",c),t.events.off("testResult",f)}},[t]),Q.useEffect(()=>{if(window.localStorage){let a=window.localStorage.getItem(Je);if(a)try{let c=JSON.parse(a),f={...o,...c};d(f);let g=ce({scores:n.scores,scoreOverrides:f.scoreOverrides});p.rawUpdate(g)}catch(c){window.localStorage.removeItem(Je),console.error("Failed to parse settings from localStorage: ",c.message)}}},[]);let{actions:p,saveSettings:m,clearAllExtensionData:i}=Q.useMemo(()=>({actions:{update:g=>t.update(g),forget:()=>t.forget(!1),rawUpdate:g=>t.storage.updateData(g)},saveSettings:async g=>{d(g),window.localStorage&&window.localStorage.setItem("embeddedUniformDevToolsSettings",JSON.stringify(g))},clearAllExtensionData:async()=>{d({route:"/"}),window.localStorage&&(window.localStorage.removeItem("embeddedUniformDevToolsSettings"),window.location.reload())}}),[t]);return r?(0,Yt.jsx)(Ye,{state:n,actions:p,settings:l,saveSettings:m,clearAllExtensionData:i}):(0,Yt.jsx)("p",{children:"Unable to find Uniform Context. Ensure the devtools plugin is activated."})}var qe=require("@emotion/react"),_=require("@uniformdev/design-system"),te=F(require("react")),eo=require("react-use");var Jt=require("@emotion/react"),ee=require("@emotion/react/jsx-runtime"),Mo=Jt.css`
465
+ `,children:[(0,L.jsx)(xt,{...e}),(0,L.jsxs)("main",{css:Ho,children:[(0,L.jsx)(Ze,{...e}),n()]})]})]})}var Fe=require("@uniformdev/context"),F=q(require("react"));var Xe=require("@emotion/react/jsx-runtime"),Je="embeddedUniformDevToolsSettings";function et({context:e,initialSettings:o}){let r=e!=null?e:typeof window!="undefined"?window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__:void 0,t=r!=null?r:new Fe.Context({manifest:{project:{}}}),[n,s]=F.useState({data:t.storage.data,manifest:t.manifest.data,scores:t.scores,personalizations:[],tests:[]}),[l,d]=F.useState(o!=null?o:{});F.useEffect(()=>{var c;let a=(0,Fe.createDebugConsoleLogDrain)((c=l.logLevel)!=null?c:"none");return t.events.on("log",a),()=>{t.events.off("log",a)}},[l,t]),F.useEffect(()=>{let a=()=>{let g=window.localStorage.getItem(Je)||"{}",h=JSON.parse(g),w=ke({quirks:t.storage.data.quirks,quirkOverrides:h.quirkOverrides});w&&(console.log("Applying overridden quirks:",w),t.update({quirks:w}));let T=le({scores:t.scores,scoreOverrides:h.scoreOverrides});T.length&&(console.log("Applying overridden scores:",T),t.storage.updateData(T)),s(D=>({...D,scores:t.scores,data:t.storage.data,manifest:t.manifest.data}))},c=g=>{!g.changed||s(h=>({...h,personalizations:[...h.personalizations,g]}))},f=g=>{!g.variantAssigned||s(h=>({...h,tests:[...h.tests,g]}))};return t.events.on("personalizationResult",c),t.events.on("testResult",f),t.storage.events.on("*",a),()=>{t.storage.events.off("*",a),t.events.off("personalizationResult",c),t.events.off("testResult",f)}},[t]),F.useEffect(()=>{if(window.localStorage){let a=window.localStorage.getItem(Je);if(a)try{let c=JSON.parse(a),f={...o,...c};d(f);let g=le({scores:n.scores,scoreOverrides:f.scoreOverrides});p.rawUpdate(g)}catch(c){window.localStorage.removeItem(Je),console.error("Failed to parse settings from localStorage: ",c.message)}}},[]);let{actions:p,saveSettings:m,clearAllExtensionData:i}=F.useMemo(()=>({actions:{update:g=>t.update(g),forget:()=>t.forget(!1),rawUpdate:g=>t.storage.updateData(g)},saveSettings:async g=>{d(g),window.localStorage&&window.localStorage.setItem("embeddedUniformDevToolsSettings",JSON.stringify(g))},clearAllExtensionData:async()=>{d({route:"/"}),window.localStorage&&(window.localStorage.removeItem("embeddedUniformDevToolsSettings"),window.location.reload())}}),[t]);return r?(0,Xe.jsx)(Ye,{state:n,actions:p,settings:l,saveSettings:m,clearAllExtensionData:i}):(0,Xe.jsx)("p",{children:"Unable to find Uniform Context. Ensure the devtools plugin is activated."})}var qe=require("@emotion/react"),G=require("@uniformdev/design-system"),re=q(require("react")),co=require("react-use");var so=require("@emotion/react"),_=require("@emotion/react/jsx-runtime"),Mo=so.css`
466
466
  align-items: center;
467
467
  border-radius: var(--rounded-full);
468
468
  background: var(--brand-secondary-5);
@@ -488,7 +488,7 @@ to {
488
488
  max-width: 100%;
489
489
  height: auto;
490
490
  }
491
- `,Xt=({...e})=>(0,ee.jsxs)("button",{type:"button",css:Mo,...e,children:[(0,ee.jsx)("span",{hidden:!0,children:"Uniform devtools"}),(0,ee.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ee.jsx)("path",{d:"M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",fill:"currentColor"}),(0,ee.jsx)("path",{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",fill:"currentColor"}),(0,ee.jsx)("path",{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",fill:"currentColor"})]})]});var I=require("@emotion/react/jsx-runtime"),Eo="dblgnkbknchechcibdojfdoeeodhmgbd",Ao="dcmlokofjljnfjcknpmhjocogllfbhkg";function Bo(e){let[o,r]=te.useState(!1),[t,n]=te.useState(e.context),[s,l]=te.useState(!1),[d,p]=(0,eo.useLocalStorage)("isUniformInlineDevtoolsDisabled",!1);return te.useEffect(()=>{!e.context&&typeof document!="undefined"&&n(window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__)},[e.context]),te.useEffect(()=>{[Ao,Eo].map(m=>{let i=new Image;i.src=`chrome-extension://${m}/icons/uniform-logo.png`,i.onload=()=>l(!0)})},[]),d?null:t?(0,I.jsxs)("div",{children:[(0,I.jsx)(_.Theme,{}),(0,I.jsx)(ve,{}),(0,I.jsx)(Xt,{onClick:()=>r(m=>!m)}),o?(0,I.jsx)("div",{css:qe.css`
491
+ `,ao=({...e})=>(0,_.jsxs)("button",{type:"button",css:Mo,...e,children:[(0,_.jsx)("span",{hidden:!0,children:"Uniform devtools"}),(0,_.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_.jsx)("path",{d:"M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",fill:"currentColor"}),(0,_.jsx)("path",{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",fill:"currentColor"}),(0,_.jsx)("path",{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",fill:"currentColor"})]})]});var I=require("@emotion/react/jsx-runtime"),Eo="dblgnkbknchechcibdojfdoeeodhmgbd",Ao="dcmlokofjljnfjcknpmhjocogllfbhkg";function Bo(e){let[o,r]=re.useState(!1),[t,n]=re.useState(e.context),[s,l]=re.useState(!1),[d,p]=(0,co.useLocalStorage)("isUniformInlineDevtoolsDisabled",!1);return re.useEffect(()=>{!e.context&&typeof document!="undefined"&&n(window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__)},[e.context]),re.useEffect(()=>{[Ao,Eo].map(m=>{let i=new Image;i.src=`chrome-extension://${m}/icons/uniform-logo.png`,i.onload=()=>l(!0)})},[]),d?null:t?(0,I.jsxs)("div",{children:[(0,I.jsx)(G.Theme,{}),(0,I.jsx)(be,{}),(0,I.jsx)(ao,{onClick:()=>r(m=>!m)}),o?(0,I.jsx)("div",{css:qe.css`
492
492
  box-shadow: var(--shadow-base);
493
493
  position: fixed;
494
494
  bottom: 82px;
@@ -497,6 +497,6 @@ to {
497
497
  max-width: var(--site-width);
498
498
  `,children:s?(0,I.jsx)("div",{css:qe.css`
499
499
  padding: var(--spacing-md);
500
- `,children:(0,I.jsxs)(_.Callout,{type:"danger",title:"This functionality is disabled.",children:[(0,I.jsx)(_.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."}),(0,I.jsx)(_.Button,{css:qe.css`
500
+ `,children:(0,I.jsxs)(G.Callout,{type:"danger",title:"This functionality is disabled.",children:[(0,I.jsx)(G.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."}),(0,I.jsx)(G.Button,{css:qe.css`
501
501
  margin-top: var(--spacing-md);
502
- `,buttonType:"secondary",onClick:()=>p(!0),children:"Disabled inline tools"})]})}):(0,I.jsx)(Xe,{...e})}):null]}):(0,I.jsx)("p",{children:"Unable to find Uniform Context. Ensure the devtools plugin is activated."})}0&&(module.exports={ContextDevTools,EmbeddedContextDevTools,ToggleEmbeddedContextDevTools});
502
+ `,buttonType:"secondary",onClick:()=>p(!0),children:"Disabled inline tools"})]})}):(0,I.jsx)(et,{...e})}):null]}):(0,I.jsx)("p",{children:"Unable to find Uniform Context. Ensure the devtools plugin is activated."})}0&&(module.exports={ContextDevTools,EmbeddedContextDevTools,ToggleEmbeddedContextDevTools});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context-devtools",
3
- "version": "17.6.1-alpha.60+dce2049a1",
3
+ "version": "17.7.1-alpha.140+80ab6baf9",
4
4
  "description": "Uniform Context developer tools components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -20,18 +20,18 @@
20
20
  "react-dom": ">=17"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/chrome": "0.0.203",
23
+ "@types/chrome": "0.0.206",
24
24
  "@types/react": "18.0.26",
25
25
  "autoprefixer": "10.4.13",
26
- "postcss": "8.4.19",
26
+ "postcss": "8.4.20",
27
27
  "react": "18.2.0",
28
28
  "react-dom": "18.2.0",
29
- "tsup": "6.1.3"
29
+ "tsup": "6.5.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@emotion/react": "11.10.5",
33
- "@uniformdev/context": "^17.6.1-alpha.60+dce2049a1",
34
- "@uniformdev/design-system": "^17.6.1-alpha.60+dce2049a1",
33
+ "@uniformdev/context": "^17.7.1-alpha.140+80ab6baf9",
34
+ "@uniformdev/design-system": "^17.7.1-alpha.140+80ab6baf9",
35
35
  "formik": "^2.2.9",
36
36
  "react-use": "^17.4.0",
37
37
  "reakit": "^1.3.11",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "dce2049a142bec6e78cda9d976eacf13a96aa483"
46
+ "gitHead": "80ab6baf9edea6b520738bd3dff5c6afc882bf77"
47
47
  }