@salesforce/afv-skills 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/applying-slds/SKILL.md +322 -0
- package/skills/applying-slds/checklists.md +83 -0
- package/skills/applying-slds/examples.md +283 -0
- package/skills/applying-slds/guidance/README.md +83 -0
- package/skills/applying-slds/guidance/blueprints-index.md +213 -0
- package/skills/applying-slds/guidance/icons-guidance.md +186 -0
- package/skills/applying-slds/guidance/overviews/borders.md +236 -0
- package/skills/applying-slds/guidance/overviews/color.md +266 -0
- package/skills/applying-slds/guidance/overviews/display-density.md +366 -0
- package/skills/applying-slds/guidance/overviews/icons.md +240 -0
- package/skills/applying-slds/guidance/overviews/illustrations.md +235 -0
- package/skills/applying-slds/guidance/overviews/shadows.md +176 -0
- package/skills/applying-slds/guidance/overviews/spacing.md +216 -0
- package/skills/applying-slds/guidance/overviews/typography.md +323 -0
- package/skills/applying-slds/guidance/overviews/utilities.md +542 -0
- package/skills/applying-slds/guidance/slds-development-guide.md +288 -0
- package/skills/applying-slds/guidance/styling-hooks/borders.md +202 -0
- package/skills/applying-slds/guidance/styling-hooks/color/expressive-palette-hooks.md +153 -0
- package/skills/applying-slds/guidance/styling-hooks/color/index.md +171 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/accent-hooks.md +204 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/feedback-hooks.md +768 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/surface-hooks.md +337 -0
- package/skills/applying-slds/guidance/styling-hooks/color/system-hooks.md +132 -0
- package/skills/applying-slds/guidance/styling-hooks/index.md +327 -0
- package/skills/applying-slds/guidance/styling-hooks/shadows.md +238 -0
- package/skills/applying-slds/guidance/styling-hooks/spacing.md +254 -0
- package/skills/applying-slds/guidance/styling-hooks/typography.md +448 -0
- package/skills/applying-slds/guidance/utilities/alignment.md +119 -0
- package/skills/applying-slds/guidance/utilities/borders.md +131 -0
- package/skills/applying-slds/guidance/utilities/box.md +125 -0
- package/skills/applying-slds/guidance/utilities/color.md +165 -0
- package/skills/applying-slds/guidance/utilities/dark-mode.md +111 -0
- package/skills/applying-slds/guidance/utilities/description-list.md +168 -0
- package/skills/applying-slds/guidance/utilities/floats.md +117 -0
- package/skills/applying-slds/guidance/utilities/grid.md +264 -0
- package/skills/applying-slds/guidance/utilities/horizontal-list.md +110 -0
- package/skills/applying-slds/guidance/utilities/hyphenation.md +84 -0
- package/skills/applying-slds/guidance/utilities/index.md +205 -0
- package/skills/applying-slds/guidance/utilities/interactions.md +89 -0
- package/skills/applying-slds/guidance/utilities/layout.md +109 -0
- package/skills/applying-slds/guidance/utilities/line-clamp.md +131 -0
- package/skills/applying-slds/guidance/utilities/margin.md +155 -0
- package/skills/applying-slds/guidance/utilities/media-object.md +161 -0
- package/skills/applying-slds/guidance/utilities/name-value-list.md +152 -0
- package/skills/applying-slds/guidance/utilities/padding.md +155 -0
- package/skills/applying-slds/guidance/utilities/position.md +177 -0
- package/skills/applying-slds/guidance/utilities/print.md +114 -0
- package/skills/applying-slds/guidance/utilities/scrollable.md +126 -0
- package/skills/applying-slds/guidance/utilities/sizing.md +190 -0
- package/skills/applying-slds/guidance/utilities/themes.md +121 -0
- package/skills/applying-slds/guidance/utilities/truncate.md +127 -0
- package/skills/applying-slds/guidance/utilities/typography.md +166 -0
- package/skills/applying-slds/guidance/utilities/vertical-list.md +166 -0
- package/skills/applying-slds/guidance/utilities/visibility.md +228 -0
- package/skills/applying-slds/metadata/README.md +84 -0
- package/skills/applying-slds/metadata/blueprints/components/accordion.yaml +304 -0
- package/skills/applying-slds/metadata/blueprints/components/activity-timeline.yaml +92 -0
- package/skills/applying-slds/metadata/blueprints/components/alert.yaml +103 -0
- package/skills/applying-slds/metadata/blueprints/components/app-launcher.yaml +94 -0
- package/skills/applying-slds/metadata/blueprints/components/avatar-group.yaml +81 -0
- package/skills/applying-slds/metadata/blueprints/components/avatar.yaml +97 -0
- package/skills/applying-slds/metadata/blueprints/components/badges.yaml +102 -0
- package/skills/applying-slds/metadata/blueprints/components/brand-band.yaml +198 -0
- package/skills/applying-slds/metadata/blueprints/components/breadcrumbs.yaml +95 -0
- package/skills/applying-slds/metadata/blueprints/components/builder-header.yaml +192 -0
- package/skills/applying-slds/metadata/blueprints/components/button-groups.yaml +82 -0
- package/skills/applying-slds/metadata/blueprints/components/button-icons.yaml +295 -0
- package/skills/applying-slds/metadata/blueprints/components/buttons.yaml +230 -0
- package/skills/applying-slds/metadata/blueprints/components/cards.yaml +124 -0
- package/skills/applying-slds/metadata/blueprints/components/carousel.yaml +140 -0
- package/skills/applying-slds/metadata/blueprints/components/chat.yaml +179 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-button-group.yaml +192 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-button.yaml +204 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-toggle.yaml +177 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox.yaml +108 -0
- package/skills/applying-slds/metadata/blueprints/components/color-picker.yaml +172 -0
- package/skills/applying-slds/metadata/blueprints/components/combobox.yaml +136 -0
- package/skills/applying-slds/metadata/blueprints/components/counter.yaml +147 -0
- package/skills/applying-slds/metadata/blueprints/components/data-tables.yaml +157 -0
- package/skills/applying-slds/metadata/blueprints/components/datepickers.yaml +130 -0
- package/skills/applying-slds/metadata/blueprints/components/datetime-picker.yaml +155 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-composer.yaml +201 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-form-footer.yaml +161 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-utility-bar.yaml +175 -0
- package/skills/applying-slds/metadata/blueprints/components/drop-zone.yaml +115 -0
- package/skills/applying-slds/metadata/blueprints/components/dueling-picklist.yaml +196 -0
- package/skills/applying-slds/metadata/blueprints/components/dynamic-icons.yaml +128 -0
- package/skills/applying-slds/metadata/blueprints/components/dynamic-menu.yaml +141 -0
- package/skills/applying-slds/metadata/blueprints/components/expandable-section.yaml +115 -0
- package/skills/applying-slds/metadata/blueprints/components/expression.yaml +143 -0
- package/skills/applying-slds/metadata/blueprints/components/feeds.yaml +125 -0
- package/skills/applying-slds/metadata/blueprints/components/file-selector.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/files.yaml +119 -0
- package/skills/applying-slds/metadata/blueprints/components/form-element.yaml +145 -0
- package/skills/applying-slds/metadata/blueprints/components/global-header.yaml +120 -0
- package/skills/applying-slds/metadata/blueprints/components/global-navigation.yaml +100 -0
- package/skills/applying-slds/metadata/blueprints/components/icons.yaml +138 -0
- package/skills/applying-slds/metadata/blueprints/components/illustration.yaml +205 -0
- package/skills/applying-slds/metadata/blueprints/components/input.yaml +151 -0
- package/skills/applying-slds/metadata/blueprints/components/list-builder.yaml +127 -0
- package/skills/applying-slds/metadata/blueprints/components/lookups.yaml +132 -0
- package/skills/applying-slds/metadata/blueprints/components/map.yaml +118 -0
- package/skills/applying-slds/metadata/blueprints/components/menus.yaml +134 -0
- package/skills/applying-slds/metadata/blueprints/components/modals.yaml +152 -0
- package/skills/applying-slds/metadata/blueprints/components/notifications.yaml +88 -0
- package/skills/applying-slds/metadata/blueprints/components/page-headers.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/panels.yaml +149 -0
- package/skills/applying-slds/metadata/blueprints/components/path.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/picklist.yaml +125 -0
- package/skills/applying-slds/metadata/blueprints/components/pills.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/popovers.yaml +120 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-bar.yaml +110 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-indicator.yaml +133 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-ring.yaml +102 -0
- package/skills/applying-slds/metadata/blueprints/components/prompt.yaml +126 -0
- package/skills/applying-slds/metadata/blueprints/components/publishers.yaml +178 -0
- package/skills/applying-slds/metadata/blueprints/components/radio-button-group.yaml +172 -0
- package/skills/applying-slds/metadata/blueprints/components/radio-group.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/rich-text-editor.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/scoped-notifications.yaml +188 -0
- package/skills/applying-slds/metadata/blueprints/components/scoped-tabs.yaml +97 -0
- package/skills/applying-slds/metadata/blueprints/components/select.yaml +127 -0
- package/skills/applying-slds/metadata/blueprints/components/setup-assistant.yaml +152 -0
- package/skills/applying-slds/metadata/blueprints/components/slider.yaml +111 -0
- package/skills/applying-slds/metadata/blueprints/components/spinners.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/split-view.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/summary-detail.yaml +103 -0
- package/skills/applying-slds/metadata/blueprints/components/tabs.yaml +138 -0
- package/skills/applying-slds/metadata/blueprints/components/textarea.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/tiles.yaml +108 -0
- package/skills/applying-slds/metadata/blueprints/components/timepicker.yaml +111 -0
- package/skills/applying-slds/metadata/blueprints/components/toast.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/tooltips.yaml +107 -0
- package/skills/applying-slds/metadata/blueprints/components/tree-grid.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/trees.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/trial-bar.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/vertical-navigation.yaml +130 -0
- package/skills/applying-slds/metadata/blueprints/components/vertical-tabs.yaml +140 -0
- package/skills/applying-slds/metadata/blueprints/components/visual-picker.yaml +150 -0
- package/skills/applying-slds/metadata/blueprints/components/welcome-mat.yaml +136 -0
- package/skills/applying-slds/metadata/hooks-index.json +6272 -0
- package/skills/applying-slds/metadata/icon-metadata.json +38466 -0
- package/skills/applying-slds/metadata/utilities-index.json +21912 -0
- package/skills/applying-slds/references/component-selection.md +112 -0
- package/skills/applying-slds/references/icons-decision-guide.md +124 -0
- package/skills/applying-slds/references/styling-decision-guide.md +228 -0
- package/skills/applying-slds/references/utilities-quick-ref.md +125 -0
- package/skills/applying-slds/scripts/search-blueprints.cjs +117 -0
- package/skills/applying-slds/scripts/search-hooks.cjs +139 -0
- package/skills/applying-slds/scripts/search-icons.cjs +174 -0
- package/skills/applying-slds/scripts/search-utilities.cjs +161 -0
- package/skills/generating-custom-lightning-type/SKILL.md +17 -39
- package/skills/generating-custom-lightning-type/assets/primitive-types-and-constraints.md +41 -0
- package/skills/generating-custom-lightning-type/references/widget-rendition.md +124 -0
- package/skills/investigating-agentforce-architecture/README.md +156 -0
- package/skills/investigating-agentforce-architecture/SKILL.md +230 -0
- package/skills/investigating-agentforce-architecture/assets/cli/describe_sobject.yaml +16 -0
- package/skills/investigating-agentforce-architecture/assets/cli/describe_tooling_sobject.yaml +17 -0
- package/skills/investigating-agentforce-architecture/assets/cli/list_metadata_genaiprompttemplate.yaml +17 -0
- package/skills/investigating-agentforce-architecture/assets/cli/org_display.yaml +15 -0
- package/skills/investigating-agentforce-architecture/assets/cli/retrieve_genai_plugin.yaml +18 -0
- package/skills/investigating-agentforce-architecture/assets/cli/show_access_token.yaml +27 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/action_tree.mmd +20 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/data_flow.mmd +19 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/dependency_graph.mmd +19 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/invocation_sequence.mmd +20 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/planner_state.mmd +18 -0
- package/skills/investigating-agentforce-architecture/assets/soql/apex_class_bodies_by_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/apex_class_bodies_by_names.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/bot_definition_details.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/bot_version_lookup.soql +4 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_by_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_ids_by_names.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_view_by_durable_ids.soql +4 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_metadata_by_id.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/functions_by_plugins.soql +5 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_attrs_by_parent_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_bundle_functions.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_definition_by_agent_chain.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugin_functions_by_plugin_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugin_instructions_by_plugin_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugins_by_planner.soql +4 -0
- package/skills/investigating-agentforce-architecture/references/architecture_sections.md +243 -0
- package/skills/investigating-agentforce-architecture/references/contract.json +244 -0
- package/skills/investigating-agentforce-architecture/references/soql_fields.md +512 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/__init__.py +1 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/fs_guard.py +329 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/paths.py +110 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/runtime.py +59 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/sql.py +10 -0
- package/skills/investigating-agentforce-architecture/scripts/cache_check.py +234 -0
- package/skills/investigating-agentforce-architecture/scripts/config.py +131 -0
- package/skills/investigating-agentforce-architecture/scripts/fetch_soql.py +689 -0
- package/skills/investigating-agentforce-architecture/scripts/finalize.py +295 -0
- package/skills/investigating-agentforce-architecture/scripts/main.py +2835 -0
- package/skills/investigating-agentforce-architecture/scripts/metadata_listing.py +265 -0
- package/skills/investigating-agentforce-architecture/scripts/parallel_retrieve.py +69 -0
- package/skills/investigating-agentforce-architecture/scripts/parse_bundle.py +215 -0
- package/skills/investigating-agentforce-architecture/scripts/parse_wave.py +845 -0
- package/skills/investigating-agentforce-architecture/scripts/probe_channels.py +302 -0
- package/skills/investigating-agentforce-architecture/scripts/render_architecture.py +1043 -0
- package/skills/investigating-agentforce-architecture/scripts/resolve_bot.py +255 -0
- package/skills/investigating-agentforce-architecture/scripts/resolve_invocation_target.py +130 -0
- package/skills/investigating-agentforce-architecture/scripts/rest_client.py +763 -0
- package/skills/investigating-agentforce-architecture/scripts/retrieve_planner.py +13 -0
- package/skills/investigating-agentforce-architecture/scripts/sf_cli.py +242 -0
- package/skills/investigating-agentforce-architecture/scripts/soql_loader.py +253 -0
- package/skills/investigating-agentforce-architecture/scripts/summarize_tree.py +143 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/__init__.py +0 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/_bootstrap.py +23 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/fixtures/__init__.py +0 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/fixtures/genai_payloads.py +400 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_cache_check.py +307 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_cache_check_main.py +283 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_config.py +115 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_end_to_end_fixture.py +651 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_finalize.py +278 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_flow_children_inflation.py +582 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_fs_guard.py +113 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_iterative_wave_b.py +478 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_main_pipeline.py +3359 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parallel_retrieve.py +131 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_bundle.py +400 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave.py +644 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_classifiers.py +224 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_helpers.py +380 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_main.py +397 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_per_branch_visited.py +244 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_probe_channels.py +359 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_probe_cli_recipes.py +185 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_render_architecture.py +810 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_bot.py +203 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_creds.py +157 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_invocation_target.py +145 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_rest_client.py +1253 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_runtime_override.py +100 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_sf_cli.py +261 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_signature_stamping.py +466 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_soql_loader.py +501 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_summarize_tree.py +241 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_write_emit_ctx.py +480 -0
- package/skills/investigating-agentforce-architecture/tools/emit_env.py +157 -0
- package/skills/investigating-agentforce-architecture/tools/emit_result.py +262 -0
- package/skills/investigating-agentforce-architecture/tools/sanitize.py +33 -0
- package/skills/investigating-agentforce-architecture/tools/write_emit_ctx.py +332 -0
- package/skills/investigating-agentforce-d360/README.md +123 -0
- package/skills/investigating-agentforce-d360/SKILL.md +163 -0
- package/skills/investigating-agentforce-d360/assets/dc/app_generation.sql +51 -0
- package/skills/investigating-agentforce-d360/assets/dc/content_category.sql +44 -0
- package/skills/investigating-agentforce-d360/assets/dc/content_quality.sql +41 -0
- package/skills/investigating-agentforce-d360/assets/dc/discover_sessions.sql +36 -0
- package/skills/investigating-agentforce-d360/assets/dc/feedback.sql +47 -0
- package/skills/investigating-agentforce-d360/assets/dc/feedback_details.sql +38 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_records.sql +45 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_llm.sql +50 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_metadata.sql +44 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_tags.sql +42 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_requests.sql +89 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_responses.sql +43 -0
- package/skills/investigating-agentforce-d360/assets/dc/generations.sql +52 -0
- package/skills/investigating-agentforce-d360/assets/dc/interactions.sql +53 -0
- package/skills/investigating-agentforce-d360/assets/dc/messages.sql +53 -0
- package/skills/investigating-agentforce-d360/assets/dc/messaging_session.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/moment_interactions.sql +34 -0
- package/skills/investigating-agentforce-d360/assets/dc/moments.sql +39 -0
- package/skills/investigating-agentforce-d360/assets/dc/participants.sql +48 -0
- package/skills/investigating-agentforce-d360/assets/dc/sessions.sql +78 -0
- package/skills/investigating-agentforce-d360/assets/dc/steps.sql +64 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_associations.sql +46 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_definition_associations.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_definitions.sql +50 -0
- package/skills/investigating-agentforce-d360/assets/dc/tags.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/telemetry_spans.sql +55 -0
- package/skills/investigating-agentforce-d360/references/artifacts.md +50 -0
- package/skills/investigating-agentforce-d360/references/dc_dmo_fields.md +823 -0
- package/skills/investigating-agentforce-d360/references/dc_pipeline_contract.md +608 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/__init__.py +2 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/cli_override.py +98 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/fs_guard.py +334 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/paths.py +155 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/runtime.py +59 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/sql.py +14 -0
- package/skills/investigating-agentforce-d360/scripts/assemble_dc.py +1624 -0
- package/skills/investigating-agentforce-d360/scripts/config.py +45 -0
- package/skills/investigating-agentforce-d360/scripts/dc.py +188 -0
- package/skills/investigating-agentforce-d360/scripts/discover_sessions.py +556 -0
- package/skills/investigating-agentforce-d360/scripts/fetch_dc.py +1045 -0
- package/skills/investigating-agentforce-d360/scripts/render_dc.py +1750 -0
- package/skills/investigating-agentforce-d360/scripts/resolve_session.py +264 -0
- package/skills/investigating-agentforce-d360/scripts/storage.py +92 -0
- package/skills/investigating-agentforce-d360/scripts/tests/__init__.py +0 -0
- package/skills/investigating-agentforce-d360/scripts/tests/_bootstrap.py +15 -0
- package/skills/investigating-agentforce-d360/scripts/tests/fixtures/__init__.py +0 -0
- package/skills/investigating-agentforce-d360/scripts/tests/fixtures/synthetic_session.py +424 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_bootstrap_and_mode.py +115 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_gateway_direct.py +220 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_gateway_direct_integration.py +158 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_helpers.py +287 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_integration.py +247 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_dc_and_resolve_session.py +433 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_discover_sessions.py +458 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_discover_sessions_grep_ci.py +193 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_helpers.py +266 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_identity.py +528 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_main.py +251 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_waterfall.py +229 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_waterfall_full.py +283 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_identity_coherence.py +327 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_branches.py +256 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_gateway_direct.py +130 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_helpers.py +291 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_integration.py +220 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_planner_llm_calls.py +284 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_show_prompts_gating.py +215 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_resolve_from_disk.py +100 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_resolve_session_main.py +149 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_runtime_override.py +104 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_session_shape.py +95 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_session_shape_dropped_by_stdm.py +85 -0
- package/skills/managing-managed-event-subscription/SKILL.md +152 -0
- package/skills/managing-managed-event-subscription/assets/managed-event-subscription-template.xml +20 -0
- package/skills/managing-managed-event-subscription/references/delete-guide.md +57 -0
- package/skills/managing-managed-event-subscription/references/topic-name-formats.md +26 -0
- package/skills/managing-managed-event-subscription/references/update-constraints.md +30 -0
- package/skills/uplifting-components-to-slds2/SKILL.md +3 -2
- package/skills/uplifting-components-to-slds2/references/color-hooks-decision-guide.md +30 -9
- package/skills/uplifting-components-to-slds2/references/examples.md +24 -6
- package/skills/validating-slds/SKILL.md +262 -0
- package/skills/validating-slds/references/quality-checks.md +308 -0
- package/skills/validating-slds/references/report-format.md +302 -0
- package/skills/validating-slds/scripts/analyze-quality.cjs +521 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Search SLDS blueprint metadata.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node search-blueprints.js --search "dialog"
|
|
8
|
+
* node search-blueprints.js --category "Overlay"
|
|
9
|
+
* node search-blueprints.js --name "modals"
|
|
10
|
+
* node search-blueprints.js # list all blueprints
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
const BLUEPRINTS_DIR = path.join(__dirname, '..', 'metadata', 'blueprints', 'components');
|
|
17
|
+
|
|
18
|
+
function loadBlueprints() {
|
|
19
|
+
const blueprints = [];
|
|
20
|
+
if (!fs.existsSync(BLUEPRINTS_DIR)) {
|
|
21
|
+
console.error(`Blueprints directory not found: ${BLUEPRINTS_DIR}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const files = fs.readdirSync(BLUEPRINTS_DIR).filter(f => f.endsWith('.yaml'));
|
|
26
|
+
for (const file of files) {
|
|
27
|
+
const content = fs.readFileSync(path.join(BLUEPRINTS_DIR, file), 'utf8');
|
|
28
|
+
const nameMatch = content.match(/^name:\s*"?([^"\n]+)"?/m);
|
|
29
|
+
const descMatch = content.match(/^description:\s*"?([^"\n]+)"?/m);
|
|
30
|
+
const catMatch = content.match(/^category:\s*"?([^"\n]+)"?/m);
|
|
31
|
+
const rootMatch = content.match(/root:\s*"?([^"\n]+)"?/m);
|
|
32
|
+
|
|
33
|
+
blueprints.push({
|
|
34
|
+
file: file.replace('.yaml', ''),
|
|
35
|
+
name: nameMatch ? nameMatch[1].trim() : file.replace('.yaml', ''),
|
|
36
|
+
description: descMatch ? descMatch[1].trim() : '',
|
|
37
|
+
category: catMatch ? catMatch[1].trim() : 'Unknown',
|
|
38
|
+
rootClass: rootMatch ? rootMatch[1].trim() : '',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return blueprints.sort((a, b) => a.name.localeCompare(b.name));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function run() {
|
|
46
|
+
const args = process.argv.slice(2);
|
|
47
|
+
const flags = {};
|
|
48
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
49
|
+
if (args[i].startsWith('--')) {
|
|
50
|
+
flags[args[i].slice(2)] = args[i + 1] || '';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const blueprints = loadBlueprints();
|
|
55
|
+
|
|
56
|
+
if (flags.name) {
|
|
57
|
+
const needle = flags.name.toLowerCase();
|
|
58
|
+
const bp = blueprints.find(b =>
|
|
59
|
+
b.file.toLowerCase() === needle || b.name.toLowerCase() === needle
|
|
60
|
+
);
|
|
61
|
+
if (!bp) {
|
|
62
|
+
console.log(`Blueprint "${flags.name}" not found.`);
|
|
63
|
+
console.log(`\nAvailable: ${blueprints.map(b => b.file).join(', ')}`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
console.log(`\n=== ${bp.name} ===`);
|
|
67
|
+
console.log(`Category: ${bp.category}`);
|
|
68
|
+
console.log(`Root class: ${bp.rootClass}`);
|
|
69
|
+
console.log(`Description: ${bp.description}`);
|
|
70
|
+
console.log(`\nFull YAML: metadata/blueprints/components/${bp.file}.yaml`);
|
|
71
|
+
console.log('\nRead the full YAML file for classes, modifiers, states, accessibility, and example HTML.');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let results = blueprints;
|
|
76
|
+
|
|
77
|
+
if (flags.category) {
|
|
78
|
+
const cat = flags.category.toLowerCase();
|
|
79
|
+
results = results.filter(b => b.category.toLowerCase() === cat);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (flags.search) {
|
|
83
|
+
const term = flags.search.toLowerCase();
|
|
84
|
+
results = results.filter(b =>
|
|
85
|
+
b.name.toLowerCase().includes(term) ||
|
|
86
|
+
b.description.toLowerCase().includes(term) ||
|
|
87
|
+
b.file.toLowerCase().includes(term)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (results.length === 0) {
|
|
92
|
+
console.log('No blueprints found matching your criteria.');
|
|
93
|
+
const categories = [...new Set(blueprints.map(b => b.category))].sort();
|
|
94
|
+
console.log(`\nAvailable categories: ${categories.join(', ')}`);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
console.log(`\nFound ${results.length} blueprint(s):\n`);
|
|
99
|
+
|
|
100
|
+
const byCategory = {};
|
|
101
|
+
for (const bp of results) {
|
|
102
|
+
if (!byCategory[bp.category]) byCategory[bp.category] = [];
|
|
103
|
+
byCategory[bp.category].push(bp);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
for (const [cat, bps] of Object.entries(byCategory).sort()) {
|
|
107
|
+
console.log(`── ${cat} ──`);
|
|
108
|
+
for (const bp of bps) {
|
|
109
|
+
console.log(` ${bp.name.padEnd(30)} ${bp.rootClass.padEnd(25)} ${bp.description.slice(0, 60)}`);
|
|
110
|
+
}
|
|
111
|
+
console.log();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
console.log('Use --name "<blueprint>" to get full details.');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
run();
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Search SLDS styling hooks metadata.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node search-hooks.js --prefix "--slds-g-color-accent-"
|
|
8
|
+
* node search-hooks.js --category "color"
|
|
9
|
+
* node search-hooks.js --property "background-color"
|
|
10
|
+
* node search-hooks.js --value "#0176d3"
|
|
11
|
+
* node search-hooks.js --search "accent"
|
|
12
|
+
* node search-hooks.js # show category summary
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const path = require('path');
|
|
17
|
+
|
|
18
|
+
const INDEX_PATH = path.join(__dirname, '..', 'metadata', 'hooks-index.json');
|
|
19
|
+
|
|
20
|
+
function loadHooks() {
|
|
21
|
+
if (!fs.existsSync(INDEX_PATH)) {
|
|
22
|
+
console.error(`Hooks index not found: ${INDEX_PATH}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const data = JSON.parse(fs.readFileSync(INDEX_PATH, 'utf8'));
|
|
26
|
+
return { hooks: data.hooks || [], categories: data.categories || {} };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function normalizeValue(v) {
|
|
30
|
+
return (v || '').toLowerCase().replace(/\s+/g, '');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function matchesValue(hook, searchValue) {
|
|
34
|
+
const needle = normalizeValue(searchValue);
|
|
35
|
+
|
|
36
|
+
const check = (v) => {
|
|
37
|
+
if (!v) return false;
|
|
38
|
+
const n = normalizeValue(v);
|
|
39
|
+
return n === needle || n.includes(needle);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
if (hook.value && check(hook.value)) return true;
|
|
43
|
+
if (hook.value_dark && check(hook.value_dark)) return true;
|
|
44
|
+
if (hook.rawValues) {
|
|
45
|
+
if (check(hook.rawValues.slds) || check(hook.rawValues.cosmos)) return true;
|
|
46
|
+
}
|
|
47
|
+
if (hook.values) {
|
|
48
|
+
if (check(hook.values.slds) || check(hook.values.cosmos)) return true;
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function matchesProperty(hook, targetProps) {
|
|
54
|
+
const appliesTo = hook.properties?.['applies-to'] || hook.properties || [];
|
|
55
|
+
if (!Array.isArray(appliesTo) || appliesTo.length === 0) return false;
|
|
56
|
+
const targets = targetProps.map(p => p.toLowerCase());
|
|
57
|
+
return targets.some(t => appliesTo.some(hp => hp.toLowerCase().includes(t) || t.includes(hp.toLowerCase())));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function formatHook(hook) {
|
|
61
|
+
const parts = [` ${hook.token}`];
|
|
62
|
+
if (hook.category) parts.push(` category: ${hook.category}`);
|
|
63
|
+
if (hook.value) parts.push(` value: ${hook.value}`);
|
|
64
|
+
if (hook.value_dark) parts.push(` value_dark: ${hook.value_dark}`);
|
|
65
|
+
if (hook.rawValues?.slds) parts.push(` value(slds): ${hook.rawValues.slds}`);
|
|
66
|
+
if (hook.rawValues?.cosmos) parts.push(` value(cosmos): ${hook.rawValues.cosmos}`);
|
|
67
|
+
const props = hook.properties?.['applies-to'] || [];
|
|
68
|
+
if (props.length) parts.push(` applies-to: ${props.join(', ')}`);
|
|
69
|
+
return parts.join('\n');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function run() {
|
|
73
|
+
const args = process.argv.slice(2);
|
|
74
|
+
const flags = {};
|
|
75
|
+
for (let i = 0; i < args.length; i++) {
|
|
76
|
+
if (args[i].startsWith('--') && i + 1 < args.length) {
|
|
77
|
+
flags[args[i].slice(2)] = args[i + 1];
|
|
78
|
+
i++;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const { hooks, categories } = loadHooks();
|
|
83
|
+
|
|
84
|
+
if (Object.keys(flags).length === 0) {
|
|
85
|
+
console.log(`\nSLDS Styling Hooks: ${hooks.length} total\n`);
|
|
86
|
+
console.log('Categories:');
|
|
87
|
+
for (const [cat, count] of Object.entries(categories).sort()) {
|
|
88
|
+
console.log(` ${cat.padEnd(15)} ${count} hooks`);
|
|
89
|
+
}
|
|
90
|
+
console.log('\nUsage:');
|
|
91
|
+
console.log(' --prefix Match by token prefix (e.g., "--slds-g-color-accent-")');
|
|
92
|
+
console.log(' --category Filter by category (e.g., "color", "spacing", "font")');
|
|
93
|
+
console.log(' --property Filter by CSS property (e.g., "background-color")');
|
|
94
|
+
console.log(' --value Find hook by CSS value (e.g., "#0176d3")');
|
|
95
|
+
console.log(' --search Search token names (e.g., "accent")');
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let results = hooks;
|
|
100
|
+
|
|
101
|
+
if (flags.prefix) {
|
|
102
|
+
const prefix = flags.prefix.toLowerCase();
|
|
103
|
+
results = results.filter(h => h.token.toLowerCase().startsWith(prefix));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (flags.search) {
|
|
107
|
+
const term = flags.search.toLowerCase();
|
|
108
|
+
results = results.filter(h => h.token.toLowerCase().includes(term));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (flags.category) {
|
|
112
|
+
const cat = flags.category.toLowerCase();
|
|
113
|
+
results = results.filter(h => (h.category || '').toLowerCase() === cat);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (flags.property) {
|
|
117
|
+
results = results.filter(h => matchesProperty(h, [flags.property]));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (flags.value) {
|
|
121
|
+
results = results.filter(h => matchesValue(h, flags.value));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (results.length === 0) {
|
|
125
|
+
console.log('No hooks found matching your criteria.');
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
console.log(`\nFound ${results.length} hook(s):\n`);
|
|
130
|
+
for (const hook of results.slice(0, 50)) {
|
|
131
|
+
console.log(formatHook(hook));
|
|
132
|
+
console.log();
|
|
133
|
+
}
|
|
134
|
+
if (results.length > 50) {
|
|
135
|
+
console.log(`... and ${results.length - 50} more. Narrow your search.`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
run();
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Search SLDS icons with synonym matching and relevance scoring.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node search-icons.js --query "save button"
|
|
8
|
+
* node search-icons.js --query "user" --category "standard"
|
|
9
|
+
* node search-icons.js --query "delete" --limit 20
|
|
10
|
+
* node search-icons.js --list-categories
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
const ICONS_PATH = path.join(__dirname, '..', 'metadata', 'icon-metadata.json');
|
|
17
|
+
|
|
18
|
+
function loadIcons() {
|
|
19
|
+
if (!fs.existsSync(ICONS_PATH)) {
|
|
20
|
+
console.error(`Icon metadata not found: ${ICONS_PATH}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
const data = JSON.parse(fs.readFileSync(ICONS_PATH, 'utf8'));
|
|
24
|
+
const icons = [];
|
|
25
|
+
for (const [key, icon] of Object.entries(data.icons || {})) {
|
|
26
|
+
icons.push({
|
|
27
|
+
symbol: key,
|
|
28
|
+
displayName: icon.displayName || key,
|
|
29
|
+
category: icon.category || 'unknown',
|
|
30
|
+
description: icon.description || '',
|
|
31
|
+
synonyms: icon.synonyms || [],
|
|
32
|
+
fullName: `${icon.category}:${key}`,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return icons;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function tokenize(query) {
|
|
39
|
+
return query.toLowerCase().split(/[\s_-]+/).filter(t => t.length > 0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function scoreIcon(icon, query, tokens) {
|
|
43
|
+
let score = 0;
|
|
44
|
+
let matchType = 'partial';
|
|
45
|
+
const matchedTerms = [];
|
|
46
|
+
const sym = icon.symbol.toLowerCase();
|
|
47
|
+
const syns = icon.synonyms.map(s => s.toLowerCase());
|
|
48
|
+
const desc = icon.description.toLowerCase();
|
|
49
|
+
|
|
50
|
+
if (sym === query) {
|
|
51
|
+
score = 100; matchType = 'exact'; matchedTerms.push(icon.symbol);
|
|
52
|
+
} else if (syns.includes(query)) {
|
|
53
|
+
score = 95; matchType = 'synonym'; matchedTerms.push(...icon.synonyms.filter(s => s.toLowerCase() === query));
|
|
54
|
+
} else if (sym.startsWith(query)) {
|
|
55
|
+
score = 85; matchType = 'partial'; matchedTerms.push(icon.symbol);
|
|
56
|
+
} else if (syns.some(s => s.startsWith(query))) {
|
|
57
|
+
score = 80; matchType = 'synonym'; matchedTerms.push(...icon.synonyms.filter(s => s.toLowerCase().startsWith(query)));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (score < 80 && sym.includes(query)) {
|
|
61
|
+
score = Math.max(score, 70); matchedTerms.push(icon.symbol);
|
|
62
|
+
}
|
|
63
|
+
const partialSyns = icon.synonyms.filter(s => s.toLowerCase().includes(query));
|
|
64
|
+
if (partialSyns.length > 0) {
|
|
65
|
+
score = Math.max(score, 65); matchedTerms.push(...partialSyns);
|
|
66
|
+
if (matchType === 'partial' && score === 65) matchType = 'synonym';
|
|
67
|
+
}
|
|
68
|
+
if (desc.includes(query)) {
|
|
69
|
+
score = Math.max(score, 55);
|
|
70
|
+
if (matchType === 'partial' && score === 55) matchType = 'contextual';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (tokens.length > 1) {
|
|
74
|
+
let tokenScore = 0;
|
|
75
|
+
let matched = 0;
|
|
76
|
+
for (const token of tokens) {
|
|
77
|
+
let hit = false;
|
|
78
|
+
if (sym.includes(token)) { tokenScore += 30; hit = true; matchedTerms.push(icon.symbol); }
|
|
79
|
+
const synHits = icon.synonyms.filter(s => s.toLowerCase().includes(token));
|
|
80
|
+
if (synHits.length) { tokenScore += 25; hit = true; matchedTerms.push(...synHits); }
|
|
81
|
+
if (desc.includes(token)) { tokenScore += 10; hit = true; }
|
|
82
|
+
if (hit) matched++;
|
|
83
|
+
}
|
|
84
|
+
if (matched > 1) tokenScore *= 1.2;
|
|
85
|
+
if (tokenScore > score) { score = tokenScore; matchType = matched > 0 ? 'synonym' : 'contextual'; }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return { icon, score: Math.round(score), matchType, matchedTerms: [...new Set(matchedTerms)] };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function usageExample(fullName, category) {
|
|
92
|
+
const altText = 'TODO: describe what this icon communicates';
|
|
93
|
+
switch (category) {
|
|
94
|
+
case 'action':
|
|
95
|
+
return `<lightning-button-icon icon-name="${fullName}" alternative-text="${altText}" title="TODO: tooltip"></lightning-button-icon>`;
|
|
96
|
+
case 'utility':
|
|
97
|
+
return `<lightning-icon icon-name="${fullName}" alternative-text="${altText}" size="small"></lightning-icon>`;
|
|
98
|
+
case 'standard':
|
|
99
|
+
case 'custom':
|
|
100
|
+
return `<lightning-icon icon-name="${fullName}" alternative-text="${altText}" size="medium"></lightning-icon>`;
|
|
101
|
+
case 'doctype':
|
|
102
|
+
return `<lightning-icon icon-name="${fullName}" alternative-text="${altText}" size="small"></lightning-icon>`;
|
|
103
|
+
default:
|
|
104
|
+
return `<lightning-icon icon-name="${fullName}" alternative-text="${altText}"></lightning-icon>`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function run() {
|
|
109
|
+
const args = process.argv.slice(2);
|
|
110
|
+
const flags = {};
|
|
111
|
+
for (let i = 0; i < args.length; i++) {
|
|
112
|
+
if (args[i] === '--list-categories') { flags.listCategories = true; continue; }
|
|
113
|
+
if (args[i].startsWith('--') && i + 1 < args.length) {
|
|
114
|
+
flags[args[i].slice(2)] = args[i + 1]; i++;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const icons = loadIcons();
|
|
119
|
+
|
|
120
|
+
if (flags.listCategories) {
|
|
121
|
+
const cats = {};
|
|
122
|
+
for (const icon of icons) {
|
|
123
|
+
cats[icon.category] = (cats[icon.category] || 0) + 1;
|
|
124
|
+
}
|
|
125
|
+
console.log('\nIcon categories:');
|
|
126
|
+
for (const [cat, count] of Object.entries(cats).sort()) {
|
|
127
|
+
console.log(` ${cat.padEnd(12)} ${count} icons`);
|
|
128
|
+
}
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (!flags.query) {
|
|
133
|
+
console.log('Usage: node search-icons.js --query "search term" [--category action|utility|standard|custom|doctype] [--limit N]');
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const query = flags.query.toLowerCase().trim();
|
|
138
|
+
const limit = parseInt(flags.limit) || 10;
|
|
139
|
+
const tokens = tokenize(query);
|
|
140
|
+
|
|
141
|
+
let searchable = icons;
|
|
142
|
+
if (flags.category) {
|
|
143
|
+
const cat = flags.category.toLowerCase();
|
|
144
|
+
searchable = searchable.filter(i => i.category === cat);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const results = searchable
|
|
148
|
+
.map(icon => scoreIcon(icon, query, tokens))
|
|
149
|
+
.filter(r => r.score > 0)
|
|
150
|
+
.sort((a, b) => b.score - a.score || a.icon.symbol.localeCompare(b.icon.symbol))
|
|
151
|
+
.slice(0, limit);
|
|
152
|
+
|
|
153
|
+
if (results.length === 0) {
|
|
154
|
+
console.log(`No icons found for "${flags.query}".`);
|
|
155
|
+
const suggestions = icons
|
|
156
|
+
.filter(i => i.symbol.startsWith(query.slice(0, 3)))
|
|
157
|
+
.slice(0, 5)
|
|
158
|
+
.map(i => i.symbol);
|
|
159
|
+
if (suggestions.length) console.log(`Try: ${suggestions.join(', ')}`);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
console.log(`\nFound ${results.length} icon(s) for "${flags.query}":\n`);
|
|
164
|
+
for (const r of results) {
|
|
165
|
+
const { icon, score, matchType, matchedTerms } = r;
|
|
166
|
+
console.log(` ${icon.fullName.padEnd(35)} score: ${score} match: ${matchType}`);
|
|
167
|
+
if (matchedTerms.length) console.log(` matched: ${matchedTerms.join(', ')}`);
|
|
168
|
+
console.log(` ${icon.description.slice(0, 80)}`);
|
|
169
|
+
console.log(` LWC: ${usageExample(icon.fullName, icon.category)}`);
|
|
170
|
+
console.log();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
run();
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Search SLDS utility classes metadata.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node search-utilities.js --category "all" # list all categories
|
|
8
|
+
* node search-utilities.js --category "grid" # browse category
|
|
9
|
+
* node search-utilities.js --search "slds-m-bottom" # search by class name
|
|
10
|
+
* node search-utilities.js --pattern "slds-p-*" # wildcard pattern
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
const INDEX_PATH = path.join(__dirname, '..', 'metadata', 'utilities-index.json');
|
|
17
|
+
const GUIDANCE_DIR = path.join(__dirname, '..', 'guidance', 'utilities');
|
|
18
|
+
|
|
19
|
+
function loadUtilities() {
|
|
20
|
+
if (!fs.existsSync(INDEX_PATH)) {
|
|
21
|
+
console.error(`Utilities index not found: ${INDEX_PATH}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
const data = JSON.parse(fs.readFileSync(INDEX_PATH, 'utf8'));
|
|
25
|
+
return {
|
|
26
|
+
utilities: data.utilities || [],
|
|
27
|
+
categories: data.categories || {},
|
|
28
|
+
total: data.total_utilities || 0,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function formatUtility(u) {
|
|
33
|
+
const parts = [` ${u.class}`];
|
|
34
|
+
if (u.category) parts.push(` category: ${u.category}`);
|
|
35
|
+
if (u.description) parts.push(` description: ${u.description}`);
|
|
36
|
+
if (u.css) {
|
|
37
|
+
const rules = Object.entries(u.css).map(([prop, val]) => `${prop}: ${val}`).join('; ');
|
|
38
|
+
parts.push(` css: ${rules}`);
|
|
39
|
+
}
|
|
40
|
+
if (u.css_rules && u.css_rules.length) {
|
|
41
|
+
parts.push(` css: ${u.css_rules.join('; ')}`);
|
|
42
|
+
}
|
|
43
|
+
return parts.join('\n');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function run() {
|
|
47
|
+
const args = process.argv.slice(2);
|
|
48
|
+
const flags = {};
|
|
49
|
+
for (let i = 0; i < args.length; i++) {
|
|
50
|
+
if (args[i].startsWith('--') && i + 1 < args.length) {
|
|
51
|
+
flags[args[i].slice(2)] = args[i + 1]; i++;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const { utilities, categories, total } = loadUtilities();
|
|
56
|
+
|
|
57
|
+
if (Object.keys(flags).length === 0) {
|
|
58
|
+
console.log(`\nSLDS Utility Classes: ${total} total across ${Object.keys(categories).length} categories\n`);
|
|
59
|
+
console.log('Usage:');
|
|
60
|
+
console.log(' --category "all" List all categories with counts');
|
|
61
|
+
console.log(' --category "grid" Show utilities in a specific category');
|
|
62
|
+
console.log(' --search "slds-m-" Search by class name or description');
|
|
63
|
+
console.log(' --pattern "slds-p-*" Wildcard pattern match');
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (flags.category) {
|
|
68
|
+
if (flags.category === 'all') {
|
|
69
|
+
console.log(`\nAll utility categories (${Object.keys(categories).length}):\n`);
|
|
70
|
+
for (const [cat, count] of Object.entries(categories).sort()) {
|
|
71
|
+
const guidePath = path.join(GUIDANCE_DIR, `${cat}.md`);
|
|
72
|
+
const hasGuide = fs.existsSync(guidePath) ? ' (has guidance)' : '';
|
|
73
|
+
console.log(` ${cat.padEnd(20)} ${String(count).padStart(4)} classes${hasGuide}`);
|
|
74
|
+
}
|
|
75
|
+
console.log(`\nTotal: ${total} utility classes`);
|
|
76
|
+
console.log('\nUse --category "<name>" to browse a specific category.');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const catKey = flags.category.toLowerCase().replace(/\s+/g, '-');
|
|
81
|
+
const catUtilities = utilities.filter(u => {
|
|
82
|
+
const uCat = (u.category_key || u.category || '').toLowerCase().replace(/\s+/g, '-');
|
|
83
|
+
return uCat === catKey;
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
if (catUtilities.length === 0) {
|
|
87
|
+
console.log(`Category "${flags.category}" not found or empty.`);
|
|
88
|
+
console.log(`Available: ${Object.keys(categories).join(', ')}`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.log(`\n── ${flags.category} (${catUtilities.length} classes) ──\n`);
|
|
93
|
+
for (const u of catUtilities.slice(0, 30)) {
|
|
94
|
+
console.log(formatUtility(u));
|
|
95
|
+
console.log();
|
|
96
|
+
}
|
|
97
|
+
if (catUtilities.length > 30) {
|
|
98
|
+
console.log(`... and ${catUtilities.length - 30} more. Use --search to narrow.`);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const guidePath = path.join(GUIDANCE_DIR, `${catKey}.md`);
|
|
102
|
+
if (fs.existsSync(guidePath)) {
|
|
103
|
+
console.log(`\nDetailed guidance: guidance/utilities/${catKey}.md`);
|
|
104
|
+
}
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (flags.pattern) {
|
|
109
|
+
const regex = new RegExp('^' + flags.pattern.toLowerCase().replace(/\*/g, '.*') + '$');
|
|
110
|
+
const matches = utilities.filter(u => regex.test((u.class || '').toLowerCase()));
|
|
111
|
+
|
|
112
|
+
if (matches.length === 0) {
|
|
113
|
+
console.log(`No utilities matching pattern "${flags.pattern}".`);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
console.log(`\nFound ${matches.length} utility(ies) matching "${flags.pattern}":\n`);
|
|
118
|
+
for (const u of matches.slice(0, 50)) {
|
|
119
|
+
console.log(formatUtility(u));
|
|
120
|
+
console.log();
|
|
121
|
+
}
|
|
122
|
+
if (matches.length > 50) {
|
|
123
|
+
console.log(`... and ${matches.length - 50} more.`);
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (flags.search) {
|
|
129
|
+
const term = flags.search.toLowerCase();
|
|
130
|
+
|
|
131
|
+
const exact = utilities.find(u => (u.class || '').toLowerCase() === term);
|
|
132
|
+
if (exact) {
|
|
133
|
+
console.log(`\nExact match:\n`);
|
|
134
|
+
console.log(formatUtility(exact));
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const matches = utilities.filter(u =>
|
|
139
|
+
(u.class || '').toLowerCase().includes(term) ||
|
|
140
|
+
(u.description || '').toLowerCase().includes(term)
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
if (matches.length === 0) {
|
|
144
|
+
console.log(`No utilities found for "${flags.search}".`);
|
|
145
|
+
console.log('Use --category "all" to browse available categories.');
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
console.log(`\nFound ${matches.length} utility(ies) for "${flags.search}":\n`);
|
|
150
|
+
for (const u of matches.slice(0, 30)) {
|
|
151
|
+
console.log(formatUtility(u));
|
|
152
|
+
console.log();
|
|
153
|
+
}
|
|
154
|
+
if (matches.length > 30) {
|
|
155
|
+
console.log(`... and ${matches.length - 30} more.`);
|
|
156
|
+
}
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
run();
|