@stisocial/ui 0.1.0 → 0.2.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 +32 -0
- package/README.md +25 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.css +73 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.d.ts +27 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.js +80 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.module.js +15 -0
- package/dist/agency/FacebookPostPreview/index.d.ts +2 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.css +84 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.d.ts +23 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.js +80 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.module.js +17 -0
- package/dist/agency/InstagramPostPreview/index.d.ts +2 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.css +84 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.d.ts +24 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.js +88 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.module.js +13 -0
- package/dist/agency/InstagramReelPreview/index.d.ts +2 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.css +105 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.d.ts +23 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.js +59 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.module.js +14 -0
- package/dist/agency/InstagramStoryPreview/index.d.ts +2 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.css +83 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.d.ts +30 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.js +99 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.module.js +16 -0
- package/dist/agency/LinkedInPostPreview/index.d.ts +2 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.css +96 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.d.ts +23 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.js +57 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.module.js +15 -0
- package/dist/agency/PinterestPinPreview/index.d.ts +2 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.css +101 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.d.ts +19 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.js +82 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.module.js +17 -0
- package/dist/agency/ThreadsPostPreview/index.d.ts +2 -0
- package/dist/agency/TikTokPreview/TikTokPreview.css +84 -0
- package/dist/agency/TikTokPreview/TikTokPreview.d.ts +25 -0
- package/dist/agency/TikTokPreview/TikTokPreview.js +95 -0
- package/dist/agency/TikTokPreview/TikTokPreview.module.js +13 -0
- package/dist/agency/TikTokPreview/index.d.ts +2 -0
- package/dist/agency/XPostPreview/XPostPreview.css +89 -0
- package/dist/agency/XPostPreview/XPostPreview.d.ts +20 -0
- package/dist/agency/XPostPreview/XPostPreview.js +91 -0
- package/dist/agency/XPostPreview/XPostPreview.module.js +16 -0
- package/dist/agency/XPostPreview/index.d.ts +2 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.css +55 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.d.ts +20 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.js +49 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.module.js +13 -0
- package/dist/agency/YouTubeThumbnailPreview/index.d.ts +2 -0
- package/dist/agency/_shared/Preview.css +226 -0
- package/dist/agency/_shared/Preview.d.ts +27 -0
- package/dist/agency/_shared/Preview.js +117 -0
- package/dist/agency/_shared/Preview.module.js +21 -0
- package/dist/agency/_shared/platforms.d.ts +24 -0
- package/dist/agency/_shared/platforms.js +109 -0
- package/dist/agency/index.d.ts +23 -0
- package/dist/agency/index.js +12 -0
- package/dist/ai/AiDisclosure/AiDisclosure.css +99 -0
- package/dist/ai/AiDisclosure/AiDisclosure.d.ts +28 -0
- package/dist/ai/AiDisclosure/AiDisclosure.js +52 -0
- package/dist/ai/AiDisclosure/AiDisclosure.module.js +10 -0
- package/dist/ai/AiDisclosure/index.d.ts +2 -0
- package/dist/ai/AttachmentChip/AttachmentChip.css +144 -0
- package/dist/ai/AttachmentChip/AttachmentChip.d.ts +40 -0
- package/dist/ai/AttachmentChip/AttachmentChip.js +140 -0
- package/dist/ai/AttachmentChip/AttachmentChip.module.js +13 -0
- package/dist/ai/AttachmentChip/index.d.ts +2 -0
- package/dist/ai/ChatThread/ChatThread.css +66 -0
- package/dist/ai/ChatThread/ChatThread.d.ts +20 -0
- package/dist/ai/ChatThread/ChatThread.js +87 -0
- package/dist/ai/ChatThread/ChatThread.module.js +10 -0
- package/dist/ai/ChatThread/ChatThreadMessage.css +80 -0
- package/dist/ai/ChatThread/ChatThreadMessage.d.ts +23 -0
- package/dist/ai/ChatThread/ChatThreadMessage.js +41 -0
- package/dist/ai/ChatThread/ChatThreadMessage.module.js +10 -0
- package/dist/ai/ChatThread/index.d.ts +3 -0
- package/dist/ai/ConversationList/ConversationList.css +175 -0
- package/dist/ai/ConversationList/ConversationList.d.ts +33 -0
- package/dist/ai/ConversationList/ConversationList.js +133 -0
- package/dist/ai/ConversationList/ConversationList.module.js +18 -0
- package/dist/ai/ConversationList/groups.d.ts +23 -0
- package/dist/ai/ConversationList/groups.js +47 -0
- package/dist/ai/MessageActions/MessageActions.css +9 -0
- package/dist/ai/MessageActions/MessageActions.d.ts +33 -0
- package/dist/ai/MessageActions/MessageActions.js +89 -0
- package/dist/ai/MessageActions/MessageActions.module.js +4 -0
- package/dist/ai/MessageActions/index.d.ts +2 -0
- package/dist/ai/ModelSelect/ModelSelect.css +7 -0
- package/dist/ai/ModelSelect/ModelSelect.d.ts +38 -0
- package/dist/ai/ModelSelect/ModelSelect.js +41 -0
- package/dist/ai/ModelSelect/ModelSelect.module.js +4 -0
- package/dist/ai/ModelSelect/index.d.ts +2 -0
- package/dist/ai/PromptInput/PromptInput.css +176 -0
- package/dist/ai/PromptInput/PromptInput.d.ts +54 -0
- package/dist/ai/PromptInput/PromptInput.js +199 -0
- package/dist/ai/PromptInput/PromptInput.module.js +15 -0
- package/dist/ai/PromptInput/index.d.ts +2 -0
- package/dist/ai/SourceList/SourceList.css +226 -0
- package/dist/ai/SourceList/SourceList.d.ts +36 -0
- package/dist/ai/SourceList/SourceList.js +102 -0
- package/dist/ai/SourceList/SourceList.module.js +17 -0
- package/dist/ai/StreamingText/StreamingText.css +69 -0
- package/dist/ai/StreamingText/StreamingText.d.ts +33 -0
- package/dist/ai/StreamingText/StreamingText.js +98 -0
- package/dist/ai/StreamingText/StreamingText.module.js +9 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.css +198 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.d.ts +35 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.js +54 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.module.js +14 -0
- package/dist/ai/SuggestedPrompts/index.d.ts +2 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.css +83 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.d.ts +16 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.js +47 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.module.js +10 -0
- package/dist/ai/ToolCallCard/ToolCallCard.css +249 -0
- package/dist/ai/ToolCallCard/ToolCallCard.d.ts +39 -0
- package/dist/ai/ToolCallCard/ToolCallCard.js +157 -0
- package/dist/ai/ToolCallCard/ToolCallCard.module.js +22 -0
- package/dist/ai/ToolCallCard/index.d.ts +2 -0
- package/dist/ai/_internal/glyphs.js +45 -0
- package/dist/ai/index.d.ts +23 -0
- package/dist/ai/index.js +15 -0
- package/dist/charts/AreaChart/AreaChart.css +9 -0
- package/dist/charts/AreaChart/AreaChart.d.ts +13 -0
- package/dist/charts/AreaChart/AreaChart.js +19 -0
- package/dist/charts/AreaChart/AreaChart.module.js +4 -0
- package/dist/charts/AreaChart/index.d.ts +2 -0
- package/dist/charts/BarChart/BarChart.css +9 -0
- package/dist/charts/BarChart/BarChart.d.ts +17 -0
- package/dist/charts/BarChart/BarChart.js +21 -0
- package/dist/charts/BarChart/BarChart.module.js +4 -0
- package/dist/charts/BarChart/index.d.ts +2 -0
- package/dist/charts/ChartLegend/ChartLegend.css +110 -0
- package/dist/charts/ChartLegend/ChartLegend.d.ts +36 -0
- package/dist/charts/ChartLegend/ChartLegend.js +55 -0
- package/dist/charts/ChartLegend/ChartLegend.module.js +11 -0
- package/dist/charts/ChartLegend/index.d.ts +2 -0
- package/dist/charts/ChartTable/ChartTable.css +109 -0
- package/dist/charts/ChartTable/ChartTable.d.ts +43 -0
- package/dist/charts/ChartTable/ChartTable.js +60 -0
- package/dist/charts/ChartTable/ChartTable.module.js +12 -0
- package/dist/charts/ChartTable/index.d.ts +2 -0
- package/dist/charts/ChartTooltip/ChartTooltip.css +77 -0
- package/dist/charts/ChartTooltip/ChartTooltip.d.ts +29 -0
- package/dist/charts/ChartTooltip/ChartTooltip.js +48 -0
- package/dist/charts/ChartTooltip/ChartTooltip.module.js +12 -0
- package/dist/charts/ChartTooltip/index.d.ts +2 -0
- package/dist/charts/ComboChart/ComboChart.css +9 -0
- package/dist/charts/ComboChart/ComboChart.d.ts +21 -0
- package/dist/charts/ComboChart/ComboChart.js +19 -0
- package/dist/charts/ComboChart/ComboChart.module.js +4 -0
- package/dist/charts/ComboChart/index.d.ts +3 -0
- package/dist/charts/LineChart/LineChart.css +9 -0
- package/dist/charts/LineChart/LineChart.d.ts +13 -0
- package/dist/charts/LineChart/LineChart.js +19 -0
- package/dist/charts/LineChart/LineChart.module.js +4 -0
- package/dist/charts/LineChart/index.d.ts +2 -0
- package/dist/charts/StackedBarChart/StackedBarChart.css +9 -0
- package/dist/charts/StackedBarChart/StackedBarChart.d.ts +17 -0
- package/dist/charts/StackedBarChart/StackedBarChart.js +21 -0
- package/dist/charts/StackedBarChart/StackedBarChart.module.js +4 -0
- package/dist/charts/StackedBarChart/index.d.ts +2 -0
- package/dist/charts/_internal/Bars.d.ts +31 -0
- package/dist/charts/_internal/Bars.js +295 -0
- package/dist/charts/_internal/LineArea.d.ts +32 -0
- package/dist/charts/_internal/LineArea.js +150 -0
- package/dist/charts/_internal/category.d.ts +19 -0
- package/dist/charts/_internal/category.js +139 -0
- package/dist/charts/_internal/format.d.ts +14 -0
- package/dist/charts/_internal/format.js +41 -0
- package/dist/charts/_internal/frame/ChartFrame.css +113 -0
- package/dist/charts/_internal/frame/ChartFrame.d.ts +3 -0
- package/dist/charts/_internal/frame/ChartFrame.js +217 -0
- package/dist/charts/_internal/frame/ChartFrame.module.js +17 -0
- package/dist/charts/_internal/marks/marks.css +195 -0
- package/dist/charts/_internal/marks/marks.js +192 -0
- package/dist/charts/_internal/marks/marks.module.js +12 -0
- package/dist/charts/_internal/math.js +107 -0
- package/dist/charts/_internal/shapes.d.ts +1 -0
- package/dist/charts/_internal/shapes.js +127 -0
- package/dist/charts/index.d.ts +20 -0
- package/dist/charts/index.js +9 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.css +54 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.d.ts +42 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.js +94 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.module.js +10 -0
- package/dist/commerce/AddToCartButton/index.d.ts +2 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.css +77 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.d.ts +35 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.js +60 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.module.js +10 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.css +108 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.d.ts +32 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.js +86 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.module.js +9 -0
- package/dist/commerce/QuantityStepper/index.d.ts +2 -0
- package/dist/commerce/StockBadge/StockBadge.d.ts +31 -0
- package/dist/commerce/StockBadge/StockBadge.js +47 -0
- package/dist/commerce/StockBadge/index.d.ts +2 -0
- package/dist/commerce/VariantSelector/VariantSelector.css +202 -0
- package/dist/commerce/VariantSelector/VariantSelector.d.ts +44 -0
- package/dist/commerce/VariantSelector/VariantSelector.js +77 -0
- package/dist/commerce/VariantSelector/VariantSelector.module.js +13 -0
- package/dist/commerce/VariantSelector/index.d.ts +2 -0
- package/dist/commerce/index.d.ts +10 -0
- package/dist/commerce/index.js +6 -0
- package/dist/components/Accordion/Accordion.css +176 -0
- package/dist/components/Accordion/Accordion.d.ts +40 -0
- package/dist/components/Accordion/Accordion.js +90 -0
- package/dist/components/Accordion/Accordion.module.js +17 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/Disclosure/Disclosure.css +162 -0
- package/dist/components/Disclosure/Disclosure.d.ts +32 -0
- package/dist/components/Disclosure/Disclosure.js +60 -0
- package/dist/components/Disclosure/Disclosure.module.js +15 -0
- package/dist/components/Disclosure/index.d.ts +2 -0
- package/dist/components/DocumentLayout/DocumentLayout.css +202 -0
- package/dist/components/DocumentLayout/DocumentLayout.d.ts +33 -0
- package/dist/components/DocumentLayout/DocumentLayout.js +69 -0
- package/dist/components/DocumentLayout/DocumentLayout.module.js +20 -0
- package/dist/components/DocumentLayout/index.d.ts +2 -0
- package/dist/components/DocumentTable/DocumentTable.css +149 -0
- package/dist/components/DocumentTable/DocumentTable.d.ts +40 -0
- package/dist/components/DocumentTable/DocumentTable.js +67 -0
- package/dist/components/DocumentTable/DocumentTable.module.js +12 -0
- package/dist/components/DocumentTable/index.d.ts +2 -0
- package/dist/components/ErrorPage/ErrorPage.css +181 -0
- package/dist/components/ErrorPage/ErrorPage.d.ts +44 -0
- package/dist/components/ErrorPage/ErrorPage.js +145 -0
- package/dist/components/ErrorPage/ErrorPage.module.js +17 -0
- package/dist/components/ErrorPage/index.d.ts +2 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.css +59 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.d.ts +47 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.js +198 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.module.js +11 -0
- package/dist/components/FeedbackWidget/index.d.ts +2 -0
- package/dist/components/Figure/Figure.css +64 -0
- package/dist/components/Figure/Figure.d.ts +24 -0
- package/dist/components/Figure/Figure.js +38 -0
- package/dist/components/Figure/Figure.module.js +10 -0
- package/dist/components/Figure/index.d.ts +2 -0
- package/dist/components/FileList/FileList.css +160 -0
- package/dist/components/FileList/FileList.d.ts +45 -0
- package/dist/components/FileList/FileList.js +146 -0
- package/dist/components/FileList/FileList.module.js +15 -0
- package/dist/components/FileList/index.d.ts +2 -0
- package/dist/components/FilterPanel/FilterPanel.js +1 -1
- package/dist/components/IconPicker/IconPicker.js +1 -1
- package/dist/components/LinkRows/LinkRows.css +135 -0
- package/dist/components/LinkRows/LinkRows.d.ts +32 -0
- package/dist/components/LinkRows/LinkRows.js +62 -0
- package/dist/components/LinkRows/LinkRows.module.js +15 -0
- package/dist/components/LinkRows/index.d.ts +2 -0
- package/dist/components/NotificationCenter/NotificationCenter.js +1 -1
- package/dist/components/OnboardingChecklist/OnboardingChecklist.js +1 -1
- package/dist/components/PageNumber/PageNumber.css +21 -0
- package/dist/components/PageNumber/PageNumber.d.ts +23 -0
- package/dist/components/PageNumber/PageNumber.js +33 -0
- package/dist/components/PageNumber/PageNumber.module.js +4 -0
- package/dist/components/PaymentInfo/PaymentInfo.css +116 -0
- package/dist/components/PaymentInfo/PaymentInfo.d.ts +41 -0
- package/dist/components/PaymentInfo/PaymentInfo.js +115 -0
- package/dist/components/PaymentInfo/PaymentInfo.module.js +15 -0
- package/dist/components/PaymentInfo/index.d.ts +2 -0
- package/dist/components/PersonItem/PersonItem.css +112 -0
- package/dist/components/PersonItem/PersonItem.d.ts +31 -0
- package/dist/components/PersonItem/PersonItem.js +54 -0
- package/dist/components/PersonItem/PersonItem.module.js +11 -0
- package/dist/components/PersonItem/index.d.ts +2 -0
- package/dist/components/PhoneField/PhoneField.js +1 -1
- package/dist/components/ReadMore/ReadMore.js +1 -1
- package/dist/components/SideNav/SideNav.js +1 -1
- package/dist/components/SignaturePad/SignaturePad.js +1 -1
- package/dist/components/SplitButton/SplitButton.js +1 -1
- package/dist/components/Table/Table.css +150 -0
- package/dist/components/Table/Table.d.ts +54 -0
- package/dist/components/Table/Table.js +75 -0
- package/dist/components/Table/Table.module.js +14 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.js +1 -1
- package/dist/components/TimeSlotPicker/TimeSlotPicker.d.ts +1 -11
- package/dist/components/TimeSlotPicker/TimeSlotPicker.js +2 -24
- package/dist/components/TimeSlotPicker/index.d.ts +3 -2
- package/dist/components/TimeSlotPicker/timeSlots.d.ts +12 -0
- package/dist/components/TimeSlotPicker/timeSlots.js +25 -0
- package/dist/components/TotalsBlock/TotalsBlock.css +86 -0
- package/dist/components/TotalsBlock/TotalsBlock.d.ts +32 -0
- package/dist/components/TotalsBlock/TotalsBlock.js +88 -0
- package/dist/components/TotalsBlock/TotalsBlock.module.js +10 -0
- package/dist/components/TotalsBlock/index.d.ts +3 -0
- package/dist/components/TotalsBlock/totals.d.ts +28 -0
- package/dist/components/TotalsBlock/totals.js +38 -0
- package/dist/components/TrashView/TrashView.css +166 -0
- package/dist/components/TrashView/TrashView.d.ts +49 -0
- package/dist/components/TrashView/TrashView.js +244 -0
- package/dist/components/TrashView/TrashView.module.js +22 -0
- package/dist/components/TrashView/index.d.ts +2 -0
- package/dist/components/TreeSelect/TreeSelect.js +1 -1
- package/dist/components/UploadQueue/UploadQueue.js +1 -1
- package/dist/components/Watermark/Watermark.css +51 -0
- package/dist/components/Watermark/Watermark.d.ts +23 -0
- package/dist/components/Watermark/Watermark.js +54 -0
- package/dist/components/Watermark/Watermark.module.js +8 -0
- package/dist/components/WhatsNew/WhatsNew.css +196 -0
- package/dist/components/WhatsNew/WhatsNew.d.ts +57 -0
- package/dist/components/WhatsNew/WhatsNew.js +191 -0
- package/dist/components/WhatsNew/WhatsNew.module.js +27 -0
- package/dist/components/WhatsNew/index.d.ts +2 -0
- package/dist/components/_document/text.js +14 -0
- package/dist/components/_document/types.d.ts +36 -0
- package/dist/components/_document/types.js +8 -0
- package/dist/components/_internal/listbox/SelectShell.js +1 -1
- package/dist/document/index.d.ts +13 -0
- package/dist/document/index.js +9 -0
- package/dist/editor/CodeEditor/CodeEditor.css +312 -0
- package/dist/editor/CodeEditor/CodeEditor.d.ts +66 -0
- package/dist/editor/CodeEditor/CodeEditor.js +256 -0
- package/dist/editor/CodeEditor/CodeEditor.module.js +32 -0
- package/dist/editor/CodeEditor/codeEdits.d.ts +1 -0
- package/dist/editor/CodeEditor/codeEdits.js +284 -0
- package/dist/editor/CodeEditor/highlight.js +195 -0
- package/dist/editor/CodeEditor/index.d.ts +3 -0
- package/dist/editor/JsonEditor/JsonEditor.css +10 -0
- package/dist/editor/JsonEditor/JsonEditor.d.ts +43 -0
- package/dist/editor/JsonEditor/JsonEditor.js +133 -0
- package/dist/editor/JsonEditor/JsonEditor.module.js +4 -0
- package/dist/editor/JsonEditor/index.d.ts +3 -0
- package/dist/editor/JsonEditor/json.d.ts +44 -0
- package/dist/editor/JsonEditor/json.js +246 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.css +173 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.d.ts +47 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.js +371 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.module.js +18 -0
- package/dist/editor/MarkdownEditor/commands.js +198 -0
- package/dist/editor/MarkdownEditor/index.d.ts +2 -0
- package/dist/editor/_shared/FormatIcons.js +138 -0
- package/dist/editor/_shared/textEdit.js +76 -0
- package/dist/editor/index.d.ts +9 -0
- package/dist/editor/index.js +5 -0
- package/dist/email/EmailButton/EmailButton.d.ts +22 -0
- package/dist/email/EmailButton/EmailButton.js +102 -0
- package/dist/email/EmailButton/index.d.ts +2 -0
- package/dist/email/EmailCallout/EmailCallout.d.ts +14 -0
- package/dist/email/EmailCallout/EmailCallout.js +42 -0
- package/dist/email/EmailCallout/index.d.ts +2 -0
- package/dist/email/EmailCode/EmailCode.d.ts +15 -0
- package/dist/email/EmailCode/EmailCode.js +58 -0
- package/dist/email/EmailCode/index.d.ts +2 -0
- package/dist/email/EmailColumns/EmailColumns.d.ts +18 -0
- package/dist/email/EmailColumns/EmailColumns.js +49 -0
- package/dist/email/EmailColumns/index.d.ts +2 -0
- package/dist/email/EmailDivider/EmailDivider.d.ts +7 -0
- package/dist/email/EmailDivider/EmailDivider.js +24 -0
- package/dist/email/EmailDivider/index.d.ts +2 -0
- package/dist/email/EmailFooter/EmailFooter.d.ts +30 -0
- package/dist/email/EmailFooter/EmailFooter.js +64 -0
- package/dist/email/EmailFooter/index.d.ts +2 -0
- package/dist/email/EmailHeader/EmailHeader.d.ts +23 -0
- package/dist/email/EmailHeader/EmailHeader.js +75 -0
- package/dist/email/EmailHeader/index.d.ts +2 -0
- package/dist/email/EmailHeading/EmailHeading.d.ts +11 -0
- package/dist/email/EmailHeading/EmailHeading.js +43 -0
- package/dist/email/EmailHeading/index.d.ts +2 -0
- package/dist/email/EmailImage/EmailImage.d.ts +25 -0
- package/dist/email/EmailImage/EmailImage.js +53 -0
- package/dist/email/EmailImage/index.d.ts +2 -0
- package/dist/email/EmailLayout/EmailLayout.d.ts +30 -0
- package/dist/email/EmailLayout/EmailLayout.js +79 -0
- package/dist/email/EmailLayout/emailDocument.d.ts +16 -0
- package/dist/email/EmailLayout/emailDocument.js +36 -0
- package/dist/email/EmailLayout/index.d.ts +3 -0
- package/dist/email/EmailList/EmailList.d.ts +10 -0
- package/dist/email/EmailList/EmailList.js +28 -0
- package/dist/email/EmailList/index.d.ts +2 -0
- package/dist/email/EmailPreheader/EmailPreheader.d.ts +14 -0
- package/dist/email/EmailPreheader/EmailPreheader.js +30 -0
- package/dist/email/EmailPreheader/index.d.ts +2 -0
- package/dist/email/EmailProductRow/EmailProductRow.d.ts +23 -0
- package/dist/email/EmailProductRow/EmailProductRow.js +112 -0
- package/dist/email/EmailProductRow/index.d.ts +2 -0
- package/dist/email/EmailSocialLinks/EmailSocialLinks.d.ts +19 -0
- package/dist/email/EmailSocialLinks/EmailSocialLinks.js +53 -0
- package/dist/email/EmailSocialLinks/index.d.ts +2 -0
- package/dist/email/EmailStats/EmailStats.d.ts +23 -0
- package/dist/email/EmailStats/EmailStats.js +86 -0
- package/dist/email/EmailStats/index.d.ts +2 -0
- package/dist/email/EmailTable/EmailTable.d.ts +24 -0
- package/dist/email/EmailTable/EmailTable.js +90 -0
- package/dist/email/EmailTable/index.d.ts +2 -0
- package/dist/email/EmailText/EmailText.d.ts +13 -0
- package/dist/email/EmailText/EmailText.js +35 -0
- package/dist/email/EmailText/index.d.ts +2 -0
- package/dist/email/_shared/theme.d.ts +8 -0
- package/dist/email/_shared/theme.js +90 -0
- package/dist/email/index.d.ts +36 -0
- package/dist/email/index.js +19 -0
- package/dist/icons/generated/index.js +8 -8
- package/dist/icons/index.js +8 -8
- package/dist/id/AccountMenu/AccountMenu.css +194 -0
- package/dist/id/AccountMenu/AccountMenu.d.ts +73 -0
- package/dist/id/AccountMenu/AccountMenu.js +171 -0
- package/dist/id/AccountMenu/AccountMenu.module.js +21 -0
- package/dist/id/AccountMenu/index.d.ts +2 -0
- package/dist/id/AppSwitcher/AppSwitcher.css +231 -0
- package/dist/id/AppSwitcher/AppSwitcher.d.ts +56 -0
- package/dist/id/AppSwitcher/AppSwitcher.js +141 -0
- package/dist/id/AppSwitcher/AppSwitcher.module.js +17 -0
- package/dist/id/AppSwitcher/index.d.ts +2 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.css +222 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.d.ts +62 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.js +189 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.module.js +16 -0
- package/dist/id/OrgSwitcher/index.d.ts +2 -0
- package/dist/id/PermissionGate/PermissionGate.css +68 -0
- package/dist/id/PermissionGate/PermissionGate.d.ts +32 -0
- package/dist/id/PermissionGate/PermissionGate.js +58 -0
- package/dist/id/PermissionGate/PermissionGate.module.js +11 -0
- package/dist/id/PermissionGate/index.d.ts +2 -0
- package/dist/id/SignInButton/SignInButton.css +179 -0
- package/dist/id/SignInButton/SignInButton.d.ts +29 -0
- package/dist/id/SignInButton/SignInButton.js +53 -0
- package/dist/id/SignInButton/SignInButton.module.js +10 -0
- package/dist/id/_internal/ActionItem/ActionItem.css +143 -0
- package/dist/id/_internal/ActionItem/ActionItem.js +68 -0
- package/dist/id/_internal/ActionItem/ActionItem.module.js +11 -0
- package/dist/id/_internal/StiMark/StiMark.css +28 -0
- package/dist/id/_internal/StiMark/StiMark.js +37 -0
- package/dist/id/_internal/StiMark/StiMark.module.js +8 -0
- package/dist/id/index.d.ts +10 -0
- package/dist/id/index.js +6 -0
- package/dist/index.d.ts +28 -5
- package/dist/index.js +16 -4
- package/dist/maps/DirectionsLink/DirectionsLink.css +10 -0
- package/dist/maps/DirectionsLink/DirectionsLink.d.ts +35 -0
- package/dist/maps/DirectionsLink/DirectionsLink.js +84 -0
- package/dist/maps/DirectionsLink/DirectionsLink.module.js +4 -0
- package/dist/maps/DirectionsLink/index.d.ts +2 -0
- package/dist/maps/LocationPicker/LocationPicker.css +60 -0
- package/dist/maps/LocationPicker/LocationPicker.d.ts +37 -0
- package/dist/maps/LocationPicker/LocationPicker.js +278 -0
- package/dist/maps/LocationPicker/LocationPicker.module.js +12 -0
- package/dist/maps/LocationPicker/index.d.ts +2 -0
- package/dist/maps/MapMarker/MapMarker.css +318 -0
- package/dist/maps/MapMarker/MapMarker.d.ts +35 -0
- package/dist/maps/MapMarker/MapMarker.js +142 -0
- package/dist/maps/MapMarker/MapMarker.module.js +20 -0
- package/dist/maps/MapMarker/index.d.ts +2 -0
- package/dist/maps/MapView/MapView.css +268 -0
- package/dist/maps/MapView/MapView.d.ts +71 -0
- package/dist/maps/MapView/MapView.js +495 -0
- package/dist/maps/MapView/MapView.module.js +23 -0
- package/dist/maps/MapView/index.d.ts +2 -0
- package/dist/maps/StoreLocator/StoreLocator.css +201 -0
- package/dist/maps/StoreLocator/StoreLocator.d.ts +43 -0
- package/dist/maps/StoreLocator/StoreLocator.js +225 -0
- package/dist/maps/StoreLocator/StoreLocator.module.js +21 -0
- package/dist/maps/StoreLocator/index.d.ts +2 -0
- package/dist/maps/TurkeyMap/TurkeyMap.css +229 -0
- package/dist/maps/TurkeyMap/TurkeyMap.d.ts +45 -0
- package/dist/maps/TurkeyMap/TurkeyMap.js +280 -0
- package/dist/maps/TurkeyMap/TurkeyMap.module.js +17 -0
- package/dist/maps/TurkeyMap/tileGrid.js +85 -0
- package/dist/maps/_internal/geo.d.ts +8 -0
- package/dist/maps/_internal/geo.js +116 -0
- package/dist/maps/_internal/mapContext.js +8 -0
- package/dist/maps/_internal/useControllable.js +24 -0
- package/dist/maps/index.d.ts +12 -0
- package/dist/maps/index.js +7 -0
- package/dist/media/AudioPlayer/AudioPlayer.css +106 -0
- package/dist/media/AudioPlayer/AudioPlayer.d.ts +38 -0
- package/dist/media/AudioPlayer/AudioPlayer.js +134 -0
- package/dist/media/AudioPlayer/AudioPlayer.module.js +16 -0
- package/dist/media/AudioPlayer/index.d.ts +2 -0
- package/dist/media/AudioWaveform/AudioWaveform.css +43 -0
- package/dist/media/AudioWaveform/AudioWaveform.d.ts +25 -0
- package/dist/media/AudioWaveform/AudioWaveform.js +101 -0
- package/dist/media/AudioWaveform/AudioWaveform.module.js +9 -0
- package/dist/media/AudioWaveform/peaks.d.ts +14 -0
- package/dist/media/AudioWaveform/peaks.js +54 -0
- package/dist/media/MediaCard/MediaCard.css +229 -0
- package/dist/media/MediaCard/MediaCard.d.ts +38 -0
- package/dist/media/MediaCard/MediaCard.js +120 -0
- package/dist/media/MediaCard/MediaCard.module.js +18 -0
- package/dist/media/MediaCard/index.d.ts +2 -0
- package/dist/media/VideoPlayer/VideoPlayer.css +125 -0
- package/dist/media/VideoPlayer/VideoPlayer.d.ts +54 -0
- package/dist/media/VideoPlayer/VideoPlayer.js +193 -0
- package/dist/media/VideoPlayer/VideoPlayer.module.js +12 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.css +139 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.d.ts +34 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.js +63 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.module.js +10 -0
- package/dist/media/VideoThumbnail/VideoThumbnailLink.js +18 -0
- package/dist/media/_internal/clock.js +17 -0
- package/dist/media/_internal/consent/ConsentNotice.css +55 -0
- package/dist/media/_internal/consent/ConsentNotice.js +40 -0
- package/dist/media/_internal/consent/ConsentNotice.module.js +10 -0
- package/dist/media/_internal/icons.js +77 -0
- package/dist/media/_internal/range/Range.css +187 -0
- package/dist/media/_internal/range/Range.js +130 -0
- package/dist/media/_internal/range/Range.module.js +10 -0
- package/dist/media/_internal/transport/MediaTransport.css +90 -0
- package/dist/media/_internal/transport/MediaTransport.js +172 -0
- package/dist/media/_internal/transport/MediaTransport.module.js +14 -0
- package/dist/media/_internal/url.js +31 -0
- package/dist/media/_internal/useConsent.js +28 -0
- package/dist/media/_internal/useMedia.js +146 -0
- package/dist/media/index.d.ts +9 -0
- package/dist/media/index.js +7 -0
- package/dist/messages/messages.d.ts +488 -0
- package/dist/messages/messages.js +978 -2
- package/dist/site/AnnouncementBar/AnnouncementBar.css +132 -0
- package/dist/site/AnnouncementBar/AnnouncementBar.d.ts +28 -0
- package/dist/site/AnnouncementBar/AnnouncementBar.js +64 -0
- package/dist/site/AnnouncementBar/AnnouncementBar.module.js +11 -0
- package/dist/site/AnnouncementBar/index.d.ts +2 -0
- package/dist/site/MegaMenu/MegaMenu.css +324 -0
- package/dist/site/MegaMenu/MegaMenu.d.ts +51 -0
- package/dist/site/MegaMenu/MegaMenu.js +170 -0
- package/dist/site/MegaMenu/MegaMenu.module.js +28 -0
- package/dist/site/MegaMenu/index.d.ts +2 -0
- package/dist/site/SiteFooter/SiteFooter.css +129 -0
- package/dist/site/SiteFooter/SiteFooter.d.ts +38 -0
- package/dist/site/SiteFooter/SiteFooter.js +79 -0
- package/dist/site/SiteFooter/SiteFooter.module.js +20 -0
- package/dist/site/SiteFooter/index.d.ts +2 -0
- package/dist/site/SiteHeader/SiteHeader.css +213 -0
- package/dist/site/SiteHeader/SiteHeader.d.ts +40 -0
- package/dist/site/SiteHeader/SiteHeader.js +115 -0
- package/dist/site/SiteHeader/SiteHeader.module.js +18 -0
- package/dist/site/SiteHeader/index.d.ts +2 -0
- package/dist/site/StickyCta/StickyCta.css +112 -0
- package/dist/site/StickyCta/StickyCta.d.ts +27 -0
- package/dist/site/StickyCta/StickyCta.js +69 -0
- package/dist/site/StickyCta/StickyCta.module.js +10 -0
- package/dist/site/StickyCta/index.d.ts +2 -0
- package/dist/site/index.d.ts +11 -0
- package/dist/site/index.js +6 -0
- package/dist/styles.css +24991 -14440
- package/dist/text/text.d.ts +5 -1
- package/dist/text/text.js +8 -2
- package/package.json +45 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-CodeEditor-root-79dc6 {
|
|
4
|
+
--sti-code-font-size: var(--sti-font-size-sm);
|
|
5
|
+
--sti-code-line-height: var(--sti-line-height-md);
|
|
6
|
+
--sti-code-pad-inline: var(--sti-space-3);
|
|
7
|
+
--sti-code-pad-block: var(--sti-space-3);
|
|
8
|
+
--sti-code-radius: var(--sti-radius-md);
|
|
9
|
+
--sti-code-gutter-gap: var(--sti-space-3);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.sti-CodeEditor-frame-9daac {
|
|
13
|
+
--sti-code-rows: 6;
|
|
14
|
+
--sti-code-tab: 2;
|
|
15
|
+
border: var(--sti-border-width) solid var(--sti-border-control);
|
|
16
|
+
border-radius: var(--sti-code-radius);
|
|
17
|
+
background: var(--sti-bg-canvas);
|
|
18
|
+
min-inline-size: 0;
|
|
19
|
+
transition: border-color var(--sti-duration-fast) var(--sti-ease-snap),
|
|
20
|
+
box-shadow var(--sti-duration-fast) var(--sti-ease-snap);
|
|
21
|
+
grid-template-columns: minmax(0, 1fr);
|
|
22
|
+
display: grid;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sti-CodeEditor-frame-9daac:focus-within {
|
|
27
|
+
border-color: var(--sti-focus-ring);
|
|
28
|
+
box-shadow: 0 0 0 var(--sti-field-halo)
|
|
29
|
+
color-mix(in oklab, var(--sti-focus-ring) 25%, transparent);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sti-CodeEditor-root-79dc6[data-invalid] .sti-CodeEditor-frame-9daac {
|
|
33
|
+
border-color: var(--sti-fg-danger);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.sti-CodeEditor-root-79dc6[data-invalid] .sti-CodeEditor-frame-9daac:focus-within {
|
|
37
|
+
box-shadow: 0 0 0 var(--sti-field-halo)
|
|
38
|
+
color-mix(in oklab, var(--sti-fg-danger) 25%, transparent);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sti-CodeEditor-root-79dc6[data-disabled] .sti-CodeEditor-frame-9daac {
|
|
42
|
+
opacity: var(--sti-opacity-disabled);
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sti-CodeEditor-root-79dc6[data-readonly] .sti-CodeEditor-frame-9daac {
|
|
47
|
+
background: var(--sti-bg-subtle);
|
|
48
|
+
border-style: dashed;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sti-CodeEditor-header-f5364 {
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: var(--sti-space-2);
|
|
55
|
+
min-block-size: var(--sti-control-h-md);
|
|
56
|
+
padding-block: var(--sti-space-1);
|
|
57
|
+
padding-inline: var(--sti-code-pad-inline) var(--sti-space-1);
|
|
58
|
+
border-block-end: var(--sti-border-width) solid var(--sti-border-subtle);
|
|
59
|
+
background: var(--sti-bg-subtle);
|
|
60
|
+
flex-wrap: wrap;
|
|
61
|
+
display: flex;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.sti-CodeEditor-language-85518 {
|
|
65
|
+
color: var(--sti-fg-muted);
|
|
66
|
+
font-family: var(--sti-font-mono);
|
|
67
|
+
font-size: var(--sti-font-size-xs);
|
|
68
|
+
font-weight: var(--sti-font-weight-medium);
|
|
69
|
+
line-height: var(--sti-line-height-xs);
|
|
70
|
+
letter-spacing: var(--sti-tracking-code);
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
flex: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.sti-CodeEditor-actions-870c4 {
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: var(--sti-space-1);
|
|
78
|
+
flex: none;
|
|
79
|
+
display: flex;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.sti-CodeEditor-scroller-b4d5f {
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
min-inline-size: 0;
|
|
85
|
+
font-family: var(--sti-font-mono);
|
|
86
|
+
font-size: var(--sti-code-font-size);
|
|
87
|
+
line-height: var(--sti-code-line-height);
|
|
88
|
+
font-variant-ligatures: none;
|
|
89
|
+
scrollbar-width: thin;
|
|
90
|
+
block-size: calc(var(--sti-code-rows) * 1lh + 2 * var(--sti-code-pad-block));
|
|
91
|
+
overflow: auto;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sti-CodeEditor-grid-fa567 {
|
|
95
|
+
grid-template-columns: auto minmax(max-content, 1fr);
|
|
96
|
+
min-block-size: 100%;
|
|
97
|
+
inline-size: max-content;
|
|
98
|
+
min-inline-size: 100%;
|
|
99
|
+
display: grid;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sti-CodeEditor-frame-9daac:not([data-line-numbers]) .sti-CodeEditor-grid-fa567 {
|
|
103
|
+
grid-template-columns: minmax(max-content, 1fr);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.sti-CodeEditor-gutter-a279b {
|
|
107
|
+
z-index: var(--sti-z-raised);
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
padding-block: var(--sti-code-pad-block);
|
|
110
|
+
padding-inline: var(--sti-code-pad-inline) var(--sti-code-gutter-gap);
|
|
111
|
+
border-inline-end: var(--sti-border-width) solid var(--sti-border-subtle);
|
|
112
|
+
background: var(--sti-bg-subtle);
|
|
113
|
+
color: var(--sti-fg-muted);
|
|
114
|
+
font-variant-numeric: tabular-nums;
|
|
115
|
+
text-align: end;
|
|
116
|
+
-webkit-user-select: none;
|
|
117
|
+
user-select: none;
|
|
118
|
+
grid-area: 1 / 1;
|
|
119
|
+
position: sticky;
|
|
120
|
+
inset-inline-start: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.sti-CodeEditor-number-877bf {
|
|
124
|
+
min-block-size: 1lh;
|
|
125
|
+
display: block;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.sti-CodeEditor-number-877bf[data-active] {
|
|
129
|
+
color: var(--sti-fg);
|
|
130
|
+
font-weight: var(--sti-font-weight-medium);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.sti-CodeEditor-number-877bf[data-marker="danger"] {
|
|
134
|
+
color: var(--sti-fg-danger);
|
|
135
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.sti-CodeEditor-number-877bf[data-marker="warning"] {
|
|
139
|
+
color: var(--sti-fg-warning);
|
|
140
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.sti-CodeEditor-highlight-250a3, .sti-CodeEditor-input-d00ce {
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
padding-block: var(--sti-code-pad-block);
|
|
146
|
+
padding-inline: var(--sti-code-pad-inline);
|
|
147
|
+
font: inherit;
|
|
148
|
+
letter-spacing: normal;
|
|
149
|
+
tab-size: var(--sti-code-tab);
|
|
150
|
+
white-space: pre;
|
|
151
|
+
word-spacing: normal;
|
|
152
|
+
border: 0;
|
|
153
|
+
grid-area: 1 / 2;
|
|
154
|
+
margin: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.sti-CodeEditor-frame-9daac:not([data-line-numbers]) .sti-CodeEditor-highlight-250a3, .sti-CodeEditor-frame-9daac:not([data-line-numbers]) .sti-CodeEditor-input-d00ce {
|
|
158
|
+
grid-column: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.sti-CodeEditor-highlight-250a3 {
|
|
162
|
+
z-index: var(--sti-z-base);
|
|
163
|
+
min-inline-size: 0;
|
|
164
|
+
color: var(--sti-fg);
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.sti-CodeEditor-code-b5a15 {
|
|
169
|
+
font: inherit;
|
|
170
|
+
display: block;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.sti-CodeEditor-line-70e99 {
|
|
174
|
+
min-block-size: 1lh;
|
|
175
|
+
display: block;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.sti-CodeEditor-line-70e99[data-active] {
|
|
179
|
+
background: color-mix(in oklab, var(--sti-fg) 6%, transparent);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.sti-CodeEditor-line-70e99[data-marker="danger"] {
|
|
183
|
+
background: var(--sti-bg-danger-subtle);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.sti-CodeEditor-line-70e99[data-marker="warning"] {
|
|
187
|
+
background: var(--sti-bg-warning-subtle);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.sti-CodeEditor-input-d00ce {
|
|
191
|
+
z-index: var(--sti-z-raised);
|
|
192
|
+
block-size: 100%;
|
|
193
|
+
min-block-size: 100%;
|
|
194
|
+
inline-size: 100%;
|
|
195
|
+
caret-color: var(--sti-fg);
|
|
196
|
+
color: #0000;
|
|
197
|
+
resize: none;
|
|
198
|
+
background: none;
|
|
199
|
+
outline: none;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.sti-CodeEditor-input-d00ce::placeholder {
|
|
204
|
+
color: var(--sti-fg-muted);
|
|
205
|
+
opacity: 1;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.sti-CodeEditor-input-d00ce::selection {
|
|
209
|
+
background: color-mix(in srgb, var(--sti-selection-bg) 55%, transparent);
|
|
210
|
+
color: #0000;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.sti-CodeEditor-input-d00ce:disabled {
|
|
214
|
+
cursor: not-allowed;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.sti-CodeEditor-t_keyword-7bf4f {
|
|
218
|
+
color: var(--sti-fg-signal);
|
|
219
|
+
font-weight: var(--sti-font-weight-medium);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.sti-CodeEditor-t_string-94758 {
|
|
223
|
+
color: var(--sti-fg-success);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.sti-CodeEditor-t_number-79bb8, .sti-CodeEditor-t_literal-5f743 {
|
|
227
|
+
color: var(--sti-fg-warning);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.sti-CodeEditor-t_comment-d69b0 {
|
|
231
|
+
color: var(--sti-fg-muted);
|
|
232
|
+
font-style: italic;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.sti-CodeEditor-t_function-0dc0e {
|
|
236
|
+
color: var(--sti-fg-link);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.sti-CodeEditor-t_property-52054, .sti-CodeEditor-t_attr-c07aa {
|
|
240
|
+
color: var(--sti-fg-info);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.sti-CodeEditor-t_tag-7d611 {
|
|
244
|
+
color: var(--sti-fg-danger);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.sti-CodeEditor-t_punct-6d0db {
|
|
248
|
+
color: var(--sti-fg-muted);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.sti-CodeEditor-footer-b7a14 {
|
|
252
|
+
justify-content: space-between;
|
|
253
|
+
align-items: center;
|
|
254
|
+
gap: var(--sti-space-1) var(--sti-space-4);
|
|
255
|
+
padding-block: var(--sti-space-1);
|
|
256
|
+
padding-inline: var(--sti-code-pad-inline);
|
|
257
|
+
border-block-start: var(--sti-border-width) solid var(--sti-border-subtle);
|
|
258
|
+
background: var(--sti-bg-subtle);
|
|
259
|
+
color: var(--sti-fg-muted);
|
|
260
|
+
font-size: var(--sti-font-size-xs);
|
|
261
|
+
line-height: var(--sti-line-height-xs);
|
|
262
|
+
font-variant-numeric: tabular-nums;
|
|
263
|
+
flex-wrap: wrap;
|
|
264
|
+
display: flex;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.sti-CodeEditor-position-fbc14 {
|
|
268
|
+
white-space: nowrap;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.sti-CodeEditor-description-f88d1, .sti-CodeEditor-hint-2c24c {
|
|
272
|
+
display: block;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (prefers-reduced-motion: reduce) {
|
|
276
|
+
.sti-CodeEditor-frame-9daac {
|
|
277
|
+
transition: none;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@media (forced-colors: active) {
|
|
282
|
+
.sti-CodeEditor-frame-9daac {
|
|
283
|
+
border-color: fieldtext;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.sti-CodeEditor-frame-9daac:focus-within {
|
|
287
|
+
outline: var(--sti-focus-ring-width) solid Highlight;
|
|
288
|
+
outline-offset: 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.sti-CodeEditor-highlight-250a3 {
|
|
292
|
+
visibility: hidden;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.sti-CodeEditor-input-d00ce {
|
|
296
|
+
color: fieldtext;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.sti-CodeEditor-input-d00ce::selection {
|
|
300
|
+
color: highlighttext;
|
|
301
|
+
background: highlight;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.sti-CodeEditor-line-70e99[data-active], .sti-CodeEditor-line-70e99[data-marker] {
|
|
305
|
+
background: none;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.sti-CodeEditor-number-877bf[data-marker] {
|
|
309
|
+
text-decoration: underline;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ErrorMessage } from "../../components/Field/Field.js";
|
|
2
|
+
import { CodeLanguage } from "./codeEdits.js";
|
|
3
|
+
import { KeyboardEvent, ReactNode, Ref } from "react";
|
|
4
|
+
/** Satıra iliştirilen işaret (hata ya da uyarı); yalnız görsel, ayrıntı `errorMessage` ile verilir. */
|
|
5
|
+
export interface CodeMarker {
|
|
6
|
+
/** 1 tabanlı satır numarası. */
|
|
7
|
+
line: number;
|
|
8
|
+
tone?: "danger" | "warning";
|
|
9
|
+
}
|
|
10
|
+
export interface CodeEditorProps {
|
|
11
|
+
/** Alanın adı (zorunlu). */
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
/** Etiket görsel olarak gizlenir; ad yine okunur. */
|
|
14
|
+
hideLabel?: boolean;
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
errorMessage?: ErrorMessage;
|
|
17
|
+
value?: string;
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
onChange?: (value: string) => void;
|
|
20
|
+
/** Renklendirme ve yorum satırı dili. Varsayılan `plain` (renklendirme yok). */
|
|
21
|
+
language?: CodeLanguage;
|
|
22
|
+
/** Başlıkta yazan dil adı; verilmezse dilin adı. */
|
|
23
|
+
languageLabel?: string;
|
|
24
|
+
lineNumbers?: boolean;
|
|
25
|
+
/** Sekme durağı genişliği (sütun). Varsayılan 2. */
|
|
26
|
+
tabSize?: number;
|
|
27
|
+
/** Girinti boşlukla (varsayılan) ya da sekme karakteriyle. */
|
|
28
|
+
insertSpaces?: boolean;
|
|
29
|
+
/** Tab tuşu girinti ekler (varsayılan). Kapalıysa Tab odağı taşır. */
|
|
30
|
+
indentWithTab?: boolean;
|
|
31
|
+
/** Açılış ayracı ve tırnağın karşılığını kendiliğinden ekler. Varsayılan açık. */
|
|
32
|
+
autoClose?: boolean;
|
|
33
|
+
/** En az ve en çok görünür satır; içerik arttıkça alan bu aralıkta uzar. */
|
|
34
|
+
minRows?: number;
|
|
35
|
+
maxRows?: number;
|
|
36
|
+
/** Üstteki şerit: dil adı, kopyalama düğmesi. Varsayılan açık. */
|
|
37
|
+
showHeader?: boolean;
|
|
38
|
+
/** Alttaki şerit: imleç konumu ve Tab ipucu. Varsayılan açık. */
|
|
39
|
+
showFooter?: boolean;
|
|
40
|
+
/** Başlık şeridinde kopyalama düğmesinden önce yer alan eylemler. */
|
|
41
|
+
headerActions?: ReactNode;
|
|
42
|
+
/** Alt şeritte imleç konumunun yanında yer alan durum. */
|
|
43
|
+
footerStatus?: ReactNode;
|
|
44
|
+
markers?: readonly CodeMarker[];
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
name?: string;
|
|
47
|
+
isRequired?: boolean;
|
|
48
|
+
isDisabled?: boolean;
|
|
49
|
+
isReadOnly?: boolean;
|
|
50
|
+
isInvalid?: boolean;
|
|
51
|
+
autoFocus?: boolean;
|
|
52
|
+
onKeyDown?: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
53
|
+
onBlur?: () => void;
|
|
54
|
+
inputRef?: Ref<HTMLTextAreaElement>;
|
|
55
|
+
className?: string;
|
|
56
|
+
id?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Kod düzenleyici: dış kütüphanesiz, çok satırlı gerçek bir metin alanı (klavye, seçim, geri alma
|
|
60
|
+
* ve yazma yöntemleri tarayıcınındır) ve arkasında aynı ölçülerle çizilen renklendirme katmanı.
|
|
61
|
+
* Girinti (Tab, Shift+Tab), satır başı girintisini sürdüren Enter, ikili ayraç ve tırnak, Ctrl+/ ile
|
|
62
|
+
* yorum, Alt+↑/↓ ile satır taşıma desteklenir. Tab tuşu odağı hapsetmez: Esc'e, ardından Tab'a
|
|
63
|
+
* basmak odağı sonraki öğeye taşır (WCAG 2.1.2).
|
|
64
|
+
*/
|
|
65
|
+
export declare function CodeEditor({ label, hideLabel, description, errorMessage, value, defaultValue, onChange, language, languageLabel, lineNumbers, tabSize, insertSpaces, indentWithTab, autoClose, minRows, maxRows, showHeader, showFooter, headerActions, footerStatus, markers, placeholder, name, isRequired, isDisabled, isReadOnly, isInvalid, autoFocus, onKeyDown, onBlur, inputRef, className, id }: CodeEditorProps): import("react").JSX.Element;
|
|
66
|
+
export type { CodeLanguage };
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useFormatter, useMessages } from "../../provider/UIProvider.js";
|
|
3
|
+
import { template } from "../../text/text.js";
|
|
4
|
+
import { FieldDescription, FieldErrorText, FieldLabel, fieldStyles } from "../../components/Field/Field.js";
|
|
5
|
+
import { VisuallyHidden } from "../../components/VisuallyHidden/VisuallyHidden.js";
|
|
6
|
+
import { announce } from "../../components/Alert/announcer.js";
|
|
7
|
+
import { CopyButton } from "../../components/CopyButton/CopyButton.js";
|
|
8
|
+
import { applyEdit } from "../_shared/textEdit.js";
|
|
9
|
+
import CodeEditor_module_default from "./CodeEditor.module.js";
|
|
10
|
+
import { backspaceEdit, caretPosition, commentEdit, enterEdit, indentEdit, indentUnit, moveLinesEdit, typeEdit } from "./codeEdits.js";
|
|
11
|
+
import { splitLines, tokenize } from "./highlight.js";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
14
|
+
import { TextArea, TextField } from "react-aria-components";
|
|
15
|
+
// src/editor/CodeEditor/CodeEditor.tsx
|
|
16
|
+
const LANGUAGE_NAMES = {
|
|
17
|
+
javascript: "JavaScript",
|
|
18
|
+
typescript: "TypeScript",
|
|
19
|
+
json: "JSON",
|
|
20
|
+
css: "CSS",
|
|
21
|
+
html: "HTML",
|
|
22
|
+
sql: "SQL"
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Kod düzenleyici: dış kütüphanesiz, çok satırlı gerçek bir metin alanı (klavye, seçim, geri alma
|
|
26
|
+
* ve yazma yöntemleri tarayıcınındır) ve arkasında aynı ölçülerle çizilen renklendirme katmanı.
|
|
27
|
+
* Girinti (Tab, Shift+Tab), satır başı girintisini sürdüren Enter, ikili ayraç ve tırnak, Ctrl+/ ile
|
|
28
|
+
* yorum, Alt+↑/↓ ile satır taşıma desteklenir. Tab tuşu odağı hapsetmez: Esc'e, ardından Tab'a
|
|
29
|
+
* basmak odağı sonraki öğeye taşır (WCAG 2.1.2).
|
|
30
|
+
*/
|
|
31
|
+
function CodeEditor({ label, hideLabel, description, errorMessage, value, defaultValue, onChange, language = "plain", languageLabel, lineNumbers = true, tabSize = 2, insertSpaces = true, indentWithTab = true, autoClose = true, minRows = 6, maxRows = 20, showHeader = true, showFooter = true, headerActions, footerStatus, markers, placeholder, name, isRequired, isDisabled, isReadOnly, isInvalid, autoFocus, onKeyDown, onBlur, inputRef, className, id }) {
|
|
32
|
+
const t = useMessages();
|
|
33
|
+
const f = useFormatter();
|
|
34
|
+
const [inner, setInner] = useState(defaultValue ?? "");
|
|
35
|
+
const text = value ?? inner;
|
|
36
|
+
const area = useRef(null);
|
|
37
|
+
const frame = useRef(null);
|
|
38
|
+
const [caret, setCaret] = useState({
|
|
39
|
+
line: 1,
|
|
40
|
+
column: 1
|
|
41
|
+
});
|
|
42
|
+
const [released, setReleased] = useState(false);
|
|
43
|
+
const releasedRef = useRef(false);
|
|
44
|
+
const unit = useMemo(() => indentUnit(tabSize, insertSpaces), [tabSize, insertSpaces]);
|
|
45
|
+
const editable = !isReadOnly && !isDisabled;
|
|
46
|
+
const setRef = useCallback((el) => {
|
|
47
|
+
area.current = el;
|
|
48
|
+
if (typeof inputRef === "function") inputRef(el);
|
|
49
|
+
else if (inputRef) inputRef.current = el;
|
|
50
|
+
}, [inputRef]);
|
|
51
|
+
const lines = useMemo(() => splitLines(tokenize(text, language)), [text, language]);
|
|
52
|
+
const lineCount = lines.length;
|
|
53
|
+
const markerTone = useMemo(() => {
|
|
54
|
+
const map = /* @__PURE__ */ new Map();
|
|
55
|
+
for (const m of markers ?? []) map.set(m.line, m.tone ?? "danger");
|
|
56
|
+
return map;
|
|
57
|
+
}, [markers]);
|
|
58
|
+
useLayoutEffect(() => {
|
|
59
|
+
const el = frame.current;
|
|
60
|
+
if (!el) return;
|
|
61
|
+
const rows = Math.min(Math.max(lineCount, minRows), Math.max(maxRows, minRows));
|
|
62
|
+
el.style.setProperty("--sti-code-rows", String(rows));
|
|
63
|
+
el.style.setProperty("--sti-code-tab", String(tabSize));
|
|
64
|
+
}, [
|
|
65
|
+
lineCount,
|
|
66
|
+
minRows,
|
|
67
|
+
maxRows,
|
|
68
|
+
tabSize
|
|
69
|
+
]);
|
|
70
|
+
const readCaret = useCallback(() => {
|
|
71
|
+
const el = area.current;
|
|
72
|
+
if (!el) return;
|
|
73
|
+
const next = caretPosition(el.value, el.selectionStart ?? 0);
|
|
74
|
+
setCaret((prev) => prev.line === next.line && prev.column === next.column ? prev : next);
|
|
75
|
+
}, []);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
const el = area.current;
|
|
78
|
+
if (!el) return;
|
|
79
|
+
const events = [
|
|
80
|
+
"keyup",
|
|
81
|
+
"mouseup",
|
|
82
|
+
"focus",
|
|
83
|
+
"select",
|
|
84
|
+
"touchend"
|
|
85
|
+
];
|
|
86
|
+
for (const e of events) el.addEventListener(e, readCaret);
|
|
87
|
+
document.addEventListener("selectionchange", readCaret);
|
|
88
|
+
return () => {
|
|
89
|
+
for (const e of events) el.removeEventListener(e, readCaret);
|
|
90
|
+
document.removeEventListener("selectionchange", readCaret);
|
|
91
|
+
};
|
|
92
|
+
}, [readCaret]);
|
|
93
|
+
useLayoutEffect(readCaret, [text, readCaret]);
|
|
94
|
+
const setRelease = (next) => {
|
|
95
|
+
releasedRef.current = next;
|
|
96
|
+
setReleased(next);
|
|
97
|
+
};
|
|
98
|
+
const handleKeyDown = (e) => {
|
|
99
|
+
onKeyDown?.(e);
|
|
100
|
+
if (e.defaultPrevented || !editable || e.nativeEvent.isComposing) return;
|
|
101
|
+
const el = e.currentTarget;
|
|
102
|
+
const state = {
|
|
103
|
+
value: el.value,
|
|
104
|
+
start: el.selectionStart ?? 0,
|
|
105
|
+
end: el.selectionEnd ?? 0
|
|
106
|
+
};
|
|
107
|
+
const mod = e.ctrlKey || e.metaKey;
|
|
108
|
+
let edit = null;
|
|
109
|
+
if (e.key === "Escape") {
|
|
110
|
+
if (indentWithTab && !releasedRef.current) {
|
|
111
|
+
setRelease(true);
|
|
112
|
+
announce(t.codeEditorTabFocusAnnounce);
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
}
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (e.key === "Tab" && !mod && !e.altKey) {
|
|
118
|
+
if (!indentWithTab) return;
|
|
119
|
+
if (releasedRef.current) {
|
|
120
|
+
setRelease(false);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
edit = indentEdit(state, unit, e.shiftKey);
|
|
124
|
+
} else {
|
|
125
|
+
if (releasedRef.current && ![
|
|
126
|
+
"Shift",
|
|
127
|
+
"Control",
|
|
128
|
+
"Alt",
|
|
129
|
+
"Meta"
|
|
130
|
+
].includes(e.key)) setRelease(false);
|
|
131
|
+
if (e.key === "Enter" && !mod && !e.altKey) edit = enterEdit(state, unit, language);
|
|
132
|
+
else if (e.key === "Backspace" && !mod && !e.altKey && !e.shiftKey) edit = backspaceEdit(state, unit, autoClose && language !== "plain");
|
|
133
|
+
else if (mod && e.key === "/" && !e.altKey) edit = commentEdit(state, language);
|
|
134
|
+
else if (e.altKey && !mod && (e.key === "ArrowUp" || e.key === "ArrowDown")) edit = moveLinesEdit(state, e.key === "ArrowUp" ? -1 : 1);
|
|
135
|
+
else if (autoClose && language !== "plain" && e.key.length === 1 && !mod && !e.altKey) edit = typeEdit(state, e.key);
|
|
136
|
+
}
|
|
137
|
+
if (!edit) return;
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
applyEdit(el, edit);
|
|
140
|
+
readCaret();
|
|
141
|
+
};
|
|
142
|
+
const languageName = languageLabel ?? (language === "plain" ? t.codeEditorLanguagePlain : LANGUAGE_NAMES[language]);
|
|
143
|
+
const hint = indentWithTab && editable ? released ? t.codeEditorHintFocus : t.codeEditorHintIndent : "";
|
|
144
|
+
const labelNode = hideLabel ? /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(FieldLabel, { children: label }) }) : /* @__PURE__ */ jsx(FieldLabel, { children: label });
|
|
145
|
+
return /* @__PURE__ */ jsxs(TextField, {
|
|
146
|
+
id,
|
|
147
|
+
value: text,
|
|
148
|
+
onChange: (v) => {
|
|
149
|
+
if (value === void 0) setInner(v);
|
|
150
|
+
onChange?.(v);
|
|
151
|
+
},
|
|
152
|
+
name,
|
|
153
|
+
isRequired,
|
|
154
|
+
isDisabled,
|
|
155
|
+
isReadOnly,
|
|
156
|
+
isInvalid,
|
|
157
|
+
autoFocus,
|
|
158
|
+
className: [
|
|
159
|
+
fieldStyles.root,
|
|
160
|
+
CodeEditor_module_default.root,
|
|
161
|
+
className
|
|
162
|
+
].filter(Boolean).join(" "),
|
|
163
|
+
children: [
|
|
164
|
+
labelNode,
|
|
165
|
+
/* @__PURE__ */ jsxs("div", {
|
|
166
|
+
ref: frame,
|
|
167
|
+
className: CodeEditor_module_default.frame,
|
|
168
|
+
"data-language": language,
|
|
169
|
+
"data-line-numbers": lineNumbers ? "" : void 0,
|
|
170
|
+
children: [
|
|
171
|
+
showHeader ? /* @__PURE__ */ jsxs("div", {
|
|
172
|
+
className: CodeEditor_module_default.header,
|
|
173
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
174
|
+
className: CodeEditor_module_default.language,
|
|
175
|
+
children: languageName
|
|
176
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
177
|
+
className: CodeEditor_module_default.actions,
|
|
178
|
+
children: [headerActions, /* @__PURE__ */ jsx(CopyButton, {
|
|
179
|
+
value: text,
|
|
180
|
+
variant: "ghost",
|
|
181
|
+
size: "sm",
|
|
182
|
+
iconOnly: true,
|
|
183
|
+
isDisabled: text === ""
|
|
184
|
+
})]
|
|
185
|
+
})]
|
|
186
|
+
}) : null,
|
|
187
|
+
/* @__PURE__ */ jsx("div", {
|
|
188
|
+
className: CodeEditor_module_default.scroller,
|
|
189
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
190
|
+
className: CodeEditor_module_default.grid,
|
|
191
|
+
children: [
|
|
192
|
+
lineNumbers ? /* @__PURE__ */ jsx("div", {
|
|
193
|
+
className: CodeEditor_module_default.gutter,
|
|
194
|
+
"aria-hidden": "true",
|
|
195
|
+
children: lines.map((_, i) => /* @__PURE__ */ jsx("span", {
|
|
196
|
+
className: CodeEditor_module_default.number,
|
|
197
|
+
"data-active": i + 1 === caret.line ? "" : void 0,
|
|
198
|
+
"data-marker": markerTone.get(i + 1),
|
|
199
|
+
children: i + 1
|
|
200
|
+
}, i))
|
|
201
|
+
}) : null,
|
|
202
|
+
/* @__PURE__ */ jsx("pre", {
|
|
203
|
+
className: CodeEditor_module_default.highlight,
|
|
204
|
+
"aria-hidden": "true",
|
|
205
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
206
|
+
className: CodeEditor_module_default.code,
|
|
207
|
+
children: lines.map((tokens, i) => /* @__PURE__ */ jsx("span", {
|
|
208
|
+
className: CodeEditor_module_default.line,
|
|
209
|
+
"data-active": i + 1 === caret.line && editable ? "" : void 0,
|
|
210
|
+
"data-marker": markerTone.get(i + 1),
|
|
211
|
+
children: tokens.map((token, j) => token.type === "plain" ? token.text : /* @__PURE__ */ jsx("span", {
|
|
212
|
+
className: CodeEditor_module_default[`t_${token.type}`],
|
|
213
|
+
children: token.text
|
|
214
|
+
}, j))
|
|
215
|
+
}, i))
|
|
216
|
+
})
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ jsx(TextArea, {
|
|
219
|
+
ref: setRef,
|
|
220
|
+
className: CodeEditor_module_default.input,
|
|
221
|
+
placeholder,
|
|
222
|
+
spellCheck: false,
|
|
223
|
+
autoCapitalize: "off",
|
|
224
|
+
autoComplete: "off",
|
|
225
|
+
autoCorrect: "off",
|
|
226
|
+
wrap: "off",
|
|
227
|
+
onKeyDown: handleKeyDown,
|
|
228
|
+
onBlur
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
})
|
|
232
|
+
}),
|
|
233
|
+
showFooter ? /* @__PURE__ */ jsxs("div", {
|
|
234
|
+
className: CodeEditor_module_default.footer,
|
|
235
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
236
|
+
className: CodeEditor_module_default.position,
|
|
237
|
+
children: template(t.codeEditorPosition, {
|
|
238
|
+
line: f.number(caret.line),
|
|
239
|
+
column: f.number(caret.column)
|
|
240
|
+
})
|
|
241
|
+
}), footerStatus]
|
|
242
|
+
}) : null
|
|
243
|
+
]
|
|
244
|
+
}),
|
|
245
|
+
description || hint ? /* @__PURE__ */ jsxs(FieldDescription, { children: [description ? /* @__PURE__ */ jsx("span", {
|
|
246
|
+
className: CodeEditor_module_default.description,
|
|
247
|
+
children: description
|
|
248
|
+
}) : null, hint ? /* @__PURE__ */ jsx("span", {
|
|
249
|
+
className: CodeEditor_module_default.hint,
|
|
250
|
+
children: hint
|
|
251
|
+
}) : null] }) : null,
|
|
252
|
+
/* @__PURE__ */ jsx(FieldErrorText, { errorMessage })
|
|
253
|
+
]
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
export { CodeEditor };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import './CodeEditor.css';
|
|
2
|
+
// src/editor/CodeEditor/CodeEditor.module.css
|
|
3
|
+
var CodeEditor_module_default = {
|
|
4
|
+
"root": "sti-CodeEditor-root-79dc6",
|
|
5
|
+
"frame": "sti-CodeEditor-frame-9daac",
|
|
6
|
+
"header": "sti-CodeEditor-header-f5364",
|
|
7
|
+
"language": "sti-CodeEditor-language-85518",
|
|
8
|
+
"actions": "sti-CodeEditor-actions-870c4",
|
|
9
|
+
"scroller": "sti-CodeEditor-scroller-b4d5f",
|
|
10
|
+
"grid": "sti-CodeEditor-grid-fa567",
|
|
11
|
+
"gutter": "sti-CodeEditor-gutter-a279b",
|
|
12
|
+
"number": "sti-CodeEditor-number-877bf",
|
|
13
|
+
"highlight": "sti-CodeEditor-highlight-250a3",
|
|
14
|
+
"input": "sti-CodeEditor-input-d00ce",
|
|
15
|
+
"code": "sti-CodeEditor-code-b5a15",
|
|
16
|
+
"line": "sti-CodeEditor-line-70e99",
|
|
17
|
+
"t_keyword": "sti-CodeEditor-t_keyword-7bf4f",
|
|
18
|
+
"t_string": "sti-CodeEditor-t_string-94758",
|
|
19
|
+
"t_number": "sti-CodeEditor-t_number-79bb8",
|
|
20
|
+
"t_literal": "sti-CodeEditor-t_literal-5f743",
|
|
21
|
+
"t_comment": "sti-CodeEditor-t_comment-d69b0",
|
|
22
|
+
"t_function": "sti-CodeEditor-t_function-0dc0e",
|
|
23
|
+
"t_property": "sti-CodeEditor-t_property-52054",
|
|
24
|
+
"t_attr": "sti-CodeEditor-t_attr-c07aa",
|
|
25
|
+
"t_tag": "sti-CodeEditor-t_tag-7d611",
|
|
26
|
+
"t_punct": "sti-CodeEditor-t_punct-6d0db",
|
|
27
|
+
"footer": "sti-CodeEditor-footer-b7a14",
|
|
28
|
+
"position": "sti-CodeEditor-position-fbc14",
|
|
29
|
+
"description": "sti-CodeEditor-description-f88d1",
|
|
30
|
+
"hint": "sti-CodeEditor-hint-2c24c"
|
|
31
|
+
};
|
|
32
|
+
export { CodeEditor_module_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CodeLanguage = "plain" | "javascript" | "typescript" | "json" | "css" | "html" | "sql";
|