@artooi/agents-web-components 0.0.0-stage → 0.1.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/CHANGELOG.md +77 -0
- package/LICENSE +21 -0
- package/README.md +4397 -2
- package/dist/agents-web-components.bundle.js +5708 -0
- package/dist/agents-web-components.bundle.js.map +7 -0
- package/dist/bundle.d.ts +3 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/chat.d.ts +3 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +16373 -0
- package/dist/chat.js.map +7 -0
- package/dist/chunk-ARNLFGCC.js +7715 -0
- package/dist/chunk-ARNLFGCC.js.map +7 -0
- package/dist/constants.d.ts +575 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/core/activity_registration.d.ts +19 -0
- package/dist/core/activity_registration.d.ts.map +1 -0
- package/dist/core/activity_registry.d.ts +46 -0
- package/dist/core/activity_registry.d.ts.map +1 -0
- package/dist/core/activity_renderer.d.ts +20 -0
- package/dist/core/activity_renderer.d.ts.map +1 -0
- package/dist/core/ag_ui_chat.d.ts +836 -0
- package/dist/core/ag_ui_chat.d.ts.map +1 -0
- package/dist/core/agui_client.d.ts +370 -0
- package/dist/core/agui_client.d.ts.map +1 -0
- package/dist/core/attachment.d.ts +42 -0
- package/dist/core/attachment.d.ts.map +1 -0
- package/dist/core/chat_registry.d.ts +23 -0
- package/dist/core/chat_registry.d.ts.map +1 -0
- package/dist/core/client_seed.d.ts +27 -0
- package/dist/core/client_seed.d.ts.map +1 -0
- package/dist/core/conversation_store.d.ts +195 -0
- package/dist/core/conversation_store.d.ts.map +1 -0
- package/dist/core/create_http_agent.d.ts +57 -0
- package/dist/core/create_http_agent.d.ts.map +1 -0
- package/dist/core/define_chat.d.ts +13 -0
- package/dist/core/define_chat.d.ts.map +1 -0
- package/dist/core/events/attachments_detail.d.ts +9 -0
- package/dist/core/events/attachments_detail.d.ts.map +1 -0
- package/dist/core/events/bar_height_detail.d.ts +6 -0
- package/dist/core/events/bar_height_detail.d.ts.map +1 -0
- package/dist/core/events/custom_agent_detail.d.ts +8 -0
- package/dist/core/events/custom_agent_detail.d.ts.map +1 -0
- package/dist/core/events/dock_width_detail.d.ts +8 -0
- package/dist/core/events/dock_width_detail.d.ts.map +1 -0
- package/dist/core/events/feedback_detail.d.ts +28 -0
- package/dist/core/events/feedback_detail.d.ts.map +1 -0
- package/dist/core/events/invalidate_detail.d.ts +16 -0
- package/dist/core/events/invalidate_detail.d.ts.map +1 -0
- package/dist/core/events/maximize_detail.d.ts +5 -0
- package/dist/core/events/maximize_detail.d.ts.map +1 -0
- package/dist/core/events/run_finished_detail.d.ts +36 -0
- package/dist/core/events/run_finished_detail.d.ts.map +1 -0
- package/dist/core/events/state_detail.d.ts +5 -0
- package/dist/core/events/state_detail.d.ts.map +1 -0
- package/dist/core/events/submit_detail.d.ts +8 -0
- package/dist/core/events/submit_detail.d.ts.map +1 -0
- package/dist/core/events/thread_detail.d.ts +27 -0
- package/dist/core/events/thread_detail.d.ts.map +1 -0
- package/dist/core/events/thread_title_detail.d.ts +8 -0
- package/dist/core/events/thread_title_detail.d.ts.map +1 -0
- package/dist/core/events/toggle_detail.d.ts +5 -0
- package/dist/core/events/toggle_detail.d.ts.map +1 -0
- package/dist/core/events/tool_run.d.ts +11 -0
- package/dist/core/events/tool_run.d.ts.map +1 -0
- package/dist/core/events/unread_detail.d.ts +11 -0
- package/dist/core/events/unread_detail.d.ts.map +1 -0
- package/dist/core/message_role.d.ts +4 -0
- package/dist/core/message_role.d.ts.map +1 -0
- package/dist/core/read_flag.d.ts +11 -0
- package/dist/core/read_flag.d.ts.map +1 -0
- package/dist/core/read_json_attribute.d.ts +15 -0
- package/dist/core/read_json_attribute.d.ts.map +1 -0
- package/dist/core/read_max_tool_rounds.d.ts +9 -0
- package/dist/core/read_max_tool_rounds.d.ts.map +1 -0
- package/dist/core/remote_conversation_store.d.ts +71 -0
- package/dist/core/remote_conversation_store.d.ts.map +1 -0
- package/dist/core/run_handlers.d.ts +85 -0
- package/dist/core/run_handlers.d.ts.map +1 -0
- package/dist/core/run_index.d.ts +58 -0
- package/dist/core/run_index.d.ts.map +1 -0
- package/dist/core/storage_scope.d.ts +118 -0
- package/dist/core/storage_scope.d.ts.map +1 -0
- package/dist/core/tool_outcome.d.ts +27 -0
- package/dist/core/tool_outcome.d.ts.map +1 -0
- package/dist/core/transcribe_audio.d.ts +32 -0
- package/dist/core/transcribe_audio.d.ts.map +1 -0
- package/dist/core/upload_attachment.d.ts +44 -0
- package/dist/core/upload_attachment.d.ts.map +1 -0
- package/dist/core/utils.d.ts +117 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/dom/animations.d.ts +122 -0
- package/dist/dom/animations.d.ts.map +1 -0
- package/dist/dom/dom_driver.d.ts +28 -0
- package/dist/dom/dom_driver.d.ts.map +1 -0
- package/dist/dom/highlight_overlay.d.ts +39 -0
- package/dist/dom/highlight_overlay.d.ts.map +1 -0
- package/dist/dom/native_setter.d.ts +5 -0
- package/dist/dom/native_setter.d.ts.map +1 -0
- package/dist/dom/ring_color.d.ts +16 -0
- package/dist/dom/ring_color.d.ts.map +1 -0
- package/dist/dom/utils.d.ts +3 -0
- package/dist/dom/utils.d.ts.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +223 -0
- package/dist/index.js.map +7 -0
- package/dist/skills/fill_template.d.ts +16 -0
- package/dist/skills/fill_template.d.ts.map +1 -0
- package/dist/skills/parse_skills.d.ts +8 -0
- package/dist/skills/parse_skills.d.ts.map +1 -0
- package/dist/skills/skill.d.ts +33 -0
- package/dist/skills/skill.d.ts.map +1 -0
- package/dist/skills/skill_catalog.d.ts +69 -0
- package/dist/skills/skill_catalog.d.ts.map +1 -0
- package/dist/skills/skill_name_from.d.ts +12 -0
- package/dist/skills/skill_name_from.d.ts.map +1 -0
- package/dist/tools/chat_surface_tools.d.ts +77 -0
- package/dist/tools/chat_surface_tools.d.ts.map +1 -0
- package/dist/tools/client_tool_registry.d.ts +58 -0
- package/dist/tools/client_tool_registry.d.ts.map +1 -0
- package/dist/tools/is_destructive.d.ts +14 -0
- package/dist/tools/is_destructive.d.ts.map +1 -0
- package/dist/tools/is_navigates.d.ts +9 -0
- package/dist/tools/is_navigates.d.ts.map +1 -0
- package/dist/tools/page_action_tools.d.ts +30 -0
- package/dist/tools/page_action_tools.d.ts.map +1 -0
- package/dist/tools/page_map.d.ts +16 -0
- package/dist/tools/page_map.d.ts.map +1 -0
- package/dist/tools/page_state.d.ts +27 -0
- package/dist/tools/page_state.d.ts.map +1 -0
- package/dist/tools/parse_tool_catalog.d.ts +21 -0
- package/dist/tools/parse_tool_catalog.d.ts.map +1 -0
- package/dist/tools/route_map.d.ts +37 -0
- package/dist/tools/route_map.d.ts.map +1 -0
- package/dist/tools/tool_catalog.d.ts +86 -0
- package/dist/tools/tool_catalog.d.ts.map +1 -0
- package/dist/tools/tool_dispatch.d.ts +82 -0
- package/dist/tools/tool_dispatch.d.ts.map +1 -0
- package/dist/ui/charts/chart_block.d.ts +57 -0
- package/dist/ui/charts/chart_block.d.ts.map +1 -0
- package/dist/ui/charts/chart_spec_from.d.ts +12 -0
- package/dist/ui/charts/chart_spec_from.d.ts.map +1 -0
- package/dist/ui/charts/chart_styles.d.ts +2 -0
- package/dist/ui/charts/chart_styles.d.ts.map +1 -0
- package/dist/ui/charts/chart_tool.d.ts +15 -0
- package/dist/ui/charts/chart_tool.d.ts.map +1 -0
- package/dist/ui/composer/attachment_styles.d.ts +2 -0
- package/dist/ui/composer/attachment_styles.d.ts.map +1 -0
- package/dist/ui/composer/attachment_tray.d.ts +53 -0
- package/dist/ui/composer/attachment_tray.d.ts.map +1 -0
- package/dist/ui/composer/auto_grow.d.ts +10 -0
- package/dist/ui/composer/auto_grow.d.ts.map +1 -0
- package/dist/ui/composer/build_composer.d.ts +32 -0
- package/dist/ui/composer/build_composer.d.ts.map +1 -0
- package/dist/ui/composer/composer_attachments.d.ts +57 -0
- package/dist/ui/composer/composer_attachments.d.ts.map +1 -0
- package/dist/ui/composer/composer_styles.d.ts +2 -0
- package/dist/ui/composer/composer_styles.d.ts.map +1 -0
- package/dist/ui/composer/composer_voice.d.ts +48 -0
- package/dist/ui/composer/composer_voice.d.ts.map +1 -0
- package/dist/ui/composer/skill_styles.d.ts +2 -0
- package/dist/ui/composer/skill_styles.d.ts.map +1 -0
- package/dist/ui/composer/skills_menu.d.ts +34 -0
- package/dist/ui/composer/skills_menu.d.ts.map +1 -0
- package/dist/ui/composer/voice_input.d.ts +46 -0
- package/dist/ui/composer/voice_input.d.ts.map +1 -0
- package/dist/ui/excerpts/attach_copy_buttons.d.ts +13 -0
- package/dist/ui/excerpts/attach_copy_buttons.d.ts.map +1 -0
- package/dist/ui/excerpts/copy_payload.d.ts +30 -0
- package/dist/ui/excerpts/copy_payload.d.ts.map +1 -0
- package/dist/ui/excerpts/page_quote_offer.d.ts +33 -0
- package/dist/ui/excerpts/page_quote_offer.d.ts.map +1 -0
- package/dist/ui/excerpts/place_offer.d.ts +9 -0
- package/dist/ui/excerpts/place_offer.d.ts.map +1 -0
- package/dist/ui/excerpts/quote_selection.d.ts +66 -0
- package/dist/ui/excerpts/quote_selection.d.ts.map +1 -0
- package/dist/ui/excerpts/transcript_quote_offer.d.ts +57 -0
- package/dist/ui/excerpts/transcript_quote_offer.d.ts.map +1 -0
- package/dist/ui/fill_ui_string.d.ts +32 -0
- package/dist/ui/fill_ui_string.d.ts.map +1 -0
- package/dist/ui/history/checkpoint_menu.d.ts +41 -0
- package/dist/ui/history/checkpoint_menu.d.ts.map +1 -0
- package/dist/ui/history/conversation_history.d.ts +317 -0
- package/dist/ui/history/conversation_history.d.ts.map +1 -0
- package/dist/ui/history/history_styles.d.ts +2 -0
- package/dist/ui/history/history_styles.d.ts.map +1 -0
- package/dist/ui/history/relative_time.d.ts +23 -0
- package/dist/ui/history/relative_time.d.ts.map +1 -0
- package/dist/ui/history/thread_drawer.d.ts +64 -0
- package/dist/ui/history/thread_drawer.d.ts.map +1 -0
- package/dist/ui/history/utils.d.ts +2 -0
- package/dist/ui/history/utils.d.ts.map +1 -0
- package/dist/ui/interrupts/approval_card.d.ts +64 -0
- package/dist/ui/interrupts/approval_card.d.ts.map +1 -0
- package/dist/ui/interrupts/approval_styles.d.ts +2 -0
- package/dist/ui/interrupts/approval_styles.d.ts.map +1 -0
- package/dist/ui/interrupts/confirmation_card.d.ts +51 -0
- package/dist/ui/interrupts/confirmation_card.d.ts.map +1 -0
- package/dist/ui/interrupts/confirmation_styles.d.ts +2 -0
- package/dist/ui/interrupts/confirmation_styles.d.ts.map +1 -0
- package/dist/ui/interrupts/pending_decision.d.ts +22 -0
- package/dist/ui/interrupts/pending_decision.d.ts.map +1 -0
- package/dist/ui/interrupts/question_card.d.ts +49 -0
- package/dist/ui/interrupts/question_card.d.ts.map +1 -0
- package/dist/ui/interrupts/question_styles.d.ts +2 -0
- package/dist/ui/interrupts/question_styles.d.ts.map +1 -0
- package/dist/ui/place/place.d.ts +17 -0
- package/dist/ui/place/place.d.ts.map +1 -0
- package/dist/ui/place/place_chip.d.ts +26 -0
- package/dist/ui/place/place_chip.d.ts.map +1 -0
- package/dist/ui/place/place_from_route.d.ts +9 -0
- package/dist/ui/place/place_from_route.d.ts.map +1 -0
- package/dist/ui/place/place_styles.d.ts +2 -0
- package/dist/ui/place/place_styles.d.ts.map +1 -0
- package/dist/ui/placement/clamp_launcher.d.ts +20 -0
- package/dist/ui/placement/clamp_launcher.d.ts.map +1 -0
- package/dist/ui/placement/clamp_panel.d.ts +13 -0
- package/dist/ui/placement/clamp_panel.d.ts.map +1 -0
- package/dist/ui/placement/collapse_styles.d.ts +2 -0
- package/dist/ui/placement/collapse_styles.d.ts.map +1 -0
- package/dist/ui/placement/dock_styles.d.ts +2 -0
- package/dist/ui/placement/dock_styles.d.ts.map +1 -0
- package/dist/ui/placement/embedded_styles.d.ts +2 -0
- package/dist/ui/placement/embedded_styles.d.ts.map +1 -0
- package/dist/ui/placement/launcher_drag.d.ts +49 -0
- package/dist/ui/placement/launcher_drag.d.ts.map +1 -0
- package/dist/ui/placement/launcher_placement.d.ts +77 -0
- package/dist/ui/placement/launcher_placement.d.ts.map +1 -0
- package/dist/ui/placement/launcher_styles.d.ts +2 -0
- package/dist/ui/placement/launcher_styles.d.ts.map +1 -0
- package/dist/ui/placement/page_styles.d.ts +2 -0
- package/dist/ui/placement/page_styles.d.ts.map +1 -0
- package/dist/ui/placement/panel_drag.d.ts +40 -0
- package/dist/ui/placement/panel_drag.d.ts.map +1 -0
- package/dist/ui/placement/panel_placement.d.ts +173 -0
- package/dist/ui/placement/panel_placement.d.ts.map +1 -0
- package/dist/ui/placement/place_widget.d.ts +31 -0
- package/dist/ui/placement/place_widget.d.ts.map +1 -0
- package/dist/ui/placement/preset_styles.d.ts +2 -0
- package/dist/ui/placement/preset_styles.d.ts.map +1 -0
- package/dist/ui/placement/resize_handle.d.ts +78 -0
- package/dist/ui/placement/resize_handle.d.ts.map +1 -0
- package/dist/ui/placement/resize_styles.d.ts +2 -0
- package/dist/ui/placement/resize_styles.d.ts.map +1 -0
- package/dist/ui/placement/sidebar_styles.d.ts +2 -0
- package/dist/ui/placement/sidebar_styles.d.ts.map +1 -0
- package/dist/ui/placement/small_viewport_styles.d.ts +2 -0
- package/dist/ui/placement/small_viewport_styles.d.ts.map +1 -0
- package/dist/ui/placement/surface_for.d.ts +93 -0
- package/dist/ui/placement/surface_for.d.ts.map +1 -0
- package/dist/ui/progress/prettify_tool_name.d.ts +11 -0
- package/dist/ui/progress/prettify_tool_name.d.ts.map +1 -0
- package/dist/ui/progress/run_announcer.d.ts +41 -0
- package/dist/ui/progress/run_announcer.d.ts.map +1 -0
- package/dist/ui/progress/run_notice.d.ts +21 -0
- package/dist/ui/progress/run_notice.d.ts.map +1 -0
- package/dist/ui/progress/run_notice_styles.d.ts +2 -0
- package/dist/ui/progress/run_notice_styles.d.ts.map +1 -0
- package/dist/ui/progress/subagent_panel.d.ts +101 -0
- package/dist/ui/progress/subagent_panel.d.ts.map +1 -0
- package/dist/ui/progress/subagent_progress.d.ts +57 -0
- package/dist/ui/progress/subagent_progress.d.ts.map +1 -0
- package/dist/ui/progress/subagent_update.d.ts +28 -0
- package/dist/ui/progress/subagent_update.d.ts.map +1 -0
- package/dist/ui/progress/thoughts_block.d.ts +57 -0
- package/dist/ui/progress/thoughts_block.d.ts.map +1 -0
- package/dist/ui/progress/thoughts_styles.d.ts +2 -0
- package/dist/ui/progress/thoughts_styles.d.ts.map +1 -0
- package/dist/ui/progress/tool_call_card.d.ts +167 -0
- package/dist/ui/progress/tool_call_card.d.ts.map +1 -0
- package/dist/ui/progress/tool_group_styles.d.ts +2 -0
- package/dist/ui/progress/tool_group_styles.d.ts.map +1 -0
- package/dist/ui/progress/tool_step_group.d.ts +50 -0
- package/dist/ui/progress/tool_step_group.d.ts.map +1 -0
- package/dist/ui/progress/tool_step_styles.d.ts +2 -0
- package/dist/ui/progress/tool_step_styles.d.ts.map +1 -0
- package/dist/ui/shell/adopt_styles.d.ts +28 -0
- package/dist/ui/shell/adopt_styles.d.ts.map +1 -0
- package/dist/ui/shell/build_header.d.ts +45 -0
- package/dist/ui/shell/build_header.d.ts.map +1 -0
- package/dist/ui/shell/build_launcher.d.ts +33 -0
- package/dist/ui/shell/build_launcher.d.ts.map +1 -0
- package/dist/ui/shell/collapse_glyph.d.ts +14 -0
- package/dist/ui/shell/collapse_glyph.d.ts.map +1 -0
- package/dist/ui/shell/frame_styles.d.ts +2 -0
- package/dist/ui/shell/frame_styles.d.ts.map +1 -0
- package/dist/ui/shell/glyph_slot.d.ts +7 -0
- package/dist/ui/shell/glyph_slot.d.ts.map +1 -0
- package/dist/ui/shell/header_button.d.ts +11 -0
- package/dist/ui/shell/header_button.d.ts.map +1 -0
- package/dist/ui/shell/icon_element.d.ts +12 -0
- package/dist/ui/shell/icon_element.d.ts.map +1 -0
- package/dist/ui/shell/is_unread_badge_enabled.d.ts +10 -0
- package/dist/ui/shell/is_unread_badge_enabled.d.ts.map +1 -0
- package/dist/ui/shell/read_launcher_icon_url.d.ts +8 -0
- package/dist/ui/shell/read_launcher_icon_url.d.ts.map +1 -0
- package/dist/ui/shell/theme_styles.d.ts +2 -0
- package/dist/ui/shell/theme_styles.d.ts.map +1 -0
- package/dist/ui/shell/token_styles.d.ts +2 -0
- package/dist/ui/shell/token_styles.d.ts.map +1 -0
- package/dist/ui/styles.d.ts +2 -0
- package/dist/ui/styles.d.ts.map +1 -0
- package/dist/ui/themes/classic_styles.d.ts +2 -0
- package/dist/ui/themes/classic_styles.d.ts.map +1 -0
- package/dist/ui/themes/classic_tokens.d.ts +2 -0
- package/dist/ui/themes/classic_tokens.d.ts.map +1 -0
- package/dist/ui/themes/code_tokens.d.ts +2 -0
- package/dist/ui/themes/code_tokens.d.ts.map +1 -0
- package/dist/ui/themes/ledger_styles.d.ts +2 -0
- package/dist/ui/themes/ledger_styles.d.ts.map +1 -0
- package/dist/ui/themes/ledger_tokens.d.ts +2 -0
- package/dist/ui/themes/ledger_tokens.d.ts.map +1 -0
- package/dist/ui/themes/modern_styles.d.ts +2 -0
- package/dist/ui/themes/modern_styles.d.ts.map +1 -0
- package/dist/ui/themes/quiet_styles.d.ts +2 -0
- package/dist/ui/themes/quiet_styles.d.ts.map +1 -0
- package/dist/ui/themes/scheme_styles.d.ts +2 -0
- package/dist/ui/themes/scheme_styles.d.ts.map +1 -0
- package/dist/ui/themes/soft_styles.d.ts +2 -0
- package/dist/ui/themes/soft_styles.d.ts.map +1 -0
- package/dist/ui/themes/soft_tokens.d.ts +2 -0
- package/dist/ui/themes/soft_tokens.d.ts.map +1 -0
- package/dist/ui/themes/theme_hosts.d.ts +15 -0
- package/dist/ui/themes/theme_hosts.d.ts.map +1 -0
- package/dist/ui/transcript/answer_actions.d.ts +50 -0
- package/dist/ui/transcript/answer_actions.d.ts.map +1 -0
- package/dist/ui/transcript/answer_stream.d.ts +56 -0
- package/dist/ui/transcript/answer_stream.d.ts.map +1 -0
- package/dist/ui/transcript/attachment_chip_styles.d.ts +2 -0
- package/dist/ui/transcript/attachment_chip_styles.d.ts.map +1 -0
- package/dist/ui/transcript/attachment_chips.d.ts +21 -0
- package/dist/ui/transcript/attachment_chips.d.ts.map +1 -0
- package/dist/ui/transcript/build_transcript.d.ts +21 -0
- package/dist/ui/transcript/build_transcript.d.ts.map +1 -0
- package/dist/ui/transcript/greeting_styles.d.ts +2 -0
- package/dist/ui/transcript/greeting_styles.d.ts.map +1 -0
- package/dist/ui/transcript/groups_tool_steps.d.ts +13 -0
- package/dist/ui/transcript/groups_tool_steps.d.ts.map +1 -0
- package/dist/ui/transcript/message_action_styles.d.ts +2 -0
- package/dist/ui/transcript/message_action_styles.d.ts.map +1 -0
- package/dist/ui/transcript/message_actions.d.ts +74 -0
- package/dist/ui/transcript/message_actions.d.ts.map +1 -0
- package/dist/ui/transcript/message_styles.d.ts +2 -0
- package/dist/ui/transcript/message_styles.d.ts.map +1 -0
- package/dist/ui/transcript/render_markdown.d.ts +40 -0
- package/dist/ui/transcript/render_markdown.d.ts.map +1 -0
- package/dist/ui/transcript/render_or_warn.d.ts +16 -0
- package/dist/ui/transcript/render_or_warn.d.ts.map +1 -0
- package/dist/ui/transcript/reveal_words.d.ts +8 -0
- package/dist/ui/transcript/reveal_words.d.ts.map +1 -0
- package/dist/ui/transcript/starter_chips.d.ts +21 -0
- package/dist/ui/transcript/starter_chips.d.ts.map +1 -0
- package/dist/ui/transcript/stick_to_bottom.d.ts +55 -0
- package/dist/ui/transcript/stick_to_bottom.d.ts.map +1 -0
- package/dist/ui/transcript/suggestion_chips.d.ts +29 -0
- package/dist/ui/transcript/suggestion_chips.d.ts.map +1 -0
- package/dist/ui/transcript/transcript.d.ts +196 -0
- package/dist/ui/transcript/transcript.d.ts.map +1 -0
- package/dist/ui/transcript/transcript_styles.d.ts +2 -0
- package/dist/ui/transcript/transcript_styles.d.ts.map +1 -0
- package/dist/ui/ui_strings.d.ts +352 -0
- package/dist/ui/ui_strings.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +86 -3
- package/src/bundle.ts +2 -0
- package/src/chat.ts +2 -0
- package/src/constants.ts +650 -0
- package/src/core/activity_registration.ts +19 -0
- package/src/core/activity_registry.ts +133 -0
- package/src/core/activity_renderer.ts +19 -0
- package/src/core/ag_ui_chat.ts +3966 -0
- package/src/core/agui_client.ts +1028 -0
- package/src/core/attachment.ts +62 -0
- package/src/core/chat_registry.ts +53 -0
- package/src/core/client_seed.ts +27 -0
- package/src/core/conversation_store.ts +478 -0
- package/src/core/create_http_agent.ts +97 -0
- package/src/core/define_chat.ts +25 -0
- package/src/core/events/attachments_detail.ts +9 -0
- package/src/core/events/bar_height_detail.ts +5 -0
- package/src/core/events/custom_agent_detail.ts +7 -0
- package/src/core/events/dock_width_detail.ts +7 -0
- package/src/core/events/feedback_detail.ts +27 -0
- package/src/core/events/invalidate_detail.ts +15 -0
- package/src/core/events/maximize_detail.ts +4 -0
- package/src/core/events/run_finished_detail.ts +36 -0
- package/src/core/events/state_detail.ts +4 -0
- package/src/core/events/submit_detail.ts +8 -0
- package/src/core/events/thread_detail.ts +26 -0
- package/src/core/events/thread_title_detail.ts +7 -0
- package/src/core/events/toggle_detail.ts +4 -0
- package/src/core/events/tool_run.ts +10 -0
- package/src/core/events/unread_detail.ts +10 -0
- package/src/core/message_role.ts +4 -0
- package/src/core/read_flag.ts +13 -0
- package/src/core/read_json_attribute.ts +30 -0
- package/src/core/read_max_tool_rounds.ts +13 -0
- package/src/core/remote_conversation_store.ts +279 -0
- package/src/core/run_handlers.ts +524 -0
- package/src/core/run_index.ts +114 -0
- package/src/core/storage_scope.ts +291 -0
- package/src/core/tool_outcome.ts +39 -0
- package/src/core/transcribe_audio.ts +76 -0
- package/src/core/upload_attachment.ts +130 -0
- package/src/core/utils.ts +230 -0
- package/src/dom/animations.ts +341 -0
- package/src/dom/dom_driver.ts +91 -0
- package/src/dom/highlight_overlay.ts +204 -0
- package/src/dom/native_setter.ts +40 -0
- package/src/dom/ring_color.ts +206 -0
- package/src/dom/utils.ts +5 -0
- package/src/index.ts +220 -0
- package/src/skills/fill_template.ts +31 -0
- package/src/skills/parse_skills.ts +31 -0
- package/src/skills/skill.ts +32 -0
- package/src/skills/skill_catalog.ts +172 -0
- package/src/skills/skill_name_from.ts +19 -0
- package/src/tools/chat_surface_tools.ts +183 -0
- package/src/tools/client_tool_registry.ts +80 -0
- package/src/tools/is_destructive.ts +17 -0
- package/src/tools/is_navigates.ts +12 -0
- package/src/tools/page_action_tools.ts +123 -0
- package/src/tools/page_map.ts +26 -0
- package/src/tools/page_state.ts +57 -0
- package/src/tools/parse_tool_catalog.ts +41 -0
- package/src/tools/route_map.ts +132 -0
- package/src/tools/tool_catalog.ts +334 -0
- package/src/tools/tool_dispatch.ts +453 -0
- package/src/ui/charts/chart_block.ts +519 -0
- package/src/ui/charts/chart_spec_from.ts +125 -0
- package/src/ui/charts/chart_styles.ts +63 -0
- package/src/ui/charts/chart_tool.ts +72 -0
- package/src/ui/composer/attachment_styles.ts +71 -0
- package/src/ui/composer/attachment_tray.ts +295 -0
- package/src/ui/composer/auto_grow.ts +12 -0
- package/src/ui/composer/build_composer.ts +114 -0
- package/src/ui/composer/composer_attachments.ts +324 -0
- package/src/ui/composer/composer_styles.ts +177 -0
- package/src/ui/composer/composer_voice.ts +93 -0
- package/src/ui/composer/skill_styles.ts +120 -0
- package/src/ui/composer/skills_menu.ts +188 -0
- package/src/ui/composer/voice_input.ts +282 -0
- package/src/ui/excerpts/attach_copy_buttons.ts +73 -0
- package/src/ui/excerpts/copy_payload.ts +156 -0
- package/src/ui/excerpts/page_quote_offer.ts +203 -0
- package/src/ui/excerpts/place_offer.ts +24 -0
- package/src/ui/excerpts/quote_selection.ts +345 -0
- package/src/ui/excerpts/transcript_quote_offer.ts +175 -0
- package/src/ui/fill_ui_string.ts +41 -0
- package/src/ui/history/checkpoint_menu.ts +300 -0
- package/src/ui/history/conversation_history.ts +1169 -0
- package/src/ui/history/history_styles.ts +492 -0
- package/src/ui/history/relative_time.ts +50 -0
- package/src/ui/history/thread_drawer.ts +471 -0
- package/src/ui/history/utils.ts +11 -0
- package/src/ui/interrupts/approval_card.ts +202 -0
- package/src/ui/interrupts/approval_styles.ts +52 -0
- package/src/ui/interrupts/confirmation_card.ts +138 -0
- package/src/ui/interrupts/confirmation_styles.ts +114 -0
- package/src/ui/interrupts/pending_decision.ts +33 -0
- package/src/ui/interrupts/question_card.ts +213 -0
- package/src/ui/interrupts/question_styles.ts +73 -0
- package/src/ui/place/place.ts +16 -0
- package/src/ui/place/place_chip.ts +146 -0
- package/src/ui/place/place_from_route.ts +27 -0
- package/src/ui/place/place_styles.ts +108 -0
- package/src/ui/placement/clamp_launcher.ts +38 -0
- package/src/ui/placement/clamp_panel.ts +30 -0
- package/src/ui/placement/collapse_styles.ts +472 -0
- package/src/ui/placement/dock_styles.ts +116 -0
- package/src/ui/placement/embedded_styles.ts +14 -0
- package/src/ui/placement/launcher_drag.ts +206 -0
- package/src/ui/placement/launcher_placement.ts +133 -0
- package/src/ui/placement/launcher_styles.ts +189 -0
- package/src/ui/placement/page_styles.ts +47 -0
- package/src/ui/placement/panel_drag.ts +138 -0
- package/src/ui/placement/panel_placement.ts +1975 -0
- package/src/ui/placement/place_widget.ts +64 -0
- package/src/ui/placement/preset_styles.ts +49 -0
- package/src/ui/placement/resize_handle.ts +229 -0
- package/src/ui/placement/resize_styles.ts +201 -0
- package/src/ui/placement/sidebar_styles.ts +113 -0
- package/src/ui/placement/small_viewport_styles.ts +70 -0
- package/src/ui/placement/surface_for.ts +183 -0
- package/src/ui/progress/prettify_tool_name.ts +16 -0
- package/src/ui/progress/run_announcer.ts +67 -0
- package/src/ui/progress/run_notice.ts +61 -0
- package/src/ui/progress/run_notice_styles.ts +52 -0
- package/src/ui/progress/subagent_panel.ts +227 -0
- package/src/ui/progress/subagent_progress.ts +200 -0
- package/src/ui/progress/subagent_update.ts +89 -0
- package/src/ui/progress/thoughts_block.ts +165 -0
- package/src/ui/progress/thoughts_styles.ts +74 -0
- package/src/ui/progress/tool_call_card.ts +429 -0
- package/src/ui/progress/tool_group_styles.ts +313 -0
- package/src/ui/progress/tool_step_group.ts +317 -0
- package/src/ui/progress/tool_step_styles.ts +486 -0
- package/src/ui/shell/adopt_styles.ts +34 -0
- package/src/ui/shell/build_header.ts +121 -0
- package/src/ui/shell/build_launcher.ts +79 -0
- package/src/ui/shell/collapse_glyph.ts +42 -0
- package/src/ui/shell/frame_styles.ts +147 -0
- package/src/ui/shell/glyph_slot.ts +12 -0
- package/src/ui/shell/header_button.ts +22 -0
- package/src/ui/shell/icon_element.ts +33 -0
- package/src/ui/shell/is_unread_badge_enabled.ts +11 -0
- package/src/ui/shell/read_launcher_icon_url.ts +9 -0
- package/src/ui/shell/theme_styles.ts +11 -0
- package/src/ui/shell/token_styles.ts +480 -0
- package/src/ui/styles.ts +110 -0
- package/src/ui/themes/classic_styles.ts +32 -0
- package/src/ui/themes/classic_tokens.ts +51 -0
- package/src/ui/themes/code_tokens.ts +21 -0
- package/src/ui/themes/ledger_styles.ts +169 -0
- package/src/ui/themes/ledger_tokens.ts +33 -0
- package/src/ui/themes/modern_styles.ts +80 -0
- package/src/ui/themes/quiet_styles.ts +118 -0
- package/src/ui/themes/scheme_styles.ts +26 -0
- package/src/ui/themes/soft_styles.ts +149 -0
- package/src/ui/themes/soft_tokens.ts +29 -0
- package/src/ui/themes/theme_hosts.ts +14 -0
- package/src/ui/transcript/answer_actions.ts +165 -0
- package/src/ui/transcript/answer_stream.ts +123 -0
- package/src/ui/transcript/attachment_chip_styles.ts +116 -0
- package/src/ui/transcript/attachment_chips.ts +82 -0
- package/src/ui/transcript/build_transcript.ts +67 -0
- package/src/ui/transcript/greeting_styles.ts +171 -0
- package/src/ui/transcript/groups_tool_steps.ts +16 -0
- package/src/ui/transcript/message_action_styles.ts +155 -0
- package/src/ui/transcript/message_actions.ts +234 -0
- package/src/ui/transcript/message_styles.ts +262 -0
- package/src/ui/transcript/render_markdown.ts +181 -0
- package/src/ui/transcript/render_or_warn.ts +22 -0
- package/src/ui/transcript/reveal_words.ts +41 -0
- package/src/ui/transcript/starter_chips.ts +42 -0
- package/src/ui/transcript/stick_to_bottom.ts +126 -0
- package/src/ui/transcript/suggestion_chips.ts +73 -0
- package/src/ui/transcript/transcript.ts +555 -0
- package/src/ui/transcript/transcript_styles.ts +153 -0
- package/src/ui/ui_strings.ts +550 -0
- package/src/version.ts +1 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
// Every public --ag-ui-* token read into its private --_* alias on :host.
|
|
2
|
+
// This is where the token defaults are declared; see the block comment below.
|
|
3
|
+
export const TOKEN_STYLES: string = `
|
|
4
|
+
/* ── Token defaults ─────────────────────────────────────────────────────────
|
|
5
|
+
Every public --ag-ui-* token is read here into a private --_* alias, and
|
|
6
|
+
only the alias is used by the rules below.
|
|
7
|
+
|
|
8
|
+
The indirection is what makes ancestor theming work. Declaring the public
|
|
9
|
+
name on :host would set it on the host element, and a value on an element
|
|
10
|
+
always beats one inherited from an ancestor, so tokens put on a wrapper
|
|
11
|
+
would have no effect. Reading the public name with the default as a var()
|
|
12
|
+
fallback leaves it undeclared on the element, so an ancestor's value
|
|
13
|
+
inherits normally while one aimed at the element still wins.
|
|
14
|
+
|
|
15
|
+
Two invariants hold this together:
|
|
16
|
+
1. No rule outside a :host block may reference a public name
|
|
17
|
+
directly. A public name read outside these blocks resolves to nothing and
|
|
18
|
+
silently drops its declaration rather than erroring, so the miss shows up
|
|
19
|
+
as a missing colour, not a failure.
|
|
20
|
+
2. Every --_* alias in use is declared here. Aliases inherit like any custom
|
|
21
|
+
property, so an undeclared one would pick up a same-named property from
|
|
22
|
+
the host page; declaring it on :host shields the shadow tree from that. */
|
|
23
|
+
:host {
|
|
24
|
+
/* Colors. The default theme, Quiet: three seeds, and every other shade
|
|
25
|
+
mixed from them in oklch, so a host that sets only --ag-ui-accent (or
|
|
26
|
+
only the background and text) gets a whole widget rethemed. The seeds use
|
|
27
|
+
light-dark, so the scheme word on the theme attribute picks the half;
|
|
28
|
+
see scheme_styles in the themes directory. Every derived shade still
|
|
29
|
+
reads its own public token first, so each stays an override point. */
|
|
30
|
+
color-scheme: light;
|
|
31
|
+
--_bg: var(--ag-ui-bg, light-dark(#ffffff, #161618));
|
|
32
|
+
--_fg: var(--ag-ui-fg, light-dark(#1b1b1d, #ececee));
|
|
33
|
+
--_accent: var(--ag-ui-accent, light-dark(#232326, #f0f0f2));
|
|
34
|
+
--_ink-2: var(--ag-ui-ink-2, color-mix(in oklch, var(--_fg) 78%, var(--_bg)));
|
|
35
|
+
--_ink-3: var(--ag-ui-ink-3, color-mix(in oklch, var(--_fg) 64%, var(--_bg)));
|
|
36
|
+
--_line: var(--ag-ui-line, color-mix(in oklch, var(--_fg) 11%, var(--_bg)));
|
|
37
|
+
--_line-strong: var(--ag-ui-line-strong, color-mix(in oklch, var(--_fg) 20%, var(--_bg)));
|
|
38
|
+
--_wash: var(--ag-ui-wash, color-mix(in oklch, var(--_fg) 4.5%, var(--_bg)));
|
|
39
|
+
--_accent-ink: var(--ag-ui-accent-ink, color-mix(in oklch, var(--_accent) 82%, var(--_fg)));
|
|
40
|
+
/* The focus ring is drawn on the panel, so it has to hold 3:1 against
|
|
41
|
+
--_bg whatever accent a host brings (WCAG 2.4.13). Two parts accent to
|
|
42
|
+
three parts ink does that at the worst case, an accent at the far end
|
|
43
|
+
from the ink (white on a light panel, black on a dark one): the ink
|
|
44
|
+
alone sits far above 3:1, and three fifths of it keeps the mix there
|
|
45
|
+
while the hue still reads as the accent. Half and half fell to 2.3:1
|
|
46
|
+
for black on the code theme. The accent over transparent, as before,
|
|
47
|
+
measured only the accent, and a light host accent fell to 1.6:1. */
|
|
48
|
+
--_ring: var(--ag-ui-ring, color-mix(in oklch, var(--_accent) 40%, var(--_fg)));
|
|
49
|
+
/* The user's turn is the accent at a whisper. With Quiet's graphite accent
|
|
50
|
+
that is a neutral wash; once a host sets a brand accent it becomes a tint
|
|
51
|
+
of the brand, which is the one thing Soft does that Quiet keeps. */
|
|
52
|
+
--_user-bg: var(--ag-ui-user-bg, color-mix(in oklch, var(--_accent) 12%, var(--_bg)));
|
|
53
|
+
--_user-fg: var(--ag-ui-user-fg, var(--_fg));
|
|
54
|
+
--_assistant-bg: var(--ag-ui-assistant-bg, transparent);
|
|
55
|
+
--_hover: var(--ag-ui-hover, color-mix(in oklch, var(--_fg) 6%, var(--_bg)));
|
|
56
|
+
--_input-bg: var(--ag-ui-input-bg, var(--_bg));
|
|
57
|
+
--_tool-bg: var(--ag-ui-tool-bg, transparent);
|
|
58
|
+
--_tool-fg: var(--ag-ui-tool-fg, var(--_ink-2));
|
|
59
|
+
--_header-bg: var(--ag-ui-header-bg, var(--_bg));
|
|
60
|
+
--_header-fg: var(--ag-ui-header-fg, var(--_fg));
|
|
61
|
+
/* Switches: a public token read with no fallback, named for it with -set.
|
|
62
|
+
With the token unset the switch computes to the guaranteed-invalid value,
|
|
63
|
+
so a rule that reads it with a fallback gets the fallback; that is how a
|
|
64
|
+
rule tells a token the host set from the theme's default for it. Every
|
|
65
|
+
theme's header buttons follow the header text only once a host sets it,
|
|
66
|
+
and a step group's calls follow the tool token only once a host sets it
|
|
67
|
+
(classic defaults --_tool-fg to the accent, which a group never drew). */
|
|
68
|
+
--_header-fg-set: var(--ag-ui-header-fg);
|
|
69
|
+
--_tool-fg-set: var(--ag-ui-tool-fg);
|
|
70
|
+
/* The header buttons' hover square, by default, once the header text is
|
|
71
|
+
set. Here it is the text at about a fifth, which every browser can mix;
|
|
72
|
+
where relative colour syntax is supported (see the block at the end) it
|
|
73
|
+
is the text's opposite instead. It reads the switch, so it is unset with
|
|
74
|
+
it, and the square below falls to the theme's own: the panel's hover shade
|
|
75
|
+
here, restated by each theme that draws another, so one rule in the frame
|
|
76
|
+
paints them all. */
|
|
77
|
+
--_header-btn-hover-auto: color-mix(in srgb, var(--_header-fg-set) 18%, transparent);
|
|
78
|
+
--_header-btn-hover: var(--ag-ui-header-btn-hover, var(--_header-btn-hover-auto, var(--_hover)));
|
|
79
|
+
--_border: var(--ag-ui-border, var(--_line));
|
|
80
|
+
--_radius: var(--ag-ui-radius, 12px);
|
|
81
|
+
/* The panel's own frame, which is the one corner a placement can put against
|
|
82
|
+
the edge of the viewport. The placements that do (page, sidebar, side, full,
|
|
83
|
+
and all but embedded on a small viewport) square this and leave --_radius alone, so
|
|
84
|
+
the answer well and the controls inside the panel stay as round as the
|
|
85
|
+
theme says: none of them meets that edge. */
|
|
86
|
+
/* What a theme sets for the frame; the effective value below is what a
|
|
87
|
+
placement squares, so the two never fight over one property. A host's
|
|
88
|
+
--ag-ui-radius still rounds the frame, as it did before themes gave the
|
|
89
|
+
frame a radius of its own; only the theme's own default differs. */
|
|
90
|
+
--_frame-radius: var(--ag-ui-frame-radius, var(--ag-ui-radius, 14px));
|
|
91
|
+
--_panel-radius: var(--ag-ui-panel-radius, var(--_frame-radius));
|
|
92
|
+
|
|
93
|
+
/* Body text and raised chrome, read only by the code-block copy button.
|
|
94
|
+
The defaults restate what it inherits, so a host that sets neither sees
|
|
95
|
+
no repaint — see the note on .code-copy. */
|
|
96
|
+
--_text: var(--ag-ui-text, var(--_fg));
|
|
97
|
+
--_surface: var(--ag-ui-surface, transparent);
|
|
98
|
+
|
|
99
|
+
/* Message action row: the control box and the mark inside it. The box has a
|
|
100
|
+
floor of 24px so it stays a reliable target at every density. */
|
|
101
|
+
--_action-size: var(--ag-ui-action-size, 28px);
|
|
102
|
+
/* The header's own controls. Sized rather than left to their contents: a row
|
|
103
|
+
of buttons each as wide as the glyph inside it comes out uneven, and uneven
|
|
104
|
+
buttons two pixels apart read as one smudge rather than five controls. */
|
|
105
|
+
--_header-btn-size: var(--ag-ui-header-btn-size, 30px);
|
|
106
|
+
--_header-gap: var(--ag-ui-header-gap, 4px);
|
|
107
|
+
--_action-icon-size: var(--ag-ui-action-icon-size, 15px);
|
|
108
|
+
--_tooltip-bg: var(--ag-ui-tooltip-bg, var(--_fg));
|
|
109
|
+
--_tooltip-fg: var(--ag-ui-tooltip-fg, var(--_bg));
|
|
110
|
+
|
|
111
|
+
/* Text and marks drawn on top of the accent and danger fills. Separate
|
|
112
|
+
tokens because they are not free: a host that themes the accent to a pale
|
|
113
|
+
colour has white-on-pale with no way to correct it, which is the one
|
|
114
|
+
theming change that makes a control unreadable rather than merely off. */
|
|
115
|
+
/* Picked from the accent's own luminance where relative colour syntax is
|
|
116
|
+
supported (the first block after this rule). Without it, this value: the
|
|
117
|
+
scheme's colour, which is the right side for each newer theme's own
|
|
118
|
+
accent in both schemes. Classic and code take white instead, in the
|
|
119
|
+
second block. */
|
|
120
|
+
--_on-accent: var(--ag-ui-on-accent, light-dark(#ffffff, #111111));
|
|
121
|
+
--_on-danger: var(--ag-ui-on-danger, #ffffff);
|
|
122
|
+
|
|
123
|
+
/* Resize grips: the corner squares and the edge strips between them. Wide
|
|
124
|
+
enough to hit without being wide enough to swallow a click on the content
|
|
125
|
+
underneath, and adjustable for a host with a coarser pointer. */
|
|
126
|
+
--_grip-corner: var(--ag-ui-grip-corner, 14px);
|
|
127
|
+
--_grip-edge: var(--ag-ui-grip-edge, 6px);
|
|
128
|
+
--_grip-edge-docked: var(--ag-ui-grip-edge-docked, 8px);
|
|
129
|
+
/* The mark drawn inside a grip, as opposed to the area it answers to. */
|
|
130
|
+
--_grip-mark-length: var(--ag-ui-grip-mark-length, 28px);
|
|
131
|
+
--_grip-mark-thickness: var(--ag-ui-grip-mark-thickness, 3px);
|
|
132
|
+
|
|
133
|
+
/* Status accents for tool-call cards. */
|
|
134
|
+
--_success: var(--ag-ui-success, light-dark(#15803d, #4ade80));
|
|
135
|
+
--_danger: var(--ag-ui-danger, light-dark(#b91c1c, #f87171));
|
|
136
|
+
--_muted: var(--ag-ui-muted, var(--_ink-3));
|
|
137
|
+
|
|
138
|
+
/* Tool-call status icon glyphs (override to re-theme) + spinner speed.
|
|
139
|
+
The pending state is the animated ring; the settled states use these. */
|
|
140
|
+
--_tool-icon-done: var(--ag-ui-tool-icon-done, "✓");
|
|
141
|
+
--_tool-icon-error: var(--ag-ui-tool-icon-error, "✕");
|
|
142
|
+
--_tool-icon-declined: var(--ag-ui-tool-icon-declined, "⊘");
|
|
143
|
+
--_tool-icon-interrupted: var(--ag-ui-tool-icon-interrupted, "◌");
|
|
144
|
+
|
|
145
|
+
/* Disclosure marks on every expandable row. Tokenised for the same reason
|
|
146
|
+
the status icons above are: a host re-theming one set and not the other
|
|
147
|
+
ends up with two vocabularies in one transcript. */
|
|
148
|
+
--_disclosure-collapsed: var(--ag-ui-disclosure-collapsed, "▸");
|
|
149
|
+
--_disclosure-expanded: var(--ag-ui-disclosure-expanded, "▾");
|
|
150
|
+
--_tool-spin-duration: var(--ag-ui-tool-spin-duration, 0.7s);
|
|
151
|
+
|
|
152
|
+
/* Answer well (opt-in via data-answer-well) — boxes a whole assistant turn. */
|
|
153
|
+
--_well-bg: var(--ag-ui-well-bg, transparent);
|
|
154
|
+
--_well-border: var(--ag-ui-well-border, var(--_border));
|
|
155
|
+
--_well-radius: var(--ag-ui-well-radius, var(--_radius));
|
|
156
|
+
|
|
157
|
+
/* Surface — set --ag-ui-shadow: none for a flush, embedded panel. */
|
|
158
|
+
--_frame-shadow: var(--ag-ui-frame-shadow, 0 1px 2px light-dark(rgb(0 0 0 / 0.05), rgb(255 255 255 / 0.04)), 0 12px 32px -16px light-dark(rgb(0 0 0 / 0.22), rgb(0 0 0 / 0.7)));
|
|
159
|
+
--_shadow: var(--ag-ui-shadow, var(--_frame-shadow));
|
|
160
|
+
--_font: var(--ag-ui-font, Inter, ui-sans-serif, system-ui, sans-serif);
|
|
161
|
+
--_serif: var(--ag-ui-serif, Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif);
|
|
162
|
+
--_font-size: var(--ag-ui-font-size, var(--_text-md));
|
|
163
|
+
/* The type scale. */
|
|
164
|
+
--_text-xs: var(--ag-ui-text-xs, 11.5px);
|
|
165
|
+
--_text-sm: var(--ag-ui-text-sm, 12.5px);
|
|
166
|
+
--_text-md: var(--ag-ui-text-md, 14px);
|
|
167
|
+
--_text-lg: var(--ag-ui-text-lg, 16px);
|
|
168
|
+
--_leading: var(--ag-ui-leading, 1.55);
|
|
169
|
+
--_code-font: var(--ag-ui-code-font, ui-monospace, "SF Mono", Menlo, monospace);
|
|
170
|
+
|
|
171
|
+
/* Header / launcher icon box. */
|
|
172
|
+
--_icon-size: var(--ag-ui-icon-size, 22px);
|
|
173
|
+
--_icon-radius: var(--ag-ui-icon-radius, 4px);
|
|
174
|
+
|
|
175
|
+
/* Composer — one bordered surface holding the field and its tool row. */
|
|
176
|
+
--_composer-radius: var(--ag-ui-composer-radius, 12px);
|
|
177
|
+
--_composer-max-height: var(--ag-ui-composer-max-height, 40vh);
|
|
178
|
+
--_tool-btn-size: var(--ag-ui-tool-btn-size, 30px);
|
|
179
|
+
--_send-size: var(--ag-ui-send-size, 30px);
|
|
180
|
+
--_glyph-size: var(--ag-ui-glyph-size, 18px);
|
|
181
|
+
--_glyph-stroke: var(--ag-ui-glyph-stroke, 1.75);
|
|
182
|
+
|
|
183
|
+
/* How wide a chart is allowed to get. A cap rather than a width: below it
|
|
184
|
+
the chart fills its column, and above it a wider panel is just a wider
|
|
185
|
+
panel. */
|
|
186
|
+
--_chart-max-width: var(--ag-ui-chart-max-width, 480px);
|
|
187
|
+
/* Chart series. Quiet draws in ink and keeps hues for the series past two. */
|
|
188
|
+
--_chart-1: var(--ag-ui-chart-1, var(--_fg));
|
|
189
|
+
--_chart-2: var(--ag-ui-chart-2, color-mix(in oklch, var(--_fg) 32%, var(--_bg)));
|
|
190
|
+
--_chart-3: var(--ag-ui-chart-3, #e0803c);
|
|
191
|
+
--_chart-4: var(--ag-ui-chart-4, #b563d8);
|
|
192
|
+
--_chart-5: var(--ag-ui-chart-5, #d84f6e);
|
|
193
|
+
--_chart-6: var(--ag-ui-chart-6, #3ba7c4);
|
|
194
|
+
|
|
195
|
+
/* Unread badge on the launcher. */
|
|
196
|
+
--_badge-bg: var(--ag-ui-badge-bg, var(--_danger));
|
|
197
|
+
--_badge-fg: var(--ag-ui-badge-fg, #ffffff);
|
|
198
|
+
--_badge-size: var(--ag-ui-badge-size, 18px);
|
|
199
|
+
--_badge-font-size: var(--ag-ui-badge-font-size, 11px);
|
|
200
|
+
|
|
201
|
+
/* The floating launcher a collapsed widget shrinks to. */
|
|
202
|
+
--_launcher-size: var(--ag-ui-launcher-size, 48px);
|
|
203
|
+
--_launcher-bg: var(--ag-ui-launcher-bg, var(--_bg));
|
|
204
|
+
--_launcher-fg: var(--ag-ui-launcher-fg, var(--_fg));
|
|
205
|
+
--_launcher-radius: var(--ag-ui-launcher-radius, 14px);
|
|
206
|
+
--_launcher-icon-size: var(--ag-ui-launcher-icon-size, 22px);
|
|
207
|
+
--_launcher-inset: var(--ag-ui-launcher-inset, auto 0 0 auto);
|
|
208
|
+
|
|
209
|
+
/* Motion. One duration and two curves drive every collapse, expand and
|
|
210
|
+
slide-over, so the widget accelerates and settles as one thing. The
|
|
211
|
+
default curve decelerates into place; the pop curve overshoots slightly,
|
|
212
|
+
for something arriving. */
|
|
213
|
+
--_motion: var(--ag-ui-motion, 0.28s);
|
|
214
|
+
--_ease: var(--ag-ui-ease, cubic-bezier(0.32, 0.72, 0, 1));
|
|
215
|
+
--_ease-pop: var(--ag-ui-ease-pop, cubic-bezier(0.34, 1.36, 0.64, 1));
|
|
216
|
+
|
|
217
|
+
/* Spacing — the density preset overrides these. */
|
|
218
|
+
--_space: var(--ag-ui-space, 10px);
|
|
219
|
+
--_pad: var(--ag-ui-pad, 16px);
|
|
220
|
+
--_msg-pad: var(--ag-ui-msg-pad, 8px 12px);
|
|
221
|
+
--_msg-radius: var(--ag-ui-msg-radius, 12px);
|
|
222
|
+
|
|
223
|
+
/* Edges of the viewport the host has already spent, and that a fixed
|
|
224
|
+
placement must therefore stay out of: a sticky nav bar, a docked toolbar,
|
|
225
|
+
a device's safe area. Four longhands rather than one shorthand because a
|
|
226
|
+
custom property is a token stream and CSS cannot index one -- the height
|
|
227
|
+
arithmetic below needs the vertical pair on its own.
|
|
228
|
+
|
|
229
|
+
Every fixed placement derives from these, and the heights subtract them in
|
|
230
|
+
one place. A host that reserved its chrome by restating --ag-ui-inset per
|
|
231
|
+
placement had to keep --ag-ui-height in step by hand, and forgetting it
|
|
232
|
+
overflowed the panel past the bottom of the screen with nothing to say so.
|
|
233
|
+
|
|
234
|
+
These take env(safe-area-inset-*) verbatim, which is what a full-bleed
|
|
235
|
+
placement wants on a device with a notch. */
|
|
236
|
+
--_viewport-inset-top: var(--ag-ui-viewport-inset-top, 0px);
|
|
237
|
+
--_viewport-inset-right: var(--ag-ui-viewport-inset-right, 0px);
|
|
238
|
+
--_viewport-inset-bottom: var(--ag-ui-viewport-inset-bottom, 0px);
|
|
239
|
+
--_viewport-inset-left: var(--ag-ui-viewport-inset-left, 0px);
|
|
240
|
+
/* What is left of the viewport once the host's chrome is taken out, on both
|
|
241
|
+
axes, so a placement never composes this itself and no host can subtract
|
|
242
|
+
an edge from the position and forget it in the height.
|
|
243
|
+
|
|
244
|
+
Settable in their own right, and that is not only convention: an on-screen
|
|
245
|
+
keyboard changes no viewport-percentage length -- not vh, not dvh, not svh
|
|
246
|
+
-- so a full-bleed panel on a phone has to be told the height rather than
|
|
247
|
+
deriving it. The value to publish there is the visual viewport's. */
|
|
248
|
+
--_viewport-height: var(
|
|
249
|
+
--ag-ui-viewport-height,
|
|
250
|
+
calc(
|
|
251
|
+
min(var(--_visual-viewport-inset-top) + var(--_visual-viewport-height), 100dvh - var(--_viewport-inset-bottom)) -
|
|
252
|
+
var(--_viewport-inset-top) - var(--_keyboard-inset-top)
|
|
253
|
+
)
|
|
254
|
+
);
|
|
255
|
+
/* That default is the host's box cut to the part of the screen the user can
|
|
256
|
+
see: from the top the panel starts at, the host's reserved top moved down
|
|
257
|
+
by the keyboard inset below, to whichever is further up, the bottom of the
|
|
258
|
+
visible area or the host's reserved bottom. Where nothing has measured, the
|
|
259
|
+
visible area is the layout viewport with no pan, and this is the host's
|
|
260
|
+
box exactly.
|
|
261
|
+
|
|
262
|
+
Cut rather than replaced. A measured height used as the whole answer kept
|
|
263
|
+
a bar the host reserved at the top in the position and out of the height,
|
|
264
|
+
so the panel ran that far past the bottom of the visible area, with its
|
|
265
|
+
composer behind the keyboard. */
|
|
266
|
+
/* The measured height of the part of the screen the user can actually see,
|
|
267
|
+
written by the element from the visual viewport and falling back to the
|
|
268
|
+
layout viewport where nothing has measured yet.
|
|
269
|
+
|
|
270
|
+
This is the on-screen keyboard, and it needs measuring because no CSS
|
|
271
|
+
length describes it: an on-screen keyboard has no effect on any
|
|
272
|
+
viewport-percentage unit, so 100vh, 100dvh and 100svh are all the same
|
|
273
|
+
number with the keyboard up as without it. A full-bleed panel sized from
|
|
274
|
+
any of them puts its composer behind the keyboard the user is typing into.
|
|
275
|
+
|
|
276
|
+
Separate from the token above so a host that states the usable height
|
|
277
|
+
outright still wins: the element writes this one inline, and an inline
|
|
278
|
+
value would otherwise outrank the host's own rule.
|
|
279
|
+
|
|
280
|
+
The fallback is dvh rather than vh because the browser's own bars do move
|
|
281
|
+
it, where a keyboard does not. iOS Safari resolves vh to the viewport with
|
|
282
|
+
its bars collapsed, so on a page that does not scroll them away a panel
|
|
283
|
+
sized from it ran under the address bar by the bars' height -- 40px on
|
|
284
|
+
the phone measured -- with a docked composer underneath. dvh is the
|
|
285
|
+
viewport with the bars as they are. */
|
|
286
|
+
--_visual-viewport-height: var(--ag-ui-visual-viewport-height, 100dvh);
|
|
287
|
+
/* How much of the layout viewport is hidden below the visible one, measured
|
|
288
|
+
and written by the element alongside the height above.
|
|
289
|
+
|
|
290
|
+
A shorter panel is not enough on its own for anything anchored to the
|
|
291
|
+
bottom. A floating widget is positioned against the layout viewport, so
|
|
292
|
+
with a keyboard up its bottom edge -- and the launcher that lives at that
|
|
293
|
+
corner -- sits behind the keyboard however tall the panel is. This is what
|
|
294
|
+
lifts it clear. */
|
|
295
|
+
/* Two tokens, for the same reason the height above has two: the element
|
|
296
|
+
writes the measurement inline, and a host that states its own value needs
|
|
297
|
+
a knob that outranks that write rather than one the next write replaces.
|
|
298
|
+
A host wanting no keyboard lift at all sets --ag-ui-keyboard-inset: 0px. */
|
|
299
|
+
--_keyboard-inset: var(--ag-ui-keyboard-inset, var(--_visual-viewport-inset-bottom));
|
|
300
|
+
--_visual-viewport-inset-bottom: var(--ag-ui-visual-viewport-inset-bottom, 0px);
|
|
301
|
+
/* How far a panel anchored at the top moves down for a keyboard, below the
|
|
302
|
+
top the host reserved. With the same two-token shape as the lift above;
|
|
303
|
+
0px keeps the panel at the host's top.
|
|
304
|
+
|
|
305
|
+
To show the field being typed into, a browser pans the visible area down
|
|
306
|
+
the layout viewport, and a fixed element stays against the layout top, so
|
|
307
|
+
a panel that did not move showed only its lower part, from the pan down,
|
|
308
|
+
with its header off the screen and an empty band under it. It moves by
|
|
309
|
+
what the pan goes past the host's reserved top, not by the whole pan: the
|
|
310
|
+
pan scrolls a bar reserved there away with the rest of the page rather
|
|
311
|
+
than pushing it down, and adding the two put the panel a whole bar below
|
|
312
|
+
the visible area. A corner panel anchored at the bottom does not use this,
|
|
313
|
+
because the band below already accounts for the pan. */
|
|
314
|
+
--_keyboard-inset-top: var(--ag-ui-keyboard-inset-top, max(0px, var(--_visual-viewport-inset-top) - var(--_viewport-inset-top)));
|
|
315
|
+
/* How much of the layout viewport is hidden above the visible one: how far
|
|
316
|
+
the browser panned. Measured and written by the element with the two
|
|
317
|
+
above. */
|
|
318
|
+
--_visual-viewport-inset-top: var(--ag-ui-visual-viewport-inset-top, 0px);
|
|
319
|
+
--_viewport-width: var(
|
|
320
|
+
--ag-ui-viewport-width,
|
|
321
|
+
calc(100vw - var(--_viewport-inset-left) - var(--_viewport-inset-right))
|
|
322
|
+
);
|
|
323
|
+
|
|
324
|
+
/* Layout — override from outside to dock the widget anywhere.
|
|
325
|
+
Set --ag-ui-position: static (and place this element in your own
|
|
326
|
+
grid/flex layout) to embed it in the page flow instead of floating. */
|
|
327
|
+
--_position: var(--ag-ui-position, fixed);
|
|
328
|
+
--_z-index: var(--ag-ui-z-index, 2147483000);
|
|
329
|
+
/* A size the user dragged, written inline on the host by the placement
|
|
330
|
+
code, and read ahead of the host's tokens so the drag wins. There is no
|
|
331
|
+
public token behind it; it is declared initial here only so a chat that
|
|
332
|
+
was never dragged does not inherit one, from a dragged chat it is
|
|
333
|
+
slotted into or from any page rule naming it. The inline value still
|
|
334
|
+
beats this default. */
|
|
335
|
+
--_drag-width: initial;
|
|
336
|
+
--_drag-height: initial;
|
|
337
|
+
/* Where a docked panel stands, written inline the same way by the placement
|
|
338
|
+
code: the bottom bar's height, or the host anchor's distance from the
|
|
339
|
+
bottom and right edges, or from the top to its bottom for a panel opening
|
|
340
|
+
below it. Read only by the dock rules, each with a 0px fallback; declared
|
|
341
|
+
initial so it never inherits any of them. */
|
|
342
|
+
--_dock-bottom: initial;
|
|
343
|
+
--_dock-right: initial;
|
|
344
|
+
--_dock-top: initial;
|
|
345
|
+
/* Where the conversation list stands beside the host's button under
|
|
346
|
+
collapse-to="none", written inline by the element from the button's box.
|
|
347
|
+
Declared initial for the same reason. */
|
|
348
|
+
--_threads-top: initial;
|
|
349
|
+
--_threads-bottom: initial;
|
|
350
|
+
--_threads-right: initial;
|
|
351
|
+
--_threads-room: initial;
|
|
352
|
+
/* The gap between a panel and the host's own button it rises from under
|
|
353
|
+
collapse-to="none". The button usually sits inside a taller toolbar, so a
|
|
354
|
+
host sets this to the button's distance from the toolbar's top plus the
|
|
355
|
+
clearance it wants, and the panel stands clear of the toolbar. */
|
|
356
|
+
--_anchor-gap: var(--ag-ui-anchor-gap, 8px);
|
|
357
|
+
--_width: var(--_drag-width, var(--ag-ui-width, 380px));
|
|
358
|
+
--_height: var(--_drag-height, var(--ag-ui-height, 560px));
|
|
359
|
+
/* The gutter a resting floating panel keeps between itself and the edge of
|
|
360
|
+
the box the host left free. One number, because the inset below spends it
|
|
361
|
+
and the cap beneath has to know it was spent. */
|
|
362
|
+
--_edge-gutter: var(--ag-ui-edge-gutter, 24px);
|
|
363
|
+
--_inset: var(
|
|
364
|
+
--ag-ui-inset,
|
|
365
|
+
auto calc(var(--_edge-gutter) + var(--_viewport-inset-right))
|
|
366
|
+
calc(var(--_edge-gutter) + var(--_viewport-inset-bottom) + var(--_keyboard-inset)) auto
|
|
367
|
+
);
|
|
368
|
+
/* The cap is what the host left free, less the *one* gutter the inset above
|
|
369
|
+
spends on the anchored edge -- not two, and not none.
|
|
370
|
+
|
|
371
|
+
Two was the first answer and it was felt on one axis only. The arithmetic
|
|
372
|
+
says why: the default panel is 560 tall against a cap of the viewport
|
|
373
|
+
minus 48, which on an 800px screen with a header reserved is 72px of
|
|
374
|
+
headroom, so the height reaches its cap almost immediately; the default
|
|
375
|
+
width is 380 against a cap near 1230, which is 850px nothing ever reaches.
|
|
376
|
+
Once the size is capped a grip cannot grow the panel, so a pull on the
|
|
377
|
+
anchored edge is written as position instead and the panel travels, and a
|
|
378
|
+
pull on the free edge stops a whole gutter short of an edge a drag can
|
|
379
|
+
reach.
|
|
380
|
+
|
|
381
|
+
None was the correction, and it overshot: the panel is anchored bottom-
|
|
382
|
+
right with a gutter already spent there, so a cap of the full usable
|
|
383
|
+
height puts the far edge exactly one gutter outside it. On an 800px screen
|
|
384
|
+
with nothing reserved that is a top of -24 -- the header, and every
|
|
385
|
+
control in it, off the top of the window. Reserve a 120px header and it
|
|
386
|
+
sits inside that instead, which is the one thing the reservation exists to
|
|
387
|
+
prevent.
|
|
388
|
+
|
|
389
|
+
One is the fixed point of both complaints. A resting panel grown to the
|
|
390
|
+
cap runs from the usable near edge to its gutter on the far one, so the
|
|
391
|
+
near edge is reachable by a resize exactly as it is by a drag, and neither
|
|
392
|
+
can put any part of the panel outside the box. */
|
|
393
|
+
--_max-width: var(--ag-ui-max-width, calc(var(--_viewport-width) - var(--_edge-gutter)));
|
|
394
|
+
--_max-height: var(--ag-ui-max-height, calc(var(--_viewport-height) - var(--_edge-gutter)));
|
|
395
|
+
/* The size the header's maximize control grows the panel to: the cap above
|
|
396
|
+
unless the host names one. A side column reads the width only. */
|
|
397
|
+
--_maximized-width: var(--ag-ui-maximized-width, var(--_max-width));
|
|
398
|
+
--_maximized-height: var(--ag-ui-maximized-height, var(--_max-height));
|
|
399
|
+
/* The page a side column must leave beside it. A switch, as above: unset, a
|
|
400
|
+
cap that reads it with no fallback drops out and caps nothing. */
|
|
401
|
+
--_min-page-width-set: var(--ag-ui-min-page-width);
|
|
402
|
+
/* Reading-column width for placement="page" (full-bleed, centred content). */
|
|
403
|
+
--_content-max-width: var(--ag-ui-content-max-width, 820px);
|
|
404
|
+
/* The greeting over an empty full-page conversation. The size scales with
|
|
405
|
+
the viewport between a phone and a desktop rather than stepping at a
|
|
406
|
+
breakpoint. */
|
|
407
|
+
--_greeting-font: var(--ag-ui-greeting-font, var(--_font));
|
|
408
|
+
--_greeting-size: var(--ag-ui-greeting-size, clamp(1.5rem, 4vw, 2.25rem));
|
|
409
|
+
/* Slim rail the sidebar placement collapses to. Only that placement reads
|
|
410
|
+
it, but it is declared here so every alias has a default in one place. */
|
|
411
|
+
--_rail-width: var(--ag-ui-rail-width, 52px);
|
|
412
|
+
|
|
413
|
+
position: var(--_position);
|
|
414
|
+
inset: var(--_inset);
|
|
415
|
+
z-index: var(--_z-index);
|
|
416
|
+
width: var(--_width);
|
|
417
|
+
max-width: var(--_max-width);
|
|
418
|
+
height: var(--_height);
|
|
419
|
+
max-height: var(--_max-height);
|
|
420
|
+
display: flex;
|
|
421
|
+
font-family: var(--_font);
|
|
422
|
+
font-size: var(--_font-size);
|
|
423
|
+
color: var(--_fg);
|
|
424
|
+
|
|
425
|
+
/* Surfaces a theme can tint; Quiet leaves them neutral. */
|
|
426
|
+
--_tint: var(--ag-ui-tint, var(--_wash));
|
|
427
|
+
--_tint-2: var(--ag-ui-tint-2, var(--_user-bg));
|
|
428
|
+
|
|
429
|
+
/* Status marks drawn as masks, so they take the colour of their state. */
|
|
430
|
+
--_ico-check: var(--ag-ui-ico-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"));
|
|
431
|
+
--_ico-error: var(--ag-ui-ico-error, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3Cpath d='M8 4.9v3.7M8 11.1v.1'/%3E%3C/svg%3E"));
|
|
432
|
+
--_ico-declined: var(--ag-ui-ico-declined, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3Cpath d='M3.8 12.2l8.4-8.4'/%3E%3C/svg%3E"));
|
|
433
|
+
--_ico-chevron: var(--ag-ui-ico-chevron, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5l4.5 4.5L6 12.5'/%3E%3C/svg%3E"));
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* The colour drawn on the accent, from the accent's own luminance: white on
|
|
437
|
+
an accent darker than WCAG relative luminance 0.179, black on a lighter
|
|
438
|
+
one. That is the crossover where the two give the same contrast, so the
|
|
439
|
+
pick is always the better of the two and never under 4.58:1. A threshold on
|
|
440
|
+
oklch lightness was tried first and missed: indigo 500 sits under the
|
|
441
|
+
threshold that works for greys and took white at 4.47:1. Each channel is
|
|
442
|
+
the same expression over the linear channels, so the result is pure black
|
|
443
|
+
or pure white. A host that sets a mid-tone brand accent in the dark scheme
|
|
444
|
+
would otherwise get the scheme's near-black on it. Relative colour syntax
|
|
445
|
+
with channel arithmetic is Chrome 119, Firefox 128 and Safari 18. Of the
|
|
446
|
+
browsers at or above this package's floor (Chrome 123, Firefox 120, Safari
|
|
447
|
+
17.5), Firefox 120 to 127 lack it, and Safari 17.5 and 17.6 parse an older
|
|
448
|
+
draft that rejects this expression, so the test below asks for the exact
|
|
449
|
+
expression and those engines keep the fallback above. light-dark needs no
|
|
450
|
+
such test: the floor is set where every engine has it. */
|
|
451
|
+
@supports (color: color(from red srgb-linear clamp(0, (0.179 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) * 100000, 1) 0 0)) {
|
|
452
|
+
:host {
|
|
453
|
+
--_on-accent: var(--ag-ui-on-accent, color(from var(--_accent) srgb-linear clamp(0, (0.179 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) * 100000, 1) clamp(0, (0.179 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) * 100000, 1) clamp(0, (0.179 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) * 100000, 1)));
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* Without relative colour syntax, classic and code keep the white they drew
|
|
458
|
+
before the theme set, not the scheme's colour: their accents are dark in
|
|
459
|
+
both schemes. Only on that path, so where the pick can be computed it is.
|
|
460
|
+
The condition is the one above, negated, and must stay its exact twin. */
|
|
461
|
+
@supports not (color: color(from red srgb-linear clamp(0, (0.179 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) * 100000, 1) 0 0)) {
|
|
462
|
+
:host([theme~="classic"]),
|
|
463
|
+
:host([theme~="code"]) {
|
|
464
|
+
--_on-accent: var(--ag-ui-on-accent, #ffffff);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* The header buttons' default hover square as the header text's opposite,
|
|
469
|
+
so white text gets a darker square and dark text a lighter one. A square
|
|
470
|
+
mixed from the text itself moves the ground toward the glyph: white on a
|
|
471
|
+
mid-blue header fell from 5.1:1 to 3.75:1 under the pointer. Moving away
|
|
472
|
+
from it can only raise what the host's own pair reads. Gated on this
|
|
473
|
+
exact expression, so a browser that cannot compute it keeps the square
|
|
474
|
+
mixed from the text rather than losing the square altogether. */
|
|
475
|
+
@supports (color: rgb(from red calc(255 - r) calc(255 - g) calc(255 - b))) {
|
|
476
|
+
:host {
|
|
477
|
+
--_header-btn-hover-auto: color-mix(in srgb, rgb(from var(--_header-fg-set) calc(255 - r) calc(255 - g) calc(255 - b)) 18%, transparent);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
`;
|
package/src/ui/styles.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// The shadow stylesheet, composed from one module per concern. Each module is
|
|
2
|
+
// a plain string constant so the element can adopt the whole sheet without a
|
|
3
|
+
// build-time CSS pipeline, and the shadow boundary scopes every class name.
|
|
4
|
+
//
|
|
5
|
+
// The list below is in cascade order, and that order is load-bearing: two
|
|
6
|
+
// rules of equal specificity resolve by which comes later, and several
|
|
7
|
+
// modules restate a state another module set at rest. A module moves in this
|
|
8
|
+
// list only with a browser test that pins what the move changes. The split
|
|
9
|
+
// that produced these modules moved no rule, so the composed sheet is the
|
|
10
|
+
// single stylesheet it replaced: the rules and their order are unchanged and
|
|
11
|
+
// only comments differ, which is also why a few small rules still sit in a
|
|
12
|
+
// neighbouring concern's module.
|
|
13
|
+
//
|
|
14
|
+
// Every module is a template literal: a backtick or a dollar-brace inside a
|
|
15
|
+
// CSS comment ends it, and tsc reports the error far from the edit.
|
|
16
|
+
|
|
17
|
+
import { CHART_STYLES } from "./charts/chart_styles.js";
|
|
18
|
+
import { ATTACHMENT_STYLES } from "./composer/attachment_styles.js";
|
|
19
|
+
import { COMPOSER_STYLES } from "./composer/composer_styles.js";
|
|
20
|
+
import { SKILL_STYLES } from "./composer/skill_styles.js";
|
|
21
|
+
import { HISTORY_STYLES } from "./history/history_styles.js";
|
|
22
|
+
import { APPROVAL_STYLES } from "./interrupts/approval_styles.js";
|
|
23
|
+
import { CONFIRMATION_STYLES } from "./interrupts/confirmation_styles.js";
|
|
24
|
+
import { QUESTION_STYLES } from "./interrupts/question_styles.js";
|
|
25
|
+
import { PLACE_STYLES } from "./place/place_styles.js";
|
|
26
|
+
import { COLLAPSE_STYLES } from "./placement/collapse_styles.js";
|
|
27
|
+
import { DOCK_STYLES } from "./placement/dock_styles.js";
|
|
28
|
+
import { EMBEDDED_STYLES } from "./placement/embedded_styles.js";
|
|
29
|
+
import { LAUNCHER_STYLES } from "./placement/launcher_styles.js";
|
|
30
|
+
import { PAGE_STYLES } from "./placement/page_styles.js";
|
|
31
|
+
import { PRESET_STYLES } from "./placement/preset_styles.js";
|
|
32
|
+
import { RESIZE_STYLES } from "./placement/resize_styles.js";
|
|
33
|
+
import { SIDEBAR_STYLES } from "./placement/sidebar_styles.js";
|
|
34
|
+
import { SMALL_VIEWPORT_STYLES } from "./placement/small_viewport_styles.js";
|
|
35
|
+
import { RUN_NOTICE_STYLES } from "./progress/run_notice_styles.js";
|
|
36
|
+
import { THOUGHTS_STYLES } from "./progress/thoughts_styles.js";
|
|
37
|
+
import { TOOL_GROUP_STYLES } from "./progress/tool_group_styles.js";
|
|
38
|
+
import { TOOL_STEP_STYLES } from "./progress/tool_step_styles.js";
|
|
39
|
+
import { FRAME_STYLES } from "./shell/frame_styles.js";
|
|
40
|
+
import { THEME_STYLES } from "./shell/theme_styles.js";
|
|
41
|
+
import { TOKEN_STYLES } from "./shell/token_styles.js";
|
|
42
|
+
import { CLASSIC_STYLES } from "./themes/classic_styles.js";
|
|
43
|
+
import { CLASSIC_TOKENS } from "./themes/classic_tokens.js";
|
|
44
|
+
import { CODE_TOKENS } from "./themes/code_tokens.js";
|
|
45
|
+
import { LEDGER_STYLES } from "./themes/ledger_styles.js";
|
|
46
|
+
import { LEDGER_TOKENS } from "./themes/ledger_tokens.js";
|
|
47
|
+
import { MODERN_STYLES } from "./themes/modern_styles.js";
|
|
48
|
+
import { QUIET_STYLES } from "./themes/quiet_styles.js";
|
|
49
|
+
import { SCHEME_STYLES } from "./themes/scheme_styles.js";
|
|
50
|
+
import { SOFT_STYLES } from "./themes/soft_styles.js";
|
|
51
|
+
import { SOFT_TOKENS } from "./themes/soft_tokens.js";
|
|
52
|
+
import { ATTACHMENT_CHIP_STYLES } from "./transcript/attachment_chip_styles.js";
|
|
53
|
+
import { GREETING_STYLES } from "./transcript/greeting_styles.js";
|
|
54
|
+
import { MESSAGE_ACTION_STYLES } from "./transcript/message_action_styles.js";
|
|
55
|
+
import { MESSAGE_STYLES } from "./transcript/message_styles.js";
|
|
56
|
+
import { TRANSCRIPT_STYLES } from "./transcript/transcript_styles.js";
|
|
57
|
+
|
|
58
|
+
export const STYLES: string = [
|
|
59
|
+
// Quiet's tokens are the defaults; each theme's tokens follow, then the
|
|
60
|
+
// scheme, then density, so density="compact" outranks a theme's own scale.
|
|
61
|
+
TOKEN_STYLES,
|
|
62
|
+
CLASSIC_TOKENS,
|
|
63
|
+
CODE_TOKENS,
|
|
64
|
+
SOFT_TOKENS,
|
|
65
|
+
LEDGER_TOKENS,
|
|
66
|
+
SCHEME_STYLES,
|
|
67
|
+
THEME_STYLES,
|
|
68
|
+
PRESET_STYLES,
|
|
69
|
+
PAGE_STYLES,
|
|
70
|
+
// Ahead of the phone block and no heavier than it: a docked panel is still
|
|
71
|
+
// full-bleed on a phone.
|
|
72
|
+
DOCK_STYLES,
|
|
73
|
+
SMALL_VIEWPORT_STYLES,
|
|
74
|
+
SIDEBAR_STYLES,
|
|
75
|
+
LAUNCHER_STYLES,
|
|
76
|
+
EMBEDDED_STYLES,
|
|
77
|
+
FRAME_STYLES,
|
|
78
|
+
COLLAPSE_STYLES,
|
|
79
|
+
TRANSCRIPT_STYLES,
|
|
80
|
+
GREETING_STYLES,
|
|
81
|
+
MESSAGE_STYLES,
|
|
82
|
+
THOUGHTS_STYLES,
|
|
83
|
+
TOOL_STEP_STYLES,
|
|
84
|
+
RESIZE_STYLES,
|
|
85
|
+
COMPOSER_STYLES,
|
|
86
|
+
PLACE_STYLES,
|
|
87
|
+
ATTACHMENT_STYLES,
|
|
88
|
+
CHART_STYLES,
|
|
89
|
+
RUN_NOTICE_STYLES,
|
|
90
|
+
ATTACHMENT_CHIP_STYLES,
|
|
91
|
+
CONFIRMATION_STYLES,
|
|
92
|
+
MESSAGE_ACTION_STYLES,
|
|
93
|
+
APPROVAL_STYLES,
|
|
94
|
+
QUESTION_STYLES,
|
|
95
|
+
SKILL_STYLES,
|
|
96
|
+
HISTORY_STYLES,
|
|
97
|
+
// The step group restates, inside a group, card rules the modules above set
|
|
98
|
+
// at rest; it outweighs them rather than relying on order, and sits ahead
|
|
99
|
+
// of the themes so a theme restating a group rule at equal weight wins.
|
|
100
|
+
TOOL_GROUP_STYLES,
|
|
101
|
+
// Each theme's structure comes last: it restates rules the modules above
|
|
102
|
+
// set at rest, at equal weight. Classic and code have no structural
|
|
103
|
+
// module; they are the base stylesheet, and classic adds only its
|
|
104
|
+
// contrast fixes.
|
|
105
|
+
CLASSIC_STYLES,
|
|
106
|
+
MODERN_STYLES,
|
|
107
|
+
QUIET_STYLES,
|
|
108
|
+
SOFT_STYLES,
|
|
109
|
+
LEDGER_STYLES,
|
|
110
|
+
].join("");
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// The classic theme's contrast fixes. Classic's structure is the base
|
|
2
|
+
// stylesheet, so this holds only what it took to bring the old look to AA.
|
|
3
|
+
export const CLASSIC_STYLES: string = `
|
|
4
|
+
/* ── Classic ──────────────────────────────────────────────────────────────
|
|
5
|
+
The status pill draws its state's colour on a grey wash, which measured
|
|
6
|
+
3.75:1 for done in the light scheme and under 2.5:1 in the dark one. Each
|
|
7
|
+
state's ink is pulled halfway to the text colour: darker on the light
|
|
8
|
+
panel, lighter on the dark one, still recognisably its state. Scoped to
|
|
9
|
+
classic, so code keeps the pill it always had. */
|
|
10
|
+
:host([theme~="classic"]) .tool-call-status {
|
|
11
|
+
color: color-mix(in oklch, var(--_muted) 50%, var(--_fg));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host([theme~="classic"]) .tool-call[data-status="deferred"] .tool-call-status {
|
|
15
|
+
color: color-mix(in oklch, var(--_accent) 50%, var(--_fg));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([theme~="classic"]) .tool-call[data-status="done"] .tool-call-status {
|
|
19
|
+
color: color-mix(in oklch, var(--_success) 50%, var(--_fg));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([theme~="classic"]) .tool-call[data-status="error"] .tool-call-status {
|
|
23
|
+
color: color-mix(in oklch, var(--_danger) 50%, var(--_fg));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* The browser's default placeholder measured 3.93:1 on the dark composer.
|
|
27
|
+
The muted ink clears 4.5:1 in both schemes. */
|
|
28
|
+
:host([theme~="classic"]) .input::placeholder {
|
|
29
|
+
color: var(--_muted);
|
|
30
|
+
opacity: 1;
|
|
31
|
+
}
|
|
32
|
+
`;
|