@volter/world-ui 0.1.0

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.
Files changed (44) hide show
  1. package/LICENSE +202 -0
  2. package/client/brand/fonts/Geist-Variable.woff2 +0 -0
  3. package/client/brand/fonts/GeistMono-Variable.woff2 +0 -0
  4. package/client/brand/fonts/InstrumentSerif-Italic.woff2 +0 -0
  5. package/client/brand/fonts/InstrumentSerif-Regular.woff2 +0 -0
  6. package/client/brand/fonts/LICENSES.txt +191 -0
  7. package/client/brand/tokens.css +212 -0
  8. package/client/consent.tsx +96 -0
  9. package/client/kit.css +55 -0
  10. package/client/kit.tsx +312 -0
  11. package/client/payment.tsx +121 -0
  12. package/client/portal.tsx +102 -0
  13. package/client/sign-in.tsx +90 -0
  14. package/dist/client/brand/fonts/Geist-Variable.woff2 +0 -0
  15. package/dist/client/brand/fonts/GeistMono-Variable.woff2 +0 -0
  16. package/dist/client/brand/fonts/InstrumentSerif-Italic.woff2 +0 -0
  17. package/dist/client/brand/fonts/InstrumentSerif-Regular.woff2 +0 -0
  18. package/dist/client/brand/fonts/LICENSES.txt +191 -0
  19. package/dist/client/brand/tokens.css +212 -0
  20. package/dist/client/consent.bundle.js +36 -0
  21. package/dist/client/consent.d.ts +47 -0
  22. package/dist/client/consent.js +24 -0
  23. package/dist/client/consent.tsx +96 -0
  24. package/dist/client/kit.bundle.js +235 -0
  25. package/dist/client/kit.css +55 -0
  26. package/dist/client/kit.d.ts +101 -0
  27. package/dist/client/kit.js +160 -0
  28. package/dist/client/kit.tsx +312 -0
  29. package/dist/client/payment.bundle.js +77 -0
  30. package/dist/client/payment.d.ts +57 -0
  31. package/dist/client/payment.js +55 -0
  32. package/dist/client/payment.tsx +121 -0
  33. package/dist/client/portal.bundle.js +39 -0
  34. package/dist/client/portal.d.ts +44 -0
  35. package/dist/client/portal.js +29 -0
  36. package/dist/client/portal.tsx +102 -0
  37. package/dist/client/sign-in.bundle.js +28 -0
  38. package/dist/client/sign-in.d.ts +43 -0
  39. package/dist/client/sign-in.js +28 -0
  40. package/dist/client/sign-in.tsx +90 -0
  41. package/dist/src/index.d.ts +33 -0
  42. package/dist/src/index.js +56 -0
  43. package/package.json +45 -0
  44. package/src/index.ts +72 -0
@@ -0,0 +1,36 @@
1
+ var mB=Object.create;var{getPrototypeOf:uB,defineProperty:CB,getOwnPropertyNames:sB}=Object;var dB=Object.prototype.hasOwnProperty;function yB(W){return this[W]}var cB,pB,JB=(W,O,D)=>{var K=W!=null&&typeof W==="object";if(K){var V=O?cB??=new WeakMap:pB??=new WeakMap,E=V.get(W);if(E)return E}D=W!=null?mB(uB(W)):{};let F=O||!W||!W.__esModule?CB(D,"default",{value:W,enumerable:!0}):D;for(let _ of sB(W))if(!dB.call(F,_))CB(F,_,{get:yB.bind(W,_),enumerable:!0});if(K)V.set(W,F);return F};var VB=(W,O)=>()=>(O||W((O={exports:{}}).exports,O),O.exports);var SB=VB((iB,XB)=>{(function(){function W(B,G){Object.defineProperty(K.prototype,B,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",G[0],G[1])}})}function O(B){if(B===null||typeof B!=="object")return null;return B=PB&&B[PB]||B["@@iterator"],typeof B==="function"?B:null}function D(B,G){B=(B=B.constructor)&&(B.displayName||B.name)||"ReactClass";var M=B+"."+G;wB[M]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",G,B),wB[M]=!0)}function K(B,G,M){this.props=B,this.context=G,this.refs=OB,this.updater=M||DB}function V(){}function E(B,G,M){this.props=B,this.context=G,this.refs=OB,this.updater=M||DB}function F(){}function _(B){return""+B}function b(B){try{_(B);var G=!1}catch(U){G=!0}if(G){G=console;var M=G.error,R=typeof Symbol==="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return M.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),_(B)}}function h(B){if(B==null)return null;if(typeof B==="function")return B.$$typeof===gB?null:B.displayName||B.name||null;if(typeof B==="string")return B;switch(B){case s:return"Fragment";case Y:return"Profiler";case H:return"StrictMode";case d:return"Suspense";case P:return"SuspenseList";case HB:return"Activity"}if(typeof B==="object")switch(typeof B.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case GB:return"Portal";case w:return B.displayName||"Context";case J:return(B._context.displayName||"Context")+".Consumer";case T:var G=B.render;return B=B.displayName,B||(B=G.displayName||G.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case I:return G=B.displayName||null,G!==null?G:h(B.type)||"Memo";case N:G=B._payload,B=B._init;try{return h(B(G))}catch(M){}}return null}function e(B){if(B===s)return"<>";if(typeof B==="object"&&B!==null&&B.$$typeof===N)return"<...>";try{var G=h(B);return G?"<"+G+">":"<...>"}catch(M){return"<...>"}}function c(){var B=Z.A;return B===null?null:B.getOwner()}function p(){return Error("react-stack-top-frame")}function i(B){if(MB.call(B,"key")){var G=Object.getOwnPropertyDescriptor(B,"key").get;if(G&&G.isReactWarning)return!1}return B.key!==void 0}function YB(B,G){function M(){TB||(TB=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",G))}M.isReactWarning=!0,Object.defineProperty(B,"key",{get:M,configurable:!0})}function o(){var B=h(this.type);return EB[B]||(EB[B]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),B=this.props.ref,B!==void 0?B:null}function l(B,G,M,R,U,z){var X=M.ref;return B={$$typeof:a,type:B,key:G,props:M,_owner:R},(X!==void 0?X:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:o}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function ZB(B,G){return G=l(B.type,G,B.props,B._owner,B._debugStack,B._debugTask),B._store&&(G._store.validated=B._store.validated),G}function BB(B){x(B)?B._store&&(B._store.validated=1):typeof B==="object"&&B!==null&&B.$$typeof===N&&(B._payload.status==="fulfilled"?x(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function x(B){return typeof B==="object"&&B!==null&&B.$$typeof===a}function zB(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(M){return G[M]})}function t(B,G){return typeof B==="object"&&B!==null&&B.key!=null?(b(B.key),zB(""+B.key)):G.toString(36)}function QB(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status==="string"?B.then(F,F):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function j(B,G,M,R,U){var z=typeof B;if(z==="undefined"||z==="boolean")B=null;var X=!1;if(B===null)X=!0;else switch(z){case"bigint":case"string":case"number":X=!0;break;case"object":switch(B.$$typeof){case a:case GB:X=!0;break;case N:return X=B._init,j(X(B._payload),G,M,R,U)}}if(X){X=B,U=U(X);var $=R===""?"."+t(X,0):R;return AB(U)?(M="",$!=null&&(M=$.replace(_B,"$&/")+"/"),j(U,G,M,"",function(C){return C})):U!=null&&(x(U)&&(U.key!=null&&(X&&X.key===U.key||b(U.key)),M=ZB(U,M+(U.key==null||X&&X.key===U.key?"":(""+U.key).replace(_B,"$&/")+"/")+$),R!==""&&X!=null&&x(X)&&X.key==null&&X._store&&!X._store.validated&&(M._store.validated=2),U=M),G.push(U)),1}if(X=0,$=R===""?".":R+":",AB(B))for(var Q=0;Q<B.length;Q++)R=B[Q],z=$+t(R,Q),X+=j(R,G,M,z,U);else if(Q=O(B),typeof Q==="function")for(Q===B.entries&&(NB||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),NB=!0),B=Q.call(B),Q=0;!(R=B.next()).done;)R=R.value,z=$+t(R,Q++),X+=j(R,G,M,z,U);else if(z==="object"){if(typeof B.then==="function")return j(QB(B),G,M,R,U);throw G=String(B),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return X}function v(B,G,M){if(B==null)return B;var R=[],U=0;return j(B,R,"","",function(z){return G.call(M,z,U++)}),R}function LB(B){if(B._status===-1){var G=B._ioInfo;G!=null&&(G.start=G.end=performance.now()),G=B._result;var M=G();if(M.then(function(U){if(B._status===0||B._status===-1){B._status=1,B._result=U;var z=B._ioInfo;z!=null&&(z.end=performance.now()),M.status===void 0&&(M.status="fulfilled",M.value=U)}},function(U){if(B._status===0||B._status===-1){B._status=2,B._result=U;var z=B._ioInfo;z!=null&&(z.end=performance.now()),M.status===void 0&&(M.status="rejected",M.reason=U)}}),G=B._ioInfo,G!=null){G.value=M;var R=M.displayName;typeof R==="string"&&(G.name=R)}B._status===-1&&(B._status=0,B._result=M)}if(B._status===1)return G=B._result,G===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+
3
+ Your code should look like:
4
+ const MyComponent = lazy(() => import('./MyComponent'))
5
+
6
+ Did you accidentally put curly braces around the import?`,G),"default"in G||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
+
8
+ Your code should look like:
9
+ const MyComponent = lazy(() => import('./MyComponent'))`,G),G.default;throw B._result}function q(){var B=Z.H;return B===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
+ 2. You might be breaking the Rules of Hooks
12
+ 3. You might have more than one copy of React in the same app
13
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),B}function n(){Z.asyncTransitions--}function S(B){if(RB===null)try{var G=("require"+Math.random()).slice(0,7);RB=(XB&&XB[G]).call(XB,"timers").setImmediate}catch(M){RB=function(R){jB===!1&&(jB=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var U=new MessageChannel;U.port1.onmessage=R,U.port2.postMessage(void 0)}}return RB(B)}function g(B){return 1<B.length&&typeof AggregateError==="function"?AggregateError(B):B[0]}function k(B,G){G!==UB-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),UB=G}function m(B,G,M){var R=Z.actQueue;if(R!==null)if(R.length!==0)try{u(R),S(function(){return m(B,G,M)});return}catch(U){Z.thrownErrors.push(U)}else Z.actQueue=null;0<Z.thrownErrors.length?(R=g(Z.thrownErrors),Z.thrownErrors.length=0,M(R)):G(B)}function u(B){if(!$B){$B=!0;var G=0;try{for(;G<B.length;G++){var M=B[G];do{Z.didUsePromise=!1;var R=M(!1);if(R!==null){if(Z.didUsePromise){B[G]=M,B.splice(0,G);return}M=R}else break}while(1)}B.length=0}catch(U){B.splice(0,G+1),Z.thrownErrors.push(U)}finally{$B=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=Symbol.for("react.transitional.element"),GB=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),HB=Symbol.for("react.activity"),PB=Symbol.iterator,wB={},DB={isMounted:function(){return!1},enqueueForceUpdate:function(B){D(B,"forceUpdate")},enqueueReplaceState:function(B){D(B,"replaceState")},enqueueSetState:function(B){D(B,"setState")}},KB=Object.assign,OB={};Object.freeze(OB),K.prototype.isReactComponent={},K.prototype.setState=function(B,G){if(typeof B!=="object"&&typeof B!=="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,G,"setState")},K.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};var A={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(r in A)A.hasOwnProperty(r)&&W(r,A[r]);V.prototype=K.prototype,A=E.prototype=new V,A.constructor=E,KB(A,K.prototype),A.isPureReactComponent=!0;var AB=Array.isArray,gB=Symbol.for("react.client.reference"),Z={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},MB=Object.prototype.hasOwnProperty,FB=console.createTask?console.createTask:function(){return null};A={react_stack_bottom_frame:function(B){return B()}};var TB,IB,EB={},kB=A.react_stack_bottom_frame.bind(A,p)(),fB=FB(e(p)),NB=!1,_B=/\/+/g,xB=typeof reportError==="function"?reportError:function(B){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B==="object"&&B!==null&&typeof B.message==="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(G))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",B);return}console.error(B)},jB=!1,RB=null,UB=0,WB=!1,$B=!1,vB=typeof queueMicrotask==="function"?function(B){queueMicrotask(function(){return queueMicrotask(B)})}:S;A=Object.freeze({__proto__:null,c:function(B){return q().useMemoCache(B)}});var r={map:v,forEach:function(B,G,M){v(B,function(){G.apply(this,arguments)},M)},count:function(B){var G=0;return v(B,function(){G++}),G},toArray:function(B){return v(B,function(G){return G})||[]},only:function(B){if(!x(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};iB.Activity=HB,iB.Children=r,iB.Component=K,iB.Fragment=s,iB.Profiler=Y,iB.PureComponent=E,iB.StrictMode=H,iB.Suspense=d,iB.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,iB.__COMPILER_RUNTIME=A,iB.act=function(B){var G=Z.actQueue,M=UB;UB++;var R=Z.actQueue=G!==null?G:[],U=!1;try{var z=B()}catch(Q){Z.thrownErrors.push(Q)}if(0<Z.thrownErrors.length)throw k(G,M),B=g(Z.thrownErrors),Z.thrownErrors.length=0,B;if(z!==null&&typeof z==="object"&&typeof z.then==="function"){var X=z;return vB(function(){U||WB||(WB=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(Q,C){U=!0,X.then(function(y){if(k(G,M),M===0){try{u(R),S(function(){return m(y,Q,C)})}catch(hB){Z.thrownErrors.push(hB)}if(0<Z.thrownErrors.length){var bB=g(Z.thrownErrors);Z.thrownErrors.length=0,C(bB)}}else Q(y)},function(y){k(G,M),0<Z.thrownErrors.length?(y=g(Z.thrownErrors),Z.thrownErrors.length=0,C(y)):C(y)})}}}var $=z;if(k(G,M),M===0&&(u(R),R.length!==0&&vB(function(){U||WB||(WB=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Z.actQueue=null),0<Z.thrownErrors.length)throw B=g(Z.thrownErrors),Z.thrownErrors.length=0,B;return{then:function(Q,C){U=!0,M===0?(Z.actQueue=R,S(function(){return m($,Q,C)})):Q($)}}},iB.cache=function(B){return function(){return B.apply(null,arguments)}},iB.cacheSignal=function(){return null},iB.captureOwnerStack=function(){var B=Z.getCurrentStack;return B===null?null:B()},iB.cloneElement=function(B,G,M){if(B===null||B===void 0)throw Error("The argument must be a React element, but you passed "+B+".");var R=KB({},B.props),U=B.key,z=B._owner;if(G!=null){var X;B:{if(MB.call(G,"ref")&&(X=Object.getOwnPropertyDescriptor(G,"ref").get)&&X.isReactWarning){X=!1;break B}X=G.ref!==void 0}X&&(z=c()),i(G)&&(b(G.key),U=""+G.key);for($ in G)!MB.call(G,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&G.ref===void 0||(R[$]=G[$])}var $=arguments.length-2;if($===1)R.children=M;else if(1<$){X=Array($);for(var Q=0;Q<$;Q++)X[Q]=arguments[Q+2];R.children=X}R=l(B.type,U,R,z,B._debugStack,B._debugTask);for(U=2;U<arguments.length;U++)BB(arguments[U]);return R},iB.createContext=function(B){return B={$$typeof:w,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:J,_context:B},B._currentRenderer=null,B._currentRenderer2=null,B},iB.createElement=function(B,G,M){for(var R=2;R<arguments.length;R++)BB(arguments[R]);R={};var U=null;if(G!=null)for(Q in IB||!("__self"in G)||"key"in G||(IB=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),i(G)&&(b(G.key),U=""+G.key),G)MB.call(G,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(R[Q]=G[Q]);var z=arguments.length-2;if(z===1)R.children=M;else if(1<z){for(var X=Array(z),$=0;$<z;$++)X[$]=arguments[$+2];Object.freeze&&Object.freeze(X),R.children=X}if(B&&B.defaultProps)for(Q in z=B.defaultProps,z)R[Q]===void 0&&(R[Q]=z[Q]);U&&YB(R,typeof B==="function"?B.displayName||B.name||"Unknown":B);var Q=1e4>Z.recentlyCreatedOwnerStacks++;return l(B,U,R,c(),Q?Error("react-stack-top-frame"):kB,Q?FB(e(B)):fB)},iB.createRef=function(){var B={current:null};return Object.seal(B),B},iB.forwardRef=function(B){B!=null&&B.$$typeof===I?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof B!=="function"?console.error("forwardRef requires a render function but was given %s.",B===null?"null":typeof B):B.length!==0&&B.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",B.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),B!=null&&B.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var G={$$typeof:T,render:B},M;return Object.defineProperty(G,"displayName",{enumerable:!1,configurable:!0,get:function(){return M},set:function(R){M=R,B.name||B.displayName||(Object.defineProperty(B,"name",{value:R}),B.displayName=R)}}),G},iB.isValidElement=x,iB.lazy=function(B){B={_status:-1,_result:B};var G={$$typeof:N,_payload:B,_init:LB},M={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return B._ioInfo=M,G._debugInfo=[{awaited:M}],G},iB.memo=function(B,G){B==null&&console.error("memo: The first argument must be a component. Instead received: %s",B===null?"null":typeof B),G={$$typeof:I,type:B,compare:G===void 0?null:G};var M;return Object.defineProperty(G,"displayName",{enumerable:!1,configurable:!0,get:function(){return M},set:function(R){M=R,B.name||B.displayName||(Object.defineProperty(B,"name",{value:R}),B.displayName=R)}}),G},iB.startTransition=function(B){var G=Z.T,M={};M._updatedFibers=new Set,Z.T=M;try{var R=B(),U=Z.S;U!==null&&U(M,R),typeof R==="object"&&R!==null&&typeof R.then==="function"&&(Z.asyncTransitions++,R.then(n,n),R.then(F,xB))}catch(z){xB(z)}finally{G===null&&M._updatedFibers&&(B=M._updatedFibers.size,M._updatedFibers.clear(),10<B&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),G!==null&&M.types!==null&&(G.types!==null&&G.types!==M.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),G.types=M.types),Z.T=G}},iB.unstable_useCacheRefresh=function(){return q().useCacheRefresh()},iB.use=function(B){return q().use(B)},iB.useActionState=function(B,G,M){return q().useActionState(B,G,M)},iB.useCallback=function(B,G){return q().useCallback(B,G)},iB.useContext=function(B){var G=q();return B.$$typeof===J&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),G.useContext(B)},iB.useDebugValue=function(B,G){return q().useDebugValue(B,G)},iB.useDeferredValue=function(B,G){return q().useDeferredValue(B,G)},iB.useEffect=function(B,G){return B==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useEffect(B,G)},iB.useEffectEvent=function(B){return q().useEffectEvent(B)},iB.useId=function(){return q().useId()},iB.useImperativeHandle=function(B,G,M){return q().useImperativeHandle(B,G,M)},iB.useInsertionEffect=function(B,G){return B==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useInsertionEffect(B,G)},iB.useLayoutEffect=function(B,G){return B==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useLayoutEffect(B,G)},iB.useMemo=function(B,G){return q().useMemo(B,G)},iB.useOptimistic=function(B,G){return q().useOptimistic(B,G)},iB.useReducer=function(B,G,M){return q().useReducer(B,G,M)},iB.useRef=function(B){return q().useRef(B)},iB.useState=function(B){return q().useState(B)},iB.useSyncExternalStore=function(B,G,M){return q().useSyncExternalStore(B,G,M)},iB.useTransition=function(){return q().useTransition()},iB.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var qB=VB((oB)=>{var f=JB(SB());(function(){function W(H){if(H==null)return null;if(typeof H==="function")return H.$$typeof===q?null:H.displayName||H.name||null;if(typeof H==="string")return H;switch(H){case o:return"Fragment";case ZB:return"Profiler";case l:return"StrictMode";case t:return"Suspense";case QB:return"SuspenseList";case LB:return"Activity"}if(typeof H==="object")switch(typeof H.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),H.$$typeof){case YB:return"Portal";case x:return H.displayName||"Context";case BB:return(H._context.displayName||"Context")+".Consumer";case zB:var Y=H.render;return H=H.displayName,H||(H=Y.displayName||Y.name||"",H=H!==""?"ForwardRef("+H+")":"ForwardRef"),H;case j:return Y=H.displayName||null,Y!==null?Y:W(H.type)||"Memo";case v:Y=H._payload,H=H._init;try{return W(H(Y))}catch(J){}}return null}function O(H){return""+H}function D(H){try{O(H);var Y=!1}catch(T){Y=!0}if(Y){Y=console;var J=Y.error,w=typeof Symbol==="function"&&Symbol.toStringTag&&H[Symbol.toStringTag]||H.constructor.name||"Object";return J.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",w),O(H)}}function K(H){if(H===o)return"<>";if(typeof H==="object"&&H!==null&&H.$$typeof===v)return"<...>";try{var Y=W(H);return Y?"<"+Y+">":"<...>"}catch(J){return"<...>"}}function V(){var H=n.A;return H===null?null:H.getOwner()}function E(){return Error("react-stack-top-frame")}function F(H){if(S.call(H,"key")){var Y=Object.getOwnPropertyDescriptor(H,"key").get;if(Y&&Y.isReactWarning)return!1}return H.key!==void 0}function _(H,Y){function J(){m||(m=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}J.isReactWarning=!0,Object.defineProperty(H,"key",{get:J,configurable:!0})}function b(){var H=W(this.type);return u[H]||(u[H]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),H=this.props.ref,H!==void 0?H:null}function h(H,Y,J,w,T,d){var P=J.ref;return H={$$typeof:i,type:H,key:Y,props:J,_owner:w},(P!==void 0?P:null)!==null?Object.defineProperty(H,"ref",{enumerable:!1,get:b}):Object.defineProperty(H,"ref",{enumerable:!1,value:null}),H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(H,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(H,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.defineProperty(H,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:d}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H}function e(H,Y,J,w,T,d){var P=Y.children;if(P!==void 0)if(w)if(g(P)){for(w=0;w<P.length;w++)c(P[w]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(P);if(S.call(Y,"key")){P=W(H);var I=Object.keys(Y).filter(function(HB){return HB!=="key"});w=0<I.length?"{key: someKey, "+I.join(": ..., ")+": ...}":"{key: someKey}",s[P+w]||(I=0<I.length?"{"+I.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
14
+ let props = %s;
15
+ <%s {...props} />
16
+ React keys must be passed directly to JSX without using spread:
17
+ let props = %s;
18
+ <%s key={someKey} {...props} />`,w,P,I,P),s[P+w]=!0)}if(P=null,J!==void 0&&(D(J),P=""+J),F(Y)&&(D(Y.key),P=""+Y.key),"key"in Y){J={};for(var N in Y)N!=="key"&&(J[N]=Y[N])}else J=Y;return P&&_(J,typeof H==="function"?H.displayName||H.name||"Unknown":H),h(H,P,J,V(),T,d)}function c(H){p(H)?H._store&&(H._store.validated=1):typeof H==="object"&&H!==null&&H.$$typeof===v&&(H._payload.status==="fulfilled"?p(H._payload.value)&&H._payload.value._store&&(H._payload.value._store.validated=1):H._store&&(H._store.validated=1))}function p(H){return typeof H==="object"&&H!==null&&H.$$typeof===i}var i=Symbol.for("react.transitional.element"),YB=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),ZB=Symbol.for("react.profiler"),BB=Symbol.for("react.consumer"),x=Symbol.for("react.context"),zB=Symbol.for("react.forward_ref"),t=Symbol.for("react.suspense"),QB=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),LB=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),n=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,g=Array.isArray,k=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(H){return H()}};var m,u={},a=f.react_stack_bottom_frame.bind(f,E)(),GB=k(K(E)),s={};oB.Fragment=o,oB.jsxDEV=function(H,Y,J,w){var T=1e4>n.recentlyCreatedOwnerStacks++;return e(H,Y,J,w,T?Error("react-stack-top-frame"):a,T?k(K(H)):GB)}})()});var L=JB(qB(),1);function yG(W){return L.jsxDEV("main",{className:"consent",children:[L.jsxDEV("div",{className:"consent-badges","aria-hidden":"true",children:[L.jsxDEV("span",{className:"consent-badge",children:W.app.name.slice(0,1).toUpperCase()},void 0,!1,void 0,this),L.jsxDEV("span",{className:"consent-link"},void 0,!1,void 0,this),L.jsxDEV("span",{className:"consent-badge consent-vendor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L.jsxDEV("h1",{className:"consent-heading",children:W.heading},void 0,!1,void 0,this),L.jsxDEV("div",{className:"consent-box",children:[L.jsxDEV("div",{className:"consent-who",children:[L.jsxDEV("strong",{children:W.app.name},void 0,!1,void 0,this),W.app.by?L.jsxDEV(L.Fragment,{children:[" by ",L.jsxDEV("strong",{children:W.app.by},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,L.jsxDEV("small",{children:W.request},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L.jsxDEV("ul",{className:"consent-permissions",children:W.permissions.map((O)=>L.jsxDEV("li",{className:"consent-permission",children:L.jsxDEV("details",{children:[L.jsxDEV("summary",{children:[L.jsxDEV("strong",{className:"consent-permission-title",children:O.title},void 0,!1,void 0,this),L.jsxDEV("small",{children:O.detail},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.help?L.jsxDEV("p",{children:O.help},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},O.title,!1,void 0,this))},void 0,!1,void 0,this),L.jsxDEV("form",{method:"post",action:W.action,className:"consent-form",children:[Object.entries(W.fields).map(([O,D])=>L.jsxDEV("input",{type:"hidden",name:O,id:O,value:D},O,!1,void 0,this)),(W.choices??[]).map((O)=>L.jsxDEV("label",{className:"consent-choice",htmlFor:O.id,children:[L.jsxDEV("span",{children:O.label},void 0,!1,void 0,this),L.jsxDEV("select",{id:O.id,name:O.id,defaultValue:O.value,children:O.options.map((D)=>L.jsxDEV("option",{value:D.value,children:D.label},D.value,!1,void 0,this))},void 0,!1,void 0,this)]},O.id,!0,void 0,this)),L.jsxDEV("div",{className:"consent-actions",children:[L.jsxDEV("button",{type:"submit",name:W.deny.name,value:W.deny.value,className:"consent-deny",children:W.deny.label},void 0,!1,void 0,this),W.allow?L.jsxDEV("button",{type:"submit",name:W.allow.name,value:W.allow.value,className:"consent-allow",children:W.allow.label},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),W.note?L.jsxDEV("p",{className:"consent-note",children:W.note},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var cG=`
19
+ body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
20
+ .consent { max-width: 530px; margin: 0 auto; padding: 24px 16px; }
21
+ .consent-badges { display: flex; align-items: center; justify-content: space-between; width: 240px; margin: 16px auto; }
22
+ .consent-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 28px; font-weight: 600; }
23
+ .consent-link { flex: 1; margin: 0 12px; border-top: 2px dashed; }
24
+ .consent-heading { text-align: center; font-weight: 400; font-size: 24px; margin: 16px 0 24px; }
25
+ .consent-box { border: 1px solid; border-radius: 6px; padding: 16px 24px; }
26
+ .consent-who small { display: block; }
27
+ .consent-permissions { list-style: none; padding: 0; margin: 16px 0; }
28
+ .consent-permission { padding: 8px 0; }
29
+ .consent-permission summary { cursor: pointer; list-style: none; }
30
+ .consent-permission summary small { display: block; }
31
+ .consent-choice { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 16px; font-weight: 600; }
32
+ .consent-choice select { font: inherit; font-weight: 400; padding: 6px; }
33
+ .consent-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid; }
34
+ .consent-actions button { flex: 1; padding: 6px 16px; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer; border: 1px solid; }
35
+ .consent-note { text-align: center; font-size: 12px; margin: 12px 0 0; }
36
+ `;export{yG as Consent,cG as CONSENT_CSS};
@@ -0,0 +1,47 @@
1
+ export type ConsentPermission = {
2
+ title: string;
3
+ detail: string;
4
+ help?: string;
5
+ };
6
+ export type ConsentProps = {
7
+ /** the page's heading, the vendor's words ("Authorize Acme") */
8
+ heading: string;
9
+ app: {
10
+ name: string;
11
+ by?: string;
12
+ };
13
+ /** the vendor's sentence under the app's name ("wants to access your octocat account") */
14
+ request: string;
15
+ permissions: ConsentPermission[];
16
+ /** where the form posts, and the fields the vendor's form carries */
17
+ action: string;
18
+ fields: Record<string, string>;
19
+ /** the two submit buttons: their field, value and label; without `allow` the person can only decline (a consent with
20
+ * nothing to grant, as Slack's with no channel for an incoming webhook) */
21
+ deny: {
22
+ name: string;
23
+ value: string;
24
+ label: string;
25
+ };
26
+ allow?: {
27
+ name: string;
28
+ value: string;
29
+ label: string;
30
+ };
31
+ /** under the buttons: where authorizing sends the person */
32
+ note?: string;
33
+ /** what the person picks before answering (Slack's channel an incoming webhook posts to): each a labelled select the
34
+ * form carries, as the payment and portal pieces carry theirs */
35
+ choices?: Array<{
36
+ id: string;
37
+ label: string;
38
+ value?: string;
39
+ options: Array<{
40
+ value: string;
41
+ label: string;
42
+ }>;
43
+ }>;
44
+ };
45
+ export declare function Consent(props: ConsentProps): import("react").JSX.Element;
46
+ /** The consent's layout; a pack's skin sets the colours and type over it. */
47
+ export declare const CONSENT_CSS = "\nbody { margin: 0; font: 14px/1.5 system-ui, -apple-system, \"Segoe UI\", sans-serif; }\n.consent { max-width: 530px; margin: 0 auto; padding: 24px 16px; }\n.consent-badges { display: flex; align-items: center; justify-content: space-between; width: 240px; margin: 16px auto; }\n.consent-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 28px; font-weight: 600; }\n.consent-link { flex: 1; margin: 0 12px; border-top: 2px dashed; }\n.consent-heading { text-align: center; font-weight: 400; font-size: 24px; margin: 16px 0 24px; }\n.consent-box { border: 1px solid; border-radius: 6px; padding: 16px 24px; }\n.consent-who small { display: block; }\n.consent-permissions { list-style: none; padding: 0; margin: 16px 0; }\n.consent-permission { padding: 8px 0; }\n.consent-permission summary { cursor: pointer; list-style: none; }\n.consent-permission summary small { display: block; }\n.consent-choice { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 16px; font-weight: 600; }\n.consent-choice select { font: inherit; font-weight: 400; padding: 6px; }\n.consent-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid; }\n.consent-actions button { flex: 1; padding: 6px 16px; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer; border: 1px solid; }\n.consent-note { text-align: center; font-size: 12px; margin: 12px 0 0; }\n";
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ export function Consent(props) {
3
+ return (_jsxs("main", { className: "consent", children: [_jsxs("div", { className: "consent-badges", "aria-hidden": "true", children: [_jsx("span", { className: "consent-badge", children: props.app.name.slice(0, 1).toUpperCase() }), _jsx("span", { className: "consent-link" }), _jsx("span", { className: "consent-badge consent-vendor" })] }), _jsx("h1", { className: "consent-heading", children: props.heading }), _jsxs("div", { className: "consent-box", children: [_jsxs("div", { className: "consent-who", children: [_jsx("strong", { children: props.app.name }), props.app.by ? _jsxs(_Fragment, { children: [" by ", _jsx("strong", { children: props.app.by })] }) : null, _jsx("small", { children: props.request })] }), _jsx("ul", { className: "consent-permissions", children: props.permissions.map((p) => (_jsx("li", { className: "consent-permission", children: _jsxs("details", { children: [_jsxs("summary", { children: [_jsx("strong", { className: "consent-permission-title", children: p.title }), _jsx("small", { children: p.detail })] }), p.help ? _jsx("p", { children: p.help }) : null] }) }, p.title))) }), _jsxs("form", { method: "post", action: props.action, className: "consent-form", children: [Object.entries(props.fields).map(([name, value]) => _jsx("input", { type: "hidden", name: name, id: name, value: value }, name)), (props.choices ?? []).map((c) => (_jsxs("label", { className: "consent-choice", htmlFor: c.id, children: [_jsx("span", { children: c.label }), _jsx("select", { id: c.id, name: c.id, defaultValue: c.value, children: c.options.map((o) => _jsx("option", { value: o.value, children: o.label }, o.value)) })] }, c.id))), _jsxs("div", { className: "consent-actions", children: [_jsx("button", { type: "submit", name: props.deny.name, value: props.deny.value, className: "consent-deny", children: props.deny.label }), props.allow ? _jsx("button", { type: "submit", name: props.allow.name, value: props.allow.value, className: "consent-allow", children: props.allow.label }) : null] }), props.note ? _jsx("p", { className: "consent-note", children: props.note }) : null] })] })] }));
4
+ }
5
+ /** The consent's layout; a pack's skin sets the colours and type over it. */
6
+ export const CONSENT_CSS = `
7
+ body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
8
+ .consent { max-width: 530px; margin: 0 auto; padding: 24px 16px; }
9
+ .consent-badges { display: flex; align-items: center; justify-content: space-between; width: 240px; margin: 16px auto; }
10
+ .consent-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 28px; font-weight: 600; }
11
+ .consent-link { flex: 1; margin: 0 12px; border-top: 2px dashed; }
12
+ .consent-heading { text-align: center; font-weight: 400; font-size: 24px; margin: 16px 0 24px; }
13
+ .consent-box { border: 1px solid; border-radius: 6px; padding: 16px 24px; }
14
+ .consent-who small { display: block; }
15
+ .consent-permissions { list-style: none; padding: 0; margin: 16px 0; }
16
+ .consent-permission { padding: 8px 0; }
17
+ .consent-permission summary { cursor: pointer; list-style: none; }
18
+ .consent-permission summary small { display: block; }
19
+ .consent-choice { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 16px; font-weight: 600; }
20
+ .consent-choice select { font: inherit; font-weight: 400; padding: 6px; }
21
+ .consent-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid; }
22
+ .consent-actions button { flex: 1; padding: 6px 16px; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer; border: 1px solid; }
23
+ .consent-note { text-align: center; font-size: 12px; margin: 12px 0 0; }
24
+ `;
@@ -0,0 +1,96 @@
1
+ // AN OAUTH CONSENT — the hosted flow every OAuth vendor puts between an application and its user
2
+ // (docs/contributing/architecture.md, "Screens"): who asks, for which account, for what, and the two
3
+ // answers. The page is a plain form rendered on the server, so a click posts and the vendor's redirect
4
+ // follows with no script, as on the vendor's own page. A pack gives the words and the fields its
5
+ // documented round trip carries, and its skin gives the look; the controls carry the vendor's names so
6
+ // a test that finds them by role and name finds them.
7
+ export type ConsentPermission = { title: string; detail: string; help?: string };
8
+
9
+ export type ConsentProps = {
10
+ /** the page's heading, the vendor's words ("Authorize Acme") */
11
+ heading: string;
12
+ app: { name: string; by?: string };
13
+ /** the vendor's sentence under the app's name ("wants to access your octocat account") */
14
+ request: string;
15
+ permissions: ConsentPermission[];
16
+ /** where the form posts, and the fields the vendor's form carries */
17
+ action: string;
18
+ fields: Record<string, string>;
19
+ /** the two submit buttons: their field, value and label; without `allow` the person can only decline (a consent with
20
+ * nothing to grant, as Slack's with no channel for an incoming webhook) */
21
+ deny: { name: string; value: string; label: string };
22
+ allow?: { name: string; value: string; label: string };
23
+ /** under the buttons: where authorizing sends the person */
24
+ note?: string;
25
+ /** what the person picks before answering (Slack's channel an incoming webhook posts to): each a labelled select the
26
+ * form carries, as the payment and portal pieces carry theirs */
27
+ choices?: Array<{ id: string; label: string; value?: string; options: Array<{ value: string; label: string }> }>;
28
+ };
29
+
30
+ export function Consent(props: ConsentProps) {
31
+ return (
32
+ <main className="consent">
33
+ <div className="consent-badges" aria-hidden="true">
34
+ <span className="consent-badge">{props.app.name.slice(0, 1).toUpperCase()}</span>
35
+ <span className="consent-link" />
36
+ <span className="consent-badge consent-vendor" />
37
+ </div>
38
+ <h1 className="consent-heading">{props.heading}</h1>
39
+ <div className="consent-box">
40
+ <div className="consent-who">
41
+ <strong>{props.app.name}</strong>
42
+ {props.app.by ? <> by <strong>{props.app.by}</strong></> : null}
43
+ <small>{props.request}</small>
44
+ </div>
45
+ <ul className="consent-permissions">
46
+ {props.permissions.map((p) => (
47
+ <li key={p.title} className="consent-permission">
48
+ <details>
49
+ <summary>
50
+ <strong className="consent-permission-title">{p.title}</strong>
51
+ <small>{p.detail}</small>
52
+ </summary>
53
+ {p.help ? <p>{p.help}</p> : null}
54
+ </details>
55
+ </li>
56
+ ))}
57
+ </ul>
58
+ <form method="post" action={props.action} className="consent-form">
59
+ {Object.entries(props.fields).map(([name, value]) => <input key={name} type="hidden" name={name} id={name} value={value} />)}
60
+ {(props.choices ?? []).map((c) => (
61
+ <label key={c.id} className="consent-choice" htmlFor={c.id}>
62
+ <span>{c.label}</span>
63
+ <select id={c.id} name={c.id} defaultValue={c.value}>{c.options.map((o) => <option key={o.value} value={o.value}>{o.label}</option>)}</select>
64
+ </label>
65
+ ))}
66
+ <div className="consent-actions">
67
+ <button type="submit" name={props.deny.name} value={props.deny.value} className="consent-deny">{props.deny.label}</button>
68
+ {props.allow ? <button type="submit" name={props.allow.name} value={props.allow.value} className="consent-allow">{props.allow.label}</button> : null}
69
+ </div>
70
+ {props.note ? <p className="consent-note">{props.note}</p> : null}
71
+ </form>
72
+ </div>
73
+ </main>
74
+ );
75
+ }
76
+
77
+ /** The consent's layout; a pack's skin sets the colours and type over it. */
78
+ export const CONSENT_CSS = `
79
+ body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
80
+ .consent { max-width: 530px; margin: 0 auto; padding: 24px 16px; }
81
+ .consent-badges { display: flex; align-items: center; justify-content: space-between; width: 240px; margin: 16px auto; }
82
+ .consent-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 28px; font-weight: 600; }
83
+ .consent-link { flex: 1; margin: 0 12px; border-top: 2px dashed; }
84
+ .consent-heading { text-align: center; font-weight: 400; font-size: 24px; margin: 16px 0 24px; }
85
+ .consent-box { border: 1px solid; border-radius: 6px; padding: 16px 24px; }
86
+ .consent-who small { display: block; }
87
+ .consent-permissions { list-style: none; padding: 0; margin: 16px 0; }
88
+ .consent-permission { padding: 8px 0; }
89
+ .consent-permission summary { cursor: pointer; list-style: none; }
90
+ .consent-permission summary small { display: block; }
91
+ .consent-choice { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 16px; font-weight: 600; }
92
+ .consent-choice select { font: inherit; font-weight: 400; padding: 6px; }
93
+ .consent-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid; }
94
+ .consent-actions button { flex: 1; padding: 6px 16px; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer; border: 1px solid; }
95
+ .consent-note { text-align: center; font-size: 12px; margin: 12px 0 0; }
96
+ `;