@stisocial/ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -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/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 +110 -0
- package/dist/id/AccountMenu/AccountMenu.d.ts +45 -0
- package/dist/id/AccountMenu/AccountMenu.js +98 -0
- package/dist/id/AccountMenu/AccountMenu.module.js +14 -0
- package/dist/id/AccountMenu/index.d.ts +2 -0
- package/dist/id/AppSwitcher/AppSwitcher.css +109 -0
- package/dist/id/AppSwitcher/AppSwitcher.d.ts +31 -0
- package/dist/id/AppSwitcher/AppSwitcher.js +88 -0
- package/dist/id/AppSwitcher/AppSwitcher.module.js +11 -0
- package/dist/id/AppSwitcher/index.d.ts +2 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.css +110 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.d.ts +37 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.js +153 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.module.js +12 -0
- package/dist/id/OrgSwitcher/index.d.ts +2 -0
- package/dist/id/PermissionGate/PermissionGate.css +57 -0
- package/dist/id/PermissionGate/PermissionGate.d.ts +30 -0
- package/dist/id/PermissionGate/PermissionGate.js +51 -0
- package/dist/id/PermissionGate/PermissionGate.module.js +10 -0
- package/dist/id/PermissionGate/index.d.ts +2 -0
- package/dist/id/SignInButton/SignInButton.d.ts +20 -0
- package/dist/id/SignInButton/SignInButton.js +34 -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/index.d.ts +10 -0
- package/dist/id/index.js +6 -0
- package/dist/index.d.ts +26 -4
- package/dist/index.js +14 -3
- 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 +481 -0
- package/dist/messages/messages.js +964 -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 +24433 -14420
- package/package.json +45 -1
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMessages } from "../../provider/UIProvider.js";
|
|
3
|
+
import { template } from "../../text/text.js";
|
|
4
|
+
import { IconButton } from "../../components/IconButton/IconButton.js";
|
|
5
|
+
import { VisuallyHidden } from "../../components/VisuallyHidden/VisuallyHidden.js";
|
|
6
|
+
import { Button } from "../../components/Button/Button.js";
|
|
7
|
+
import { Link } from "../../components/Link/Link.js";
|
|
8
|
+
import { ArrowLink } from "../../components/ArrowLink/ArrowLink.js";
|
|
9
|
+
import { MinusIcon } from "../../icons/generated/MinusIcon.js";
|
|
10
|
+
import { PlusIcon } from "../../icons/generated/PlusIcon.js";
|
|
11
|
+
import { MapPinIcon } from "../../icons/generated/MapPinIcon.js";
|
|
12
|
+
import { clamp, fitView, panBy, project, tileRange, unproject, worldSize, wrapTileX } from "../_internal/geo.js";
|
|
13
|
+
import { useControllable } from "../_internal/useControllable.js";
|
|
14
|
+
import { MapContext } from "../_internal/mapContext.js";
|
|
15
|
+
import MapView_module_default from "./MapView.module.js";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { Children, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
18
|
+
// src/maps/MapView/MapView.tsx
|
|
19
|
+
/** Varsayılan karo kaynağı: OpenStreetMap standart katmanı. */
|
|
20
|
+
const OSM_TILE_URL = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
21
|
+
/** Varsayılan görünüm: Türkiye'nin ortası, bütün ülke görünür. */
|
|
22
|
+
const DEFAULT_CENTER = {
|
|
23
|
+
lat: 39,
|
|
24
|
+
lng: 35
|
|
25
|
+
};
|
|
26
|
+
const DEFAULT_ZOOM = 6;
|
|
27
|
+
const join = (...names) => names.filter(Boolean).join(" ");
|
|
28
|
+
/**
|
|
29
|
+
* Karo adresi kuralı: `https://`, kök göreli (`/`) ya da `data:image/` (çevrimdışı örnek; görsel
|
|
30
|
+
* adresi betik çalıştırmaz) ile başlar; `{z}`, `{x}`, `{y}` yer tutucularının üçü de bulunur.
|
|
31
|
+
* Kural dışı adres varsayılana (OpenStreetMap) döner: `http://` ve `javascript:` asla istenmez.
|
|
32
|
+
*/
|
|
33
|
+
function safeTileUrl(url) {
|
|
34
|
+
if (!url) return OSM_TILE_URL;
|
|
35
|
+
return /^(https:\/\/|\/(?!\/)|data:image\/)/.test(url) && [
|
|
36
|
+
"{z}",
|
|
37
|
+
"{x}",
|
|
38
|
+
"{y}"
|
|
39
|
+
].every((p) => url.includes(p)) ? url : OSM_TILE_URL;
|
|
40
|
+
}
|
|
41
|
+
function tileSrc(url, z, x, y) {
|
|
42
|
+
return url.replace("{z}", String(z)).replace("{x}", String(x)).replace("{y}", String(y));
|
|
43
|
+
}
|
|
44
|
+
const PAN_STEP = 64;
|
|
45
|
+
/**
|
|
46
|
+
* Harita: karo tabanlı, kendi çizimiyle (üçüncü taraf betik yok). Gizlilik kipi: harita izin
|
|
47
|
+
* verilene kadar yüklenmez; o zamana kadar konumlar metin listesi olarak gösterilir. Klavye: ok
|
|
48
|
+
* tuşları kaydırır (Shift hızlı), `+` / `-` yakınlaştırır, Home ilk görünüme döner; fare: sürükleme,
|
|
49
|
+
* çift tıklama, Ctrl/⌘ + tekerlek.
|
|
50
|
+
*/
|
|
51
|
+
function MapView(props) {
|
|
52
|
+
const messages = useMessages();
|
|
53
|
+
const [loaded, setLoaded] = useControllable(props.isLoaded, props.defaultLoaded ?? false, props.onLoadedChange);
|
|
54
|
+
const size = props.size ?? "md";
|
|
55
|
+
const root = join(MapView_module_default.root, props.className);
|
|
56
|
+
if (!loaded) {
|
|
57
|
+
const count = Children.toArray(props.children).length;
|
|
58
|
+
return /* @__PURE__ */ jsx("div", {
|
|
59
|
+
id: props.id,
|
|
60
|
+
ref: props.ref,
|
|
61
|
+
className: root,
|
|
62
|
+
"data-state": "consent",
|
|
63
|
+
"data-size": size,
|
|
64
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: MapView_module_default.consent,
|
|
66
|
+
role: "group",
|
|
67
|
+
"aria-label": props.label,
|
|
68
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: MapView_module_default.consentCard,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: MapView_module_default.consentIcon,
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
children: /* @__PURE__ */ jsx(MapPinIcon, {})
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsx("h3", {
|
|
77
|
+
className: MapView_module_default.consentTitle,
|
|
78
|
+
children: messages.mapConsentTitle
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsx("p", {
|
|
81
|
+
className: MapView_module_default.consentText,
|
|
82
|
+
children: messages.mapConsentText
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsxs("div", {
|
|
85
|
+
className: MapView_module_default.consentActions,
|
|
86
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
87
|
+
variant: "primary",
|
|
88
|
+
onPress: () => setLoaded(true),
|
|
89
|
+
children: messages.mapLoad
|
|
90
|
+
}), /* @__PURE__ */ jsx(ArrowLink, {
|
|
91
|
+
external: true,
|
|
92
|
+
size: "sm",
|
|
93
|
+
href: openStreetMapUrl(props.center ?? props.defaultCenter ?? DEFAULT_CENTER, props.zoom ?? props.defaultZoom ?? DEFAULT_ZOOM),
|
|
94
|
+
children: messages.mapOpenExternal
|
|
95
|
+
})]
|
|
96
|
+
}),
|
|
97
|
+
count > 0 && props.showMarkerList !== false ? /* @__PURE__ */ jsx(MapContext.Provider, {
|
|
98
|
+
value: LIST_CONTEXT,
|
|
99
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
100
|
+
className: MapView_module_default.list,
|
|
101
|
+
"aria-label": messages.mapMarkers,
|
|
102
|
+
children: props.children
|
|
103
|
+
})
|
|
104
|
+
}) : null
|
|
105
|
+
]
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return /* @__PURE__ */ jsx(LoadedMap, {
|
|
111
|
+
...props,
|
|
112
|
+
size,
|
|
113
|
+
className: root
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const LIST_CONTEXT = { mode: "list" };
|
|
117
|
+
/** OpenStreetMap'te aynı yeri açan adres (yalnız kişi bağlantıya basınca istek gider). */
|
|
118
|
+
function openStreetMapUrl(center, zoom) {
|
|
119
|
+
const lat = center.lat.toFixed(5);
|
|
120
|
+
const lng = center.lng.toFixed(5);
|
|
121
|
+
return `https://www.openstreetmap.org/?mlat=${lat}&mlon=${lng}#map=${Math.round(zoom)}/${lat}/${lng}`;
|
|
122
|
+
}
|
|
123
|
+
function LoadedMap(props) {
|
|
124
|
+
const messages = useMessages();
|
|
125
|
+
const { minZoom = 2, maxZoom = 18, fit, onPick, crosshair, children, id, ref, attribution } = props;
|
|
126
|
+
const [center, setCenter] = useControllable(props.center, props.defaultCenter ?? DEFAULT_CENTER, props.onCenterChange);
|
|
127
|
+
const [rawZoom, setZoomState] = useControllable(props.zoom, props.defaultZoom ?? DEFAULT_ZOOM, props.onZoomChange);
|
|
128
|
+
const zoom = clamp(Math.round(rawZoom), minZoom, maxZoom);
|
|
129
|
+
const urlTemplate = safeTileUrl(props.tileUrl);
|
|
130
|
+
const viewport = useRef(null);
|
|
131
|
+
const layer = useRef(null);
|
|
132
|
+
const [box, setBox] = useState({
|
|
133
|
+
width: 0,
|
|
134
|
+
height: 0
|
|
135
|
+
});
|
|
136
|
+
const [dragging, setDragging] = useState(false);
|
|
137
|
+
const [tiles, setTiles] = useState({
|
|
138
|
+
loaded: false,
|
|
139
|
+
failed: 0,
|
|
140
|
+
epoch: 0
|
|
141
|
+
});
|
|
142
|
+
const [announcement, setAnnouncement] = useState("");
|
|
143
|
+
const helpId = useId();
|
|
144
|
+
const initial = useRef({
|
|
145
|
+
center,
|
|
146
|
+
zoom
|
|
147
|
+
});
|
|
148
|
+
const drag = useRef(null);
|
|
149
|
+
const lastWheel = useRef(0);
|
|
150
|
+
useLayoutEffect(() => {
|
|
151
|
+
const el = viewport.current;
|
|
152
|
+
if (!el) return;
|
|
153
|
+
const measure = () => {
|
|
154
|
+
const r = el.getBoundingClientRect();
|
|
155
|
+
setBox((b) => b.width === Math.round(r.width) && b.height === Math.round(r.height) ? b : {
|
|
156
|
+
width: Math.round(r.width),
|
|
157
|
+
height: Math.round(r.height)
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
measure();
|
|
161
|
+
const ro = new ResizeObserver(measure);
|
|
162
|
+
ro.observe(el);
|
|
163
|
+
return () => ro.disconnect();
|
|
164
|
+
}, []);
|
|
165
|
+
const range = useMemo(() => box.width > 0 ? tileRange(center, zoom, box.width, box.height) : null, [
|
|
166
|
+
center,
|
|
167
|
+
zoom,
|
|
168
|
+
box.width,
|
|
169
|
+
box.height
|
|
170
|
+
]);
|
|
171
|
+
useLayoutEffect(() => {
|
|
172
|
+
const el = layer.current;
|
|
173
|
+
if (!el || !range) return;
|
|
174
|
+
el.style.setProperty("--sti-map-tile", `256px`);
|
|
175
|
+
el.style.setProperty("--sti-map-cols", String(range.x1 - range.x0 + 1));
|
|
176
|
+
el.style.setProperty("--sti-map-tiles-x", `${range.x0 * 256 - range.left}px`);
|
|
177
|
+
el.style.setProperty("--sti-map-tiles-y", `${range.y0 * 256 - range.top}px`);
|
|
178
|
+
});
|
|
179
|
+
const setZoom = useCallback((z) => setZoomState(clamp(Math.round(z), minZoom, maxZoom)), [
|
|
180
|
+
setZoomState,
|
|
181
|
+
minZoom,
|
|
182
|
+
maxZoom
|
|
183
|
+
]);
|
|
184
|
+
/** `delta` kadar yakınlaştırır; `at` (görünüm pikseli) verilirse o nokta yerinde kalır. */
|
|
185
|
+
const zoomBy = useCallback((delta, at) => {
|
|
186
|
+
const next = clamp(zoom + delta, minZoom, maxZoom);
|
|
187
|
+
if (next === zoom) return;
|
|
188
|
+
if (at && box.width > 0) {
|
|
189
|
+
const c = project(center, zoom);
|
|
190
|
+
const point = {
|
|
191
|
+
x: c.x + (at.x - box.width / 2),
|
|
192
|
+
y: c.y + (at.y - box.height / 2)
|
|
193
|
+
};
|
|
194
|
+
const geo = unproject(point, zoom);
|
|
195
|
+
const target = project(geo, next);
|
|
196
|
+
setCenter(unproject({
|
|
197
|
+
x: target.x - (at.x - box.width / 2),
|
|
198
|
+
y: clamp(target.y - (at.y - box.height / 2), 0, worldSize(next))
|
|
199
|
+
}, next));
|
|
200
|
+
}
|
|
201
|
+
setZoom(next);
|
|
202
|
+
setAnnouncement(template(messages.mapZoomLevel, { zoom: next }));
|
|
203
|
+
}, [
|
|
204
|
+
zoom,
|
|
205
|
+
minZoom,
|
|
206
|
+
maxZoom,
|
|
207
|
+
box,
|
|
208
|
+
center,
|
|
209
|
+
setCenter,
|
|
210
|
+
setZoom,
|
|
211
|
+
messages.mapZoomLevel
|
|
212
|
+
]);
|
|
213
|
+
/** Görünüm pikselindeki konum. */
|
|
214
|
+
const toLatLng = useCallback((px, py) => {
|
|
215
|
+
const c = project(center, zoom);
|
|
216
|
+
return unproject({
|
|
217
|
+
x: c.x + (px - box.width / 2),
|
|
218
|
+
y: clamp(c.y + (py - box.height / 2), 0, worldSize(zoom))
|
|
219
|
+
}, zoom);
|
|
220
|
+
}, [
|
|
221
|
+
center,
|
|
222
|
+
zoom,
|
|
223
|
+
box
|
|
224
|
+
]);
|
|
225
|
+
const fitKey = fit ? fit.map((p) => `${p.lat},${p.lng}`).join(";") : "";
|
|
226
|
+
const appliedFit = useRef("");
|
|
227
|
+
useEffect(() => {
|
|
228
|
+
if (!fit || !fitKey || box.width === 0 || appliedFit.current === fitKey) return;
|
|
229
|
+
appliedFit.current = fitKey;
|
|
230
|
+
const view = fitView(fit, box.width, box.height, {
|
|
231
|
+
minZoom,
|
|
232
|
+
maxZoom
|
|
233
|
+
});
|
|
234
|
+
if (view) {
|
|
235
|
+
setCenter(view.center);
|
|
236
|
+
setZoom(view.zoom);
|
|
237
|
+
}
|
|
238
|
+
}, [
|
|
239
|
+
fitKey,
|
|
240
|
+
box.width,
|
|
241
|
+
box.height
|
|
242
|
+
]);
|
|
243
|
+
useEffect(() => {
|
|
244
|
+
const el = viewport.current;
|
|
245
|
+
if (!el) return;
|
|
246
|
+
const onWheel = (e) => {
|
|
247
|
+
if (!(e.ctrlKey || e.metaKey)) return;
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
const now = performance.now();
|
|
250
|
+
if (now - lastWheel.current < 160) return;
|
|
251
|
+
lastWheel.current = now;
|
|
252
|
+
const r = el.getBoundingClientRect();
|
|
253
|
+
zoomBy(e.deltaY < 0 ? 1 : -1, {
|
|
254
|
+
x: e.clientX - r.left,
|
|
255
|
+
y: e.clientY - r.top
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
el.addEventListener("wheel", onWheel, { passive: false });
|
|
259
|
+
return () => el.removeEventListener("wheel", onWheel);
|
|
260
|
+
}, [zoomBy]);
|
|
261
|
+
const onPointerDown = (e) => {
|
|
262
|
+
if (e.pointerType === "mouse" && e.button !== 0) return;
|
|
263
|
+
drag.current = {
|
|
264
|
+
id: e.pointerId,
|
|
265
|
+
x: e.clientX,
|
|
266
|
+
y: e.clientY,
|
|
267
|
+
origin: center,
|
|
268
|
+
moved: false
|
|
269
|
+
};
|
|
270
|
+
try {
|
|
271
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
272
|
+
} catch {}
|
|
273
|
+
};
|
|
274
|
+
const onPointerMove = (e) => {
|
|
275
|
+
const d = drag.current;
|
|
276
|
+
if (!d || d.id !== e.pointerId) return;
|
|
277
|
+
const dx = e.clientX - d.x;
|
|
278
|
+
const dy = e.clientY - d.y;
|
|
279
|
+
if (!d.moved && Math.hypot(dx, dy) < 5) return;
|
|
280
|
+
if (!d.moved) setDragging(true);
|
|
281
|
+
d.moved = true;
|
|
282
|
+
setCenter(panBy(d.origin, zoom, -dx, -dy));
|
|
283
|
+
};
|
|
284
|
+
const endDrag = (e, cancelled) => {
|
|
285
|
+
const d = drag.current;
|
|
286
|
+
if (!d || d.id !== e.pointerId) return;
|
|
287
|
+
drag.current = null;
|
|
288
|
+
setDragging(false);
|
|
289
|
+
if (!d.moved && !cancelled && onPick) {
|
|
290
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
291
|
+
onPick(toLatLng(e.clientX - r.left, e.clientY - r.top));
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
const onKeyDown = (e) => {
|
|
295
|
+
if (e.target !== e.currentTarget || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
296
|
+
const step = e.shiftKey ? 256 : PAN_STEP;
|
|
297
|
+
const pan = (dx, dy) => {
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
setCenter(panBy(center, zoom, dx, dy));
|
|
300
|
+
};
|
|
301
|
+
switch (e.key) {
|
|
302
|
+
case "ArrowLeft": return pan(-step, 0);
|
|
303
|
+
case "ArrowRight": return pan(step, 0);
|
|
304
|
+
case "ArrowUp": return pan(0, -step);
|
|
305
|
+
case "ArrowDown": return pan(0, step);
|
|
306
|
+
case "+":
|
|
307
|
+
case "=":
|
|
308
|
+
e.preventDefault();
|
|
309
|
+
return zoomBy(1);
|
|
310
|
+
case "-":
|
|
311
|
+
case "_":
|
|
312
|
+
e.preventDefault();
|
|
313
|
+
return zoomBy(-1);
|
|
314
|
+
case "Home":
|
|
315
|
+
e.preventDefault();
|
|
316
|
+
setCenter(initial.current.center);
|
|
317
|
+
setZoom(initial.current.zoom);
|
|
318
|
+
return;
|
|
319
|
+
case "Enter":
|
|
320
|
+
case " ":
|
|
321
|
+
if (onPick) {
|
|
322
|
+
e.preventDefault();
|
|
323
|
+
onPick(center);
|
|
324
|
+
}
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
const toPixel = useCallback((p) => {
|
|
329
|
+
const size = worldSize(zoom);
|
|
330
|
+
const c = project(center, zoom);
|
|
331
|
+
const w = project(p, zoom);
|
|
332
|
+
let dx = w.x - c.x;
|
|
333
|
+
dx = ((dx + size / 2) % size + size) % size - size / 2;
|
|
334
|
+
return {
|
|
335
|
+
x: box.width / 2 + dx,
|
|
336
|
+
y: box.height / 2 + (w.y - c.y)
|
|
337
|
+
};
|
|
338
|
+
}, [
|
|
339
|
+
center,
|
|
340
|
+
zoom,
|
|
341
|
+
box.width,
|
|
342
|
+
box.height
|
|
343
|
+
]);
|
|
344
|
+
const context = useMemo(() => ({
|
|
345
|
+
mode: "map",
|
|
346
|
+
toPixel,
|
|
347
|
+
width: box.width,
|
|
348
|
+
height: box.height
|
|
349
|
+
}), [
|
|
350
|
+
toPixel,
|
|
351
|
+
box.width,
|
|
352
|
+
box.height
|
|
353
|
+
]);
|
|
354
|
+
const tileList = useMemo(() => {
|
|
355
|
+
if (!range) return [];
|
|
356
|
+
const out = [];
|
|
357
|
+
for (let y = range.y0; y <= range.y1; y++) for (let x = range.x0; x <= range.x1; x++) out.push({
|
|
358
|
+
key: `${range.zoom}/${x}/${y}`,
|
|
359
|
+
src: tileSrc(urlTemplate, range.zoom, wrapTileX(x, range.zoom), y)
|
|
360
|
+
});
|
|
361
|
+
return out;
|
|
362
|
+
}, [range, urlTemplate]);
|
|
363
|
+
const failed = tiles.failed > 0 && !tiles.loaded;
|
|
364
|
+
const zoomIn = () => zoomBy(1);
|
|
365
|
+
const zoomOut = () => zoomBy(-1);
|
|
366
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
367
|
+
id,
|
|
368
|
+
ref,
|
|
369
|
+
className: props.className,
|
|
370
|
+
"data-state": "loaded",
|
|
371
|
+
"data-size": props.size,
|
|
372
|
+
"data-dragging": dragging ? "" : void 0,
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ jsxs("div", {
|
|
375
|
+
ref: viewport,
|
|
376
|
+
className: MapView_module_default.viewport,
|
|
377
|
+
role: "group",
|
|
378
|
+
tabIndex: 0,
|
|
379
|
+
"aria-label": props.label,
|
|
380
|
+
"aria-roledescription": messages.mapRole,
|
|
381
|
+
"aria-describedby": helpId,
|
|
382
|
+
"data-crosshair": crosshair,
|
|
383
|
+
onKeyDown,
|
|
384
|
+
onPointerDown,
|
|
385
|
+
onPointerMove,
|
|
386
|
+
onPointerUp: (e) => endDrag(e, false),
|
|
387
|
+
onPointerCancel: (e) => endDrag(e, true),
|
|
388
|
+
onDoubleClick: (e) => {
|
|
389
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
390
|
+
zoomBy(1, {
|
|
391
|
+
x: e.clientX - r.left,
|
|
392
|
+
y: e.clientY - r.top
|
|
393
|
+
});
|
|
394
|
+
},
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ jsx("div", {
|
|
397
|
+
ref: layer,
|
|
398
|
+
className: MapView_module_default.tiles,
|
|
399
|
+
"aria-hidden": "true",
|
|
400
|
+
"data-ready": range ? "" : void 0,
|
|
401
|
+
children: tileList.map((t) => /* @__PURE__ */ jsx("img", {
|
|
402
|
+
className: MapView_module_default.tile,
|
|
403
|
+
src: t.src,
|
|
404
|
+
alt: "",
|
|
405
|
+
width: 256,
|
|
406
|
+
height: 256,
|
|
407
|
+
draggable: false,
|
|
408
|
+
decoding: "async",
|
|
409
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
410
|
+
onLoad: () => setTiles((s) => s.loaded ? s : {
|
|
411
|
+
...s,
|
|
412
|
+
loaded: true
|
|
413
|
+
}),
|
|
414
|
+
onError: () => setTiles((s) => ({
|
|
415
|
+
...s,
|
|
416
|
+
failed: s.failed + 1
|
|
417
|
+
}))
|
|
418
|
+
}, t.key))
|
|
419
|
+
}, tiles.epoch),
|
|
420
|
+
/* @__PURE__ */ jsx("div", {
|
|
421
|
+
className: MapView_module_default.markers,
|
|
422
|
+
children: /* @__PURE__ */ jsx(MapContext.Provider, {
|
|
423
|
+
value: context,
|
|
424
|
+
children
|
|
425
|
+
})
|
|
426
|
+
}),
|
|
427
|
+
crosshair ? /* @__PURE__ */ jsx("span", {
|
|
428
|
+
className: MapView_module_default.crosshair,
|
|
429
|
+
"aria-hidden": "true"
|
|
430
|
+
}) : null
|
|
431
|
+
]
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ jsxs("div", {
|
|
434
|
+
className: MapView_module_default.controls,
|
|
435
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
436
|
+
variant: "ghost",
|
|
437
|
+
size: "sm",
|
|
438
|
+
label: messages.mapZoomIn,
|
|
439
|
+
icon: /* @__PURE__ */ jsx(PlusIcon, {}),
|
|
440
|
+
isDisabled: zoom >= maxZoom,
|
|
441
|
+
onPress: () => {
|
|
442
|
+
zoomIn();
|
|
443
|
+
if (zoom + 1 >= maxZoom) viewport.current?.focus();
|
|
444
|
+
}
|
|
445
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
446
|
+
variant: "ghost",
|
|
447
|
+
size: "sm",
|
|
448
|
+
label: messages.mapZoomOut,
|
|
449
|
+
icon: /* @__PURE__ */ jsx(MinusIcon, {}),
|
|
450
|
+
isDisabled: zoom <= minZoom,
|
|
451
|
+
onPress: () => {
|
|
452
|
+
zoomOut();
|
|
453
|
+
if (zoom - 1 <= minZoom) viewport.current?.focus();
|
|
454
|
+
}
|
|
455
|
+
})]
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ jsx("div", {
|
|
458
|
+
className: MapView_module_default.attribution,
|
|
459
|
+
children: attribution ?? /* @__PURE__ */ jsx(Link, {
|
|
460
|
+
variant: "subtle",
|
|
461
|
+
external: true,
|
|
462
|
+
href: "https://www.openstreetmap.org/copyright",
|
|
463
|
+
children: messages.mapAttribution
|
|
464
|
+
})
|
|
465
|
+
}),
|
|
466
|
+
failed ? /* @__PURE__ */ jsxs("div", {
|
|
467
|
+
className: MapView_module_default.failed,
|
|
468
|
+
role: "status",
|
|
469
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
470
|
+
className: MapView_module_default.failedText,
|
|
471
|
+
children: messages.mapTilesFailed
|
|
472
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
473
|
+
size: "sm",
|
|
474
|
+
onPress: () => setTiles((s) => ({
|
|
475
|
+
loaded: false,
|
|
476
|
+
failed: 0,
|
|
477
|
+
epoch: s.epoch + 1
|
|
478
|
+
})),
|
|
479
|
+
children: messages.mapReload
|
|
480
|
+
})]
|
|
481
|
+
}) : null,
|
|
482
|
+
/* @__PURE__ */ jsxs(VisuallyHidden, {
|
|
483
|
+
id: helpId,
|
|
484
|
+
children: [messages.mapKeyboardHelp, onPick ? ` ${messages.mapPickHelp}` : ""]
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ jsx("span", {
|
|
487
|
+
className: MapView_module_default.live,
|
|
488
|
+
role: "status",
|
|
489
|
+
"aria-live": "polite",
|
|
490
|
+
children: announcement
|
|
491
|
+
})
|
|
492
|
+
]
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
export { MapView, OSM_TILE_URL, openStreetMapUrl, safeTileUrl, tileSrc };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './MapView.css';
|
|
2
|
+
// src/maps/MapView/MapView.module.css
|
|
3
|
+
var MapView_module_default = {
|
|
4
|
+
"root": "sti-MapView-root-2c464",
|
|
5
|
+
"viewport": "sti-MapView-viewport-32f46",
|
|
6
|
+
"tiles": "sti-MapView-tiles-41d91",
|
|
7
|
+
"tile": "sti-MapView-tile-09977",
|
|
8
|
+
"markers": "sti-MapView-markers-dba92",
|
|
9
|
+
"crosshair": "sti-MapView-crosshair-5acc9",
|
|
10
|
+
"controls": "sti-MapView-controls-f0b39",
|
|
11
|
+
"attribution": "sti-MapView-attribution-87cce",
|
|
12
|
+
"failed": "sti-MapView-failed-982bd",
|
|
13
|
+
"failedText": "sti-MapView-failedText-a25f1",
|
|
14
|
+
"live": "sti-MapView-live-ccdfb",
|
|
15
|
+
"consent": "sti-MapView-consent-892ea",
|
|
16
|
+
"consentCard": "sti-MapView-consentCard-8e1c2",
|
|
17
|
+
"consentIcon": "sti-MapView-consentIcon-44a5c",
|
|
18
|
+
"consentTitle": "sti-MapView-consentTitle-1514e",
|
|
19
|
+
"consentText": "sti-MapView-consentText-1b1db",
|
|
20
|
+
"consentActions": "sti-MapView-consentActions-e6536",
|
|
21
|
+
"list": "sti-MapView-list-86b6c"
|
|
22
|
+
};
|
|
23
|
+
export { MapView_module_default as default };
|