@gradial/aci 0.1.52-rc.29 → 0.1.52-rc.34-e2e.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +4 -4
  3. package/dist/audience-data-models.d.ts +201 -372
  4. package/dist/audience-data-models.js +283 -120
  5. package/dist/cli/compile-registry.mjs +0 -2
  6. package/dist/collect/aci.js +1 -1
  7. package/dist/collect/aci.js.sha256 +1 -1
  8. package/dist/collect/gapbuffer.js +11 -6
  9. package/dist/internal/platform/collectionstore/errors.d.ts +11 -0
  10. package/dist/internal/platform/collectionstore/errors.js +20 -0
  11. package/dist/next/error-pages.d.ts +4 -0
  12. package/dist/next/error-pages.js +4 -0
  13. package/dist/next/release-context.d.ts +29 -0
  14. package/dist/next/release-context.js +55 -0
  15. package/dist/next/server.d.ts +8 -0
  16. package/dist/next/server.js +14 -1
  17. package/dist/react/VideoPlayer.d.ts +1 -1
  18. package/dist/react/VideoPlayer.js +2 -2
  19. package/dist/react/index.d.ts +2 -2
  20. package/dist/react/index.js +2 -3
  21. package/dist/testing/conformance/preset.js +3 -0
  22. package/dist/testing/conformance/root-identity.js +7 -26
  23. package/dist/testing/conformance/types.d.ts +3 -0
  24. package/dist/types/image.d.ts +54 -17
  25. package/dist/types/image.js +102 -18
  26. package/dist/types/media.d.ts +14 -6
  27. package/dist/types/video.d.ts +7 -3
  28. package/migrations/conformance-registry.md +22 -0
  29. package/package.json +8 -7
  30. package/src/cli/compile-registry.mjs +0 -2
  31. package/src/types/image.ts +133 -29
  32. package/src/types/video.ts +1 -1
  33. package/templates/astro/starter-content/src/fixtures/sections.ts +0 -1
  34. package/templates/common/.agents/skills/aci/SKILL.md +4 -3
  35. package/templates/common/.agents/skills/dam-delivery/SKILL.md +182 -193
  36. package/templates/common/.agents/skills/dam-delivery/references/permalink-grammar.md +137 -101
  37. package/templates/common/starter-content/.content/dam/README.md +74 -0
  38. package/templates/common/starter-content/.content/dam/folders/seed/000000000000000000000000101/governance.json +2 -1
  39. package/templates/common/starter-content/.content/dam/folders/seed/000000000000000000000000102/governance.json +2 -1
  40. package/templates/common/starter-content/.content/patterns/components/button.json +2 -2
  41. package/templates/common/starter-content/.content/patterns/components/container.json +2 -2
  42. package/templates/common/starter-content/.content/patterns/components/feature_card.json +2 -2
  43. package/templates/common/starter-content/.content/patterns/components/feature_grid.json +2 -2
  44. package/templates/common/starter-content/.content/patterns/components/home_hero.json +16 -7
  45. package/templates/common/starter-content/.content/patterns/components/personalization_choice.json +2 -2
  46. package/templates/common/starter-content/.content/patterns/components/site-footer.json +2 -2
  47. package/templates/common/starter-content/.content/patterns/components/site-navigation.json +2 -2
  48. package/templates/common/starter-content/.content/patterns/components/stats_bar.json +2 -2
  49. package/templates/nextjs/template/src/app/fonts/inter/OFL.txt +93 -0
  50. package/templates/nextjs/template/src/app/fonts/inter/inter-latin.woff2 +0 -0
  51. package/templates/nextjs/template/src/app/fonts/space-grotesk/OFL.txt +93 -0
  52. package/templates/nextjs/template/src/app/fonts/space-grotesk/space-grotesk-latin.woff2 +0 -0
  53. package/templates/nextjs/template/src/app/layout.tsx +10 -7
  54. package/templates/nextjs/template/tests/conformance.test.ts.tmpl +1 -0
  55. package/templates/common/.agents/skills/dam-delivery/references/parameter-contract.md +0 -107
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,21 +1,24 @@
1
1
  import type { ReactNode } from 'react';
2
- import { Inter, Space_Grotesk } from 'next/font/google';
2
+ import localFont from 'next/font/local';
3
3
  import { DevRefresh } from '@gradial/aci/next';
4
4
  import { ConsentManager } from './_components/consent-manager';
5
5
  import '@/design-system/styles.css';
6
6
 
7
- const inter = Inter({
8
- subsets: ['latin'],
7
+ // Fonts ship with the site so `next build` never fetches from Google Fonts.
8
+ // Each file is the Google Fonts latin-subset variable woff2 (one file covers
9
+ // weights 400-700); the SIL OFL 1.1 license sits beside it.
10
+ const inter = localFont({
11
+ src: './fonts/inter/inter-latin.woff2',
9
12
  variable: '--font-inter',
10
13
  display: 'swap',
11
- weight: ['400', '500', '600', '700'],
14
+ weight: '400 700',
12
15
  });
13
16
 
14
- const spaceGrotesk = Space_Grotesk({
15
- subsets: ['latin'],
17
+ const spaceGrotesk = localFont({
18
+ src: './fonts/space-grotesk/space-grotesk-latin.woff2',
16
19
  variable: '--font-space-grotesk',
17
20
  display: 'swap',
18
- weight: ['400', '500', '600', '700'],
21
+ weight: '400 700',
19
22
  });
20
23
 
21
24
  export default function Layout({ children }: { children: ReactNode }) {
@@ -8,6 +8,7 @@ import { conformancePreset } from '@gradial/aci/testing';
8
8
 
9
9
  conformancePreset({
10
10
  framework: 'next',
11
+ registry: 'src/cms/registry.ts',
11
12
  siteId: '{{siteName}}',
12
13
  });
13
14
 
@@ -1,107 +0,0 @@
1
- # Delivery Parameter Contract Reference
2
-
3
- The mint API accepts exactly this parameter set. Anything else — unknown
4
- fields, out-of-range values, invalid combinations — is rejected with a
5
- typed error. Parameters are canonicalized server-side (fixed order,
6
- defaults elided) so numerically equal requests produce byte-equal URLs.
7
-
8
- ## Parameters
9
-
10
- ### width, height
11
-
12
- - Integers, 1–4096. Omit (or 0) for "not constrained".
13
- - The **effective** output dimension is capped, not the raw value:
14
- `width·dpr ≤ 4096` and `height·dpr ≤ 4096`. `width: 4096, dpr: 2` is
15
- rejected even though each value is individually legal.
16
- - Supplying only one dimension scales the other to preserve aspect ratio.
17
-
18
- ### fit
19
-
20
- - `"fit"` (default): scale to fit inside width×height, preserving aspect
21
- ratio, never cropping.
22
- - `"fill"`: scale and crop to exactly fill width×height.
23
- - Requires at least one of `width`/`height` when set explicitly.
24
-
25
- ### gravity
26
-
27
- - Controls which region survives a `fill` crop.
28
- - Compass points: `ce` (center, default), `no`, `so`, `ea`, `we`, `noea`,
29
- `nowe`, `soea`, `sowe`.
30
- - Focal point: `fp:{x}:{y}` with x and y in `[0,1]` — `fp:0.5:0.25` keeps
31
- the point half across, a quarter down. Numerically equal focal points
32
- canonicalize identically (`fp:0.50:0.250` ≡ `fp:0.5:0.25`).
33
- - **Non-default gravity requires `fit: "fill"`** — gravity only means
34
- something when cropping. `{ "width": 100, "gravity": "noea" }` is
35
- rejected; add `"fit": "fill"`.
36
-
37
- ### quality
38
-
39
- - Integer 1–100, default 82. Applies to lossy output formats.
40
-
41
- ### dpr
42
-
43
- - Integer 1–3, default 1. Multiplies the output dimensions for
44
- high-density displays; see the effective-dimension cap above.
45
-
46
- ### format
47
-
48
- - `"webp"` (default), `"avif"`, `"jpeg"`, `"png"`. Becomes the URL's file
49
- extension.
50
-
51
- ## Special Cases
52
-
53
- - **SVG assets**: passthrough only. The empty parameter set `{}` mints a
54
- passthrough URL serving the original SVG; any transform parameter is
55
- rejected with `dam.delivery.svg_transform`.
56
- - **Non-image assets**: never served through delivery URLs
57
- (`dam.delivery.not_image`). Use the download endpoints.
58
- - **Oversized blobs**: blobs over the origin's 200 MB streaming envelope
59
- refuse to mint (`dam.delivery.source_too_large`).
60
-
61
- ## Error Codes
62
-
63
- Per-item (inside `results[i].error`, HTTP 200 on the envelope):
64
-
65
- | Code | Cause |
66
- | --- | --- |
67
- | `dam.delivery.invalid_param` | range or combination violation; `details.param` names the offender |
68
- | `dam.delivery.svg_transform` | transform params on an SVG asset |
69
- | `dam.delivery.not_image` | non-image MIME |
70
- | `dam.delivery.source_too_large` | blob over the streaming envelope |
71
-
72
- Request-level (problem+json):
73
-
74
- | Code | HTTP | Cause |
75
- | --- | --- | --- |
76
- | `dam.asset.no_approved_version` | 422 | no publishable approved version (draft-only, embargoed, expired, or version-scoped restriction) |
77
- | `dam.asset.not_active` | 422 | archived / deleted asset |
78
- | `dam.asset.legal_hold` | 422 | legal hold active |
79
- | `dam.asset.blocked` | 422 | asset-wide publication block (usage restriction) |
80
- | `dam.permission_denied` | 403 | caller lacks download permission |
81
- | `NOT_FOUND` | 404 | unknown asset |
82
-
83
- ## Worked Examples
84
-
85
- ```jsonc
86
- // Hero image, art-directed crop on a focal point, retina
87
- { "width": 1440, "height": 600, "fit": "fill", "gravity": "fp:0.62:0.3", "dpr": 2 }
88
-
89
- // Thumbnail grid cell, default gravity center-crop
90
- { "width": 320, "height": 320, "fit": "fill" }
91
-
92
- // Constrain width only, keep aspect ratio, high quality JPEG
93
- { "width": 1200, "quality": 95, "format": "jpeg" }
94
-
95
- // SVG passthrough (the ONLY valid SVG request)
96
- { }
97
- ```
98
-
99
- Rejected examples and why:
100
-
101
- ```jsonc
102
- { "width": 4096, "dpr": 3 } // effective width 12288 > 4096
103
- { "width": 100, "gravity": "noea" } // gravity requires fit "fill"
104
- { "fit": "fill" } // fit requires width or height
105
- { "gravity": "fp:1.5:0" } // focal coords must be in [0,1]
106
- { "format": "gif" } // outside the closed format set
107
- ```