@algolia/wizard 0.109.0 → 0.110.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/dist/main.js +6 -5
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2469,7 +2469,7 @@ async function ensureApplication(resumeAppId) {
|
|
|
2469
2469
|
// package.json
|
|
2470
2470
|
var package_default = {
|
|
2471
2471
|
name: "@algolia/wizard",
|
|
2472
|
-
version: "0.
|
|
2472
|
+
version: "0.110.0",
|
|
2473
2473
|
description: "Magically implement Algolia functionality in your codebase",
|
|
2474
2474
|
type: "module",
|
|
2475
2475
|
engines: {
|
|
@@ -6758,7 +6758,7 @@ function searchInstructions(input) {
|
|
|
6758
6758
|
})}. Use the source and the existing UI that displays this entity to understand the search task, result content, and appropriate scope.` : null;
|
|
6759
6759
|
const mountCandidateMessage = input.searchLocation ? `The confirmed-content placement analysis suggested "${input.searchLocation}" as a mount candidate. Before editing, read that file and inspect its parent layout, sibling controls, and the relevant content UI. If the evidence confirms it, import and render the new search component there; otherwise mount it in the better existing file. In all cases, mount the component before finishing; do not leave an unrendered component.` : "The scan found no reliable mount candidate. Determine the best existing location from the layout hierarchy and the UI that displays the indexed content, then mount the new search component there; do not default to a header or navigation component or leave an unrendered component.";
|
|
6760
6760
|
const placementMessage = "Place content-specific search beside the heading or controls for the corresponding browse/listing task. Use shared navigation only for genuinely app-wide search and only when it fits the available space and responsive layout without crowding primary actions.";
|
|
6761
|
-
const replacementMessage =
|
|
6761
|
+
const replacementMessage = `${SEARCH_SCOPE_RULE} Replace the usage of each same-scope search control with the new component, keep its intentional placement, and delete the code that only it uses, for example its provider, dialog, and hooks. Keep differently scoped search, filters, and navigation.`;
|
|
6762
6762
|
const accessibilityInstructions = [
|
|
6763
6763
|
"Target WCAG 2.2 AA. Use semantic search structure and give the input a persistent accessible name: prefer a visible associated label and use the project's visually-hidden utility where the layout has no room for one. A placeholder or a labeled search landmark does not name the input. When the input uses aria-labelledby, every referenced element must exist and contain meaningful, content-specific text. Preserve a widget's generated label when it provides one and make it content-specific through supported options. If the SDK reference says that no option changes the generated label, accept that label as a known widget limitation: do not rebuild the widget headless, do not patch generated DOM, and name the gap in the summary.",
|
|
6764
6764
|
"Preserve widget-provided combobox, popup, and item roles, relationships, and keyboard behavior; for a headless widget, implement the documented semantics instead of inventing different ARIA. Tab must reach the input and controls, Arrow keys move through results, Enter selects, and Escape dismisses without trapping or losing focus.",
|
|
@@ -6791,6 +6791,7 @@ function searchInstructions(input) {
|
|
|
6791
6791
|
"The summary should be extremely concise; do not mention manual testing steps."
|
|
6792
6792
|
];
|
|
6793
6793
|
}
|
|
6794
|
+
var SEARCH_SCOPE_RULE = "An existing search control has the same scope as the new search when its results include the indexed content, for example a site-wide search dialog or command palette. A search control that returns only other content, for example settings or help pages, has a different scope.";
|
|
6794
6795
|
var EXISTING_COMPONENT_INSTRUCTION = "A search component for this content can already exist, for example from an earlier run. Do not trust it: compare the record fields that it reads with the real records, and rewrite it when they differ. Do not report success while the UI reads a field that no record has.";
|
|
6795
6796
|
var CSP_INSTRUCTION = 'Search for a Content-Security-Policy (next.config, middleware, proxy, server headers, or a meta tag). If the project sets one, it blocks Algolia until you allow it: add https://*.algolia.net, https://*.algolianet.com, and https://insights.algolia.io to connect-src, and load search-insights from npm as the SDK reference describes instead of from jsDelivr. Without this, every search fails with "Unreachable hosts" and the widget stays empty.';
|
|
6796
6797
|
var INGEST_SCRIPT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
@@ -6891,7 +6892,7 @@ function validationInstructions(input) {
|
|
|
6891
6892
|
`Indexed content context: ${JSON.stringify(input.findings.confirmedEntities?.[0] ?? null)}.`,
|
|
6892
6893
|
`The confirmed placement candidate was "${input.searchLocation ?? "unknown"}", but verify the actual mount rather than assuming the candidate was used.`,
|
|
6893
6894
|
"Inspect the generated search component, its actual mount file, that file's parent layout and sibling controls, and the relevant content UI. Do not rely only on type checks or tests.",
|
|
6894
|
-
|
|
6895
|
+
`Confirm that the application renders exactly one search control for the indexed content, and that the new component is not mounted twice. ${SEARCH_SCOPE_RULE} If a same-scope search control is still mounted, set sufficient=false and name the file that mounts it. Do not set sufficient=false for a differently scoped search control.`,
|
|
6895
6896
|
"If the project sets a Content-Security-Policy, confirm that connect-src allows https://*.algolia.net, https://*.algolianet.com, and https://insights.algolia.io, and that search-insights is loaded from npm (not a CDN). If a CSP exists and fails either check, set sufficient=false. If the project has no CSP, skip both checks: do not set sufficient=false, and do not ask to add a CSP. Without a CSP, insights={true} (or insights: true) with no search-insights package is correct, because the widget loads search-insights from its CDN: do not report a missing search-insights package.",
|
|
6896
6897
|
"Confirm content-specific search is placed with the corresponding content or task controls. Shared navigation is valid only for genuinely app-wide search that fits the visual hierarchy and responsive layout without crowding primary actions.",
|
|
6897
6898
|
"Confirm the input has a persistent accessible name; widget-provided combobox, popup, and item relationships and keyboard behavior are preserved; and loading, empty, and error status text is perceivable to assistive technology.",
|
|
@@ -6914,7 +6915,7 @@ function validationInstructions(input) {
|
|
|
6914
6915
|
"Always call reportStatus with status=success after validation, even when sufficient=false.",
|
|
6915
6916
|
"Set sufficient=false if the input's computed accessible name is empty or generic, including when aria-labelledby references a missing or empty element; a placeholder does not count as the label.",
|
|
6916
6917
|
'Exception: the InstantSearch Autocomplete widget (react-instantsearch or instantsearch.js) names its input "Submit" through its generated label (the input has aria-labelledby pointing at that label), and no widget option changes it. Accept that name when the widget is used unmodified, and do not ask for an aria-label, inputProps, or a label wrapper: do not set sufficient=false for it, and do not request a headless rebuild or DOM patch.',
|
|
6917
|
-
"Set sufficient=true when the search
|
|
6918
|
+
"Set sufficient=true when the new search control is the only search for the indexed content, is structurally complete, and no placement, accessibility, or theme-color violation was found.",
|
|
6918
6919
|
"Set sufficient=false when a required placement, accessibility, or theme-color property is observed to fail, the implementation is incomplete, or checks have implementation-caused failures; include concrete additionalInstructions for the next pass.",
|
|
6919
6920
|
"You can only read source files. If a required property can be checked in the source, check it there. If it can be established only in a browser (rendered contrast, keyboard behavior, 320-pixel reflow, live-region status, computed accessible name), set sufficient=true when the source shows no violation. Never request devtools, a screenshot, or a contrast tool, and never repeat a finding that an earlier pass already fixed.",
|
|
6920
6921
|
"If a check fails only in untouched code, set unrelatedFailure to a concise failure description.",
|
|
@@ -10200,7 +10201,7 @@ async function resetProjectState() {
|
|
|
10200
10201
|
// package.json with { type: 'json' }
|
|
10201
10202
|
var package_default2 = {
|
|
10202
10203
|
name: "@algolia/wizard",
|
|
10203
|
-
version: "0.
|
|
10204
|
+
version: "0.110.0",
|
|
10204
10205
|
description: "Magically implement Algolia functionality in your codebase",
|
|
10205
10206
|
type: "module",
|
|
10206
10207
|
engines: {
|