@gradial/aci 0.1.41 → 0.1.42
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 +9 -13
- package/README.md +4 -4
- package/dist/astro/index.d.ts +1 -1
- package/dist/astro/index.js +1 -1
- package/dist/astro/page.d.ts +6 -0
- package/dist/astro/page.js +3 -2
- package/dist/cli/compile-registry.d.mts +2 -0
- package/dist/cli/compile-registry.mjs +759 -0
- package/dist/cli/materialize-template.d.mts +19 -0
- package/dist/cli/materialize-template.mjs +128 -0
- package/dist/cli/validate-content.d.mts +2 -0
- package/dist/cli/validate-content.mjs +426 -0
- package/dist/cli/verify-next-cdn-routes.d.mts +2 -0
- package/dist/cli/verify-next-cdn-routes.mjs +47 -0
- package/dist/collect/assignments.d.ts +65 -0
- package/dist/collect/assignments.js +138 -0
- package/dist/collect/batcher.d.ts +21 -0
- package/dist/collect/batcher.js +10 -0
- package/dist/collect/declarative.d.ts +1 -1
- package/dist/collect/declarative.js +7 -1
- package/dist/collect/index.js +30 -4
- package/dist/collect/pageviews.d.ts +15 -3
- package/dist/collect/pageviews.js +28 -13
- package/dist/collect/transport.d.ts +2 -0
- package/dist/collect/transport.js +32 -0
- package/dist/consent-banner/index.d.ts +33 -0
- package/dist/consent-banner/index.js +99 -0
- package/dist/content/personalization.d.ts +35 -0
- package/dist/content/personalization.js +57 -0
- package/dist/content/types.d.ts +7 -1
- package/dist/edge/personalization-core.d.ts +11 -0
- package/dist/edge/personalization-core.js +265 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/next/assignments-script.d.ts +14 -0
- package/dist/next/assignments-script.js +17 -0
- package/dist/next/collect-route.d.ts +19 -0
- package/dist/next/collect-route.js +351 -0
- package/dist/next/index.d.ts +1 -0
- package/dist/next/index.js +1 -0
- package/dist/next/middleware.d.ts +15 -1
- package/dist/next/middleware.js +71 -27
- package/dist/next/page.js +2 -1
- package/dist/next/personalization-host.d.ts +118 -0
- package/dist/next/personalization-host.js +276 -0
- package/dist/next/server.js +6 -6
- package/dist/next/vercel-personalization.d.ts +3 -0
- package/dist/next/vercel-personalization.js +3 -0
- package/dist/next/vercel-s3-personalization.d.ts +58 -0
- package/dist/next/vercel-s3-personalization.js +220 -0
- package/dist/providers/s3.d.ts +1 -1
- package/dist/providers/s3.js +1 -1
- package/dist/react/VideoPlayer.d.ts +6 -6
- package/dist/react/index.d.ts +6 -6
- package/dist/types/page.d.ts +1 -1
- package/package.json +19 -1
- package/src/astro/ConsentBanner.astro +62 -0
- package/src/cli/verify-next-cdn-routes.mjs +5 -4
- package/src/consent-banner/styles.css +110 -0
- package/src/types/page.ts +1 -1
- package/templates/astro/starter-content/src/cms/contracts/components/index.ts +2 -0
- package/templates/astro/starter-content/src/cms/contracts/components/personalizationChoice.contract.ts +17 -0
- package/templates/astro/starter-content/src/cms/registry.ts +3 -0
- package/templates/astro/starter-content/src/components/sections/PersonalizationChoice.astro +41 -0
- package/templates/astro/starter-content/src/render/RenderPage.astro +3 -2
- package/templates/astro/template/src/layouts/SiteLayout.astro +3 -1
- package/templates/astro/template/src/pages/[...slug].astro +1 -0
- package/templates/common/.content/audiences/preference-blue/_index.json +11 -0
- package/templates/common/.content/audiences/preference-red/_index.json +11 -0
- package/templates/common/.content/overlays/audience/preference-blue/pages/home/_index.json +13 -0
- package/templates/common/.content/overlays/audience/preference-red/pages/home/_index.json +13 -0
- package/templates/common/.content/pages/home/_index.json +114 -4
- package/templates/common/.content/segments/preference-blue/_index.json +20 -0
- package/templates/common/.content/segments/preference-red/_index.json +20 -0
- package/templates/common/contracts/components/index.ts +21 -1
- package/templates/common/contracts/components/personalizationChoice.contract.ts +17 -0
- package/templates/nextjs/starter-content/src/cms/contracts/components/index.ts +3 -1
- package/templates/nextjs/starter-content/src/cms/contracts/components/personalizationChoice.contract.ts +17 -0
- package/templates/nextjs/starter-content/src/cms/registry.ts +3 -0
- package/templates/nextjs/starter-content/src/components/sections/PersonalizationChoice.tsx +53 -0
- package/templates/nextjs/starter-content/src/middleware.ts +11 -0
- package/templates/nextjs/template/src/app/collect/route.ts +18 -0
- package/templates/nextjs/template/src/middleware.ts +6 -2
- package/templates/astro/template/.aci.yaml +0 -28
- package/templates/common/.content/.gradial-dam/blobs/sha256/7f/bf/7fbfc7fe230ff12688c496f660119e41d9725c4504d82e310c15665c73c09292 +0 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/a0/f5/a0f506689de9b15a7055f70103a3f02cd3ba105771ae2de6754df2ede1210d3a +0 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/dd/b7/ddb7e9642be08317bcd4b2bd26b58ba8d0d34dd7239e03e684a4f3634fa3845b +0 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/fb/32/fb3260e8286ea8231ea1c77b9c0be92d6edd9026565731eb14cfdcfd6b1b75b3 +0 -0
- package/templates/common/.content/config/robots.txt +0 -2
- package/templates/common/.content/config/site.json +0 -197
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/asset.json +0 -9
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/editorial.json +0 -14
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/governance.json +0 -23
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/versions/v0001.json +0 -37
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/asset.json +0 -9
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/editorial.json +0 -14
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/governance.json +0 -23
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/versions/v0001.json +0 -37
- package/templates/common/.content/fragments/navbar/_index.json +0 -25
- package/templates/common/.content/fragments/site-footer/_index.json +0 -62
- package/templates/common/.content/pages/about/_index.json +0 -51
- package/templates/nextjs/template/.aci.yaml +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.40 - 2026-07-21
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
- First published release to actually ship the layout-default preservation and
|
|
8
|
-
validation fix in the CLI binary. Earlier binaries (through 0.1.39) predated
|
|
9
|
-
the fix, and the 0.1.40 meta package pinned platform CLI packages that were
|
|
10
|
-
never published, leaving its `aci` command unresolvable. The publish process
|
|
11
|
-
now stamps one release version into the SDK, all six platform packages, and
|
|
12
|
-
the README in lockstep, and gates publishing on registry verification of
|
|
13
|
-
every platform package.
|
|
5
|
+
### Added
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
- First-party consent banner component (`mountConsentBanner`) for sites without
|
|
8
|
+
an external CMP. Checks for the `aci_consent` cookie, renders a banner with
|
|
9
|
+
accept/reject buttons, and calls `applyConsent()` on user decision.
|
|
10
|
+
- `ConsentBanner.astro` wrapper component for Astro sites, importable from
|
|
11
|
+
`@gradial/aci/astro/ConsentBanner`.
|
|
12
|
+
- Base CSS styles for the consent banner in `@gradial/aci/consent-banner/styles.css`.
|
|
13
|
+
Sites override with their own CSS.
|
|
18
14
|
|
|
19
15
|
## 0.1.34 - 2026-07-20
|
|
20
16
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agentic Content Infrastructure SDK
|
|
2
2
|
|
|
3
|
-
`@gradial/aci` `0.1.
|
|
3
|
+
`@gradial/aci` `0.1.33` is a pre-1.0 public-surface reset for the ACI
|
|
4
4
|
client SDK. Breaking changes from the old `0.1.x` accidental surface are
|
|
5
5
|
intentional: the root import is framework-neutral, framework runtime behavior is
|
|
6
6
|
behind explicit subpaths, and the first required customer path is React/Next.
|
|
@@ -8,7 +8,7 @@ behind explicit subpaths, and the first required customer path is React/Next.
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npm install @gradial/aci@0.1.
|
|
11
|
+
npm install @gradial/aci@0.1.33 zod@^4
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Root Import
|
|
@@ -85,13 +85,13 @@ go through an app-owned HTTP endpoint backed server-side by a `ContentProvider`.
|
|
|
85
85
|
The first RC scaffold path is Next:
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
npx @gradial/aci@0.1.
|
|
88
|
+
npx @gradial/aci@0.1.33 init my-site --template next-starter
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
List available templates:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
npx @gradial/aci@0.1.
|
|
94
|
+
npx @gradial/aci@0.1.33 init --list
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
## Personalization: The One-Tag Install
|
package/dist/astro/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export { getPageData, type PageData, type AstroGlobal, type GetPageDataOptions,
|
|
|
39
39
|
export { createRegistry, registryLookup } from '../registry.js';
|
|
40
40
|
export type { Registry, RegistryEntry, AnyComponent } from '../registry.js';
|
|
41
41
|
export type { BlockRef } from '../types/block-ref.js';
|
|
42
|
-
export { collectScriptTagHTML, collectTagAttributes, COLLECT_SCRIPT_SRC, type CollectTagAttributes, type PersonalizationSiteConfig, type SitePersonalizationConfig, } from '../content/personalization.js';
|
|
42
|
+
export { collectScriptTagHTML, collectTagAttributes, COLLECT_SCRIPT_SRC, assignmentsScriptTagHTML, assignmentsScriptJSON, ASSIGNMENTS_TAG_VERSION, type CollectTagAttributes, type PersonalizationSiteConfig, type SitePersonalizationConfig, type AssignmentsPayloadSource, type ExperimentAssignmentContext, } from '../content/personalization.js';
|
|
43
43
|
export interface RenderableBlock {
|
|
44
44
|
Component: AnyComponent | undefined;
|
|
45
45
|
props: Record<string, unknown>;
|
package/dist/astro/index.js
CHANGED
|
@@ -46,7 +46,7 @@ export { createRegistry, registryLookup } from '../registry.js';
|
|
|
46
46
|
// tag with data attributes), so the kit layout emits the contract tag via
|
|
47
47
|
// this snippet builder (design/04; design/09 Task 9b).
|
|
48
48
|
// ---------------------------------------------------------------------------
|
|
49
|
-
export { collectScriptTagHTML, collectTagAttributes, COLLECT_SCRIPT_SRC, } from '../content/personalization.js';
|
|
49
|
+
export { collectScriptTagHTML, collectTagAttributes, COLLECT_SCRIPT_SRC, assignmentsScriptTagHTML, assignmentsScriptJSON, ASSIGNMENTS_TAG_VERSION, } from '../content/personalization.js';
|
|
50
50
|
export function createRenderChildren(registry) {
|
|
51
51
|
function renderChildren(blocks) {
|
|
52
52
|
return blocks.map((block) => {
|
package/dist/astro/page.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ export interface PageData {
|
|
|
66
66
|
* personalization is disabled or when in preview mode.
|
|
67
67
|
*/
|
|
68
68
|
collectTag: string;
|
|
69
|
+
/**
|
|
70
|
+
* Pre-rendered data-aci-assignments script tag HTML. Empty string when
|
|
71
|
+
* the page payload carries no experiments block (base pages, previews) —
|
|
72
|
+
* the SDK's assignments collector reads this tag to emit exposures.
|
|
73
|
+
*/
|
|
74
|
+
assignmentsTag: string;
|
|
69
75
|
}
|
|
70
76
|
export interface GetPageDataOptions {
|
|
71
77
|
/** Path to compiled content root. Defaults to ACI_CONTENT_ROOT env or '.aci/compiled'. */
|
package/dist/astro/page.js
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
import { normalizeRoute } from '../content/routes.js';
|
|
34
34
|
import { routeMetadataForContent } from '../content/provider.js';
|
|
35
35
|
import { resolveSlots } from '../content/resolve-slots.js';
|
|
36
|
-
import { collectScriptTagHTML } from '../content/personalization.js';
|
|
36
|
+
import { assignmentsScriptTagHTML, collectScriptTagHTML } from '../content/personalization.js';
|
|
37
37
|
import { getPendingRenderInputFromHeaders } from '../runtime/page.js';
|
|
38
38
|
// ---------------------------------------------------------------------------
|
|
39
39
|
// Implementation
|
|
@@ -96,7 +96,8 @@ export async function getPageData(astro, _options) {
|
|
|
96
96
|
// Collect tag: suppress in preview mode (authoring surface, not visitor traffic)
|
|
97
97
|
const isPreview = astro.url.searchParams.has('preview_token');
|
|
98
98
|
const collectTag = isPreview ? '' : collectScriptTagHTML(siteConfig);
|
|
99
|
-
|
|
99
|
+
const assignmentsTag = isPreview ? '' : assignmentsScriptTagHTML(page);
|
|
100
|
+
return { route, siteConfig, page, meta, layout, slots, collectTag, assignmentsTag };
|
|
100
101
|
}
|
|
101
102
|
// ---------------------------------------------------------------------------
|
|
102
103
|
// Internal helpers
|