@zappie/foundations 0.14.0 → 0.15.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 +19 -0
- package/dist/attribution/powered-by-zappie.js +29 -0
- package/dist/attribution/powered-by-zappie.js.map +6 -0
- package/dist/index.d.ts +20 -3
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @zappie/foundations
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 59968bd: Every storefront shows "Powered by Zappie" in its footer, linking to https://zappie.ai, and nothing turns it off.
|
|
8
|
+
|
|
9
|
+
`PoweredByZappie` from `@zappie/foundations` renders the link with a `data-zappie-attribution` marker. It takes the colour of the text around it and never renders under the site's small text or 11px.
|
|
10
|
+
|
|
11
|
+
Verify's new V21 opens the home, start, content, item, cart and closed pages at 390 and 1440 px and fails a page whose footer doesn't show the link readably: missing, outside the footer, linked elsewhere, hidden, faded, clipped, covered, off screen, under 11px or under 4.5:1 contrast. Every run includes it, whatever `only`, a check set or `zappie.config.ts` says. The failure names the page and the reason.
|
|
12
|
+
|
|
13
|
+
The check's lint step adds `lint/powered-by-zappie`, outside ESLint so no config or comment turns it off: a site with no attribution fails, and one outside any footer the source writes is a warning.
|
|
14
|
+
|
|
15
|
+
The starter's pages and its closed page show `PoweredByZappie` in their footer.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [b2d1af9]
|
|
20
|
+
- @zappie/sdk@0.18.0
|
|
21
|
+
|
|
3
22
|
## 0.14.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/attribution/powered-by-zappie.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var ZAPPIE_ATTRIBUTION_URL = "https://zappie.ai";
|
|
4
|
+
var ZAPPIE_ATTRIBUTION_TEXT = "Powered by Zappie";
|
|
5
|
+
function PoweredByZappie({ style, ...props }) {
|
|
6
|
+
const size = style?.fontSize ?? "1em";
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"a",
|
|
9
|
+
{
|
|
10
|
+
...props,
|
|
11
|
+
style: {
|
|
12
|
+
color: "inherit",
|
|
13
|
+
...style,
|
|
14
|
+
fontSize: `max(${typeof size == "number" ? size + "px" : size}, var(--z-text-sm, .875rem), 11px)`
|
|
15
|
+
},
|
|
16
|
+
href: ZAPPIE_ATTRIBUTION_URL,
|
|
17
|
+
target: "_blank",
|
|
18
|
+
rel: "noopener",
|
|
19
|
+
"data-zappie-attribution": "",
|
|
20
|
+
children: ZAPPIE_ATTRIBUTION_TEXT
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
PoweredByZappie,
|
|
26
|
+
ZAPPIE_ATTRIBUTION_TEXT,
|
|
27
|
+
ZAPPIE_ATTRIBUTION_URL
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=powered-by-zappie.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/attribution/powered-by-zappie.tsx"],
|
|
4
|
+
"mappings": ";AAyBI;AAtBG,IAAM,yBAAyB;AAE/B,IAAM,0BAA0B;AAiBhC,SAAS,gBAAgB,EAAE,OAAO,GAAG,MAAM,GAAyB;AACzE,QAAM,OAAO,OAAO,YAAY;AAChC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,OAAO;AAAA,QACP,GAAG;AAAA,QACH,UAAU,OAAO,OAAO,QAAQ,WAAW,OAAO,OAAO,IAAI;AAAA,MAC/D;AAAA,MACA,MAAM;AAAA,MACN,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,2BAAwB;AAAA,MAEvB;AAAA;AAAA,EACH;AAEJ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { P as PartOwnedAttributes, a as PartProps } from './slot-CHfqzPTd.js';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { HTMLAttributes, ReactNode, KeyboardEvent as KeyboardEvent$1, ImgHTMLAttributes, ChangeEvent, ClipboardEvent } from 'react';
|
|
3
|
+
import { AnchorHTMLAttributes, HTMLAttributes, ReactNode, KeyboardEvent as KeyboardEvent$1, ImgHTMLAttributes, ChangeEvent, ClipboardEvent } from 'react';
|
|
4
4
|
import { ZappieEnvironment } from '@zappie/sdk/services';
|
|
5
5
|
import * as _zappie_sdk from '@zappie/sdk';
|
|
6
6
|
import { Branch as Branch$1, CartLine, Money as Money$1, CartLineInput, CartIssue, CartFix, Quote, DeliveryAddress, CartFulfilment, OptionGroup as OptionGroup$1, Item, Choice as Choice$1, MoneyFormatOptions, PaymentMethodKind, Category, Menu, Store, OpeningTime } from '@zappie/sdk';
|
|
@@ -111,6 +111,23 @@ declare const ZappieAccountLink: react.ForwardRefExoticComponent<Omit<react.AllH
|
|
|
111
111
|
returnTo?: string;
|
|
112
112
|
} & react.RefAttributes<HTMLElement>>;
|
|
113
113
|
|
|
114
|
+
/** Where the attribution links. */
|
|
115
|
+
declare const ZAPPIE_ATTRIBUTION_URL = "https://zappie.ai";
|
|
116
|
+
/** The attribution's words. */
|
|
117
|
+
declare const ZAPPIE_ATTRIBUTION_TEXT = "Powered by Zappie";
|
|
118
|
+
/** The link's props: any anchor prop but its link, target, words and hiding. */
|
|
119
|
+
type PoweredByZappieProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "target" | "rel" | "children" | "hidden" | "aria-hidden">;
|
|
120
|
+
/**
|
|
121
|
+
* The "Powered by Zappie" link every storefront shows in its footer. Put it inside your `<footer>`.
|
|
122
|
+
* `zappie verify` fails a page whose footer doesn't show it readably, and the site host adds it to
|
|
123
|
+
* a page that leaves it out.
|
|
124
|
+
*
|
|
125
|
+
* It has no styles of its own beyond a floor: it takes the colour of the text around it and is
|
|
126
|
+
* never smaller than your small text (`--z-text-sm`) or 11px. Style it with `className`, or set
|
|
127
|
+
* `color` and `fontSize` in `style`. A smaller `fontSize` is raised to the floor.
|
|
128
|
+
*/
|
|
129
|
+
declare function PoweredByZappie({ style, ...props }: PoweredByZappieProps): react.JSX.Element;
|
|
130
|
+
|
|
114
131
|
/** What a template gets to render when a map fails to load. */
|
|
115
132
|
type MapLoadErrorState = {
|
|
116
133
|
/** Why the map failed to load. */
|
|
@@ -1156,5 +1173,5 @@ declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttr
|
|
|
1156
1173
|
/** The installed @zappie/foundations version. */
|
|
1157
1174
|
declare const FOUNDATIONS_VERSION: string;
|
|
1158
1175
|
|
|
1159
|
-
export { Account, AccountNotConfiguredError, Address, Branch, BranchMap, Cart, Choice, DeliveryMap, FOUNDATIONS_VERSION, Fulfilment, Image, ItemForm, ItemNote, Money, OpenStatus, OptionGroup, Otp, Overlay, PartProps, PaymentMethods, Quantity, Schedule, ScheduleBlock, ScheduleSlot, Search, Totals, ZappieAccountLink, canOrderAhead, contactLinks, createSearchIndex, formatOpeningHours, formatWallClock, getOpenStatus, parseWallClock, preloadOverlay, useControllableState, useDragToClose, useOverlay, useZappieAccountUrl, zappieAccountUrl, zappieEnvironment, zappieSupportUrl };
|
|
1160
|
-
export type { ActiveGroup, AddressState, AddressSuggestion, BranchMapLoadErrorState, BranchMapProps, ContactLink, Customer, DeliveryMapProps, DragDirection, DragToCloseOptions, ImageProps, ItemFormContext, ItemFormInvalidGroup, ItemFormProps, MapLoadErrorState, NoteState, PaymentMethod, QuantityProps, QuantityState, ScheduleState, ScheduleStatus, SearchResult, SearchSource, SearchState, SignInOptions, TotalsState, ZappieSupportContext };
|
|
1176
|
+
export { Account, AccountNotConfiguredError, Address, Branch, BranchMap, Cart, Choice, DeliveryMap, FOUNDATIONS_VERSION, Fulfilment, Image, ItemForm, ItemNote, Money, OpenStatus, OptionGroup, Otp, Overlay, PartProps, PaymentMethods, PoweredByZappie, Quantity, Schedule, ScheduleBlock, ScheduleSlot, Search, Totals, ZAPPIE_ATTRIBUTION_TEXT, ZAPPIE_ATTRIBUTION_URL, ZappieAccountLink, canOrderAhead, contactLinks, createSearchIndex, formatOpeningHours, formatWallClock, getOpenStatus, parseWallClock, preloadOverlay, useControllableState, useDragToClose, useOverlay, useZappieAccountUrl, zappieAccountUrl, zappieEnvironment, zappieSupportUrl };
|
|
1177
|
+
export type { ActiveGroup, AddressState, AddressSuggestion, BranchMapLoadErrorState, BranchMapProps, ContactLink, Customer, DeliveryMapProps, DragDirection, DragToCloseOptions, ImageProps, ItemFormContext, ItemFormInvalidGroup, ItemFormProps, MapLoadErrorState, NoteState, PaymentMethod, PoweredByZappieProps, QuantityProps, QuantityState, ScheduleState, ScheduleStatus, SearchResult, SearchSource, SearchState, SignInOptions, TotalsState, ZappieSupportContext };
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,11 @@ import {
|
|
|
9
9
|
zappieAccountUrl,
|
|
10
10
|
zappieEnvironment
|
|
11
11
|
} from "./account/zappie-account.js";
|
|
12
|
+
import {
|
|
13
|
+
PoweredByZappie,
|
|
14
|
+
ZAPPIE_ATTRIBUTION_TEXT,
|
|
15
|
+
ZAPPIE_ATTRIBUTION_URL
|
|
16
|
+
} from "./attribution/powered-by-zappie.js";
|
|
12
17
|
import { BranchMap, DeliveryMap } from "./branch-map/index.js";
|
|
13
18
|
import { Cart, Totals } from "./cart/index.js";
|
|
14
19
|
import { deferred, useIntentPreload } from "./deferred/index.js";
|
|
@@ -52,9 +57,12 @@ export {
|
|
|
52
57
|
Otp,
|
|
53
58
|
Overlay,
|
|
54
59
|
PaymentMethods,
|
|
60
|
+
PoweredByZappie,
|
|
55
61
|
Schedule,
|
|
56
62
|
Search,
|
|
57
63
|
Totals,
|
|
64
|
+
ZAPPIE_ATTRIBUTION_TEXT,
|
|
65
|
+
ZAPPIE_ATTRIBUTION_URL,
|
|
58
66
|
ZappieAccountLink,
|
|
59
67
|
canOrderAhead,
|
|
60
68
|
contactLinks,
|
package/dist/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"mappings": ";;;AACA,SAAS,uBAAuB;AAIhC,SAAS,SAAS,iCAAiC;AAEnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,mBAAmB;AAOvC,SAAS,MAAM,cAAc;AAE7B,SAAS,UAAU,wBAAwB;AAO3C,SAAS,eAAe;AAKxB,SAAS,cAAc;AAEvB,SAAS,gBAAgB;AAEzB,SAAS,kBAAkB;AAS3B,SAAS,4BAA4B;AACrC,cAAc;AACd,SAAS,aAAa;AAEtB,SAAS,aAAa;AACtB,SAAS,WAAW;AACpB,SAAS,sBAAsB;AAK/B,SAAS,sBAAsB;AAC/B,SAAS,SAAS,kBAAkB;AACpC,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB,cAAc;AAE1C,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;
|
|
4
|
+
"mappings": ";;;AACA,SAAS,uBAAuB;AAIhC,SAAS,SAAS,iCAAiC;AAEnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,WAAW,mBAAmB;AAOvC,SAAS,MAAM,cAAc;AAE7B,SAAS,UAAU,wBAAwB;AAO3C,SAAS,eAAe;AAKxB,SAAS,cAAc;AAEvB,SAAS,gBAAgB;AAEzB,SAAS,kBAAkB;AAS3B,SAAS,4BAA4B;AACrC,cAAc;AACd,SAAS,aAAa;AAEtB,SAAS,aAAa;AACtB,SAAS,WAAW;AACpB,SAAS,sBAAsB;AAK/B,SAAS,sBAAsB;AAC/B,SAAS,SAAS,kBAAkB;AACpC,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB,cAAc;AAE1C,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AA3EpB,IAAM,sBAA8B;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zappie/foundations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "UI-less React primitives for Zappie storefronts: behaviour, state and accessibility without styles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": "^18.2.0 || ^19.0.0",
|
|
67
67
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
68
|
-
"@zappie/sdk": "^0.
|
|
68
|
+
"@zappie/sdk": "^0.18.0"
|
|
69
69
|
},
|
|
70
70
|
"repository": {
|
|
71
71
|
"type": "git",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/google.maps": "^3.66.7",
|
|
77
77
|
"esbuild": "^0.28.2",
|
|
78
|
-
"@zappie/sdk": "0.
|
|
78
|
+
"@zappie/sdk": "0.18.0"
|
|
79
79
|
},
|
|
80
80
|
"license": "MIT",
|
|
81
81
|
"homepage": "https://github.com/zappie/storefront-packages#readme",
|