@wildo-ai/framework-knowledge 1.1.8 → 1.1.9
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/claude-marketplace/plugins/wildo/.claude-plugin/plugin.json +1 -1
- package/dist/claude-marketplace/plugins/wildo/references/composites-and-the-loop.md +9 -2
- package/dist/claude-marketplace/plugins/wildo/references/creation-state.md +21 -0
- package/dist/claude-marketplace/plugins/wildo/references/derived-artifacts.md +121 -0
- package/dist/claude-marketplace/plugins/wildo/references/runs-judges-and-questions.md +29 -5
- package/dist/claude-marketplace/plugins/wildo/skills/answer/SKILL.md +29 -2
- package/dist/claude-marketplace/plugins/wildo/skills/build/SKILL.md +69 -24
- package/dist/claude-marketplace/plugins/wildo/skills/doctor/SKILL.md +10 -0
- package/dist/claude-marketplace/plugins/wildo/skills/run/SKILL.md +21 -5
- package/dist/claude-marketplace/plugins/wildo/skills/start/SKILL.md +31 -5
- package/dist/claude-marketplace/plugins/wildo/skills/status/SKILL.md +2 -0
- package/dist/claude-marketplace/plugins/wildo/skills/why/SKILL.md +11 -1
- package/dist/esm/framework-knowledge.definitions.d.ts +1 -1
- package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -1
- package/dist/esm/framework-knowledge.definitions.js +11 -1
- package/dist/esm/framework-knowledge.definitions.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts +2 -2
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js +2 -2
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts +11 -11
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.js +29 -22
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +3 -3
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +59 -10
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +3 -3
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js +1 -1
- package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +2 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +5 -5
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +8 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +12 -4
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +25 -27
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +85 -43
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts +40 -0
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js +41 -0
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts +199 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js +201 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts +67 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js +76 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +3 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +27 -18
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts +11 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js +11 -11
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts +2 -0
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js +3 -1
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +2 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +3 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts +5 -2
- package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.definition/playbook.definition.js +16 -4
- package/dist/esm/playbooks/top_down.definition/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +7 -3
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +36 -2
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts +7 -1
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js +4 -2
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +9 -3
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +3 -3
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +35 -2
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +30 -17
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -1
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -1
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/external-framework-mapping.json +1 -1
- package/dist/knowledge/manifest.json +8 -8
- package/dist/knowledge/playbooks/bottom_up.assemble-verify/method.md +22 -7
- package/dist/knowledge/playbooks/bottom_up.assemble-verify/playbook.json +3 -3
- package/dist/knowledge/playbooks/bottom_up.build/method.md +17 -15
- package/dist/knowledge/playbooks/bottom_up.build/playbook.json +4 -3
- package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +117 -28
- package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +4 -4
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +133 -59
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +2 -2
- package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +169 -276
- package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +2 -2
- package/dist/knowledge/playbooks/bottom_up.capability-composition/method.md +8 -1
- package/dist/knowledge/playbooks/bottom_up.capability-composition/playbook.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.conception/method.md +3 -2
- package/dist/knowledge/playbooks/bottom_up.conception/playbook.json +2 -2
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +22 -6
- package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +4 -3
- package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +13 -5
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +5 -2
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +1 -1
- package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.brand-identity/method.md +71 -37
- package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +35 -38
- package/dist/knowledge/playbooks/top_down.brand-name-research/method.md +105 -0
- package/dist/knowledge/playbooks/top_down.brand-name-research/playbook.json +55 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/method.md +78 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/playbook.json +63 -0
- package/dist/knowledge/playbooks/top_down.brand-naming/method.md +56 -0
- package/dist/knowledge/playbooks/top_down.brand-naming/playbook.json +65 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.business-model/method.md +60 -6
- package/dist/knowledge/playbooks/top_down.business-model/playbook.json +15 -10
- package/dist/knowledge/playbooks/top_down.compliance-analysis/playbook.json +30 -10
- package/dist/knowledge/playbooks/top_down.compliance-conception/playbook.json +3 -1
- package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +4 -1
- package/dist/knowledge/playbooks/top_down.definition/method.md +8 -3
- package/dist/knowledge/playbooks/top_down.definition/playbook.json +6 -4
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +11 -1
- package/dist/knowledge/playbooks/top_down.risk-register/method.md +21 -0
- package/dist/knowledge/playbooks/top_down.risk-register/playbook.json +8 -2
- package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +4 -2
- package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +10 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +40 -17
- package/dist/knowledge/references/brand.name-choice.config.md +127 -0
- package/dist/knowledge/references/brand.name-screening.config.md +253 -0
- package/dist/knowledge/references/build-plan.task-graph.config.md +64 -11
- package/dist/knowledge/references/business-model.pricing-plan.config.md +16 -0
- package/dist/knowledge/references/business-model.snapshot.config.md +64 -0
- package/dist/knowledge/references/business-model.snapshot.validation.md +68 -4
- package/dist/knowledge/references/capability-composition.config.md +67 -4
- package/dist/knowledge/references/example.data-seeding.minimal.md +29 -1
- package/dist/knowledge/references/market.snapshot.validation.md +1 -1
- package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +7 -1
- package/dist/knowledge/references/saas.data-seeding.definition-input.md +6 -0
- package/dist/knowledge/references/saas.models.queue.scheduled-recovery.md +81 -2
- package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +10 -0
- package/dist/knowledge/references/saas.website.astro.label-loader.md +9 -0
- package/dist/knowledge/references/saas.website.factories.define-section.md +4 -0
- package/dist/knowledge/references/saas.website.page-manifest.schema.md +12 -3
- package/dist/knowledge/references/saas.website.page-sections.component.md +72 -0
- package/dist/knowledge/references/saas.website.sections.definition-schema.md +11 -0
- package/dist/knowledge/registries/assurance-authority-bases.json +1 -1
- package/dist/knowledge/registries/framework-topics.json +38 -1
- package/dist/knowledge/registries/playbooks.json +68 -20
- package/dist/knowledge/registries/source-tags.json +748 -695
- package/dist/knowledge/rules/live-context-door.md +5 -2
- package/dist/knowledge/skills/INDEX.md +2 -1
- package/dist/knowledge/skills/application-database-migrations/SKILL.md +1 -1
- package/dist/knowledge/skills/brand-name-screening/SKILL.md +154 -0
- package/dist/knowledge/skills/brand-name-screening/references/framework-brand-name-screening-api.md +394 -0
- package/dist/knowledge/skills/brand-name-screening/references/screening-procedure.md +65 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +5 -2
- package/dist/knowledge/skills/config-saas/SKILL.md +31 -4
- package/dist/knowledge/skills/config-saas/references/compliance-declarations.md +14 -1
- package/dist/knowledge/skills/config-saas/references/framework-background-work-api.md +81 -2
- package/dist/knowledge/skills/email-add-template/SKILL.md +1 -1
- package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +1 -1
- package/dist/knowledge/skills/inbound-channels/SKILL.md +2 -2
- package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +11 -1
- package/dist/knowledge/skills/local-environment-bootstrap/references/derived-artifact-currency.md +122 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/framework-upgrade-and-dependency-alignment.md +11 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +9 -2
- package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +11 -1
- package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +11 -1
- package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1 -1
- package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1 -1
- package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1 -1
- package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +10 -0
- package/dist/knowledge/skills/module-relationships/SKILL.md +6 -4
- package/dist/knowledge/skills/seeding-authoring/SKILL.md +51 -3
- package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +6 -0
- package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +7 -1
- package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +10 -0
- package/dist/knowledge/skills/website-factory-advanced/SKILL.md +4 -0
- package/dist/knowledge/skills/website-page-authoring/SKILL.md +84 -3
- package/dist/knowledge/skills/website-section-contact/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-cta/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-faq/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-hero/SKILL.md +27 -9
- package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-pricing/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-social-proof/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +1 -1
- package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +11 -0
- package/dist/knowledge/topic-index.json +169 -43
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -137,6 +137,14 @@ compile-time prop checking.
|
|
|
137
137
|
* and is caught by nothing until a reviewer reads the page. The
|
|
138
138
|
* build and `wildo website audit` check the pack against the
|
|
139
139
|
* DECLARED keys, so declare every slot the component reads.
|
|
140
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
141
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
142
|
+
* sections list through `WebsitePageSections`, which places every
|
|
143
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
144
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
145
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
146
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
147
|
+
* to keep, like the id attribute it becomes.
|
|
140
148
|
* - `Component` — the React component that renders the section. Typed
|
|
141
149
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
142
150
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
163
171
|
sectionRef: WebsiteSectionRefSchema,
|
|
164
172
|
category: WebsiteSectionCategorySchema,
|
|
165
173
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
174
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
175
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
176
|
+
}).optional(),
|
|
166
177
|
Component: z.unknown(),
|
|
167
178
|
getStructuredData: z.unknown().optional(),
|
|
168
179
|
});
|
|
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
251
262
|
sectionRef: WebsiteSectionRef | string;
|
|
252
263
|
category: WebsiteSectionCategory;
|
|
253
264
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
265
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
266
|
+
anchorId?: string;
|
|
254
267
|
Component: ComponentType<TProps>;
|
|
255
268
|
/**
|
|
256
269
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
333
346
|
sectionRef: input.sectionRef,
|
|
334
347
|
category: input.category,
|
|
335
348
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
349
|
+
anchorId: input.anchorId,
|
|
336
350
|
Component: input.Component,
|
|
337
351
|
getStructuredData: input.getStructuredData,
|
|
338
352
|
});
|
|
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
345
359
|
sectionRef: parsed.sectionRef,
|
|
346
360
|
category: parsed.category,
|
|
347
361
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
362
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
348
363
|
Component: input.Component,
|
|
349
364
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
350
365
|
};
|
|
@@ -155,6 +155,14 @@ compile-time prop checking.
|
|
|
155
155
|
* and is caught by nothing until a reviewer reads the page. The
|
|
156
156
|
* build and `wildo website audit` check the pack against the
|
|
157
157
|
* DECLARED keys, so declare every slot the component reads.
|
|
158
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
159
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
160
|
+
* sections list through `WebsitePageSections`, which places every
|
|
161
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
162
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
163
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
164
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
165
|
+
* to keep, like the id attribute it becomes.
|
|
158
166
|
* - `Component` — the React component that renders the section. Typed
|
|
159
167
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
160
168
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
181
189
|
sectionRef: WebsiteSectionRefSchema,
|
|
182
190
|
category: WebsiteSectionCategorySchema,
|
|
183
191
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
192
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
193
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
194
|
+
}).optional(),
|
|
184
195
|
Component: z.unknown(),
|
|
185
196
|
getStructuredData: z.unknown().optional(),
|
|
186
197
|
});
|
|
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
269
280
|
sectionRef: WebsiteSectionRef | string;
|
|
270
281
|
category: WebsiteSectionCategory;
|
|
271
282
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
283
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
284
|
+
anchorId?: string;
|
|
272
285
|
Component: ComponentType<TProps>;
|
|
273
286
|
/**
|
|
274
287
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
351
364
|
sectionRef: input.sectionRef,
|
|
352
365
|
category: input.category,
|
|
353
366
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
367
|
+
anchorId: input.anchorId,
|
|
354
368
|
Component: input.Component,
|
|
355
369
|
getStructuredData: input.getStructuredData,
|
|
356
370
|
});
|
|
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
363
377
|
sectionRef: parsed.sectionRef,
|
|
364
378
|
category: parsed.category,
|
|
365
379
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
380
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
366
381
|
Component: input.Component,
|
|
367
382
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
368
383
|
};
|
|
@@ -137,6 +137,14 @@ compile-time prop checking.
|
|
|
137
137
|
* and is caught by nothing until a reviewer reads the page. The
|
|
138
138
|
* build and `wildo website audit` check the pack against the
|
|
139
139
|
* DECLARED keys, so declare every slot the component reads.
|
|
140
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
141
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
142
|
+
* sections list through `WebsitePageSections`, which places every
|
|
143
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
144
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
145
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
146
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
147
|
+
* to keep, like the id attribute it becomes.
|
|
140
148
|
* - `Component` — the React component that renders the section. Typed
|
|
141
149
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
142
150
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
163
171
|
sectionRef: WebsiteSectionRefSchema,
|
|
164
172
|
category: WebsiteSectionCategorySchema,
|
|
165
173
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
174
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
175
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
176
|
+
}).optional(),
|
|
166
177
|
Component: z.unknown(),
|
|
167
178
|
getStructuredData: z.unknown().optional(),
|
|
168
179
|
});
|
|
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
251
262
|
sectionRef: WebsiteSectionRef | string;
|
|
252
263
|
category: WebsiteSectionCategory;
|
|
253
264
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
265
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
266
|
+
anchorId?: string;
|
|
254
267
|
Component: ComponentType<TProps>;
|
|
255
268
|
/**
|
|
256
269
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
333
346
|
sectionRef: input.sectionRef,
|
|
334
347
|
category: input.category,
|
|
335
348
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
349
|
+
anchorId: input.anchorId,
|
|
336
350
|
Component: input.Component,
|
|
337
351
|
getStructuredData: input.getStructuredData,
|
|
338
352
|
});
|
|
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
345
359
|
sectionRef: parsed.sectionRef,
|
|
346
360
|
category: parsed.category,
|
|
347
361
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
362
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
348
363
|
Component: input.Component,
|
|
349
364
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
350
365
|
};
|
|
@@ -155,6 +155,14 @@ compile-time prop checking.
|
|
|
155
155
|
* and is caught by nothing until a reviewer reads the page. The
|
|
156
156
|
* build and `wildo website audit` check the pack against the
|
|
157
157
|
* DECLARED keys, so declare every slot the component reads.
|
|
158
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
159
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
160
|
+
* sections list through `WebsitePageSections`, which places every
|
|
161
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
162
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
163
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
164
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
165
|
+
* to keep, like the id attribute it becomes.
|
|
158
166
|
* - `Component` — the React component that renders the section. Typed
|
|
159
167
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
160
168
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
181
189
|
sectionRef: WebsiteSectionRefSchema,
|
|
182
190
|
category: WebsiteSectionCategorySchema,
|
|
183
191
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
192
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
193
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
194
|
+
}).optional(),
|
|
184
195
|
Component: z.unknown(),
|
|
185
196
|
getStructuredData: z.unknown().optional(),
|
|
186
197
|
});
|
|
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
269
280
|
sectionRef: WebsiteSectionRef | string;
|
|
270
281
|
category: WebsiteSectionCategory;
|
|
271
282
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
283
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
284
|
+
anchorId?: string;
|
|
272
285
|
Component: ComponentType<TProps>;
|
|
273
286
|
/**
|
|
274
287
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
351
364
|
sectionRef: input.sectionRef,
|
|
352
365
|
category: input.category,
|
|
353
366
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
367
|
+
anchorId: input.anchorId,
|
|
354
368
|
Component: input.Component,
|
|
355
369
|
getStructuredData: input.getStructuredData,
|
|
356
370
|
});
|
|
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
363
377
|
sectionRef: parsed.sectionRef,
|
|
364
378
|
category: parsed.category,
|
|
365
379
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
380
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
366
381
|
Component: input.Component,
|
|
367
382
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
368
383
|
};
|
|
@@ -137,6 +137,14 @@ compile-time prop checking.
|
|
|
137
137
|
* and is caught by nothing until a reviewer reads the page. The
|
|
138
138
|
* build and `wildo website audit` check the pack against the
|
|
139
139
|
* DECLARED keys, so declare every slot the component reads.
|
|
140
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
141
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
142
|
+
* sections list through `WebsitePageSections`, which places every
|
|
143
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
144
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
145
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
146
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
147
|
+
* to keep, like the id attribute it becomes.
|
|
140
148
|
* - `Component` — the React component that renders the section. Typed
|
|
141
149
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
142
150
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
163
171
|
sectionRef: WebsiteSectionRefSchema,
|
|
164
172
|
category: WebsiteSectionCategorySchema,
|
|
165
173
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
174
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
175
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
176
|
+
}).optional(),
|
|
166
177
|
Component: z.unknown(),
|
|
167
178
|
getStructuredData: z.unknown().optional(),
|
|
168
179
|
});
|
|
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
251
262
|
sectionRef: WebsiteSectionRef | string;
|
|
252
263
|
category: WebsiteSectionCategory;
|
|
253
264
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
265
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
266
|
+
anchorId?: string;
|
|
254
267
|
Component: ComponentType<TProps>;
|
|
255
268
|
/**
|
|
256
269
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
333
346
|
sectionRef: input.sectionRef,
|
|
334
347
|
category: input.category,
|
|
335
348
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
349
|
+
anchorId: input.anchorId,
|
|
336
350
|
Component: input.Component,
|
|
337
351
|
getStructuredData: input.getStructuredData,
|
|
338
352
|
});
|
|
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
345
359
|
sectionRef: parsed.sectionRef,
|
|
346
360
|
category: parsed.category,
|
|
347
361
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
362
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
348
363
|
Component: input.Component,
|
|
349
364
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
350
365
|
};
|
|
@@ -155,6 +155,14 @@ compile-time prop checking.
|
|
|
155
155
|
* and is caught by nothing until a reviewer reads the page. The
|
|
156
156
|
* build and `wildo website audit` check the pack against the
|
|
157
157
|
* DECLARED keys, so declare every slot the component reads.
|
|
158
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
159
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
160
|
+
* sections list through `WebsitePageSections`, which places every
|
|
161
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
162
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
163
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
164
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
165
|
+
* to keep, like the id attribute it becomes.
|
|
158
166
|
* - `Component` — the React component that renders the section. Typed
|
|
159
167
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
160
168
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
181
189
|
sectionRef: WebsiteSectionRefSchema,
|
|
182
190
|
category: WebsiteSectionCategorySchema,
|
|
183
191
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
192
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
193
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
194
|
+
}).optional(),
|
|
184
195
|
Component: z.unknown(),
|
|
185
196
|
getStructuredData: z.unknown().optional(),
|
|
186
197
|
});
|
|
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
269
280
|
sectionRef: WebsiteSectionRef | string;
|
|
270
281
|
category: WebsiteSectionCategory;
|
|
271
282
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
283
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
284
|
+
anchorId?: string;
|
|
272
285
|
Component: ComponentType<TProps>;
|
|
273
286
|
/**
|
|
274
287
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
351
364
|
sectionRef: input.sectionRef,
|
|
352
365
|
category: input.category,
|
|
353
366
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
367
|
+
anchorId: input.anchorId,
|
|
354
368
|
Component: input.Component,
|
|
355
369
|
getStructuredData: input.getStructuredData,
|
|
356
370
|
});
|
|
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
363
377
|
sectionRef: parsed.sectionRef,
|
|
364
378
|
category: parsed.category,
|
|
365
379
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
380
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
366
381
|
Component: input.Component,
|
|
367
382
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
368
383
|
};
|
package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md
CHANGED
|
@@ -137,6 +137,14 @@ compile-time prop checking.
|
|
|
137
137
|
* and is caught by nothing until a reviewer reads the page. The
|
|
138
138
|
* build and `wildo website audit` check the pack against the
|
|
139
139
|
* DECLARED keys, so declare every slot the component reads.
|
|
140
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
141
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
142
|
+
* sections list through `WebsitePageSections`, which places every
|
|
143
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
144
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
145
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
146
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
147
|
+
* to keep, like the id attribute it becomes.
|
|
140
148
|
* - `Component` — the React component that renders the section. Typed
|
|
141
149
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
142
150
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
163
171
|
sectionRef: WebsiteSectionRefSchema,
|
|
164
172
|
category: WebsiteSectionCategorySchema,
|
|
165
173
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
174
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
175
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
176
|
+
}).optional(),
|
|
166
177
|
Component: z.unknown(),
|
|
167
178
|
getStructuredData: z.unknown().optional(),
|
|
168
179
|
});
|
|
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
251
262
|
sectionRef: WebsiteSectionRef | string;
|
|
252
263
|
category: WebsiteSectionCategory;
|
|
253
264
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
265
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
266
|
+
anchorId?: string;
|
|
254
267
|
Component: ComponentType<TProps>;
|
|
255
268
|
/**
|
|
256
269
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
333
346
|
sectionRef: input.sectionRef,
|
|
334
347
|
category: input.category,
|
|
335
348
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
349
|
+
anchorId: input.anchorId,
|
|
336
350
|
Component: input.Component,
|
|
337
351
|
getStructuredData: input.getStructuredData,
|
|
338
352
|
});
|
|
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
345
359
|
sectionRef: parsed.sectionRef,
|
|
346
360
|
category: parsed.category,
|
|
347
361
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
362
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
348
363
|
Component: input.Component,
|
|
349
364
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
350
365
|
};
|
|
@@ -155,6 +155,14 @@ compile-time prop checking.
|
|
|
155
155
|
* and is caught by nothing until a reviewer reads the page. The
|
|
156
156
|
* build and `wildo website audit` check the pack against the
|
|
157
157
|
* DECLARED keys, so declare every slot the component reads.
|
|
158
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
159
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
160
|
+
* sections list through `WebsitePageSections`, which places every
|
|
161
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
162
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
163
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
164
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
165
|
+
* to keep, like the id attribute it becomes.
|
|
158
166
|
* - `Component` — the React component that renders the section. Typed
|
|
159
167
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
160
168
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
181
189
|
sectionRef: WebsiteSectionRefSchema,
|
|
182
190
|
category: WebsiteSectionCategorySchema,
|
|
183
191
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
192
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
193
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
194
|
+
}).optional(),
|
|
184
195
|
Component: z.unknown(),
|
|
185
196
|
getStructuredData: z.unknown().optional(),
|
|
186
197
|
});
|
|
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
269
280
|
sectionRef: WebsiteSectionRef | string;
|
|
270
281
|
category: WebsiteSectionCategory;
|
|
271
282
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
283
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
284
|
+
anchorId?: string;
|
|
272
285
|
Component: ComponentType<TProps>;
|
|
273
286
|
/**
|
|
274
287
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
351
364
|
sectionRef: input.sectionRef,
|
|
352
365
|
category: input.category,
|
|
353
366
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
367
|
+
anchorId: input.anchorId,
|
|
354
368
|
Component: input.Component,
|
|
355
369
|
getStructuredData: input.getStructuredData,
|
|
356
370
|
});
|
|
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
363
377
|
sectionRef: parsed.sectionRef,
|
|
364
378
|
category: parsed.category,
|
|
365
379
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
380
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
366
381
|
Component: input.Component,
|
|
367
382
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
368
383
|
};
|
|
@@ -708,12 +723,15 @@ catalog, and the page route renders it through
|
|
|
708
723
|
|
|
709
724
|
### Step 5: Compose into a page
|
|
710
725
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
the label-pack validator
|
|
726
|
+
Add the exported `HERO_SECTION` to the page's sections list
|
|
727
|
+
(`<PAGE>_SECTIONS` in `website/src/sections/<page>.sections.tsx`) at its
|
|
728
|
+
reading-order position, normally first. The page renders that list through
|
|
729
|
+
`<WebsitePageSections>`, which wraps each section in its `WebsiteSection` and
|
|
730
|
+
renders `Component` with NO props, and the manifest's `sectionRefs` derive from
|
|
731
|
+
the same list, so the label-pack validator audits it with no further edit.
|
|
732
|
+
A hero with a layout variant therefore binds the variant in its definition
|
|
733
|
+
(`Component: () => <HeroBody variant={HeroVariant.CENTERED} />`), never in the
|
|
734
|
+
page JSX.
|
|
717
735
|
|
|
718
736
|
**Finish** after the hero compiles and renders without TypeScript errors,
|
|
719
737
|
the page manifest includes the exported `HERO_SECTION`, and the homepage
|
|
@@ -929,9 +947,9 @@ a single block (last-wins).
|
|
|
929
947
|
`WebSite` / `Organization` (or omitted entirely).
|
|
930
948
|
- [ ] Layout / variant choices live on the component's prop interface,
|
|
931
949
|
NOT on the `WebsiteSectionDefinition`.
|
|
932
|
-
- [ ] The exported `HERO_SECTION` is
|
|
933
|
-
|
|
934
|
-
|
|
950
|
+
- [ ] The exported `HERO_SECTION` is an entry of the page's `<PAGE>_SECTIONS`
|
|
951
|
+
list, and the page renders that list through `<WebsitePageSections>`
|
|
952
|
+
rather than placing the hero in its JSX by hand.
|
|
935
953
|
|
|
936
954
|
### Grep invariants
|
|
937
955
|
|
|
@@ -141,6 +141,14 @@ compile-time prop checking.
|
|
|
141
141
|
* and is caught by nothing until a reviewer reads the page. The
|
|
142
142
|
* build and `wildo website audit` check the pack against the
|
|
143
143
|
* DECLARED keys, so declare every slot the component reads.
|
|
144
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
145
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
146
|
+
* sections list through `WebsitePageSections`, which places every
|
|
147
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
148
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
149
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
150
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
151
|
+
* to keep, like the id attribute it becomes.
|
|
144
152
|
* - `Component` — the React component that renders the section. Typed
|
|
145
153
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
146
154
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -167,6 +175,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
167
175
|
sectionRef: WebsiteSectionRefSchema,
|
|
168
176
|
category: WebsiteSectionCategorySchema,
|
|
169
177
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
178
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
179
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
180
|
+
}).optional(),
|
|
170
181
|
Component: z.unknown(),
|
|
171
182
|
getStructuredData: z.unknown().optional(),
|
|
172
183
|
});
|
|
@@ -255,6 +266,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
255
266
|
sectionRef: WebsiteSectionRef | string;
|
|
256
267
|
category: WebsiteSectionCategory;
|
|
257
268
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
269
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
270
|
+
anchorId?: string;
|
|
258
271
|
Component: ComponentType<TProps>;
|
|
259
272
|
/**
|
|
260
273
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -337,6 +350,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
337
350
|
sectionRef: input.sectionRef,
|
|
338
351
|
category: input.category,
|
|
339
352
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
353
|
+
anchorId: input.anchorId,
|
|
340
354
|
Component: input.Component,
|
|
341
355
|
getStructuredData: input.getStructuredData,
|
|
342
356
|
});
|
|
@@ -349,6 +363,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
349
363
|
sectionRef: parsed.sectionRef,
|
|
350
364
|
category: parsed.category,
|
|
351
365
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
366
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
352
367
|
Component: input.Component,
|
|
353
368
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
354
369
|
};
|
|
@@ -155,6 +155,14 @@ compile-time prop checking.
|
|
|
155
155
|
* and is caught by nothing until a reviewer reads the page. The
|
|
156
156
|
* build and `wildo website audit` check the pack against the
|
|
157
157
|
* DECLARED keys, so declare every slot the component reads.
|
|
158
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
159
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
160
|
+
* sections list through `WebsitePageSections`, which places every
|
|
161
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
162
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
163
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
164
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
165
|
+
* to keep, like the id attribute it becomes.
|
|
158
166
|
* - `Component` — the React component that renders the section. Typed
|
|
159
167
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
160
168
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
181
189
|
sectionRef: WebsiteSectionRefSchema,
|
|
182
190
|
category: WebsiteSectionCategorySchema,
|
|
183
191
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
192
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
193
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
194
|
+
}).optional(),
|
|
184
195
|
Component: z.unknown(),
|
|
185
196
|
getStructuredData: z.unknown().optional(),
|
|
186
197
|
});
|
|
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
269
280
|
sectionRef: WebsiteSectionRef | string;
|
|
270
281
|
category: WebsiteSectionCategory;
|
|
271
282
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
283
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
284
|
+
anchorId?: string;
|
|
272
285
|
Component: ComponentType<TProps>;
|
|
273
286
|
/**
|
|
274
287
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
351
364
|
sectionRef: input.sectionRef,
|
|
352
365
|
category: input.category,
|
|
353
366
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
367
|
+
anchorId: input.anchorId,
|
|
354
368
|
Component: input.Component,
|
|
355
369
|
getStructuredData: input.getStructuredData,
|
|
356
370
|
});
|
|
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
363
377
|
sectionRef: parsed.sectionRef,
|
|
364
378
|
category: parsed.category,
|
|
365
379
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
380
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
366
381
|
Component: input.Component,
|
|
367
382
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
368
383
|
};
|
package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md
CHANGED
|
@@ -137,6 +137,14 @@ compile-time prop checking.
|
|
|
137
137
|
* and is caught by nothing until a reviewer reads the page. The
|
|
138
138
|
* build and `wildo website audit` check the pack against the
|
|
139
139
|
* DECLARED keys, so declare every slot the component reads.
|
|
140
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
141
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
142
|
+
* sections list through `WebsitePageSections`, which places every
|
|
143
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
144
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
145
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
146
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
147
|
+
* to keep, like the id attribute it becomes.
|
|
140
148
|
* - `Component` — the React component that renders the section. Typed
|
|
141
149
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
142
150
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
163
171
|
sectionRef: WebsiteSectionRefSchema,
|
|
164
172
|
category: WebsiteSectionCategorySchema,
|
|
165
173
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
174
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
175
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
176
|
+
}).optional(),
|
|
166
177
|
Component: z.unknown(),
|
|
167
178
|
getStructuredData: z.unknown().optional(),
|
|
168
179
|
});
|
|
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
251
262
|
sectionRef: WebsiteSectionRef | string;
|
|
252
263
|
category: WebsiteSectionCategory;
|
|
253
264
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
265
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
266
|
+
anchorId?: string;
|
|
254
267
|
Component: ComponentType<TProps>;
|
|
255
268
|
/**
|
|
256
269
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
333
346
|
sectionRef: input.sectionRef,
|
|
334
347
|
category: input.category,
|
|
335
348
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
349
|
+
anchorId: input.anchorId,
|
|
336
350
|
Component: input.Component,
|
|
337
351
|
getStructuredData: input.getStructuredData,
|
|
338
352
|
});
|
|
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
345
359
|
sectionRef: parsed.sectionRef,
|
|
346
360
|
category: parsed.category,
|
|
347
361
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
362
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
348
363
|
Component: input.Component,
|
|
349
364
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
350
365
|
};
|
|
@@ -155,6 +155,14 @@ compile-time prop checking.
|
|
|
155
155
|
* and is caught by nothing until a reviewer reads the page. The
|
|
156
156
|
* build and `wildo website audit` check the pack against the
|
|
157
157
|
* DECLARED keys, so declare every slot the component reads.
|
|
158
|
+
* - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
|
|
159
|
+
* can target it. Belongs to the DEFINITION because a page renders its
|
|
160
|
+
* sections list through `WebsitePageSections`, which places every
|
|
161
|
+
* section itself: an anchor a page author would otherwise write on a
|
|
162
|
+
* hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
|
|
163
|
+
* valid HTML id that is also URL-fragment-safe: a letter, then
|
|
164
|
+
* letters, digits, `-` or `_`. Uniqueness on a page is the author's
|
|
165
|
+
* to keep, like the id attribute it becomes.
|
|
158
166
|
* - `Component` — the React component that renders the section. Typed
|
|
159
167
|
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
160
168
|
* the component's prop shape (props vary per section). The factory
|
|
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
|
|
|
181
189
|
sectionRef: WebsiteSectionRefSchema,
|
|
182
190
|
category: WebsiteSectionCategorySchema,
|
|
183
191
|
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
192
|
+
anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
|
|
193
|
+
error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
|
|
194
|
+
}).optional(),
|
|
184
195
|
Component: z.unknown(),
|
|
185
196
|
getStructuredData: z.unknown().optional(),
|
|
186
197
|
});
|
|
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
|
|
|
269
280
|
sectionRef: WebsiteSectionRef | string;
|
|
270
281
|
category: WebsiteSectionCategory;
|
|
271
282
|
expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
|
|
283
|
+
/** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
|
|
284
|
+
anchorId?: string;
|
|
272
285
|
Component: ComponentType<TProps>;
|
|
273
286
|
/**
|
|
274
287
|
* See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
|
|
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
351
364
|
sectionRef: input.sectionRef,
|
|
352
365
|
category: input.category,
|
|
353
366
|
expectedLabelKeys: input.expectedLabelKeys,
|
|
367
|
+
anchorId: input.anchorId,
|
|
354
368
|
Component: input.Component,
|
|
355
369
|
getStructuredData: input.getStructuredData,
|
|
356
370
|
});
|
|
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
|
|
|
363
377
|
sectionRef: parsed.sectionRef,
|
|
364
378
|
category: parsed.category,
|
|
365
379
|
expectedLabelKeys: parsed.expectedLabelKeys,
|
|
380
|
+
...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
|
|
366
381
|
Component: input.Component,
|
|
367
382
|
...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
|
|
368
383
|
};
|