@aws-amplify/ui-react 2.1.5 → 2.1.6

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/internal.js CHANGED
@@ -1 +1,2 @@
1
- var k=Object.create;var f=Object.defineProperty,v=Object.defineProperties,w=Object.getOwnPropertyDescriptor,H=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertyNames,y=Object.getOwnPropertySymbols,F=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var b=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&b(e,r,t[r]);if(y)for(var r of y(t))_.call(t,r)&&b(e,r,t[r]);return e},g=(e,t)=>v(e,H(t)),D=e=>f(e,"__esModule",{value:!0}),i=(e,t)=>f(e,"name",{value:t,configurable:!0});var G=(e,t)=>{D(e);for(var r in t)f(e,r,{get:t[r],enumerable:!0})},N=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!O.call(e,o)&&o!=="default"&&f(e,o,{get:()=>t[o],enumerable:!(r=w(t,o))||r.enumerable});return e},d=e=>N(D(f(e!=null?k(F(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);G(exports,{createDataStorePredicate:()=>x,findChildOverrides:()=>V,getOverrideProps:()=>j,getOverridesFromVariants:()=>C,mergeVariantsAndOverrides:()=>U,useAuth:()=>T,useDataStoreBinding:()=>q,useDataStoreCollection:()=>L,useDataStoreItem:()=>A,useStorageURL:()=>z});var p=d(require("react"));var R=d(require("@aws-amplify/auth")),M=d(require("@aws-amplify/core")),m=d(require("react")),T=i(()=>{let[e,t]=(0,m.useState)({error:void 0,isLoading:!0,user:void 0}),r=i(({payload:a})=>{switch(a.event){case"signIn":return t({user:a.data,isLoading:!1});case"signOut":return t({isLoading:!1});default:break}},"handleAuth"),o=i(()=>(t({isLoading:!0}),R.default.currentAuthenticatedUser().then(a=>t({user:a,isLoading:!1})).catch(a=>t({error:a,isLoading:!1})),M.Hub.listen("auth",r),()=>M.Hub.remove("auth",r)),"fetch");return(0,m.useEffect)(o,[]),g(l({},e),{fetch:o})},"useAuth");var P=d(require("@aws-amplify/datastore")),u=d(require("react")),L=i(({model:e,criteria:t,pagination:r})=>{let[o,a]=(0,u.useState)({items:[],isLoading:!1,error:void 0});return(0,u.useEffect)(i(()=>{a({isLoading:!0,items:[]});let n=P.DataStore.observeQuery(e,t,r).subscribe(c=>a({items:c.items,isLoading:!1}),c=>a({items:[],error:c,isLoading:!1}));if(n)return()=>n.unsubscribe()},"fetch"),[]),o},"useDataStoreCollection"),A=i(({model:e,id:t})=>{let[r,o]=(0,u.useState)(),[a,s]=(0,u.useState)(!1),[n,c]=(0,u.useState)();return(0,u.useEffect)(i(()=>{s(!0),P.DataStore.query(e,t).then(o).catch(c).finally(()=>s(!1))},"fetch"),[]),{error:n,item:r,isLoading:a}},"useDataStoreItem");function q(e){return e.type==="record"?A(e):L(e)}i(q,"useDataStoreBinding");var S=d(require("@aws-amplify/storage")),h=d(require("react")),z=i((e,t)=>{let[r,o]=(0,h.useState)({isLoading:!0}),a=JSON.stringify(t),s=i(()=>{o({isLoading:!0});let n=S.Storage.get(e,t);return n.then(c=>o({url:c,isLoading:!1})).catch(c=>o({error:c,isLoading:!1})),()=>S.Storage.cancel(n)},"fetch");return(0,h.useEffect)(s,[e,a]),g(l({},r),{fetch:s})},"useStorageURL");var J=d(require("@radix-ui/react-id"));var E=i(e=>typeof e=="function","isFunction");var V=i((e,t)=>{if(!e)return null;let r=Object.entries(e).filter(o=>o[0].startsWith(t));return Object.assign({},...Array.from(r,([o,a])=>({[o.replace(t,"")]:a})))},"findChildOverrides"),j=i((e,t)=>{if(!e)return null;let r=Object.entries(e).filter(([o])=>o===t).flatMap(([,o])=>Object.entries(o)).filter(o=>o==null?void 0:o[0]);return Object.fromEntries(r)},"getOverrideProps");function C(e,t){let r=[...new Set(e.flatMap(s=>Object.keys(s.variantValues)))],o=Object.keys(t).filter(s=>r.includes(s)&&t[s]).reduce((s,n)=>(s[n]=t[n],s),{});return e.filter(({variantValues:s})=>Object.keys(s).length===Object.keys(o).length&&Object.entries(s).every(([n,c])=>o[n]===c)).reduce((s,n)=>l(l({},s),n.overrides),{})}i(C,"getOverridesFromVariants");var U=i((e,t)=>{if(!e&&!t)return null;if(!t)return e;if(!e)return t;let r=new Set(Object.keys(t)),o=Object.keys(e).filter(s=>r.has(s)),a=Object.fromEntries(o.map(s=>[s,l(l({},e[s]),t[s])]));return l(l(l({},e),t),a)},"mergeVariantsAndOverrides");var I=i(e=>e.reduce((t,r)=>o=>r(t(o)),t=>t),"mergePredicates"),x=i(e=>{let{and:t,or:r,field:o,operator:a,operand:s}=e;if(Array.isArray(t)){let n=t.map(c=>x(c));return c=>c.and(I(n))}else if(Array.isArray(r)){let n=r.map(c=>x(c));return c=>c.or(I(n))}return n=>E(n[o])?n[o].call(n,a,s):n},"createDataStorePredicate");0&&(module.exports={createDataStorePredicate,findChildOverrides,getOverrideProps,getOverridesFromVariants,mergeVariantsAndOverrides,useAuth,useDataStoreBinding,useDataStoreCollection,useDataStoreItem,useStorageURL});
1
+ var v=Object.create;var u=Object.defineProperty,B=Object.defineProperties,F=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertyNames,O=Object.getOwnPropertySymbols,G=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var D=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&D(e,r,t[r]);if(O)for(var r of O(t))N.call(t,r)&&D(e,r,t[r]);return e},g=(e,t)=>B(e,w(t)),y=e=>u(e,"__esModule",{value:!0}),a=(e,t)=>u(e,"name",{value:t,configurable:!0});var T=(e,t)=>{for(var r in t)u(e,r,{get:t[r],enumerable:!0})},R=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of _(t))!b.call(e,n)&&(r||n!=="default")&&u(e,n,{get:()=>t[n],enumerable:!(o=F(t,n))||o.enumerable});return e},E=(e,t)=>R(y(u(e!=null?v(G(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),q=(e=>(t,r)=>e&&e.get(t)||(r=R(y({}),t,1),e&&e.set(t,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var W={};T(W,{createDataStorePredicate:()=>x,findChildOverrides:()=>C,getOverrideProps:()=>I,getOverridesFromVariants:()=>U,mergeVariantsAndOverrides:()=>k,useAuth:()=>z,useDataStoreBinding:()=>J,useDataStoreCollection:()=>A,useDataStoreItem:()=>V,useStorageURL:()=>K});var f=E(require("react"));var L=E(require("@aws-amplify/auth")),P=require("@aws-amplify/core"),m=require("react"),z=a(()=>{let[e,t]=(0,m.useState)({error:void 0,isLoading:!0,user:void 0}),r=a(({payload:n})=>{switch(n.event){case"signIn":return t({user:n.data,isLoading:!1});case"signOut":return t({isLoading:!1});default:break}},"handleAuth"),o=a(()=>(t({isLoading:!0}),L.default.currentAuthenticatedUser().then(n=>t({user:n,isLoading:!1})).catch(n=>t({error:n,isLoading:!1})),P.Hub.listen("auth",r),()=>P.Hub.remove("auth",r)),"fetch");return(0,m.useEffect)(o,[]),g(l({},e),{fetch:o})},"useAuth");var h=require("@aws-amplify/datastore"),d=require("react"),A=a(({model:e,criteria:t,pagination:r})=>{let[o,n]=(0,d.useState)({items:[],isLoading:!1,error:void 0});return(0,d.useEffect)(a(()=>{n({isLoading:!0,items:[]});let i=h.DataStore.observeQuery(e,t,r).subscribe(c=>n({items:c.items,isLoading:!1}),c=>n({items:[],error:c,isLoading:!1}));if(i)return()=>i.unsubscribe()},"fetch"),[]),o},"useDataStoreCollection"),V=a(({model:e,id:t})=>{let[r,o]=(0,d.useState)(),[n,s]=(0,d.useState)(!1),[i,c]=(0,d.useState)();return(0,d.useEffect)(a(()=>{s(!0),h.DataStore.query(e,t).then(o).catch(c).finally(()=>s(!1))},"fetch"),[]),{error:i,item:r,isLoading:n}},"useDataStoreItem");function J(e){return e.type==="record"?V(e):A(e)}a(J,"useDataStoreBinding");var S=require("@aws-amplify/storage"),M=require("react"),K=a((e,t)=>{let[r,o]=(0,M.useState)({isLoading:!0}),n=JSON.stringify(t),s=a(()=>{o({isLoading:!0});let i=S.Storage.get(e,t);return i.then(c=>o({url:c,isLoading:!1})).catch(c=>o({error:c,isLoading:!1})),()=>S.Storage.cancel(i)},"fetch");return(0,M.useEffect)(s,[e,n]),g(l({},r),{fetch:s})},"useStorageURL");var Q=require("@radix-ui/react-id");var j=a(e=>typeof e=="function","isFunction");var C=a((e,t)=>{if(!e)return null;let r=Object.entries(e).filter(o=>o[0].startsWith(t));return Object.assign({},...Array.from(r,([o,n])=>({[o.replace(t,"")]:n})))},"findChildOverrides"),I=a((e,t)=>{if(!e)return null;let r=Object.entries(e).filter(([o])=>o===t).flatMap(([,o])=>Object.entries(o)).filter(o=>o==null?void 0:o[0]);return Object.fromEntries(r)},"getOverrideProps");function U(e,t){let r=[...new Set(e.flatMap(s=>Object.keys(s.variantValues)))],o=Object.keys(t).filter(s=>r.includes(s)&&t[s]).reduce((s,i)=>(s[i]=t[i],s),{});return e.filter(({variantValues:s})=>Object.keys(s).length===Object.keys(o).length&&Object.entries(s).every(([i,c])=>o[i]===c)).reduce((s,i)=>l(l({},s),i.overrides),{})}a(U,"getOverridesFromVariants");var k=a((e,t)=>{if(!e&&!t)return null;if(!t)return e;if(!e)return t;let r=new Set(Object.keys(t)),o=Object.keys(e).filter(s=>r.has(s)),n=Object.fromEntries(o.map(s=>[s,l(l({},e[s]),t[s])]));return l(l(l({},e),t),n)},"mergeVariantsAndOverrides");var H=a(e=>e.reduce((t,r)=>o=>r(t(o)),t=>t),"mergePredicates"),x=a(e=>{let{and:t,or:r,field:o,operator:n,operand:s}=e;if(Array.isArray(t)){let i=t.map(c=>x(c));return c=>c.and(H(i))}else if(Array.isArray(r)){let i=r.map(c=>x(c));return c=>c.or(H(i))}return i=>j(i[o])?i[o].call(i,n,s):i},"createDataStorePredicate");module.exports=q(W);0&&(module.exports={createDataStorePredicate,findChildOverrides,getOverrideProps,getOverridesFromVariants,mergeVariantsAndOverrides,useAuth,useDataStoreBinding,useDataStoreCollection,useDataStoreItem,useStorageURL});
2
+ //# sourceMappingURL=internal.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/internal.tsx", "../src/globals.js", "../src/hooks/useAuth.ts", "../src/hooks/useDataStore.tsx", "../src/hooks/useStorageURL.ts", "../src/primitives/shared/utils.ts", "../src/primitives/shared/datastore.ts"],
4
- "sourcesContent": ["export * from './hooks/useAuth';\nexport * from './hooks/useDataStore';\nexport * from './hooks/useStorageURL';\nexport * from './primitives/shared/datastore';\nexport {\n EscapeHatchProps,\n Variant,\n findChildOverrides,\n getOverridesFromVariants,\n getOverrideProps,\n mergeVariantsAndOverrides,\n} from './primitives/shared/utils';\n", "/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n", "import Auth, { CognitoUser } from '@aws-amplify/auth';\nimport { Hub } from '@aws-amplify/core';\nimport { useEffect, useState } from 'react';\n\n// Exposes relevant CognitoUser properties\ninterface AuthUser extends CognitoUser {\n username: string;\n attributes: Record<string, string>;\n}\n\nexport interface UseAuthResult {\n user?: AuthUser;\n isLoading: boolean;\n error?: Error;\n fetch?: () => void;\n}\n\n/**\n * Amplify Auth React hook\n * @internal\n */\nexport const useAuth = (): UseAuthResult => {\n const [result, setResult] = useState<UseAuthResult>({\n error: undefined,\n isLoading: true,\n user: undefined,\n });\n\n const handleAuth = ({ payload }) => {\n switch (payload.event) {\n case 'signIn':\n return setResult({ user: payload.data, isLoading: false });\n case 'signOut':\n return setResult({ isLoading: false });\n default:\n break;\n }\n };\n\n const fetch = () => {\n setResult({ isLoading: true });\n\n Auth.currentAuthenticatedUser()\n .then((user) => setResult({ user, isLoading: false }))\n .catch((error) => setResult({ error, isLoading: false }));\n\n // Handle Hub Auth events\n Hub.listen('auth', handleAuth);\n\n // Stop listening events on unmount\n return () => Hub.remove('auth', handleAuth);\n };\n\n useEffect(fetch, []);\n\n return { ...result, fetch };\n};\n", "import { DataStore, PersistentModel } from '@aws-amplify/datastore';\nimport { useEffect, useState } from 'react';\nimport {\n DataStoreBindingProps,\n DataStoreCollectionProps,\n DataStoreCollectionResult,\n DataStoreItemProps,\n DataStoreItemResult,\n} from '../primitives/types/datastore';\n\n/**\n * Perform a collection query against a DataStore model\n * @internal\n */\nexport const useDataStoreCollection = <M extends PersistentModel>({\n model,\n criteria,\n pagination,\n}: DataStoreCollectionProps<M>): DataStoreCollectionResult<M> => {\n const [result, setResult] = useState<DataStoreCollectionResult<M>>({\n items: [],\n isLoading: false,\n error: undefined,\n });\n\n const fetch = () => {\n setResult({ isLoading: true, items: [] });\n\n const subscription = DataStore.observeQuery(\n model,\n criteria,\n pagination\n ).subscribe(\n (snapshot) => setResult({ items: snapshot.items, isLoading: false }),\n (error) => setResult({ items: [], error, isLoading: false })\n );\n\n // Unsubscribe from query updates on unmount\n if (subscription) {\n return () => subscription.unsubscribe();\n }\n };\n\n // Fetch on next render cycle\n useEffect(fetch, []);\n\n return result;\n};\n\n/**\n * Perform a single record query against a DataStore model\n * @internal\n */\nexport const useDataStoreItem = <M extends PersistentModel>({\n model,\n id,\n}: DataStoreItemProps<M>): DataStoreItemResult<M> => {\n const [item, setItem] = useState<M>();\n const [isLoading, setLoading] = useState<boolean>(false);\n const [error, setError] = useState<Error>();\n\n const fetch = () => {\n setLoading(true);\n\n DataStore.query(model, id)\n .then(setItem)\n .catch(setError)\n .finally(() => setLoading(false));\n };\n\n // Fetch on next render cycle\n useEffect(fetch, []);\n\n return {\n error,\n item,\n isLoading,\n };\n};\n\n/**\n * Perform a query against a DataStore model\n * @internal\n */\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props: DataStoreBindingProps<Model, 'record'>\n): DataStoreItemResult<Model>;\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props: DataStoreBindingProps<Model, 'collection'>\n): DataStoreCollectionResult<Model>;\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props:\n | DataStoreBindingProps<Model, 'record'>\n | DataStoreBindingProps<Model, 'collection'>\n): DataStoreItemResult<Model> | DataStoreCollectionResult<Model> {\n return props.type === 'record'\n ? useDataStoreItem(props)\n : useDataStoreCollection(props);\n}\n", "import { S3ProviderGetConfig, Storage } from '@aws-amplify/storage';\nimport { useEffect, useState } from 'react';\n\nexport interface UseStorageURLResult {\n url?: string;\n error?: Error;\n isLoading: boolean;\n}\n\n/**\n * Computes a public URL for an Amplify Storage file\n * @internal\n */\nexport const useStorageURL = (key: string, options?: S3ProviderGetConfig) => {\n const [result, setResult] = useState<UseStorageURLResult>({\n isLoading: true,\n });\n\n // Used to prevent an infinite loop on useEffect, because `options`\n // will have a different reference on every render\n const serializedOptions = JSON.stringify(options);\n\n const fetch = () => {\n setResult({ isLoading: true });\n\n const promise = Storage.get(key, options);\n\n // Attempt to fetch storage object url\n promise\n .then((url) => setResult({ url, isLoading: false }))\n .catch((error) => setResult({ error, isLoading: false }));\n\n // Cancel current promise on unmount\n return () => Storage.cancel(promise);\n };\n\n useEffect(fetch, [key, serializedOptions]);\n\n return { ...result, fetch };\n};\n", "import { useId } from '@radix-ui/react-id';\n\nexport const strHasLength = (str: unknown): str is string =>\n typeof str === 'string' && str.length > 0;\n\nexport const isFunction = (fn: unknown): fn is Function =>\n typeof fn === 'function';\n\nexport const isNullOrEmptyString = (value: unknown) =>\n value == null || (typeof value === 'string' && value.length === 0);\n\n/**\n * Create a consecutive integer array from start value to end value.\n * @param start start value\n * @param end end value\n * @returns an integer array with elements from start to end consecutively\n */\nexport const getConsecutiveIntArray = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, idx) => idx + start);\n};\n\n/**\n * Create a uuid to use with amplify fields unless\n * an id is provided\n * @param id user specified id\n * @returns string\n */\nexport const useStableId = (id?: string) => useId(id);\n\n// Prefixed autogenerated id created by useStableId\nexport const AUTO_GENERATED_ID_PREFIX = 'radix-id-';\n\n/**\n * This method is used to parse through all of the overrides and\n * only pass the relevant child overrides for a given component.\n * @internal\n * @param overrides escape hatch props\n * @param elementHierarchy\n * @returns overrides only for specified element\n */\nexport const findChildOverrides = (\n overrides: EscapeHatchProps | null | undefined,\n elementHierarchy: string\n) => {\n if (!overrides) {\n return null;\n }\n\n const filteredOverrides = Object.entries(overrides).filter((m) =>\n m[0].startsWith(elementHierarchy)\n );\n\n return Object.assign(\n {},\n ...Array.from(filteredOverrides, ([k, v]) => ({\n [k.replace(elementHierarchy, '')]: v,\n }))\n );\n};\n\n/**\n * This helper method is used to get the overrides\n * that will be applied to a component\n * @internal\n * @param overrides escape hatch props\n * @param elementHierarchy\n * @returns component overrides\n */\nexport const getOverrideProps = (\n overrides: EscapeHatchProps | null | undefined,\n elementHierarchy: string\n) => {\n if (!overrides) {\n return null;\n }\n\n const componentOverrides = Object.entries(overrides)\n .filter(([key]) => key === elementHierarchy)\n .flatMap(([, value]) => Object.entries(value))\n .filter((m) => m?.[0]);\n\n return Object.fromEntries(componentOverrides);\n};\n\nexport type EscapeHatchProps = {\n [elementHierarchy: string]: Record<string, string>;\n};\n\ntype VariantValues = { [key: string]: string };\nexport type Variant = {\n variantValues: VariantValues;\n overrides: EscapeHatchProps;\n};\n\n/**\n * Given a list of style variants, select a given one based on input props\n * @internal\n * @param variants list of style variants to select from\n * @param props variant values to select from the list, may include additional props, to tidy up usage upstream\n */\nexport function getOverridesFromVariants(\n variants: Variant[],\n props: { [key: string]: any }\n) {\n // Get unique keys from the provided variants\n const variantValueKeys = [\n ...new Set(\n variants.flatMap((variant) => Object.keys(variant.variantValues))\n ),\n ];\n\n // Get variant value object from provided props, dropping keys that aren't in variantValueKeys, or whose vals are falsey\n const variantValuesFromProps: VariantValues = Object.keys(props)\n .filter((i) => variantValueKeys.includes(i) && props[i])\n .reduce((acc, key) => {\n acc[key] = props[key];\n return acc;\n }, {});\n\n const matchedVariants = variants.filter(({ variantValues }) => {\n return (\n Object.keys(variantValues).length ===\n Object.keys(variantValuesFromProps).length &&\n Object.entries(variantValues).every(\n ([key, value]) => variantValuesFromProps[key] === value\n )\n );\n });\n\n return matchedVariants.reduce((overrides, variant) => {\n return { ...overrides, ...variant.overrides };\n }, {});\n}\n\n/**\n * This helper method is used to merge\n * variants with overrides\n * @internal\n * @param variants\n * @param overrides\n * @returns merged variants with overrides\n */\nexport const mergeVariantsAndOverrides = (\n variants: EscapeHatchProps,\n overrides: EscapeHatchProps\n): EscapeHatchProps => {\n if (!variants && !overrides) {\n return null;\n }\n if (!overrides) {\n return variants;\n }\n if (!variants) {\n return overrides;\n }\n const overrideKeys = new Set(Object.keys(overrides));\n const sharedKeys = Object.keys(variants).filter((variantKey) =>\n overrideKeys.has(variantKey)\n );\n const merged = Object.fromEntries(\n sharedKeys.map((sharedKey) => [\n sharedKey,\n { ...variants[sharedKey], ...overrides[sharedKey] },\n ])\n );\n return {\n ...variants,\n ...overrides,\n ...merged,\n };\n};\n", "import {\n ModelPredicate,\n PersistentModel,\n ProducerModelPredicate,\n} from '@aws-amplify/datastore';\nimport { DataStorePredicateObject } from '../types/datastore';\nimport { isFunction } from './utils';\n\n/**\n * Given an array of predicates, compose them in sequential order\n */\nconst mergePredicates = <Model extends PersistentModel>(\n predicates: ProducerModelPredicate<Model>[]\n): ProducerModelPredicate<Model> =>\n predicates.reduce(\n (previous, current) => (predicate) => current(previous(predicate)),\n (predicate) => predicate\n );\n\n/**\n * Creates a DataStore compatible predicate function from an object representation\n * @internal\n */\nexport const createDataStorePredicate = <Model extends PersistentModel>(\n predicateObject: DataStorePredicateObject\n): ProducerModelPredicate<Model> => {\n const {\n and: groupAnd,\n or: groupOr,\n field,\n operator,\n operand,\n } = predicateObject;\n\n if (Array.isArray(groupAnd)) {\n const predicates = groupAnd.map((condition) =>\n createDataStorePredicate<Model>(condition)\n );\n\n return (p: ModelPredicate<Model>) => p.and(mergePredicates(predicates));\n } else if (Array.isArray(groupOr)) {\n const predicates = groupOr.map((condition) =>\n createDataStorePredicate<Model>(condition)\n );\n\n return (p: ModelPredicate<Model>) => p.or(mergePredicates(predicates));\n }\n\n return (predicate: ModelPredicate<Model>) => {\n if (isFunction(predicate[field])) {\n return predicate[field].call(predicate, operator, operand);\n }\n\n return predicate;\n };\n};\n"],
5
- "mappings": "q9BAAA,2QCQA,MAAuB,oBCRvB,MAAkC,gCAClC,EAAoB,gCACpB,EAAoC,oBAmBvB,EAAU,MAAqB,CAC1C,GAAM,CAAC,EAAQ,GAAa,eAAwB,CAClD,MAAO,OACP,UAAW,GACX,KAAM,SAGF,EAAa,GAAC,CAAE,aAAc,CAClC,OAAQ,EAAQ,WACT,SACH,MAAO,GAAU,CAAE,KAAM,EAAQ,KAAM,UAAW,SAC/C,UACH,MAAO,GAAU,CAAE,UAAW,aAE9B,QAPa,cAWb,EAAQ,MACZ,GAAU,CAAE,UAAW,KAEvB,UAAK,2BACF,KAAK,AAAC,GAAS,EAAU,CAAE,OAAM,UAAW,MAC5C,MAAM,AAAC,GAAU,EAAU,CAAE,QAAO,UAAW,MAGlD,MAAI,OAAO,OAAQ,GAGZ,IAAM,MAAI,OAAO,OAAQ,IAXpB,SAcd,sBAAU,EAAO,IAEV,OAAK,GAAL,CAAa,WAlCC,WCrBvB,MAA2C,qCAC3C,EAAoC,oBAavB,EAAyB,GAA4B,CAChE,QACA,WACA,gBAC+D,CAC/D,GAAM,CAAC,EAAQ,GAAa,eAAuC,CACjE,MAAO,GACP,UAAW,GACX,MAAO,SAsBT,sBAnBc,MAAM,CAClB,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AEA,EAAW,OACT,CAAC,EAAU,IAAY,AAAC,GAAc,EAAQ,EAAS,IACvD,AAAC,GAAc,GALK,mBAYX,EAA2B,EACtC,GACkC,CAClC,GAAM,CACJ,IAAK,EACL,GAAI,EACJ,QACA,WACA,WACE,EAEJ,GAAI,MAAM,QAAQ,GAAW,CAC3B,GAAM,GAAa,EAAS,IAAI,AAAC,GAC/B,EAAgC,IAGlC,MAAO,AAAC,IAA6B,EAAE,IAAI,EAAgB,YAClD,MAAM,QAAQ,GAAU,CACjC,GAAM,GAAa,EAAQ,IAAI,AAAC,GAC9B,EAAgC,IAGlC,MAAO,AAAC,IAA6B,EAAE,GAAG,EAAgB,IAG5D,MAAO,AAAC,IACF,EAAW,EAAU,IAChB,EAAU,GAAO,KAAK,EAAW,EAAU,GAG7C,GA9B6B",
6
- "names": []
7
- }
1
+ {"version":3,"sources":["../src/internal.tsx","../src/react-shim.js","../src/hooks/useAuth.ts","../src/hooks/useDataStore.tsx","../src/hooks/useStorageURL.ts","../src/primitives/shared/utils.ts","../src/primitives/shared/datastore.ts"],"sourcesContent":["export * from './hooks/useAuth';\nexport * from './hooks/useDataStore';\nexport * from './hooks/useStorageURL';\nexport * from './primitives/shared/datastore';\nexport {\n EscapeHatchProps,\n Variant,\n findChildOverrides,\n getOverridesFromVariants,\n getOverrideProps,\n mergeVariantsAndOverrides,\n} from './primitives/shared/utils';\n","/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n","import Auth, { CognitoUser } from '@aws-amplify/auth';\nimport { Hub } from '@aws-amplify/core';\nimport { useEffect, useState } from 'react';\n\n// Exposes relevant CognitoUser properties\ninterface AuthUser extends CognitoUser {\n username: string;\n attributes: Record<string, string>;\n}\n\nexport interface UseAuthResult {\n user?: AuthUser;\n isLoading: boolean;\n error?: Error;\n fetch?: () => void;\n}\n\n/**\n * Amplify Auth React hook\n * @internal\n */\nexport const useAuth = (): UseAuthResult => {\n const [result, setResult] = useState<UseAuthResult>({\n error: undefined,\n isLoading: true,\n user: undefined,\n });\n\n const handleAuth = ({ payload }) => {\n switch (payload.event) {\n case 'signIn':\n return setResult({ user: payload.data, isLoading: false });\n case 'signOut':\n return setResult({ isLoading: false });\n default:\n break;\n }\n };\n\n const fetch = () => {\n setResult({ isLoading: true });\n\n Auth.currentAuthenticatedUser()\n .then((user) => setResult({ user, isLoading: false }))\n .catch((error) => setResult({ error, isLoading: false }));\n\n // Handle Hub Auth events\n Hub.listen('auth', handleAuth);\n\n // Stop listening events on unmount\n return () => Hub.remove('auth', handleAuth);\n };\n\n useEffect(fetch, []);\n\n return { ...result, fetch };\n};\n","import { DataStore, PersistentModel } from '@aws-amplify/datastore';\nimport { useEffect, useState } from 'react';\nimport {\n DataStoreBindingProps,\n DataStoreCollectionProps,\n DataStoreCollectionResult,\n DataStoreItemProps,\n DataStoreItemResult,\n} from '../primitives/types/datastore';\n\n/**\n * Perform a collection query against a DataStore model\n * @internal\n */\nexport const useDataStoreCollection = <M extends PersistentModel>({\n model,\n criteria,\n pagination,\n}: DataStoreCollectionProps<M>): DataStoreCollectionResult<M> => {\n const [result, setResult] = useState<DataStoreCollectionResult<M>>({\n items: [],\n isLoading: false,\n error: undefined,\n });\n\n const fetch = () => {\n setResult({ isLoading: true, items: [] });\n\n const subscription = DataStore.observeQuery(\n model,\n criteria,\n pagination\n ).subscribe(\n (snapshot) => setResult({ items: snapshot.items, isLoading: false }),\n (error) => setResult({ items: [], error, isLoading: false })\n );\n\n // Unsubscribe from query updates on unmount\n if (subscription) {\n return () => subscription.unsubscribe();\n }\n };\n\n // Fetch on next render cycle\n useEffect(fetch, []);\n\n return result;\n};\n\n/**\n * Perform a single record query against a DataStore model\n * @internal\n */\nexport const useDataStoreItem = <M extends PersistentModel>({\n model,\n id,\n}: DataStoreItemProps<M>): DataStoreItemResult<M> => {\n const [item, setItem] = useState<M>();\n const [isLoading, setLoading] = useState<boolean>(false);\n const [error, setError] = useState<Error>();\n\n const fetch = () => {\n setLoading(true);\n\n DataStore.query(model, id)\n .then(setItem)\n .catch(setError)\n .finally(() => setLoading(false));\n };\n\n // Fetch on next render cycle\n useEffect(fetch, []);\n\n return {\n error,\n item,\n isLoading,\n };\n};\n\n/**\n * Perform a query against a DataStore model\n * @internal\n */\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props: DataStoreBindingProps<Model, 'record'>\n): DataStoreItemResult<Model>;\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props: DataStoreBindingProps<Model, 'collection'>\n): DataStoreCollectionResult<Model>;\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props:\n | DataStoreBindingProps<Model, 'record'>\n | DataStoreBindingProps<Model, 'collection'>\n): DataStoreItemResult<Model> | DataStoreCollectionResult<Model> {\n return props.type === 'record'\n ? useDataStoreItem(props)\n : useDataStoreCollection(props);\n}\n","import { S3ProviderGetConfig, Storage } from '@aws-amplify/storage';\nimport { useEffect, useState } from 'react';\n\nexport interface UseStorageURLResult {\n url?: string;\n error?: Error;\n isLoading: boolean;\n}\n\n/**\n * Computes a public URL for an Amplify Storage file\n * @internal\n */\nexport const useStorageURL = (key: string, options?: S3ProviderGetConfig) => {\n const [result, setResult] = useState<UseStorageURLResult>({\n isLoading: true,\n });\n\n // Used to prevent an infinite loop on useEffect, because `options`\n // will have a different reference on every render\n const serializedOptions = JSON.stringify(options);\n\n const fetch = () => {\n setResult({ isLoading: true });\n\n const promise = Storage.get(key, options);\n\n // Attempt to fetch storage object url\n promise\n .then((url) => setResult({ url, isLoading: false }))\n .catch((error) => setResult({ error, isLoading: false }));\n\n // Cancel current promise on unmount\n return () => Storage.cancel(promise);\n };\n\n useEffect(fetch, [key, serializedOptions]);\n\n return { ...result, fetch };\n};\n","import { useId } from '@radix-ui/react-id';\n\nexport const strHasLength = (str: unknown): str is string =>\n typeof str === 'string' && str.length > 0;\n\nexport const isFunction = (fn: unknown): fn is Function =>\n typeof fn === 'function';\n\nexport const isNullOrEmptyString = (value: unknown) =>\n value == null || (typeof value === 'string' && value.length === 0);\n\n/**\n * Create a consecutive integer array from start value to end value.\n * @param start start value\n * @param end end value\n * @returns an integer array with elements from start to end consecutively\n */\nexport const getConsecutiveIntArray = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, idx) => idx + start);\n};\n\n/**\n * Create a uuid to use with amplify fields unless\n * an id is provided\n * @param id user specified id\n * @returns string\n */\nexport const useStableId = (id?: string) => useId(id);\n\n// Prefixed autogenerated id created by useStableId\nexport const AUTO_GENERATED_ID_PREFIX = 'radix-id-';\n\n/**\n * This method is used to parse through all of the overrides and\n * only pass the relevant child overrides for a given component.\n * @internal\n * @param overrides escape hatch props\n * @param elementHierarchy\n * @returns overrides only for specified element\n */\nexport const findChildOverrides = (\n overrides: EscapeHatchProps | null | undefined,\n elementHierarchy: string\n) => {\n if (!overrides) {\n return null;\n }\n\n const filteredOverrides = Object.entries(overrides).filter((m) =>\n m[0].startsWith(elementHierarchy)\n );\n\n return Object.assign(\n {},\n ...Array.from(filteredOverrides, ([k, v]) => ({\n [k.replace(elementHierarchy, '')]: v,\n }))\n );\n};\n\n/**\n * This helper method is used to get the overrides\n * that will be applied to a component\n * @internal\n * @param overrides escape hatch props\n * @param elementHierarchy\n * @returns component overrides\n */\nexport const getOverrideProps = (\n overrides: EscapeHatchProps | null | undefined,\n elementHierarchy: string\n) => {\n if (!overrides) {\n return null;\n }\n\n const componentOverrides = Object.entries(overrides)\n .filter(([key]) => key === elementHierarchy)\n .flatMap(([, value]) => Object.entries(value))\n .filter((m) => m?.[0]);\n\n return Object.fromEntries(componentOverrides);\n};\n\nexport type EscapeHatchProps = {\n [elementHierarchy: string]: Record<string, string>;\n};\n\ntype VariantValues = { [key: string]: string };\nexport type Variant = {\n variantValues: VariantValues;\n overrides: EscapeHatchProps;\n};\n\n/**\n * Given a list of style variants, select a given one based on input props\n * @internal\n * @param variants list of style variants to select from\n * @param props variant values to select from the list, may include additional props, to tidy up usage upstream\n */\nexport function getOverridesFromVariants(\n variants: Variant[],\n props: { [key: string]: any }\n) {\n // Get unique keys from the provided variants\n const variantValueKeys = [\n ...new Set(\n variants.flatMap((variant) => Object.keys(variant.variantValues))\n ),\n ];\n\n // Get variant value object from provided props, dropping keys that aren't in variantValueKeys, or whose vals are falsey\n const variantValuesFromProps: VariantValues = Object.keys(props)\n .filter((i) => variantValueKeys.includes(i) && props[i])\n .reduce((acc, key) => {\n acc[key] = props[key];\n return acc;\n }, {});\n\n const matchedVariants = variants.filter(({ variantValues }) => {\n return (\n Object.keys(variantValues).length ===\n Object.keys(variantValuesFromProps).length &&\n Object.entries(variantValues).every(\n ([key, value]) => variantValuesFromProps[key] === value\n )\n );\n });\n\n return matchedVariants.reduce((overrides, variant) => {\n return { ...overrides, ...variant.overrides };\n }, {});\n}\n\n/**\n * This helper method is used to merge\n * variants with overrides\n * @internal\n * @param variants\n * @param overrides\n * @returns merged variants with overrides\n */\nexport const mergeVariantsAndOverrides = (\n variants: EscapeHatchProps,\n overrides: EscapeHatchProps\n): EscapeHatchProps => {\n if (!variants && !overrides) {\n return null;\n }\n if (!overrides) {\n return variants;\n }\n if (!variants) {\n return overrides;\n }\n const overrideKeys = new Set(Object.keys(overrides));\n const sharedKeys = Object.keys(variants).filter((variantKey) =>\n overrideKeys.has(variantKey)\n );\n const merged = Object.fromEntries(\n sharedKeys.map((sharedKey) => [\n sharedKey,\n { ...variants[sharedKey], ...overrides[sharedKey] },\n ])\n );\n return {\n ...variants,\n ...overrides,\n ...merged,\n };\n};\n","import {\n ModelPredicate,\n PersistentModel,\n ProducerModelPredicate,\n} from '@aws-amplify/datastore';\nimport { DataStorePredicateObject } from '../types/datastore';\nimport { isFunction } from './utils';\n\n/**\n * Given an array of predicates, compose them in sequential order\n */\nconst mergePredicates = <Model extends PersistentModel>(\n predicates: ProducerModelPredicate<Model>[]\n): ProducerModelPredicate<Model> =>\n predicates.reduce(\n (previous, current) => (predicate) => current(previous(predicate)),\n (predicate) => predicate\n );\n\n/**\n * Creates a DataStore compatible predicate function from an object representation\n * @internal\n */\nexport const createDataStorePredicate = <Model extends PersistentModel>(\n predicateObject: DataStorePredicateObject\n): ProducerModelPredicate<Model> => {\n const {\n and: groupAnd,\n or: groupOr,\n field,\n operator,\n operand,\n } = predicateObject;\n\n if (Array.isArray(groupAnd)) {\n const predicates = groupAnd.map((condition) =>\n createDataStorePredicate<Model>(condition)\n );\n\n return (p: ModelPredicate<Model>) => p.and(mergePredicates(predicates));\n } else if (Array.isArray(groupOr)) {\n const predicates = groupOr.map((condition) =>\n createDataStorePredicate<Model>(condition)\n );\n\n return (p: ModelPredicate<Model>) => p.or(mergePredicates(predicates));\n }\n\n return (predicate: ModelPredicate<Model>) => {\n if (isFunction(predicate[field])) {\n return predicate[field].call(predicate, operator, operand);\n }\n\n return predicate;\n };\n};\n"],"mappings":"ujCAAA,8QCQA,MAAuB,oBCRvB,MAAkC,gCAClC,EAAoB,6BACpB,EAAoC,iBAmBvB,EAAU,MAAqB,CAC1C,GAAM,CAAC,EAAQ,GAAa,eAAwB,CAClD,MAAO,OACP,UAAW,GACX,KAAM,SAGF,EAAa,GAAC,CAAE,aAAc,CAClC,OAAQ,EAAQ,WACT,SACH,MAAO,GAAU,CAAE,KAAM,EAAQ,KAAM,UAAW,SAC/C,UACH,MAAO,GAAU,CAAE,UAAW,aAE9B,QAPa,cAWb,EAAQ,MACZ,GAAU,CAAE,UAAW,KAEvB,UAAK,2BACF,KAAK,AAAC,GAAS,EAAU,CAAE,OAAM,UAAW,MAC5C,MAAM,AAAC,GAAU,EAAU,CAAE,QAAO,UAAW,MAGlD,MAAI,OAAO,OAAQ,GAGZ,IAAM,MAAI,OAAO,OAAQ,IAXpB,SAcd,sBAAU,EAAO,IAEV,OAAK,GAAL,CAAa,WAlCC,WCrBvB,MAA2C,kCAC3C,EAAoC,iBAavB,E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OAAO,YACpB,EAAW,IAAI,AAAC,GAAc,CAC5B,EACA,OAAK,EAAS,IAAe,EAAU,OAG3C,MAAO,UACF,GACA,GACA,IA1BkC,6BCpIzC,GAAM,GAAkB,EACtB,GAEA,EAAW,OACT,CAAC,EAAU,IAAY,AAAC,GAAc,EAAQ,EAAS,IACvD,AAAC,GAAc,GALK,mBAYX,EAA2B,EACtC,GACkC,CAClC,GAAM,CACJ,IAAK,EACL,GAAI,EACJ,QACA,WACA,WACE,EAEJ,GAAI,MAAM,QAAQ,GAAW,CAC3B,GAAM,GAAa,EAAS,IAAI,AAAC,GAC/B,EAAgC,IAGlC,MAAO,AAAC,IAA6B,EAAE,IAAI,EAAgB,YAClD,MAAM,QAAQ,GAAU,CACjC,GAAM,GAAa,EAAQ,IAAI,AAAC,GAC9B,EAAgC,IAGlC,MAAO,AAAC,IAA6B,EAAE,GAAG,EAAgB,IAG5D,MAAO,AAAC,IACF,EAAW,EAAU,IAChB,EAAU,GAAO,KAAK,EAAW,EAAU,GAG7C,GA9B6B","names":[]}
package/dist/legacy.js CHANGED
@@ -1 +1,2 @@
1
- var r=Object.create;var f=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var A=t=>f(t,"__esModule",{value:!0});var S=(t,m)=>{A(t);for(var e in m)f(t,e,{get:m[e],enumerable:!0})},h=(t,m,e)=>{if(m&&typeof m=="object"||typeof m=="function")for(let p of a(m))!c.call(t,p)&&p!=="default"&&f(t,p,{get:()=>m[p],enumerable:!(e=y(m,p))||e.enumerable});return t},l=t=>h(A(f(t!=null?r(o(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);S(exports,{AmplifyAuthenticator:()=>i.AmplifyAuthenticator,AmplifyChatbot:()=>i.AmplifyChatbot,AmplifyPhotoPicker:()=>i.AmplifyPhotoPicker,AmplifyPicker:()=>i.AmplifyPicker,AmplifyS3Album:()=>i.AmplifyS3Album,AmplifyS3Image:()=>i.AmplifyS3Image,AmplifyS3ImagePicker:()=>i.AmplifyS3ImagePicker,AmplifyS3Text:()=>i.AmplifyS3Text,AmplifyS3TextPicker:()=>i.AmplifyS3TextPicker,AmplifySignIn:()=>i.AmplifySignIn,AmplifySignOut:()=>i.AmplifySignOut,withAuthenticator:()=>i.withAuthenticator});var n=l(require("react"));var i=l(require("@aws-amplify/ui-react-v1"));0&&(module.exports={AmplifyAuthenticator,AmplifyChatbot,AmplifyPhotoPicker,AmplifyPicker,AmplifyS3Album,AmplifyS3Image,AmplifyS3ImagePicker,AmplifyS3Text,AmplifyS3TextPicker,AmplifySignIn,AmplifySignOut,withAuthenticator});
1
+ var y=Object.create;var e=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var l=m=>e(m,"__esModule",{value:!0});var h=(m,t)=>{for(var p in t)e(m,p,{get:t[p],enumerable:!0})},r=(m,t,p,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let A of a(t))!S.call(m,A)&&(p||A!=="default")&&e(m,A,{get:()=>t[A],enumerable:!(f=o(t,A))||f.enumerable});return m},n=(m,t)=>r(l(e(m!=null?y(c(m)):{},"default",!t&&m&&m.__esModule?{get:()=>m.default,enumerable:!0}:{value:m,enumerable:!0})),m),P=(m=>(t,p)=>m&&m.get(t)||(p=r(l({}),t,1),m&&m.set(t,p),p))(typeof WeakMap!="undefined"?new WeakMap:0);var k={};h(k,{AmplifyAuthenticator:()=>i.AmplifyAuthenticator,AmplifyChatbot:()=>i.AmplifyChatbot,AmplifyPhotoPicker:()=>i.AmplifyPhotoPicker,AmplifyPicker:()=>i.AmplifyPicker,AmplifyS3Album:()=>i.AmplifyS3Album,AmplifyS3Image:()=>i.AmplifyS3Image,AmplifyS3ImagePicker:()=>i.AmplifyS3ImagePicker,AmplifyS3Text:()=>i.AmplifyS3Text,AmplifyS3TextPicker:()=>i.AmplifyS3TextPicker,AmplifySignIn:()=>i.AmplifySignIn,AmplifySignOut:()=>i.AmplifySignOut,withAuthenticator:()=>i.withAuthenticator});var g=n(require("react"));var i=require("@aws-amplify/ui-react-v1");module.exports=P(k);0&&(module.exports={AmplifyAuthenticator,AmplifyChatbot,AmplifyPhotoPicker,AmplifyPicker,AmplifyS3Album,AmplifyS3Image,AmplifyS3ImagePicker,AmplifyS3Text,AmplifyS3TextPicker,AmplifySignIn,AmplifySignOut,withAuthenticator});
2
+ //# sourceMappingURL=legacy.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/legacy.tsx", "../src/globals.js"],
4
- "sourcesContent": ["export {\n /** @deprecated `AmplifyAuthenticator` is the v1 release. Prefer the latest `Authenticator` for continued support. */\n AmplifyAuthenticator,\n AmplifySignIn,\n AmplifySignOut,\n AmplifyChatbot,\n AmplifyPhotoPicker,\n AmplifyPicker,\n AmplifyS3Album,\n AmplifyS3Image,\n AmplifyS3ImagePicker,\n AmplifyS3Text,\n AmplifyS3TextPicker,\n /** @deprecated `withAuthenticator` from legacy. Prefer the latest `withAuthenticator` release for continued support. */\n withAuthenticator,\n} from '@aws-amplify/ui-react-v1';\n", "/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n"],
5
- "mappings": "mlBAAA,ueCQA,MAAuB,oBDRvB,MAeO",
6
- "names": []
7
- }
1
+ {"version":3,"sources":["../src/legacy.tsx","../src/react-shim.js"],"sourcesContent":["export {\n /** @deprecated `AmplifyAuthenticator` is the v1 release. Prefer the latest `Authenticator` for continued support. */\n AmplifyAuthenticator,\n AmplifySignIn,\n AmplifySignOut,\n AmplifyChatbot,\n AmplifyPhotoPicker,\n AmplifyPicker,\n AmplifyS3Album,\n AmplifyS3Image,\n AmplifyS3ImagePicker,\n AmplifyS3Text,\n AmplifyS3TextPicker,\n /** @deprecated `withAuthenticator` from legacy. Prefer the latest `withAuthenticator` release for continued support. */\n withAuthenticator,\n} from '@aws-amplify/ui-react-v1';\n","/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n"],"mappings":"qrBAAA,0eCQA,MAAuB,oBDRvB,MAeO","names":[]}
@@ -124,6 +124,9 @@
124
124
  "width": {
125
125
  "type": "string"
126
126
  },
127
+ "whiteSpace": {
128
+ "type": "string"
129
+ },
127
130
  "flex": {
128
131
  "type": "string"
129
132
  },
@@ -597,6 +600,9 @@
597
600
  "width": {
598
601
  "type": "string"
599
602
  },
603
+ "whiteSpace": {
604
+ "type": "string"
605
+ },
600
606
  "flex": {
601
607
  "type": "string"
602
608
  },
@@ -1042,6 +1048,9 @@
1042
1048
  "width": {
1043
1049
  "type": "string"
1044
1050
  },
1051
+ "whiteSpace": {
1052
+ "type": "string"
1053
+ },
1045
1054
  "flex": {
1046
1055
  "type": "string"
1047
1056
  },
@@ -1547,6 +1556,9 @@
1547
1556
  "width": {
1548
1557
  "type": "string"
1549
1558
  },
1559
+ "whiteSpace": {
1560
+ "type": "string"
1561
+ },
1550
1562
  "flex": {
1551
1563
  "type": "string"
1552
1564
  },
@@ -2010,6 +2022,9 @@
2010
2022
  "width": {
2011
2023
  "type": "string"
2012
2024
  },
2025
+ "whiteSpace": {
2026
+ "type": "string"
2027
+ },
2013
2028
  "flex": {
2014
2029
  "type": "string"
2015
2030
  },
@@ -2456,6 +2471,9 @@
2456
2471
  "width": {
2457
2472
  "type": "string"
2458
2473
  },
2474
+ "whiteSpace": {
2475
+ "type": "string"
2476
+ },
2459
2477
  "flex": {
2460
2478
  "type": "string"
2461
2479
  },
@@ -3012,6 +3030,9 @@
3012
3030
  "width": {
3013
3031
  "type": "string"
3014
3032
  },
3033
+ "whiteSpace": {
3034
+ "type": "string"
3035
+ },
3015
3036
  "flex": {
3016
3037
  "type": "string"
3017
3038
  },
@@ -3223,6 +3244,9 @@
3223
3244
  "width": {
3224
3245
  "type": "string"
3225
3246
  },
3247
+ "whiteSpace": {
3248
+ "type": "string"
3249
+ },
3226
3250
  "flex": {
3227
3251
  "type": "string"
3228
3252
  },
@@ -3664,6 +3688,9 @@
3664
3688
  "width": {
3665
3689
  "type": "string"
3666
3690
  },
3691
+ "whiteSpace": {
3692
+ "type": "string"
3693
+ },
3667
3694
  "flex": {
3668
3695
  "type": "string"
3669
3696
  },
@@ -4112,6 +4139,9 @@
4112
4139
  "width": {
4113
4140
  "type": "string"
4114
4141
  },
4142
+ "whiteSpace": {
4143
+ "type": "string"
4144
+ },
4115
4145
  "flex": {
4116
4146
  "type": "string"
4117
4147
  },
@@ -4554,6 +4584,9 @@
4554
4584
  "width": {
4555
4585
  "type": "string"
4556
4586
  },
4587
+ "whiteSpace": {
4588
+ "type": "string"
4589
+ },
4557
4590
  "flex": {
4558
4591
  "type": "string"
4559
4592
  },
@@ -4996,6 +5029,9 @@
4996
5029
  "width": {
4997
5030
  "type": "string"
4998
5031
  },
5032
+ "whiteSpace": {
5033
+ "type": "string"
5034
+ },
4999
5035
  "flex": {
5000
5036
  "type": "string"
5001
5037
  },
@@ -5471,6 +5507,9 @@
5471
5507
  "width": {
5472
5508
  "type": "string"
5473
5509
  },
5510
+ "whiteSpace": {
5511
+ "type": "string"
5512
+ },
5474
5513
  "flex": {
5475
5514
  "type": "string"
5476
5515
  },
@@ -5933,6 +5972,9 @@
5933
5972
  "width": {
5934
5973
  "type": "string"
5935
5974
  },
5975
+ "whiteSpace": {
5976
+ "type": "string"
5977
+ },
5936
5978
  "flex": {
5937
5979
  "type": "string"
5938
5980
  },
@@ -6402,6 +6444,9 @@
6402
6444
  "width": {
6403
6445
  "type": "string"
6404
6446
  },
6447
+ "whiteSpace": {
6448
+ "type": "string"
6449
+ },
6405
6450
  "flex": {
6406
6451
  "type": "string"
6407
6452
  },
@@ -6854,6 +6899,9 @@
6854
6899
  "type": "string",
6855
6900
  "priority": true
6856
6901
  },
6902
+ "whiteSpace": {
6903
+ "type": "string"
6904
+ },
6857
6905
  "flex": {
6858
6906
  "type": "string"
6859
6907
  },
@@ -7889,6 +7937,9 @@
7889
7937
  "type": "string",
7890
7938
  "priority": true
7891
7939
  },
7940
+ "whiteSpace": {
7941
+ "type": "string"
7942
+ },
7892
7943
  "flex": {
7893
7944
  "type": "string"
7894
7945
  },
@@ -8358,6 +8409,9 @@
8358
8409
  "width": {
8359
8410
  "type": "string"
8360
8411
  },
8412
+ "whiteSpace": {
8413
+ "type": "string"
8414
+ },
8361
8415
  "flex": {
8362
8416
  "type": "string"
8363
8417
  },
@@ -8827,6 +8881,9 @@
8827
8881
  "width": {
8828
8882
  "type": "string"
8829
8883
  },
8884
+ "whiteSpace": {
8885
+ "type": "string"
8886
+ },
8830
8887
  "flex": {
8831
8888
  "type": "string"
8832
8889
  },
@@ -9872,6 +9929,9 @@
9872
9929
  "width": {
9873
9930
  "type": "string"
9874
9931
  },
9932
+ "whiteSpace": {
9933
+ "type": "string"
9934
+ },
9875
9935
  "flex": {
9876
9936
  "type": "string"
9877
9937
  },
@@ -10338,6 +10398,9 @@
10338
10398
  "width": {
10339
10399
  "type": "string"
10340
10400
  },
10401
+ "whiteSpace": {
10402
+ "type": "string"
10403
+ },
10341
10404
  "flex": {
10342
10405
  "type": "string"
10343
10406
  },
@@ -10864,6 +10927,9 @@
10864
10927
  "width": {
10865
10928
  "type": "string"
10866
10929
  },
10930
+ "whiteSpace": {
10931
+ "type": "string"
10932
+ },
10867
10933
  "flex": {
10868
10934
  "type": "string"
10869
10935
  },
@@ -11069,6 +11135,9 @@
11069
11135
  "width": {
11070
11136
  "type": "string"
11071
11137
  },
11138
+ "whiteSpace": {
11139
+ "type": "string"
11140
+ },
11072
11141
  "flex": {
11073
11142
  "type": "string"
11074
11143
  },
@@ -11525,6 +11594,9 @@
11525
11594
  "width": {
11526
11595
  "type": "string"
11527
11596
  },
11597
+ "whiteSpace": {
11598
+ "type": "string"
11599
+ },
11528
11600
  "flex": {
11529
11601
  "type": "string"
11530
11602
  },
@@ -12119,6 +12191,9 @@
12119
12191
  "width": {
12120
12192
  "type": "string"
12121
12193
  },
12194
+ "whiteSpace": {
12195
+ "type": "string"
12196
+ },
12122
12197
  "flex": {
12123
12198
  "type": "string"
12124
12199
  },
@@ -12707,6 +12782,9 @@
12707
12782
  "width": {
12708
12783
  "type": "string"
12709
12784
  },
12785
+ "whiteSpace": {
12786
+ "type": "string"
12787
+ },
12710
12788
  "flex": {
12711
12789
  "type": "string"
12712
12790
  },
@@ -13153,6 +13231,9 @@
13153
13231
  "width": {
13154
13232
  "type": "string"
13155
13233
  },
13234
+ "whiteSpace": {
13235
+ "type": "string"
13236
+ },
13156
13237
  "flex": {
13157
13238
  "type": "string"
13158
13239
  },
@@ -13688,6 +13769,9 @@
13688
13769
  "width": {
13689
13770
  "type": "string"
13690
13771
  },
13772
+ "whiteSpace": {
13773
+ "type": "string"
13774
+ },
13691
13775
  "flex": {
13692
13776
  "type": "string"
13693
13777
  },
@@ -14184,6 +14268,9 @@
14184
14268
  "width": {
14185
14269
  "type": "string"
14186
14270
  },
14271
+ "whiteSpace": {
14272
+ "type": "string"
14273
+ },
14187
14274
  "flex": {
14188
14275
  "type": "string"
14189
14276
  },
@@ -14661,6 +14748,9 @@
14661
14748
  "width": {
14662
14749
  "type": "string"
14663
14750
  },
14751
+ "whiteSpace": {
14752
+ "type": "string"
14753
+ },
14664
14754
  "flex": {
14665
14755
  "type": "string"
14666
14756
  },
@@ -15108,6 +15198,9 @@
15108
15198
  "width": {
15109
15199
  "type": "string"
15110
15200
  },
15201
+ "whiteSpace": {
15202
+ "type": "string"
15203
+ },
15111
15204
  "flex": {
15112
15205
  "type": "string"
15113
15206
  },
@@ -15694,6 +15787,9 @@
15694
15787
  "width": {
15695
15788
  "type": "string"
15696
15789
  },
15790
+ "whiteSpace": {
15791
+ "type": "string"
15792
+ },
15697
15793
  "flex": {
15698
15794
  "type": "string"
15699
15795
  },
@@ -16201,6 +16297,9 @@
16201
16297
  "width": {
16202
16298
  "type": "string"
16203
16299
  },
16300
+ "whiteSpace": {
16301
+ "type": "string"
16302
+ },
16204
16303
  "flex": {
16205
16304
  "type": "string"
16206
16305
  },
@@ -16767,6 +16866,9 @@
16767
16866
  "width": {
16768
16867
  "type": "string"
16769
16868
  },
16869
+ "whiteSpace": {
16870
+ "type": "string"
16871
+ },
16770
16872
  "flex": {
16771
16873
  "type": "string"
16772
16874
  },
@@ -17355,6 +17457,9 @@
17355
17457
  "width": {
17356
17458
  "type": "string"
17357
17459
  },
17460
+ "whiteSpace": {
17461
+ "type": "string"
17462
+ },
17358
17463
  "flex": {
17359
17464
  "type": "string"
17360
17465
  },
@@ -17879,6 +17984,9 @@
17879
17984
  "width": {
17880
17985
  "type": "string"
17881
17986
  },
17987
+ "whiteSpace": {
17988
+ "type": "string"
17989
+ },
17882
17990
  "flex": {
17883
17991
  "type": "string"
17884
17992
  },
@@ -18345,6 +18453,9 @@
18345
18453
  "width": {
18346
18454
  "type": "string"
18347
18455
  },
18456
+ "whiteSpace": {
18457
+ "type": "string"
18458
+ },
18348
18459
  "flex": {
18349
18460
  "type": "string"
18350
18461
  },
@@ -18775,6 +18886,9 @@
18775
18886
  "width": {
18776
18887
  "type": "string"
18777
18888
  },
18889
+ "whiteSpace": {
18890
+ "type": "string"
18891
+ },
18778
18892
  "flex": {
18779
18893
  "type": "string"
18780
18894
  },
@@ -19214,6 +19328,9 @@
19214
19328
  "width": {
19215
19329
  "type": "string"
19216
19330
  },
19331
+ "whiteSpace": {
19332
+ "type": "string"
19333
+ },
19217
19334
  "flex": {
19218
19335
  "type": "string"
19219
19336
  },
@@ -19475,6 +19592,9 @@
19475
19592
  "width": {
19476
19593
  "type": "string"
19477
19594
  },
19595
+ "whiteSpace": {
19596
+ "type": "string"
19597
+ },
19478
19598
  "flex": {
19479
19599
  "type": "string"
19480
19600
  },
@@ -19983,6 +20103,9 @@
19983
20103
  "width": {
19984
20104
  "type": "string"
19985
20105
  },
20106
+ "whiteSpace": {
20107
+ "type": "string"
20108
+ },
19986
20109
  "flex": {
19987
20110
  "type": "string"
19988
20111
  },
@@ -20459,6 +20582,9 @@
20459
20582
  "width": {
20460
20583
  "type": "string"
20461
20584
  },
20585
+ "whiteSpace": {
20586
+ "type": "string"
20587
+ },
20462
20588
  "flex": {
20463
20589
  "type": "string"
20464
20590
  },
@@ -20898,6 +21024,9 @@
20898
21024
  "width": {
20899
21025
  "type": "string"
20900
21026
  },
21027
+ "whiteSpace": {
21028
+ "type": "string"
21029
+ },
20901
21030
  "flex": {
20902
21031
  "type": "string"
20903
21032
  },
@@ -21346,6 +21475,9 @@
21346
21475
  "width": {
21347
21476
  "type": "string"
21348
21477
  },
21478
+ "whiteSpace": {
21479
+ "type": "string"
21480
+ },
21349
21481
  "flex": {
21350
21482
  "type": "string"
21351
21483
  },
@@ -21782,6 +21914,9 @@
21782
21914
  "width": {
21783
21915
  "type": "string"
21784
21916
  },
21917
+ "whiteSpace": {
21918
+ "type": "string"
21919
+ },
21785
21920
  "flex": {
21786
21921
  "type": "string"
21787
21922
  },
@@ -22227,6 +22362,9 @@
22227
22362
  "width": {
22228
22363
  "type": "string"
22229
22364
  },
22365
+ "whiteSpace": {
22366
+ "type": "string"
22367
+ },
22230
22368
  "flex": {
22231
22369
  "type": "string"
22232
22370
  },
@@ -22660,6 +22798,9 @@
22660
22798
  "width": {
22661
22799
  "type": "string"
22662
22800
  },
22801
+ "whiteSpace": {
22802
+ "type": "string"
22803
+ },
22663
22804
  "flex": {
22664
22805
  "type": "string"
22665
22806
  },
@@ -23093,6 +23234,9 @@
23093
23234
  "width": {
23094
23235
  "type": "string"
23095
23236
  },
23237
+ "whiteSpace": {
23238
+ "type": "string"
23239
+ },
23096
23240
  "flex": {
23097
23241
  "type": "string"
23098
23242
  },