@goldencomm/create-baseline 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/index.mjs +296 -0
- package/package.json +44 -0
- package/templates/next/.claude/skills/ai-elements/SKILL.md +160 -0
- package/templates/next/.claude/skills/ai-elements/references/agent.md +134 -0
- package/templates/next/.claude/skills/ai-elements/references/artifact.md +84 -0
- package/templates/next/.claude/skills/ai-elements/references/attachments.md +190 -0
- package/templates/next/.claude/skills/ai-elements/references/audio-player.md +134 -0
- package/templates/next/.claude/skills/ai-elements/references/canvas.md +34 -0
- package/templates/next/.claude/skills/ai-elements/references/chain-of-thought.md +81 -0
- package/templates/next/.claude/skills/ai-elements/references/checkpoint.md +183 -0
- package/templates/next/.claude/skills/ai-elements/references/code-block.md +170 -0
- package/templates/next/.claude/skills/ai-elements/references/commit.md +177 -0
- package/templates/next/.claude/skills/ai-elements/references/confirmation.md +262 -0
- package/templates/next/.claude/skills/ai-elements/references/connection.md +34 -0
- package/templates/next/.claude/skills/ai-elements/references/context.md +126 -0
- package/templates/next/.claude/skills/ai-elements/references/controls.md +32 -0
- package/templates/next/.claude/skills/ai-elements/references/conversation.md +224 -0
- package/templates/next/.claude/skills/ai-elements/references/edge.md +52 -0
- package/templates/next/.claude/skills/ai-elements/references/environment-variables.md +102 -0
- package/templates/next/.claude/skills/ai-elements/references/file-tree.md +72 -0
- package/templates/next/.claude/skills/ai-elements/references/image.md +146 -0
- package/templates/next/.claude/skills/ai-elements/references/inline-citation.md +299 -0
- package/templates/next/.claude/skills/ai-elements/references/jsx-preview.md +104 -0
- package/templates/next/.claude/skills/ai-elements/references/message.md +237 -0
- package/templates/next/.claude/skills/ai-elements/references/mic-selector.md +189 -0
- package/templates/next/.claude/skills/ai-elements/references/model-selector.md +112 -0
- package/templates/next/.claude/skills/ai-elements/references/node.md +73 -0
- package/templates/next/.claude/skills/ai-elements/references/open-in-chat.md +67 -0
- package/templates/next/.claude/skills/ai-elements/references/package-info.md +95 -0
- package/templates/next/.claude/skills/ai-elements/references/panel.md +33 -0
- package/templates/next/.claude/skills/ai-elements/references/persona.md +166 -0
- package/templates/next/.claude/skills/ai-elements/references/plan.md +79 -0
- package/templates/next/.claude/skills/ai-elements/references/prompt-input.md +579 -0
- package/templates/next/.claude/skills/ai-elements/references/queue.md +172 -0
- package/templates/next/.claude/skills/ai-elements/references/reasoning.md +238 -0
- package/templates/next/.claude/skills/ai-elements/references/sandbox.md +129 -0
- package/templates/next/.claude/skills/ai-elements/references/schema-display.md +102 -0
- package/templates/next/.claude/skills/ai-elements/references/shimmer.md +48 -0
- package/templates/next/.claude/skills/ai-elements/references/snippet.md +64 -0
- package/templates/next/.claude/skills/ai-elements/references/sources.md +209 -0
- package/templates/next/.claude/skills/ai-elements/references/speech-input.md +163 -0
- package/templates/next/.claude/skills/ai-elements/references/stack-trace.md +224 -0
- package/templates/next/.claude/skills/ai-elements/references/suggestion.md +124 -0
- package/templates/next/.claude/skills/ai-elements/references/task.md +222 -0
- package/templates/next/.claude/skills/ai-elements/references/terminal.md +103 -0
- package/templates/next/.claude/skills/ai-elements/references/test-results.md +157 -0
- package/templates/next/.claude/skills/ai-elements/references/tool.md +285 -0
- package/templates/next/.claude/skills/ai-elements/references/toolbar.md +32 -0
- package/templates/next/.claude/skills/ai-elements/references/transcription.md +120 -0
- package/templates/next/.claude/skills/ai-elements/references/voice-selector.md +241 -0
- package/templates/next/.claude/skills/ai-elements/references/web-preview.md +200 -0
- package/templates/next/.claude/skills/ai-elements/scripts/agent.tsx +61 -0
- package/templates/next/.claude/skills/ai-elements/scripts/artifact.tsx +127 -0
- package/templates/next/.claude/skills/ai-elements/scripts/attachments-inline.tsx +128 -0
- package/templates/next/.claude/skills/ai-elements/scripts/attachments-list.tsx +95 -0
- package/templates/next/.claude/skills/ai-elements/scripts/attachments.tsx +85 -0
- package/templates/next/.claude/skills/ai-elements/scripts/audio-player-remote.tsx +35 -0
- package/templates/next/.claude/skills/ai-elements/scripts/audio-player.tsx +68 -0
- package/templates/next/.claude/skills/ai-elements/scripts/chain-of-thought.tsx +82 -0
- package/templates/next/.claude/skills/ai-elements/scripts/checkpoint.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/code-block-dark.tsx +46 -0
- package/templates/next/.claude/skills/ai-elements/scripts/code-block.tsx +120 -0
- package/templates/next/.claude/skills/ai-elements/scripts/commit.tsx +94 -0
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation-accepted.tsx +40 -0
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation-rejected.tsx +40 -0
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation-request.tsx +54 -0
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation.tsx +55 -0
- package/templates/next/.claude/skills/ai-elements/scripts/context.tsx +45 -0
- package/templates/next/.claude/skills/ai-elements/scripts/conversation.tsx +177 -0
- package/templates/next/.claude/skills/ai-elements/scripts/environment-variables.tsx +62 -0
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree-basic.tsx +18 -0
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree-expanded.tsx +21 -0
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree-selection.tsx +24 -0
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree.tsx +42 -0
- package/templates/next/.claude/skills/ai-elements/scripts/image.tsx +20 -0
- package/templates/next/.claude/skills/ai-elements/scripts/inline-citation.tsx +97 -0
- package/templates/next/.claude/skills/ai-elements/scripts/jsx-preview.tsx +104 -0
- package/templates/next/.claude/skills/ai-elements/scripts/message.tsx +365 -0
- package/templates/next/.claude/skills/ai-elements/scripts/mic-selector.tsx +49 -0
- package/templates/next/.claude/skills/ai-elements/scripts/model-selector.tsx +365 -0
- package/templates/next/.claude/skills/ai-elements/scripts/open-in-chat.tsx +33 -0
- package/templates/next/.claude/skills/ai-elements/scripts/package-info.tsx +51 -0
- package/templates/next/.claude/skills/ai-elements/scripts/persona-command.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/persona-glint.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/persona-halo.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/persona-mana.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/persona-obsidian.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/persona-opal.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/plan.tsx +65 -0
- package/templates/next/.claude/skills/ai-elements/scripts/prompt-input-cursor.tsx +502 -0
- package/templates/next/.claude/skills/ai-elements/scripts/prompt-input-tooltip.tsx +44 -0
- package/templates/next/.claude/skills/ai-elements/scripts/prompt-input.tsx +267 -0
- package/templates/next/.claude/skills/ai-elements/scripts/queue-prompt-input.tsx +394 -0
- package/templates/next/.claude/skills/ai-elements/scripts/queue.tsx +295 -0
- package/templates/next/.claude/skills/ai-elements/scripts/reasoning.tsx +71 -0
- package/templates/next/.claude/skills/ai-elements/scripts/sandbox.tsx +178 -0
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-basic.tsx +9 -0
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-body.tsx +20 -0
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-nested.tsx +23 -0
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-params.tsx +16 -0
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display.tsx +110 -0
- package/templates/next/.claude/skills/ai-elements/scripts/shimmer-duration.tsx +31 -0
- package/templates/next/.claude/skills/ai-elements/scripts/shimmer-elements.tsx +43 -0
- package/templates/next/.claude/skills/ai-elements/scripts/shimmer.tsx +17 -0
- package/templates/next/.claude/skills/ai-elements/scripts/snippet-plain.tsx +19 -0
- package/templates/next/.claude/skills/ai-elements/scripts/snippet.tsx +25 -0
- package/templates/next/.claude/skills/ai-elements/scripts/sources-custom.tsx +39 -0
- package/templates/next/.claude/skills/ai-elements/scripts/sources.tsx +32 -0
- package/templates/next/.claude/skills/ai-elements/scripts/speech-input.tsx +84 -0
- package/templates/next/.claude/skills/ai-elements/scripts/stack-trace-collapsed.tsx +39 -0
- package/templates/next/.claude/skills/ai-elements/scripts/stack-trace-no-internal.tsx +41 -0
- package/templates/next/.claude/skills/ai-elements/scripts/stack-trace.tsx +58 -0
- package/templates/next/.claude/skills/ai-elements/scripts/suggestion-input.tsx +144 -0
- package/templates/next/.claude/skills/ai-elements/scripts/suggestion.tsx +32 -0
- package/templates/next/.claude/skills/ai-elements/scripts/task.tsx +59 -0
- package/templates/next/.claude/skills/ai-elements/scripts/terminal-basic.tsx +7 -0
- package/templates/next/.claude/skills/ai-elements/scripts/terminal-clear.tsx +19 -0
- package/templates/next/.claude/skills/ai-elements/scripts/terminal-streaming.tsx +38 -0
- package/templates/next/.claude/skills/ai-elements/scripts/terminal.tsx +82 -0
- package/templates/next/.claude/skills/ai-elements/scripts/test-results-basic.tsx +27 -0
- package/templates/next/.claude/skills/ai-elements/scripts/test-results-errors.tsx +51 -0
- package/templates/next/.claude/skills/ai-elements/scripts/test-results-suites.tsx +40 -0
- package/templates/next/.claude/skills/ai-elements/scripts/test-results.tsx +102 -0
- package/templates/next/.claude/skills/ai-elements/scripts/tool-input-available.tsx +31 -0
- package/templates/next/.claude/skills/ai-elements/scripts/tool-input-streaming.tsx +30 -0
- package/templates/next/.claude/skills/ai-elements/scripts/tool-output-available.tsx +80 -0
- package/templates/next/.claude/skills/ai-elements/scripts/tool-output-error.tsx +44 -0
- package/templates/next/.claude/skills/ai-elements/scripts/tool.tsx +222 -0
- package/templates/next/.claude/skills/ai-elements/scripts/transcription.tsx +290 -0
- package/templates/next/.claude/skills/ai-elements/scripts/voice-selector.tsx +245 -0
- package/templates/next/.claude/skills/ai-elements/scripts/web-preview.tsx +115 -0
- package/templates/next/.claude/skills/ai-sdk/SKILL.md +78 -0
- package/templates/next/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/templates/next/.claude/skills/frontend-design/SKILL.md +55 -0
- package/templates/next/.claude/skills/gc-implement-figma-page/SKILL.md +93 -0
- package/templates/next/.claude/skills/migrate-ai-sdk-v6-to-v7/SKILL.md +108 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/AGENTS.md +946 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/README.md +60 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/SKILL.md +89 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/metadata.json +11 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/_sections.md +29 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/_template.md +24 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/AGENTS.md +3810 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/README.md +123 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/SKILL.md +149 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/metadata.json +15 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/_sections.md +46 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/_template.md +28 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +82 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-analyzable-paths.md +63 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +60 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-request-idle-callback.md +105 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-hoist-static-io.md +149 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-no-shared-module-state.md +50 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/templates/next/.claude/skills/web-design-guidelines/SKILL.md +39 -0
- package/templates/next/CLAUDE.md +42 -0
- package/templates/next/README.md +30 -0
- package/templates/next/_gitignore +4 -0
- package/templates/next/app/globals.css +13 -0
- package/templates/next/app/layout.tsx +44 -0
- package/templates/next/app/page.tsx +30 -0
- package/templates/next/globals.d.ts +8 -0
- package/templates/next/next.config.mjs +6 -0
- package/templates/next/package.json +38 -0
- package/templates/next/postcss.config.mjs +5 -0
- package/templates/next/skills-lock.json +47 -0
- package/templates/next/tsconfig.json +36 -0
- package/templates/shopify-theme/.claude/skills/gc-shopify-block/SKILL.md +44 -0
- package/templates/shopify-theme/.claude/skills/shopify-dev/SKILL.md +51 -0
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/log_skill_use.mjs +205 -0
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/search_docs.mjs +272 -0
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/track-telemetry.ps1 +361 -0
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/track-telemetry.sh +527 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/SKILL.md +343 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/blocks/hero-slide.liquid +342 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/config/settings_schema.json +1 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/featured-collection.liquid +457 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/locales/en.default.json +10 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/locales/en.default.schema.json +103 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/package.json +10 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/search_docs.mjs +759 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/track-telemetry.ps1 +361 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/track-telemetry.sh +527 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/validate.mjs +654 -0
- package/templates/shopify-theme/.claude/skills/shopify-liquid/sections/hero-banner.liquid +329 -0
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/SKILL.md +165 -0
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/scripts/log_skill_use.mjs +205 -0
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/scripts/track-telemetry.ps1 +361 -0
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/scripts/track-telemetry.sh +527 -0
- package/templates/shopify-theme/.shopifyignore +9 -0
- package/templates/shopify-theme/CLAUDE.md +51 -0
- package/templates/shopify-theme/README.md +92 -0
- package/templates/shopify-theme/assets/baseline.css +8390 -0
- package/templates/shopify-theme/assets/swiper-element-bundle.min.js +14 -0
- package/templates/shopify-theme/blocks/_accordion.liquid +59 -0
- package/templates/shopify-theme/blocks/_carousel-slide.liquid +24 -0
- package/templates/shopify-theme/blocks/_modal-body.liquid +18 -0
- package/templates/shopify-theme/blocks/_modal-footer.liquid +36 -0
- package/templates/shopify-theme/blocks/_modal-header.liquid +19 -0
- package/templates/shopify-theme/blocks/_modal-media.liquid +37 -0
- package/templates/shopify-theme/blocks/accordion-group.liquid +53 -0
- package/templates/shopify-theme/blocks/alert.liquid +92 -0
- package/templates/shopify-theme/blocks/avatar-group.liquid +51 -0
- package/templates/shopify-theme/blocks/avatar.liquid +56 -0
- package/templates/shopify-theme/blocks/badge.liquid +33 -0
- package/templates/shopify-theme/blocks/breadcrumb.liquid +45 -0
- package/templates/shopify-theme/blocks/button.liquid +51 -0
- package/templates/shopify-theme/blocks/buttons.liquid +41 -0
- package/templates/shopify-theme/blocks/card.liquid +67 -0
- package/templates/shopify-theme/blocks/carousel.liquid +55 -0
- package/templates/shopify-theme/blocks/column.liquid +33 -0
- package/templates/shopify-theme/blocks/image.liquid +37 -0
- package/templates/shopify-theme/blocks/modal.liquid +52 -0
- package/templates/shopify-theme/blocks/popover.liquid +24 -0
- package/templates/shopify-theme/blocks/skeleton.liquid +22 -0
- package/templates/shopify-theme/blocks/spinner.liquid +22 -0
- package/templates/shopify-theme/blocks/split.liquid +39 -0
- package/templates/shopify-theme/blocks/tab.liquid +19 -0
- package/templates/shopify-theme/blocks/tabs.liquid +78 -0
- package/templates/shopify-theme/blocks/tags.liquid +55 -0
- package/templates/shopify-theme/blocks/text.liquid +55 -0
- package/templates/shopify-theme/blocks/tooltip.liquid +50 -0
- package/templates/shopify-theme/blocks/typography.liquid +90 -0
- package/templates/shopify-theme/config/settings_data.json +4 -0
- package/templates/shopify-theme/config/settings_schema.json +10 -0
- package/templates/shopify-theme/layout/theme.liquid +21 -0
- package/templates/shopify-theme/locales/en.default.json +5 -0
- package/templates/shopify-theme/locales/en.default.schema.json +131 -0
- package/templates/shopify-theme/package.json +21 -0
- package/templates/shopify-theme/scripts/sync-tokens.mjs +32 -0
- package/templates/shopify-theme/sections/baseline-components.liquid +81 -0
- package/templates/shopify-theme/skills-lock.json +23 -0
- package/templates/shopify-theme/snippets/lucide.liquid +34 -0
- package/templates/shopify-theme/snippets/pagination.liquid +44 -0
- package/templates/shopify-theme/templates/collection.json +13 -0
- package/templates/shopify-theme/templates/gift_card.liquid +5 -0
- package/templates/shopify-theme/templates/index.json +135 -0
- package/templates/shopify-theme/templates/list-collections.json +13 -0
- package/templates/shopify-theme/templates/product.json +13 -0
- package/templates/wordpress/.claude/CLAUDE.md +37 -0
- package/templates/wordpress/.claude/skills/wp-block-development/SKILL.md +174 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/attributes-and-serialization.md +22 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/block-json.md +49 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/creating-new-blocks.md +46 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/debugging.md +36 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/deprecations.md +24 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/dynamic-rendering.md +23 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/inner-blocks.md +25 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/registration.md +30 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/supports-and-wrappers.md +18 -0
- package/templates/wordpress/.claude/skills/wp-block-development/references/tooling-and-testing.md +21 -0
- package/templates/wordpress/.claude/skills/wp-block-development/scripts/list_blocks.mjs +121 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/SKILL.md +116 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/references/creating-new-block-theme.md +37 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/references/debugging.md +24 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/references/patterns.md +18 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/references/style-variations.md +14 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/references/templates-and-parts.md +16 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/references/theme-json.md +59 -0
- package/templates/wordpress/.claude/skills/wp-block-themes/scripts/detect_block_themes.mjs +117 -0
- package/templates/wordpress/.claude/skills/wp-performance/SKILL.md +146 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/autoload-options.md +24 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/cron.md +20 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/database.md +20 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/http-api.md +15 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/measurement.md +21 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/object-cache.md +24 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/query-monitor-headless.md +38 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/server-timing.md +22 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/wp-cli-doctor.md +24 -0
- package/templates/wordpress/.claude/skills/wp-performance/references/wp-cli-profile.md +32 -0
- package/templates/wordpress/.claude/skills/wp-performance/scripts/perf_inspect.mjs +128 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/SKILL.md +112 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/data-and-cron.md +19 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/debugging.md +19 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/lifecycle.md +33 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/security.md +29 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/settings-api.md +22 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/structure.md +16 -0
- package/templates/wordpress/.claude/skills/wp-plugin-development/scripts/detect_plugins.mjs +122 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/SKILL.md +114 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/references/authentication.md +18 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/references/custom-content-types.md +20 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/references/discovery-and-params.md +20 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/references/responses-and-fields.md +30 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/references/routes-and-endpoints.md +36 -0
- package/templates/wordpress/.claude/skills/wp-rest-api/references/schema.md +22 -0
- package/templates/wordpress/.ddev/commands/web/seed +7 -0
- package/templates/wordpress/.ddev/config.yaml +18 -0
- package/templates/wordpress/.ddev/docker-compose.packages.yaml +14 -0
- package/templates/wordpress/.ddev/docker-compose.redis.yaml +11 -0
- package/templates/wordpress/.env.example +33 -0
- package/templates/wordpress/CLAUDE.md +34 -0
- package/templates/wordpress/README.md +45 -0
- package/templates/wordpress/_gitignore +33 -0
- package/templates/wordpress/auth.json.example +18 -0
- package/templates/wordpress/composer.json +91 -0
- package/templates/wordpress/composer.lock +1594 -0
- package/templates/wordpress/package.json +13 -0
- package/templates/wordpress/scripts/seed.sh +64 -0
- package/templates/wordpress/skills-lock.json +35 -0
- package/templates/wordpress/wp-config.php +89 -0
- package/templates/wordpress/wp-content/index.php +2 -0
- package/templates/wordpress/wp-content/mu-plugins/baseline-bootstrap.php +26 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Agent
|
|
2
|
+
|
|
3
|
+
A composable component for displaying AI agent configuration with model, instructions, tools, and output schema.
|
|
4
|
+
|
|
5
|
+
The `Agent` component displays an interface for showing AI agent configuration details. It's designed to represent a configured agent from the AI SDK, showing the agent's model, system instructions, available tools (with expandable input schemas), and output schema.
|
|
6
|
+
|
|
7
|
+
See `scripts/agent.tsx` for this example.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx ai-elements@latest add agent
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage with AI SDK
|
|
16
|
+
|
|
17
|
+
Display an agent's configuration alongside your chat interface. Tools are displayed in an accordion where clicking the description expands to show the input schema.
|
|
18
|
+
|
|
19
|
+
```tsx title="app/page.tsx"
|
|
20
|
+
"use client";
|
|
21
|
+
|
|
22
|
+
import { tool } from "ai";
|
|
23
|
+
import { z } from "zod";
|
|
24
|
+
import {
|
|
25
|
+
Agent,
|
|
26
|
+
AgentContent,
|
|
27
|
+
AgentHeader,
|
|
28
|
+
AgentInstructions,
|
|
29
|
+
AgentOutput,
|
|
30
|
+
AgentTool,
|
|
31
|
+
AgentTools,
|
|
32
|
+
} from "@/components/ai-elements/agent";
|
|
33
|
+
|
|
34
|
+
const webSearch = tool({
|
|
35
|
+
description: "Search the web for information",
|
|
36
|
+
inputSchema: z.object({
|
|
37
|
+
query: z.string().describe("The search query"),
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const readUrl = tool({
|
|
42
|
+
description: "Read and parse content from a URL",
|
|
43
|
+
inputSchema: z.object({
|
|
44
|
+
url: z.string().url().describe("The URL to read"),
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const outputSchema = `z.object({
|
|
49
|
+
sentiment: z.enum(['positive', 'negative', 'neutral']),
|
|
50
|
+
score: z.number(),
|
|
51
|
+
summary: z.string(),
|
|
52
|
+
})`;
|
|
53
|
+
|
|
54
|
+
export default function Page() {
|
|
55
|
+
return (
|
|
56
|
+
<Agent>
|
|
57
|
+
<AgentHeader
|
|
58
|
+
name="Sentiment Analyzer"
|
|
59
|
+
model="anthropic/claude-sonnet-4-5"
|
|
60
|
+
/>
|
|
61
|
+
<AgentContent>
|
|
62
|
+
<AgentInstructions>
|
|
63
|
+
Analyze the sentiment of the provided text and return a structured
|
|
64
|
+
analysis with sentiment classification, confidence score, and summary.
|
|
65
|
+
</AgentInstructions>
|
|
66
|
+
<AgentTools>
|
|
67
|
+
<AgentTool tool={webSearch} value="web_search" />
|
|
68
|
+
<AgentTool tool={readUrl} value="read_url" />
|
|
69
|
+
</AgentTools>
|
|
70
|
+
<AgentOutput schema={outputSchema} />
|
|
71
|
+
</AgentContent>
|
|
72
|
+
</Agent>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Features
|
|
78
|
+
|
|
79
|
+
- Model badge in header
|
|
80
|
+
- Instructions rendered as markdown
|
|
81
|
+
- Tools displayed as accordion items with expandable input schemas
|
|
82
|
+
- Output schema display with syntax highlighting
|
|
83
|
+
- Composable structure for flexible layouts
|
|
84
|
+
- Works with AI SDK `Tool` type
|
|
85
|
+
|
|
86
|
+
## Props
|
|
87
|
+
|
|
88
|
+
### `<Agent />`
|
|
89
|
+
|
|
90
|
+
| Prop | Type | Default | Description |
|
|
91
|
+
|------|------|---------|-------------|
|
|
92
|
+
| `...props` | `React.ComponentProps<` | - | Any props are spread to the root div. |
|
|
93
|
+
|
|
94
|
+
### `<AgentHeader />`
|
|
95
|
+
|
|
96
|
+
| Prop | Type | Default | Description |
|
|
97
|
+
|------|------|---------|-------------|
|
|
98
|
+
| `name` | `string` | Required | The name of the agent. |
|
|
99
|
+
| `model` | `string` | - | The model identifier (e.g. |
|
|
100
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the container div. |
|
|
101
|
+
|
|
102
|
+
### `<AgentContent />`
|
|
103
|
+
|
|
104
|
+
| Prop | Type | Default | Description |
|
|
105
|
+
|------|------|---------|-------------|
|
|
106
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the container div. |
|
|
107
|
+
|
|
108
|
+
### `<AgentInstructions />`
|
|
109
|
+
|
|
110
|
+
| Prop | Type | Default | Description |
|
|
111
|
+
|------|------|---------|-------------|
|
|
112
|
+
| `children` | `string` | Required | The instruction text. |
|
|
113
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the container div. |
|
|
114
|
+
|
|
115
|
+
### `<AgentTools />`
|
|
116
|
+
|
|
117
|
+
| Prop | Type | Default | Description |
|
|
118
|
+
|------|------|---------|-------------|
|
|
119
|
+
| `...props` | `React.ComponentProps<typeof Accordion>` | - | Any other props are spread to the Accordion component. |
|
|
120
|
+
|
|
121
|
+
### `<AgentTool />`
|
|
122
|
+
|
|
123
|
+
| Prop | Type | Default | Description |
|
|
124
|
+
|------|------|---------|-------------|
|
|
125
|
+
| `tool` | `Tool` | Required | The tool object from the AI SDK containing description and inputSchema. |
|
|
126
|
+
| `value` | `string` | Required | Unique identifier for the accordion item. |
|
|
127
|
+
| `...props` | `React.ComponentProps<typeof AccordionItem>` | - | Any other props are spread to the AccordionItem component. |
|
|
128
|
+
|
|
129
|
+
### `<AgentOutput />`
|
|
130
|
+
|
|
131
|
+
| Prop | Type | Default | Description |
|
|
132
|
+
|------|------|---------|-------------|
|
|
133
|
+
| `schema` | `string` | Required | The output schema as a string (displayed with syntax highlighting). |
|
|
134
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the container div. |
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Artifact
|
|
2
|
+
|
|
3
|
+
A container component for displaying generated content like code, documents, or other outputs with built-in actions.
|
|
4
|
+
|
|
5
|
+
The `Artifact` component provides a structured container for displaying generated content like code, documents, or other outputs with built-in header actions.
|
|
6
|
+
|
|
7
|
+
See `scripts/artifact.tsx` for this example.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx ai-elements@latest add artifact
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Structured container with header and content areas
|
|
18
|
+
- Built-in header with title and description support
|
|
19
|
+
- Flexible action buttons with tooltips
|
|
20
|
+
- Customizable styling for all subcomponents
|
|
21
|
+
- Support for close buttons and action groups
|
|
22
|
+
- Clean, modern design with border and shadow
|
|
23
|
+
- Responsive layout that adapts to content
|
|
24
|
+
- TypeScript support with proper type definitions
|
|
25
|
+
- Composable architecture for maximum flexibility
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### With Code Display
|
|
30
|
+
|
|
31
|
+
See `scripts/artifact.tsx` for this example.
|
|
32
|
+
|
|
33
|
+
## Props
|
|
34
|
+
|
|
35
|
+
### `<Artifact />`
|
|
36
|
+
|
|
37
|
+
| Prop | Type | Default | Description |
|
|
38
|
+
|------|------|---------|-------------|
|
|
39
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Any other props are spread to the underlying div element. |
|
|
40
|
+
|
|
41
|
+
### `<ArtifactHeader />`
|
|
42
|
+
|
|
43
|
+
| Prop | Type | Default | Description |
|
|
44
|
+
|------|------|---------|-------------|
|
|
45
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Any other props are spread to the underlying div element. |
|
|
46
|
+
|
|
47
|
+
### `<ArtifactTitle />`
|
|
48
|
+
|
|
49
|
+
| Prop | Type | Default | Description |
|
|
50
|
+
|------|------|---------|-------------|
|
|
51
|
+
| `...props` | `React.HTMLAttributes<HTMLParagraphElement>` | - | Any other props are spread to the underlying paragraph element. |
|
|
52
|
+
|
|
53
|
+
### `<ArtifactDescription />`
|
|
54
|
+
|
|
55
|
+
| Prop | Type | Default | Description |
|
|
56
|
+
|------|------|---------|-------------|
|
|
57
|
+
| `...props` | `React.HTMLAttributes<HTMLParagraphElement>` | - | Any other props are spread to the underlying paragraph element. |
|
|
58
|
+
|
|
59
|
+
### `<ArtifactActions />`
|
|
60
|
+
|
|
61
|
+
| Prop | Type | Default | Description |
|
|
62
|
+
|------|------|---------|-------------|
|
|
63
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Any other props are spread to the underlying div element. |
|
|
64
|
+
|
|
65
|
+
### `<ArtifactAction />`
|
|
66
|
+
|
|
67
|
+
| Prop | Type | Default | Description |
|
|
68
|
+
|------|------|---------|-------------|
|
|
69
|
+
| `tooltip` | `string` | - | Tooltip text to display on hover. |
|
|
70
|
+
| `label` | `string` | - | Screen reader label for the action button. |
|
|
71
|
+
| `icon` | `LucideIcon` | - | Lucide icon component to display in the button. |
|
|
72
|
+
| `...props` | `React.ComponentProps<typeof Button>` | - | Any other props are spread to the underlying shadcn/ui Button component. |
|
|
73
|
+
|
|
74
|
+
### `<ArtifactClose />`
|
|
75
|
+
|
|
76
|
+
| Prop | Type | Default | Description |
|
|
77
|
+
|------|------|---------|-------------|
|
|
78
|
+
| `...props` | `React.ComponentProps<typeof Button>` | - | Any other props are spread to the underlying shadcn/ui Button component. |
|
|
79
|
+
|
|
80
|
+
### `<ArtifactContent />`
|
|
81
|
+
|
|
82
|
+
| Prop | Type | Default | Description |
|
|
83
|
+
|------|------|---------|-------------|
|
|
84
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Any other props are spread to the underlying div element. |
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Attachments
|
|
2
|
+
|
|
3
|
+
A flexible, composable attachment component for displaying files, images, videos, audio, and source documents.
|
|
4
|
+
|
|
5
|
+
The `Attachment` component provides a unified way to display file attachments and source documents with multiple layout variants.
|
|
6
|
+
|
|
7
|
+
See `scripts/attachments.tsx` for this example.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx ai-elements@latest add attachments
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage with AI SDK
|
|
16
|
+
|
|
17
|
+
Display user-uploaded files in chat messages or input areas.
|
|
18
|
+
|
|
19
|
+
```tsx title="app/page.tsx"
|
|
20
|
+
"use client";
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
Attachments,
|
|
24
|
+
Attachment,
|
|
25
|
+
AttachmentPreview,
|
|
26
|
+
AttachmentInfo,
|
|
27
|
+
AttachmentRemove,
|
|
28
|
+
} from "@/components/ai-elements/attachments";
|
|
29
|
+
import type { FileUIPart } from "ai";
|
|
30
|
+
|
|
31
|
+
interface MessageProps {
|
|
32
|
+
attachments: (FileUIPart & { id: string })[];
|
|
33
|
+
onRemove?: (id: string) => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const MessageAttachments = ({ attachments, onRemove }: MessageProps) => (
|
|
37
|
+
<Attachments variant="grid">
|
|
38
|
+
{attachments.map((file) => (
|
|
39
|
+
<Attachment
|
|
40
|
+
key={file.id}
|
|
41
|
+
data={file}
|
|
42
|
+
onRemove={onRemove ? () => onRemove(file.id) : undefined}
|
|
43
|
+
>
|
|
44
|
+
<AttachmentPreview />
|
|
45
|
+
<AttachmentRemove />
|
|
46
|
+
</Attachment>
|
|
47
|
+
))}
|
|
48
|
+
</Attachments>
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export default MessageAttachments;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Features
|
|
55
|
+
|
|
56
|
+
- Three display variants: grid (thumbnails), inline (badges), and list (rows)
|
|
57
|
+
- Supports both FileUIPart and SourceDocumentUIPart from the AI SDK
|
|
58
|
+
- Automatic media type detection (image, video, audio, document, source)
|
|
59
|
+
- Hover card support for inline previews
|
|
60
|
+
- Remove button with customizable callback
|
|
61
|
+
- Composable architecture for maximum flexibility
|
|
62
|
+
- Accessible with proper ARIA labels
|
|
63
|
+
- TypeScript support with exported utility functions
|
|
64
|
+
|
|
65
|
+
## Examples
|
|
66
|
+
|
|
67
|
+
### Grid Variant
|
|
68
|
+
|
|
69
|
+
Best for displaying attachments in messages with visual thumbnails.
|
|
70
|
+
|
|
71
|
+
See `scripts/attachments.tsx` for this example.
|
|
72
|
+
|
|
73
|
+
### Inline Variant
|
|
74
|
+
|
|
75
|
+
Best for compact badge-style display in input areas with hover previews.
|
|
76
|
+
|
|
77
|
+
See `scripts/attachments-inline.tsx` for this example.
|
|
78
|
+
|
|
79
|
+
### List Variant
|
|
80
|
+
|
|
81
|
+
Best for file lists with full metadata display.
|
|
82
|
+
|
|
83
|
+
See `scripts/attachments-list.tsx` for this example.
|
|
84
|
+
|
|
85
|
+
## Props
|
|
86
|
+
|
|
87
|
+
### `<Attachments />`
|
|
88
|
+
|
|
89
|
+
Container component that sets the layout variant.
|
|
90
|
+
|
|
91
|
+
| Prop | Type | Default | Description |
|
|
92
|
+
|------|------|---------|-------------|
|
|
93
|
+
| `variant` | `unknown` | - | The display layout variant. |
|
|
94
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the underlying div element. |
|
|
95
|
+
|
|
96
|
+
### `<Attachment />`
|
|
97
|
+
|
|
98
|
+
Individual attachment item wrapper.
|
|
99
|
+
|
|
100
|
+
| Prop | Type | Default | Description |
|
|
101
|
+
|------|------|---------|-------------|
|
|
102
|
+
| `data` | `unknown` | - | The attachment data (FileUIPart or SourceDocumentUIPart with id). |
|
|
103
|
+
| `onRemove` | `() => void` | - | Callback fired when the remove button is clicked. |
|
|
104
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the underlying div element. |
|
|
105
|
+
|
|
106
|
+
### `<AttachmentPreview />`
|
|
107
|
+
|
|
108
|
+
Displays the media preview (image, video, or icon).
|
|
109
|
+
|
|
110
|
+
| Prop | Type | Default | Description |
|
|
111
|
+
|------|------|---------|-------------|
|
|
112
|
+
| `fallbackIcon` | `React.ReactNode` | - | Custom icon to display when no preview is available. |
|
|
113
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the underlying div element. |
|
|
114
|
+
|
|
115
|
+
### `<AttachmentInfo />`
|
|
116
|
+
|
|
117
|
+
Displays the filename and optional media type.
|
|
118
|
+
|
|
119
|
+
| Prop | Type | Default | Description |
|
|
120
|
+
|------|------|---------|-------------|
|
|
121
|
+
| `showMediaType` | `boolean` | `false` | Whether to show the media type below the filename. |
|
|
122
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the underlying div element. |
|
|
123
|
+
|
|
124
|
+
### `<AttachmentRemove />`
|
|
125
|
+
|
|
126
|
+
Remove button that appears on hover.
|
|
127
|
+
|
|
128
|
+
| Prop | Type | Default | Description |
|
|
129
|
+
|------|------|---------|-------------|
|
|
130
|
+
| `label` | `string` | - | Screen reader label for the button. |
|
|
131
|
+
| `...props` | `React.ComponentProps<typeof Button>` | - | Spread to the underlying Button component. |
|
|
132
|
+
|
|
133
|
+
### `<AttachmentHoverCard />`
|
|
134
|
+
|
|
135
|
+
Wrapper for hover preview functionality.
|
|
136
|
+
|
|
137
|
+
| Prop | Type | Default | Description |
|
|
138
|
+
|------|------|---------|-------------|
|
|
139
|
+
| `openDelay` | `number` | `0` | Delay in ms before opening the hover card. |
|
|
140
|
+
| `closeDelay` | `number` | `0` | Delay in ms before closing the hover card. |
|
|
141
|
+
| `...props` | `React.ComponentProps<typeof HoverCard>` | - | Spread to the underlying HoverCard component. |
|
|
142
|
+
|
|
143
|
+
### `<AttachmentHoverCardTrigger />`
|
|
144
|
+
|
|
145
|
+
Trigger element for the hover card.
|
|
146
|
+
|
|
147
|
+
| Prop | Type | Default | Description |
|
|
148
|
+
|------|------|---------|-------------|
|
|
149
|
+
| `...props` | `React.ComponentProps<typeof HoverCardTrigger>` | - | Spread to the underlying HoverCardTrigger component. |
|
|
150
|
+
|
|
151
|
+
### `<AttachmentHoverCardContent />`
|
|
152
|
+
|
|
153
|
+
Content displayed in the hover card.
|
|
154
|
+
|
|
155
|
+
| Prop | Type | Default | Description |
|
|
156
|
+
|------|------|---------|-------------|
|
|
157
|
+
| `align` | `unknown` | - | Alignment of the hover card content. |
|
|
158
|
+
| `...props` | `React.ComponentProps<typeof HoverCardContent>` | - | Spread to the underlying HoverCardContent component. |
|
|
159
|
+
|
|
160
|
+
### `<AttachmentEmpty />`
|
|
161
|
+
|
|
162
|
+
Empty state component when no attachments are present.
|
|
163
|
+
|
|
164
|
+
| Prop | Type | Default | Description |
|
|
165
|
+
|------|------|---------|-------------|
|
|
166
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Spread to the underlying div element. |
|
|
167
|
+
|
|
168
|
+
## Utility Functions
|
|
169
|
+
|
|
170
|
+
### `getMediaCategory(data)`
|
|
171
|
+
|
|
172
|
+
Returns the media category for an attachment.
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
import { getMediaCategory } from "@/components/ai-elements/attachments";
|
|
176
|
+
|
|
177
|
+
const category = getMediaCategory(attachment);
|
|
178
|
+
// Returns: "image" | "video" | "audio" | "document" | "source" | "unknown"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### `getAttachmentLabel(data)`
|
|
182
|
+
|
|
183
|
+
Returns the display label for an attachment.
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
import { getAttachmentLabel } from "@/components/ai-elements/attachments";
|
|
187
|
+
|
|
188
|
+
const label = getAttachmentLabel(attachment);
|
|
189
|
+
// Returns filename or fallback like "Image" or "Attachment"
|
|
190
|
+
```
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Audio Player
|
|
2
|
+
|
|
3
|
+
A composable audio player component built on media-chrome, with shadcn styling and flexible controls.
|
|
4
|
+
|
|
5
|
+
The `AudioPlayer` component provides a flexible and customizable audio playback interface built on top of media-chrome. It features a composable architecture that allows you to build audio experiences with custom controls, metadata display, and seamless integration with AI-generated audio content.
|
|
6
|
+
|
|
7
|
+
See `scripts/audio-player.tsx` for this example.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx ai-elements@latest add audio-player
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Built on media-chrome for reliable audio playback
|
|
18
|
+
- Fully composable architecture with granular control components
|
|
19
|
+
- ButtonGroup integration for cohesive control layout
|
|
20
|
+
- Individual control components (play, seek, volume, etc.)
|
|
21
|
+
- Flexible layout with customizable control bars
|
|
22
|
+
- CSS custom properties for deep theming
|
|
23
|
+
- Shadcn/ui Button component styling
|
|
24
|
+
- Responsive design that works across devices
|
|
25
|
+
- Full TypeScript support with proper types for all components
|
|
26
|
+
|
|
27
|
+
## Variants
|
|
28
|
+
|
|
29
|
+
### AI SDK Speech Result
|
|
30
|
+
|
|
31
|
+
The `AudioPlayer` component can be used to play audio from an AI SDK Speech Result.
|
|
32
|
+
|
|
33
|
+
See `scripts/audio-player.tsx` for this example.
|
|
34
|
+
|
|
35
|
+
### Remote Audio
|
|
36
|
+
|
|
37
|
+
The `AudioPlayer` component can be used to play remote audio files.
|
|
38
|
+
|
|
39
|
+
See `scripts/audio-player-remote.tsx` for this example.
|
|
40
|
+
|
|
41
|
+
## Props
|
|
42
|
+
|
|
43
|
+
### `<AudioPlayer />`
|
|
44
|
+
|
|
45
|
+
Root MediaController component. Accepts all MediaController props except `audio` (which is set to `true` by default).
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Description |
|
|
48
|
+
|------|------|---------|-------------|
|
|
49
|
+
| `style` | `CSSProperties` | - | Custom CSS properties can be passed to override media-chrome theming variables. |
|
|
50
|
+
| `...props` | `Omit<React.ComponentProps<typeof MediaController>, ` | - | Any other props are spread to the MediaController component. |
|
|
51
|
+
|
|
52
|
+
### `<AudioPlayerElement />`
|
|
53
|
+
|
|
54
|
+
The audio element that contains the media source. Accepts either a remote URL or AI SDK Speech Result data.
|
|
55
|
+
|
|
56
|
+
| Prop | Type | Default | Description |
|
|
57
|
+
|------|------|---------|-------------|
|
|
58
|
+
| `src` | `string` | - | The URL of the audio file to play (for remote audio). |
|
|
59
|
+
| `data` | `SpeechResult[` | - | AI SDK Speech Result audio data with base64 encoding (for AI-generated audio). |
|
|
60
|
+
| `...props` | `Omit<React.ComponentProps<` | - | Any other props are spread to the audio element (excluding src when using data). |
|
|
61
|
+
|
|
62
|
+
### `<AudioPlayerControlBar />`
|
|
63
|
+
|
|
64
|
+
Container for control buttons, wraps children in a ButtonGroup.
|
|
65
|
+
|
|
66
|
+
| Prop | Type | Default | Description |
|
|
67
|
+
|------|------|---------|-------------|
|
|
68
|
+
| `...props` | `React.ComponentProps<typeof MediaControlBar>` | - | Any other props are spread to the MediaControlBar component. |
|
|
69
|
+
|
|
70
|
+
### `<AudioPlayerPlayButton />`
|
|
71
|
+
|
|
72
|
+
Play/pause button wrapped in a shadcn Button component.
|
|
73
|
+
|
|
74
|
+
| Prop | Type | Default | Description |
|
|
75
|
+
|------|------|---------|-------------|
|
|
76
|
+
| `...props` | `React.ComponentProps<typeof MediaPlayButton>` | - | Any other props are spread to the MediaPlayButton component. |
|
|
77
|
+
|
|
78
|
+
### `<AudioPlayerSeekBackwardButton />`
|
|
79
|
+
|
|
80
|
+
Seek backward button wrapped in a shadcn Button component.
|
|
81
|
+
|
|
82
|
+
| Prop | Type | Default | Description |
|
|
83
|
+
|------|------|---------|-------------|
|
|
84
|
+
| `seekOffset` | `number` | `10` | The number of seconds to seek backward. |
|
|
85
|
+
| `...props` | `React.ComponentProps<typeof MediaSeekBackwardButton>` | - | Any other props are spread to the MediaSeekBackwardButton component. |
|
|
86
|
+
|
|
87
|
+
### `<AudioPlayerSeekForwardButton />`
|
|
88
|
+
|
|
89
|
+
Seek forward button wrapped in a shadcn Button component.
|
|
90
|
+
|
|
91
|
+
| Prop | Type | Default | Description |
|
|
92
|
+
|------|------|---------|-------------|
|
|
93
|
+
| `seekOffset` | `number` | `10` | The number of seconds to seek forward. |
|
|
94
|
+
| `...props` | `React.ComponentProps<typeof MediaSeekForwardButton>` | - | Any other props are spread to the MediaSeekForwardButton component. |
|
|
95
|
+
|
|
96
|
+
### `<AudioPlayerTimeDisplay />`
|
|
97
|
+
|
|
98
|
+
Displays the current playback time, wrapped in ButtonGroupText.
|
|
99
|
+
|
|
100
|
+
| Prop | Type | Default | Description |
|
|
101
|
+
|------|------|---------|-------------|
|
|
102
|
+
| `...props` | `React.ComponentProps<typeof MediaTimeDisplay>` | - | Any other props are spread to the MediaTimeDisplay component. |
|
|
103
|
+
|
|
104
|
+
### `<AudioPlayerTimeRange />`
|
|
105
|
+
|
|
106
|
+
Seek slider for controlling playback position, wrapped in ButtonGroupText.
|
|
107
|
+
|
|
108
|
+
| Prop | Type | Default | Description |
|
|
109
|
+
|------|------|---------|-------------|
|
|
110
|
+
| `...props` | `React.ComponentProps<typeof MediaTimeRange>` | - | Any other props are spread to the MediaTimeRange component. |
|
|
111
|
+
|
|
112
|
+
### `<AudioPlayerDurationDisplay />`
|
|
113
|
+
|
|
114
|
+
Displays the total duration of the audio, wrapped in ButtonGroupText.
|
|
115
|
+
|
|
116
|
+
| Prop | Type | Default | Description |
|
|
117
|
+
|------|------|---------|-------------|
|
|
118
|
+
| `...props` | `React.ComponentProps<typeof MediaDurationDisplay>` | - | Any other props are spread to the MediaDurationDisplay component. |
|
|
119
|
+
|
|
120
|
+
### `<AudioPlayerMuteButton />`
|
|
121
|
+
|
|
122
|
+
Mute/unmute button, wrapped in ButtonGroupText.
|
|
123
|
+
|
|
124
|
+
| Prop | Type | Default | Description |
|
|
125
|
+
|------|------|---------|-------------|
|
|
126
|
+
| `...props` | `React.ComponentProps<typeof MediaMuteButton>` | - | Any other props are spread to the MediaMuteButton component. |
|
|
127
|
+
|
|
128
|
+
### `<AudioPlayerVolumeRange />`
|
|
129
|
+
|
|
130
|
+
Volume slider control, wrapped in ButtonGroupText.
|
|
131
|
+
|
|
132
|
+
| Prop | Type | Default | Description |
|
|
133
|
+
|------|------|---------|-------------|
|
|
134
|
+
| `...props` | `React.ComponentProps<typeof MediaVolumeRange>` | - | Any other props are spread to the MediaVolumeRange component. |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Canvas
|
|
2
|
+
|
|
3
|
+
A React Flow-based canvas component for building interactive node-based interfaces.
|
|
4
|
+
|
|
5
|
+
The `Canvas` component provides a React Flow-based canvas for building interactive node-based interfaces. It comes pre-configured with sensible defaults for AI applications, including panning, zooming, and selection behaviors.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx ai-elements@latest add canvas
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Pre-configured React Flow canvas with AI-optimized defaults
|
|
18
|
+
- Pan on scroll enabled for intuitive navigation
|
|
19
|
+
- Selection on drag for multi-node operations
|
|
20
|
+
- Customizable background color using CSS variables
|
|
21
|
+
- Delete key support (Backspace and Delete keys)
|
|
22
|
+
- Auto-fit view to show all nodes
|
|
23
|
+
- Disabled double-click zoom for better UX
|
|
24
|
+
- Disabled pan on drag to prevent accidental canvas movement
|
|
25
|
+
- Fully compatible with React Flow props and API
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
### `<Canvas />`
|
|
30
|
+
|
|
31
|
+
| Prop | Type | Default | Description |
|
|
32
|
+
|------|------|---------|-------------|
|
|
33
|
+
| `children` | `ReactNode` | - | Child components like Background, Controls, or MiniMap. |
|
|
34
|
+
| `...props` | `ReactFlowProps` | - | Any other React Flow props like nodes, edges, nodeTypes, edgeTypes, onNodesChange, etc. |
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Chain of Thought
|
|
2
|
+
|
|
3
|
+
A collapsible component that visualizes AI reasoning steps with support for search results, images, and step-by-step progress indicators.
|
|
4
|
+
|
|
5
|
+
The `ChainOfThought` component provides a visual representation of an AI's reasoning process, showing step-by-step thinking with support for search results, images, and progress indicators. It helps users understand how AI arrives at conclusions.
|
|
6
|
+
|
|
7
|
+
See `scripts/chain-of-thought.tsx` for this example.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx ai-elements@latest add chain-of-thought
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Collapsible interface with smooth animations powered by Radix UI
|
|
18
|
+
- Step-by-step visualization of AI reasoning process
|
|
19
|
+
- Support for different step statuses (complete, active, pending)
|
|
20
|
+
- Built-in search results display with badge styling
|
|
21
|
+
- Image support with captions for visual content
|
|
22
|
+
- Custom icons for different step types
|
|
23
|
+
- Context-aware components using React Context API
|
|
24
|
+
- Fully typed with TypeScript
|
|
25
|
+
- Accessible with keyboard navigation support
|
|
26
|
+
- Responsive design that adapts to different screen sizes
|
|
27
|
+
- Smooth fade and slide animations for content transitions
|
|
28
|
+
- Composable architecture for flexible customization
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
### `<ChainOfThought />`
|
|
33
|
+
|
|
34
|
+
| Prop | Type | Default | Description |
|
|
35
|
+
|------|------|---------|-------------|
|
|
36
|
+
| `open` | `boolean` | - | Controlled open state of the collapsible. |
|
|
37
|
+
| `defaultOpen` | `boolean` | `false` | Default open state when uncontrolled. |
|
|
38
|
+
| `onOpenChange` | `(open: boolean) => void` | - | Callback when the open state changes. |
|
|
39
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the root div element. |
|
|
40
|
+
|
|
41
|
+
### `<ChainOfThoughtHeader />`
|
|
42
|
+
|
|
43
|
+
| Prop | Type | Default | Description |
|
|
44
|
+
|------|------|---------|-------------|
|
|
45
|
+
| `children` | `React.ReactNode` | - | Custom header text. |
|
|
46
|
+
| `...props` | `React.ComponentProps<typeof CollapsibleTrigger>` | - | Any other props are spread to the CollapsibleTrigger component. |
|
|
47
|
+
|
|
48
|
+
### `<ChainOfThoughtStep />`
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Description |
|
|
51
|
+
|------|------|---------|-------------|
|
|
52
|
+
| `icon` | `LucideIcon` | `DotIcon` | Icon to display for the step. |
|
|
53
|
+
| `label` | `string` | - | The main text label for the step. |
|
|
54
|
+
| `description` | `string` | - | Optional description text shown below the label. |
|
|
55
|
+
| `status` | `unknown` | - | Visual status of the step. |
|
|
56
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the root div element. |
|
|
57
|
+
|
|
58
|
+
### `<ChainOfThoughtSearchResults />`
|
|
59
|
+
|
|
60
|
+
| Prop | Type | Default | Description |
|
|
61
|
+
|------|------|---------|-------------|
|
|
62
|
+
| `...props` | `React.ComponentProps<` | - | Any props are spread to the container div element. |
|
|
63
|
+
|
|
64
|
+
### `<ChainOfThoughtSearchResult />`
|
|
65
|
+
|
|
66
|
+
| Prop | Type | Default | Description |
|
|
67
|
+
|------|------|---------|-------------|
|
|
68
|
+
| `...props` | `React.ComponentProps<typeof Badge>` | - | Any props are spread to the Badge component. |
|
|
69
|
+
|
|
70
|
+
### `<ChainOfThoughtContent />`
|
|
71
|
+
|
|
72
|
+
| Prop | Type | Default | Description |
|
|
73
|
+
|------|------|---------|-------------|
|
|
74
|
+
| `...props` | `React.ComponentProps<typeof CollapsibleContent>` | - | Any props are spread to the CollapsibleContent component. |
|
|
75
|
+
|
|
76
|
+
### `<ChainOfThoughtImage />`
|
|
77
|
+
|
|
78
|
+
| Prop | Type | Default | Description |
|
|
79
|
+
|------|------|---------|-------------|
|
|
80
|
+
| `caption` | `string` | - | Optional caption text displayed below the image. |
|
|
81
|
+
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the container div element. |
|