@zappie/sdk 0.23.0 → 0.24.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @zappie/sdk
2
2
 
3
+ ## 0.24.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1d7831f: `zappie check` names a corner radius written as a number in the screens every storefront shares: the account, orders and order pages, sign-in, the checkout, the bag drawer, the cart notice, and the closed and not-found pages. `css/literal-radius` flags `rounded-full`, `rounded-2xl`, `rounded-[12px]` and the other sized `rounded-*` utilities, `border-radius` with a length no `var()` gives, and an inline `borderRadius` number. Radius tokens, sizes your own CSS defines as `--radius-<name>`, square corners and a circle whose class list makes a square box pass. A comment with `zappie-allow-radius: <reason>` keeps any other true circle. It warns. Set `corners: { fail: true }` in `zappie.config.ts` to fail the step on it, and `corners.files` to name your own shared screens. `validateConfig` checks the new key.
8
+
9
+ ## 0.23.1
10
+
11
+ ### Patch Changes
12
+
13
+ - b7848ed: `@zappie/checkout-fields` is the behaviour of a checkout's fields above `useCheckoutFlow`, with no markup beyond the map: `useAddressPicker` and `useAddressSuggestions` for the address search, `DeliveryAddressMap` for the live or static map of the address, `useContactDraft` and `contactProblemText` for the contact details, `useScheduleStrip` and `scheduledLabel` for the schedule's days, `useRegionSearch`, `useEscapeClose` and `orderTimeChoice`.
14
+
15
+ The kit's address picker uses it, so `address-utils.ts` and `use-address-picker.ts` are no longer copied into a project, and `zappie add address-picker` installs the package. The SDK's Vite plugin pre-bundles the package in development. The starter picks its address and words its phone problem with it.
16
+
17
+ `zappie diff --apply` names the packages a new item version needs that the project doesn't have. `zappie doctor` accepts a later 0.x minor of a Zappie package for an item's requirement, so an item that asks for `^0.1.0` is met by 0.21.0.
18
+
3
19
  ## 0.23.0
4
20
 
5
21
  ### Minor Changes
@@ -121,6 +121,20 @@ type ZappieSiteConfig = {
121
121
  /** Fails the check when it finds an unused file or export. */
122
122
  fail?: boolean;
123
123
  };
124
+ /**
125
+ * How `zappie check` treats a corner radius written as a number, not a token, in the screens every storefront
126
+ * shares: the account, orders and order pages, sign-in, the checkout, the bag, the cart notice, and the closed and
127
+ * not-found pages. It warns unless `fail` is true.
128
+ */
129
+ corners?: {
130
+ /** Fails the check when a shared screen has a literal corner radius. */
131
+ fail?: boolean;
132
+ /**
133
+ * Globs of the shared screens' files, relative to the project, such as `app/account/**`. They replace the
134
+ * default list. An empty list checks no file.
135
+ */
136
+ files?: string[];
137
+ };
124
138
  };
125
139
  /**
126
140
  * A configuration diagnostic with its field path, stable code, message and severity.
package/dist/debug.js CHANGED
@@ -1,2 +1,2 @@
1
- var VERSION=true?"0.23.0":"0.0.0-development";function installDebug(client){if(typeof window==="undefined"||client.mode!=="test"){return}const events=[];let quote;const emit=(name,detail)=>{const event={name,detail,at:new Date().toISOString()};events.push(event);window.dispatchEvent(new CustomEvent("zappie:event",{detail:event}))};globalThis.__zappieEmit=emit;window.__zappie={version:VERSION,store:client.config.store,async catalogue(){await client.cart.hydrate();const branch=(await client.store.get()).branches.find(value=>value.id===client.cart.getSnapshot().branchId);return{branch,menu:await client.menu.get({branch:branch.id})}},cart:Object.assign(()=>client.cart.getSnapshot(),{async inject(input){await client.cart.hydrate();if(input.lines.length>100||input.lines.some(line=>!Number.isInteger(line.quantity??1)||(line.quantity??1)<1||(line.quantity??1)>99)){throw new Error("Use up to 100 cart lines with whole quantities from 1 to 99.")}const snapshot=client.cart.getSnapshot();const value={v:1,menuVersion:client._internal.cartCatalogue().version,updatedAt:Date.now(),fulfilment:snapshot.fulfilment,promoCode:snapshot.promoCode,lines:input.lines.map((line,index)=>({...line,id:`debug_${index}`,name:line.itemId,quantity:line.quantity??1,choices:(line.choices??[]).map(choice=>({...choice,quantity:choice.quantity??1})),inputs:line.inputs??{},addedAt:new Date().toISOString()}))};const scope=client.config.cart?.storageScope;(client.config.storage??window.localStorage).setItem(`zappie:cart:v1:${client.config.store}:${snapshot.branchId}${scope?`:${scope}`:""}`,JSON.stringify(value))}}),quote:()=>quote,events};client.on("add_to_cart",detail=>emit("add_to_cart",detail));client.cart.subscribe(()=>{const state=client.cart.state;const next="quote"in state?state.quote:void 0;if(next&&next!==quote){quote=next;emit("quote",next)}})}export{installDebug};
1
+ var VERSION=true?"0.24.0":"0.0.0-development";function installDebug(client){if(typeof window==="undefined"||client.mode!=="test"){return}const events=[];let quote;const emit=(name,detail)=>{const event={name,detail,at:new Date().toISOString()};events.push(event);window.dispatchEvent(new CustomEvent("zappie:event",{detail:event}))};globalThis.__zappieEmit=emit;window.__zappie={version:VERSION,store:client.config.store,async catalogue(){await client.cart.hydrate();const branch=(await client.store.get()).branches.find(value=>value.id===client.cart.getSnapshot().branchId);return{branch,menu:await client.menu.get({branch:branch.id})}},cart:Object.assign(()=>client.cart.getSnapshot(),{async inject(input){await client.cart.hydrate();if(input.lines.length>100||input.lines.some(line=>!Number.isInteger(line.quantity??1)||(line.quantity??1)<1||(line.quantity??1)>99)){throw new Error("Use up to 100 cart lines with whole quantities from 1 to 99.")}const snapshot=client.cart.getSnapshot();const value={v:1,menuVersion:client._internal.cartCatalogue().version,updatedAt:Date.now(),fulfilment:snapshot.fulfilment,promoCode:snapshot.promoCode,lines:input.lines.map((line,index)=>({...line,id:`debug_${index}`,name:line.itemId,quantity:line.quantity??1,choices:(line.choices??[]).map(choice=>({...choice,quantity:choice.quantity??1})),inputs:line.inputs??{},addedAt:new Date().toISOString()}))};const scope=client.config.cart?.storageScope;(client.config.storage??window.localStorage).setItem(`zappie:cart:v1:${client.config.store}:${snapshot.branchId}${scope?`:${scope}`:""}`,JSON.stringify(value))}}),quote:()=>quote,events};client.on("add_to_cart",detail=>emit("add_to_cart",detail));client.cart.subscribe(()=>{const state=client.cart.state;const next="quote"in state?state.quote:void 0;if(next&&next!==quote){quote=next;emit("quote",next)}})}export{installDebug};
2
2
  //# sourceMappingURL=debug.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{ZappieCartError}from"./cart/errors.js";import{holdsForLater,isHeldQuote}from"./cart/held.js";import{previewItem}from"./cart/preview.js";import{estimateUnitPrice}from"./cart/price.js";import{resolveSourceMenu}from"./cart/source-menu.js";import{validateLine}from"./cart/validate.js";import{createZappie}from"./client.js";import{API_VERSION}from"./config.js";import{ZappieError,isZappieError}from"./errors.js";export*from"./models.js";import{format,money}from"./money.js";import{RestTransport}from"./transport/rest.js";var VERSION=true?"0.23.0":"0.0.0-development";export{API_VERSION,RestTransport,VERSION,ZappieCartError,ZappieError,createZappie,estimateUnitPrice,format,holdsForLater,isHeldQuote,isZappieError,money,previewItem,resolveSourceMenu,validateLine};
1
+ import{ZappieCartError}from"./cart/errors.js";import{holdsForLater,isHeldQuote}from"./cart/held.js";import{previewItem}from"./cart/preview.js";import{estimateUnitPrice}from"./cart/price.js";import{resolveSourceMenu}from"./cart/source-menu.js";import{validateLine}from"./cart/validate.js";import{createZappie}from"./client.js";import{API_VERSION}from"./config.js";import{ZappieError,isZappieError}from"./errors.js";export*from"./models.js";import{format,money}from"./money.js";import{RestTransport}from"./transport/rest.js";var VERSION=true?"0.24.0":"0.0.0-development";export{API_VERSION,RestTransport,VERSION,ZappieCartError,ZappieError,createZappie,estimateUnitPrice,format,holdsForLater,isHeldQuote,isZappieError,money,previewItem,resolveSourceMenu,validateLine};
2
2
  //# sourceMappingURL=index.js.map
@@ -986,6 +986,20 @@ type ZappieSiteConfig = {
986
986
  /** Fails the check when it finds an unused file or export. */
987
987
  fail?: boolean;
988
988
  };
989
+ /**
990
+ * How `zappie check` treats a corner radius written as a number, not a token, in the screens every storefront
991
+ * shares: the account, orders and order pages, sign-in, the checkout, the bag, the cart notice, and the closed and
992
+ * not-found pages. It warns unless `fail` is true.
993
+ */
994
+ corners?: {
995
+ /** Fails the check when a shared screen has a literal corner radius. */
996
+ fail?: boolean;
997
+ /**
998
+ * Globs of the shared screens' files, relative to the project, such as `app/account/**`. They replace the
999
+ * default list. An empty list checks no file.
1000
+ */
1001
+ files?: string[];
1002
+ };
989
1003
  };
990
1004
 
991
1005
  /** Inputs for a storefront document's report-only security headers. */
@@ -1,2 +1,2 @@
1
- import{globallyAllowed,hostname,nonblank,packageName,record,unknownKeys}from"./helpers.js";import{analytics,budgets,nested}from"./sections.js";var rootKeys=["store","branches","theme","prerender","menu","packages","audit","outbound","security","budgets","readiness","analytics","verify","unused"];function validateConfig(input){const issues=[];const issue=value=>issues.push(value);const error=(path,code,message)=>issue({path,code,message,severity:"error"});if(!record(input)){return{valid:false,issues:[{path:"$",code:"invalid_type",message:"Expected a configuration object. Export an object from zappie.config.ts.",severity:"error"}]}}unknownKeys(input,rootKeys,"",issue);if(!nonblank(input.store)){error("store",input.store===void 0?"missing_required":"invalid_type","Expected a non-empty storefront slug. Set store to the slug used by createZappie().")}theme(input.theme,error);stringList(input.branches,"branches",error,{nonempty:true,unique:true,slug:true});if(input.prerender!==void 0){issue({path:"prerender",code:"unused_setting",message:"Zappie hosting prerenders no page, so prerender does nothing. Remove it.",severity:"warning"})}nested(input.menu,"menu",["hiddenCategories"],issue,value=>{stringList(value.hiddenCategories,"menu.hiddenCategories",error)});nested(input.packages,"packages",["allow"],issue,value=>{const allow=stringList(value.allow,"packages.allow",error);allow?.forEach((name,index)=>{if(globallyAllowed(name)){issue({path:`packages.allow[${index}]`,code:"redundant_allowlist",message:`${name} is already globally allowed. Remove it from packages.allow.`,severity:"warning"})}else if(!packageName(name)){error(`packages.allow[${index}]`,"invalid_format","Expected a lowercase npm package name. Use a package name such as lucide-react or @scope/name.")}})});nested(input.outbound,"outbound",["allow"],issue,value=>{hostList(value.allow,"outbound.allow",error)});nested(input.security,"security",["csp","links"],issue,security=>{hostList(security.links,"security.links",error);nested(security.csp,"security.csp",["imgSrc","connectSrc","fontSrc","styleSrc","frameSrc"],issue,csp=>{for(const[name,value]of Object.entries(csp)){hostList(value,`security.csp.${name}`,error)}})});budgets(input.budgets,issue,error);nested(input.readiness,"readiness",["routeDiscovery"],issue,readiness=>{nested(readiness.routeDiscovery,"readiness.routeDiscovery",["optOut"],issue,routeDiscovery=>{nested(routeDiscovery.optOut,"readiness.routeDiscovery.optOut",["reason"],issue,optOut=>{if(!nonblank(optOut.reason)){error("readiness.routeDiscovery.optOut.reason","invalid_format","Expected a non-blank reason. Explain why the site disables initial route discovery.")}})})});analytics(input.analytics,issue,error);nested(input.verify,"verify",["startPath","cataloguePath"],issue,()=>{});nested(input.unused,"unused",["fail"],issue,unused=>{if(unused.fail!==void 0&&typeof unused.fail!=="boolean"){error("unused.fail","invalid_type","Expected a boolean. Set unused.fail to true or remove it.")}});return{valid:!issues.some(entry=>entry.severity==="error"),issues}}function theme(value,error){if(typeof value!=="string"){error("theme",value===void 0?"missing_required":"invalid_type","Expected a relative .json path. Set theme to a value such as ./theme.json.")}else if(!/\.json$/.test(value)||/^(?:[a-z][a-z\d+.-]*:|\/|\\)/i.test(value)||value.includes("\\")){error("theme","invalid_format","Expected a relative .json path. Use a value such as ./theme.json.")}}function stringList(value,path,error,options={}){if(value===void 0){return void 0}if(!Array.isArray(value)||value.some(entry=>typeof entry!=="string")){error(path,"invalid_type",`Expected an array of strings. Set ${path} to string values.`);return void 0}if(options.nonempty&&value.length===0){error(path,"invalid_format",`Expected at least one value. Add a value to ${path} or remove the field.`)}value.forEach((entry,index)=>{if(options.slug&&!nonblank(entry)){error(`${path}[${index}]`,"invalid_format","Expected a non-empty branch slug. Remove the empty value or use a branch slug.")}});if(options.unique&&new Set(value).size!==value.length){error(path,"duplicate",`Expected unique values. Remove duplicates from ${path}.`)}return value}function hostList(value,path,error){stringList(value,path,error)?.forEach((host,index)=>{if(!hostname(host)){error(`${path}[${index}]`,"invalid_format","Expected a hostname or leading *. subdomain pattern without a scheme, path, port or IP. Use a value such as api.example.com.")}})}export{validateConfig};
1
+ import{globallyAllowed,hostname,nonblank,packageName,record,unknownKeys}from"./helpers.js";import{analytics,budgets,nested}from"./sections.js";var rootKeys=["store","branches","theme","prerender","menu","packages","audit","outbound","security","budgets","readiness","analytics","verify","unused","corners"];function validateConfig(input){const issues=[];const issue=value=>issues.push(value);const error=(path,code,message)=>issue({path,code,message,severity:"error"});if(!record(input)){return{valid:false,issues:[{path:"$",code:"invalid_type",message:"Expected a configuration object. Export an object from zappie.config.ts.",severity:"error"}]}}unknownKeys(input,rootKeys,"",issue);if(!nonblank(input.store)){error("store",input.store===void 0?"missing_required":"invalid_type","Expected a non-empty storefront slug. Set store to the slug used by createZappie().")}theme(input.theme,error);branchList(stringList(input.branches,"branches",error),error);if(input.prerender!==void 0){issue({path:"prerender",code:"unused_setting",message:"Zappie hosting prerenders no page, so prerender does nothing. Remove it.",severity:"warning"})}nested(input.menu,"menu",["hiddenCategories"],issue,value=>{stringList(value.hiddenCategories,"menu.hiddenCategories",error)});nested(input.packages,"packages",["allow"],issue,value=>{const allow=stringList(value.allow,"packages.allow",error);allow?.forEach((name,index)=>{if(globallyAllowed(name)){issue({path:`packages.allow[${index}]`,code:"redundant_allowlist",message:`${name} is already globally allowed. Remove it from packages.allow.`,severity:"warning"})}else if(!packageName(name)){error(`packages.allow[${index}]`,"invalid_format","Expected a lowercase npm package name. Use a package name such as lucide-react or @scope/name.")}})});nested(input.outbound,"outbound",["allow"],issue,value=>{hostList(value.allow,"outbound.allow",error)});nested(input.security,"security",["csp","links"],issue,security=>{hostList(security.links,"security.links",error);nested(security.csp,"security.csp",["imgSrc","connectSrc","fontSrc","styleSrc","frameSrc"],issue,csp=>{for(const[name,value]of Object.entries(csp)){hostList(value,`security.csp.${name}`,error)}})});budgets(input.budgets,issue,error);nested(input.readiness,"readiness",["routeDiscovery"],issue,readiness=>{nested(readiness.routeDiscovery,"readiness.routeDiscovery",["optOut"],issue,routeDiscovery=>{nested(routeDiscovery.optOut,"readiness.routeDiscovery.optOut",["reason"],issue,optOut=>{if(!nonblank(optOut.reason)){error("readiness.routeDiscovery.optOut.reason","invalid_format","Expected a non-blank reason. Explain why the site disables initial route discovery.")}})})});analytics(input.analytics,issue,error);nested(input.verify,"verify",["startPath","cataloguePath"],issue,()=>{});for(const key of["unused","corners"]){nested(input[key],key,key==="unused"?["fail"]:["fail","files"],issue,value=>{if(value.fail!==void 0&&typeof value.fail!=="boolean"){error(`${key}.fail`,"invalid_type",`Expected a boolean. Set ${key}.fail to true or remove it.`)}stringList(value.files,`${key}.files`,error)})}return{valid:!issues.some(entry=>entry.severity==="error"),issues}}function theme(value,error){if(typeof value!=="string"||!/\.json$/.test(value)||/^(?:[a-z][a-z\d+.-]*:|\/)|\\/i.test(value)){error("theme",typeof value==="string"?"invalid_format":value===void 0?"missing_required":"invalid_type","Expected a relative .json path. Use a value such as ./theme.json.")}}function stringList(value,path,error){if(value===void 0){return void 0}if(!Array.isArray(value)||value.some(entry=>typeof entry!=="string")){error(path,"invalid_type",`Expected an array of strings. Set ${path} to string values.`);return void 0}return value}function branchList(value,error){if(!value){return}if(value.length===0){error("branches","invalid_format","Expected at least one value. Add a value to branches or remove the field.")}value.forEach((entry,index)=>{if(!nonblank(entry)){error(`branches[${index}]`,"invalid_format","Expected a non-empty branch slug. Remove the empty value or use a branch slug.")}});if(new Set(value).size!==value.length){error("branches","duplicate","Expected unique values. Remove duplicates from branches.")}}function hostList(value,path,error){stringList(value,path,error)?.forEach((host,index)=>{if(!hostname(host)){error(`${path}[${index}]`,"invalid_format","Expected a hostname or leading *. subdomain pattern without a scheme, path, port or IP. Use a value such as api.example.com.")}})}export{validateConfig};
2
2
  //# sourceMappingURL=validate.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/site-config/validate.ts"],
4
- "mappings": "AAAA,OACE,gBACA,SACA,SACA,YACA,OACA,gBACK,eACP,OAAS,UAAW,QAAS,WAAc,gBAG3C,IAAM,SAAW,CACf,QACA,WACA,QACA,YACA,OACA,WACA,QACA,WACA,WACA,UACA,YACA,YACA,SACA,QACF,EASO,SAAS,eAAe,MAAkC,CAC/D,MAAM,OAAwB,CAAC,EAC/B,MAAM,MAAS,OAAuB,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MAAM,QAAQ,KAAK,GACpB,MAAM,KAAM,OAAU,OAAO,QAAU,QAAQ,EAC/C,CACA,MACE,KACA,eACA,qCAAqC,IAAI,oBAC3C,EACA,OAAO,MACT,CACA,OAAO,KACT,CAGA,SAAS,WAAW,MAA6B,MAAiB,CAChE,GAAI,CAAC,MAAO,CACV,MACF,CACA,GAAI,MAAM,SAAW,EAAG,CACtB,MACE,WACA,iBACA,2EACF,CACF,CACA,MAAM,QAAQ,CAAC,MAAO,QAAU,CAC9B,GAAI,CAAC,SAAS,KAAK,EAAG,CACpB,MACE,YAAY,KAAK,IACjB,iBACA,gFACF,CACF,CACF,CAAC,EACD,GAAI,IAAI,IAAI,KAAK,EAAE,OAAS,MAAM,OAAQ,CACxC,MACE,WACA,YACA,0DACF,CACF,CACF,CAEA,SAAS,SAAS,MAAgB,KAAc,MAAiB,CAC/D,WAAW,MAAO,KAAM,KAAK,GAAG,QAAQ,CAAC,KAAM,QAAU,CACvD,GAAI,CAAC,SAAS,IAAI,EAAG,CACnB,MACE,GAAG,IAAI,IAAI,KAAK,IAChB,iBACA,8HACF,CACF,CACF,CAAC,CACH",
5
5
  "names": []
6
6
  }
@@ -38,7 +38,7 @@ type MarkedSource = {
38
38
  */
39
39
  declare function zappieSource({ previewHost }: ZappieSourceOptions): Plugin;
40
40
  /**
41
- * Every browser entry of the `@zappie/sdk` and `@zappie/foundations` installed under `root`, such as
41
+ * Every browser entry of the `@zappie/sdk`, `@zappie/foundations` and `@zappie/checkout-fields` installed under `root`, such as
42
42
  * `@zappie/sdk/customer`, for Vite's `optimizeDeps.include`. A package that isn't installed, or that is linked from a
43
43
  * workspace rather than installed, which Vite serves from source, adds none.
44
44
  *
@@ -1,3 +1,3 @@
1
- import{randomBytes}from"node:crypto";import{existsSync,readFileSync,realpathSync}from"node:fs";import{createRequire}from"node:module";import path from"node:path";import{parseSync}from"vite";var SOURCE_ATTRIBUTE="data-zappie-source";var COMPONENT_ATTRIBUTE="data-zappie-component";function zappieSource({previewHost}){let root="";return{name:"zappie-source",enforce:"pre",apply:(_config,{command})=>command==="serve",config(config){root=path.resolve(config.root??process.cwd())},configEnvironment(name){if(name!=="client"){return}const include=zappieDevEntries(root);return{optimizeDeps:{entries:["app/**/*.{js,jsx,ts,tsx}"],...include.length?{include}:{}}}},configResolved(config){root=config.root},transform:{filter:{id:/\.[jt]sx$/},handler(code,id){if(!previewHost){return null}if(!id.startsWith(`${root}/`)){return null}const file=id.slice(root.length+1);if(!file.startsWith("app/")||file.includes("node_modules/")){return null}return markSource(code,file)}}}}var SERVER_ONLY_ENTRIES={"@zappie/sdk":["./vite","./server","./testing"],"@zappie/foundations":["./next"]};function zappieDevEntries(root){return Object.entries(SERVER_ONLY_ENTRIES).flatMap(([name,serverOnly])=>{const manifest=installedManifest(root,name);if(!manifest){return[]}const exports=manifest.exports;const subpaths=exports&&typeof exports==="object"&&!Array.isArray(exports)?Object.keys(exports).filter(key=>key.startsWith(".")):["."];return subpaths.filter(subpath=>!serverOnly.includes(subpath)&&!subpath.includes("*")&&!/\.(?:css|json)$/.test(subpath)).map(subpath=>subpath==="."?name:`${name}${subpath.slice(1)}`)})}function installedManifest(root,name){for(let directory=path.resolve(root);;directory=path.dirname(directory)){const file=path.join(directory,"node_modules",name,"package.json");if(existsSync(file)){const real=realpathSync(file);return real.split(path.sep).includes("node_modules")?JSON.parse(readFileSync(real,"utf8")):void 0}if(path.dirname(directory)===directory){return void 0}}}function markSource(code,file){if(!/^[\x21-\x7e]+$/.test(file)){return null}const escaped=file.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;");const parsed=parseSync(file,code);if(parsed.errors.length>0){return null}const lineStarts=[0];for(let index=code.indexOf("\n");index!==-1;index=code.indexOf("\n",index+1)){lineStarts.push(index+1)}const lineOf=offset=>{let low=0;let high=lineStarts.length-1;while(low<high){const middle=low+high+1>>1;if(lineStarts[middle]<=offset){low=middle}else{high=middle-1}}return low};const inserts=[];const visit=(value,component)=>{if(!value||typeof value!=="object"){return}if(Array.isArray(value)){for(const entry of value){visit(entry,component)}return}const node=value;const named=componentName(node)??component;if(node.type==="JSXOpeningElement"){const name=node.name;const attributes=node.attributes;if(name.type==="JSXIdentifier"&&typeof name.name==="string"&&/^[a-z]/.test(name.name)&&!attributes.some(attribute=>attribute.name?.name===SOURCE_ATTRIBUTE)){const component2=named?` ${COMPONENT_ATTRIBUTE}="${named}"`:"";inserts.push([name.end,` ${SOURCE_ATTRIBUTE}="${escaped}:${lineOf(node.start)+1}"${component2}`])}}for(const key in node){if(key!=="type"&&key!=="start"&&key!=="end"){visit(node[key],named)}}};visit(parsed.program,void 0);if(inserts.length===0){return null}inserts.sort((a,b)=>a[0]-b[0]);let output="";let from=0;const lines=lineStarts.map(()=>[[0,0]]);const added=lineStarts.map(()=>0);for(const[offset,text]of inserts){output+=code.slice(from,offset)+text;from=offset;const line=lineOf(offset);const column=offset-lineStarts[line];added[line]+=text.length;lines[line].push([column+added[line],column])}output+=code.slice(from);let previousLine=0;let previousColumn=0;const mappings=lines.map((segments,line)=>{let previousGenerated=0;return segments.map(([generated,original])=>{const encoded=vlq(generated-previousGenerated)+"A"+vlq(line-previousLine)+vlq(original-previousColumn);previousGenerated=generated;previousLine=line;previousColumn=original;return encoded}).join(",")}).join(";");return{code:output,map:{version:3,sources:[file],names:[],mappings}}}var BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function vlq(value){let rest=value<0?-value<<1|1:value<<1;let encoded="";do{let digit=rest&31;rest>>>=5;if(rest>0){digit|=32}encoded+=BASE64[digit]}while(rest>0);return encoded}function componentName(node){const id=node.id??void 0;const capitalised=name=>typeof name==="string"&&/^[A-Z]/.test(name)?name:void 0;if(node.type==="FunctionDeclaration"||node.type==="FunctionExpression"){return capitalised(id?.name)}if(node.type==="VariableDeclarator"&&id?.type==="Identifier"){return capitalised(id.name)}return void 0}function zappieHoistImports(){return{name:"zappie-hoist-imports",apply:"build",applyToEnvironment:environment=>environment.config.consumer==="client",generateBundle(_options,bundle){const importsOf=fileName=>{const chunk=bundle[fileName];return chunk?.type==="chunk"?chunk.imports:[]};for(const chunk of Object.values(bundle)){if(chunk.type!=="chunk"||!chunk.isEntry){continue}const listed=new Set([chunk.fileName,...chunk.imports]);const hoisted=[];const pending=[...chunk.imports];for(let index=0;index<pending.length;index++){for(const next of importsOf(pending[index])){if(!listed.has(next)){listed.add(next);hoisted.push(next);pending.push(next)}}}if(hoisted.length===0){continue}const from=chunk.fileName.split("/").slice(0,-1);chunk.code+=`
1
+ import{randomBytes}from"node:crypto";import{existsSync,readFileSync,realpathSync}from"node:fs";import{createRequire}from"node:module";import path from"node:path";import{parseSync}from"vite";var SOURCE_ATTRIBUTE="data-zappie-source";var COMPONENT_ATTRIBUTE="data-zappie-component";function zappieSource({previewHost}){let root="";return{name:"zappie-source",enforce:"pre",apply:(_config,{command})=>command==="serve",config(config){root=path.resolve(config.root??process.cwd())},configEnvironment(name){if(name!=="client"){return}const include=zappieDevEntries(root);return{optimizeDeps:{entries:["app/**/*.{js,jsx,ts,tsx}"],...include.length?{include}:{}}}},configResolved(config){root=config.root},transform:{filter:{id:/\.[jt]sx$/},handler(code,id){if(!previewHost){return null}if(!id.startsWith(`${root}/`)){return null}const file=id.slice(root.length+1);if(!file.startsWith("app/")||file.includes("node_modules/")){return null}return markSource(code,file)}}}}var SERVER_ONLY_ENTRIES={"@zappie/sdk":["./vite","./server","./testing"],"@zappie/foundations":["./next"],"@zappie/checkout-fields":[]};function zappieDevEntries(root){return Object.entries(SERVER_ONLY_ENTRIES).flatMap(([name,serverOnly])=>{const manifest=installedManifest(root,name);if(!manifest){return[]}const exports=manifest.exports;const subpaths=exports&&typeof exports==="object"&&!Array.isArray(exports)?Object.keys(exports).filter(key=>key.startsWith(".")):["."];return subpaths.filter(subpath=>!serverOnly.includes(subpath)&&!subpath.includes("*")&&!/\.(?:css|json)$/.test(subpath)).map(subpath=>subpath==="."?name:`${name}${subpath.slice(1)}`)})}function installedManifest(root,name){for(let directory=path.resolve(root);;directory=path.dirname(directory)){const file=path.join(directory,"node_modules",name,"package.json");if(existsSync(file)){const real=realpathSync(file);return real.split(path.sep).includes("node_modules")?JSON.parse(readFileSync(real,"utf8")):void 0}if(path.dirname(directory)===directory){return void 0}}}function markSource(code,file){if(!/^[\x21-\x7e]+$/.test(file)){return null}const escaped=file.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;");const parsed=parseSync(file,code);if(parsed.errors.length>0){return null}const lineStarts=[0];for(let index=code.indexOf("\n");index!==-1;index=code.indexOf("\n",index+1)){lineStarts.push(index+1)}const lineOf=offset=>{let low=0;let high=lineStarts.length-1;while(low<high){const middle=low+high+1>>1;if(lineStarts[middle]<=offset){low=middle}else{high=middle-1}}return low};const inserts=[];const visit=(value,component)=>{if(!value||typeof value!=="object"){return}if(Array.isArray(value)){for(const entry of value){visit(entry,component)}return}const node=value;const named=componentName(node)??component;if(node.type==="JSXOpeningElement"){const name=node.name;const attributes=node.attributes;if(name.type==="JSXIdentifier"&&typeof name.name==="string"&&/^[a-z]/.test(name.name)&&!attributes.some(attribute=>attribute.name?.name===SOURCE_ATTRIBUTE)){const component2=named?` ${COMPONENT_ATTRIBUTE}="${named}"`:"";inserts.push([name.end,` ${SOURCE_ATTRIBUTE}="${escaped}:${lineOf(node.start)+1}"${component2}`])}}for(const key in node){if(key!=="type"&&key!=="start"&&key!=="end"){visit(node[key],named)}}};visit(parsed.program,void 0);if(inserts.length===0){return null}inserts.sort((a,b)=>a[0]-b[0]);let output="";let from=0;const lines=lineStarts.map(()=>[[0,0]]);const added=lineStarts.map(()=>0);for(const[offset,text]of inserts){output+=code.slice(from,offset)+text;from=offset;const line=lineOf(offset);const column=offset-lineStarts[line];added[line]+=text.length;lines[line].push([column+added[line],column])}output+=code.slice(from);let previousLine=0;let previousColumn=0;const mappings=lines.map((segments,line)=>{let previousGenerated=0;return segments.map(([generated,original])=>{const encoded=vlq(generated-previousGenerated)+"A"+vlq(line-previousLine)+vlq(original-previousColumn);previousGenerated=generated;previousLine=line;previousColumn=original;return encoded}).join(",")}).join(";");return{code:output,map:{version:3,sources:[file],names:[],mappings}}}var BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function vlq(value){let rest=value<0?-value<<1|1:value<<1;let encoded="";do{let digit=rest&31;rest>>>=5;if(rest>0){digit|=32}encoded+=BASE64[digit]}while(rest>0);return encoded}function componentName(node){const id=node.id??void 0;const capitalised=name=>typeof name==="string"&&/^[A-Z]/.test(name)?name:void 0;if(node.type==="FunctionDeclaration"||node.type==="FunctionExpression"){return capitalised(id?.name)}if(node.type==="VariableDeclarator"&&id?.type==="Identifier"){return capitalised(id.name)}return void 0}function zappieHoistImports(){return{name:"zappie-hoist-imports",apply:"build",applyToEnvironment:environment=>environment.config.consumer==="client",generateBundle(_options,bundle){const importsOf=fileName=>{const chunk=bundle[fileName];return chunk?.type==="chunk"?chunk.imports:[]};for(const chunk of Object.values(bundle)){if(chunk.type!=="chunk"||!chunk.isEntry){continue}const listed=new Set([chunk.fileName,...chunk.imports]);const hoisted=[];const pending=[...chunk.imports];for(let index=0;index<pending.length;index++){for(const next of importsOf(pending[index])){if(!listed.has(next)){listed.add(next);hoisted.push(next);pending.push(next)}}}if(hoisted.length===0){continue}const from=chunk.fileName.split("/").slice(0,-1);chunk.code+=`
2
2
  ${hoisted.map(file=>`import ${JSON.stringify(relativeImport(from,file))};`).join("")}
3
3
  `;chunk.imports.push(...hoisted)}}}}function relativeImport(from,file){const to=file.split("/");let shared=0;while(shared<from.length&&shared<to.length-1&&from[shared]===to[shared]){shared++}const up=from.length-shared;const rest=to.slice(shared).join("/");return up===0?`./${rest}`:`${"../".repeat(up)}${rest}`}var UPLOADS_PREFIX="/_zappie/assets/";function zappieUploads({host}){const origin=uploadsOrigin(host);return{name:"zappie-uploads",apply:(_config,{command})=>command==="serve"&&Boolean(origin),configureServer(server){server.middlewares.use((request,response,next)=>{const path2=request.url??"";if(!origin||!path2.startsWith(UPLOADS_PREFIX)){next();return}void forwardUpload(origin,path2,request.method,request.headers.accept).then(({status,headers,body})=>{response.writeHead(status,headers);response.end(body)}).catch(()=>{response.writeHead(502,{"cache-control":"no-store"});response.end()})})}}}function uploadsOrigin(host){if(!host){return void 0}try{const url=new URL(host.includes("://")?host:`https://${host}`);return url.protocol==="https:"?url.origin:void 0}catch{return void 0}}async function forwardUpload(origin,path2,method="GET",accept){if(method!=="GET"&&method!=="HEAD"){return{status:405,headers:{allow:"GET, HEAD"},body:Buffer.alloc(0)}}const upstream=await fetch(`${origin}${path2}`,{method,headers:accept?{accept}:{}});const headers={};for(const key of["content-type","cache-control","vary"]){const value=upstream.headers.get(key);if(value){headers[key]=value}}return{status:upstream.status,headers,body:Buffer.from(await upstream.arrayBuffer())}}function zappieWorker(){let root=process.cwd();let building=false;let renderer;return{name:"zappie-worker",enforce:"pre",config(config,{command}){root=path.resolve(config.root??process.cwd());building=command==="build";return{define:{"import.meta.env.ZAPPIE_DEPLOY_ID":JSON.stringify(building?randomBytes(8).toString("hex"):"dev")}}},configEnvironment(name){return building&&name!=="client"?{build:{minify:true}}:void 0},resolveId:{filter:{id:STREAMING_ONLY},handler(source){if(!building||this.environment.config.consumer==="client"||!STREAMING_ONLY.test(source)){return null}renderer??(renderer=streamingRenderer(root)??null);return renderer}}}}var STREAMING_ONLY=/^react-dom\/server(?:\.edge)?$/;function streamingRenderer(root){try{const manifest=createRequire(path.join(root,"package.json")).resolve("react-dom/package.json");const file=path.join(path.dirname(manifest),"cjs","react-dom-server.edge.production.js");return existsSync(file)?file:void 0}catch{return void 0}}export{COMPONENT_ATTRIBUTE,SOURCE_ATTRIBUTE,forwardUpload,markSource,streamingRenderer,uploadsOrigin,zappieDevEntries,zappieHoistImports,zappieSource,zappieUploads,zappieWorker};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappie/sdk",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Typed, framework-agnostic client for Zappie menus, carts, checkout, auth and events.",
5
5
  "type": "module",
6
6
  "sideEffects": [