@plitzi/plitzi-builder 0.38.4 → 0.38.5
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 +344 -0
- package/dist/index.html +2 -15
- package/dist/modules/App/AppContainer/containers/ContainerServer.d.ts +2 -2
- package/dist/modules/App/components/AppDirectory/Directory.d.ts +3 -1
- package/dist/modules/App/helpers/utils.d.ts +1 -3
- package/dist/modules/Builder/components/BuilderSearch/helpers.d.ts +0 -1
- package/dist/modules/Builder/components/BuilderTree/utils.d.ts +1 -0
- package/dist/modules/Builder/hooks/useRevealElement.d.ts +6 -2
- package/dist/modules/Components/Components.d.ts +1 -1
- package/dist/modules/Components/components/ComponentForm/helpers.d.ts +15 -0
- package/dist/modules/Components/components/ComponentForm/index.d.ts +1 -0
- package/dist/modules/Components/components/FormSection/FormSection.d.ts +10 -0
- package/dist/modules/Components/components/FormSection/index.d.ts +3 -0
- package/dist/modules/Components/components/PropsEditor/helpers.d.ts +7 -0
- package/dist/modules/Data/Data.d.ts +7 -0
- package/dist/modules/Data/components/DataEditor/DataEditor.d.ts +12 -0
- package/dist/modules/Data/components/DataEditor/index.d.ts +3 -0
- package/dist/modules/Data/components/DataHeader/DataHeader.d.ts +14 -0
- package/dist/modules/Data/components/DataHeader/index.d.ts +3 -0
- package/dist/modules/Data/components/DataProblems/DataProblems.d.ts +9 -0
- package/dist/modules/Data/components/DataProblems/index.d.ts +3 -0
- package/dist/modules/Data/components/DataSidebar/DataSidebar.d.ts +13 -0
- package/dist/modules/Data/components/DataSidebar/index.d.ts +3 -0
- package/dist/modules/Data/components/DataWelcome/DataWelcome.d.ts +6 -0
- package/dist/modules/Data/components/DataWelcome/index.d.ts +3 -0
- package/dist/modules/Data/helpers.d.ts +12 -0
- package/dist/modules/Data/index.d.ts +2 -0
- package/dist/modules/Data/useData.d.ts +12 -0
- package/dist/modules/Elements/CategoryChip.d.ts +11 -0
- package/dist/modules/Elements/Element.d.ts +2 -1
- package/dist/modules/Elements/ElementCategory.d.ts +6 -3
- package/dist/modules/Elements/ElementHelper.d.ts +12 -2
- package/dist/modules/Elements/Elements.d.ts +4 -0
- package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/FileItem/FileItem.d.ts +1 -1
- package/dist/modules/FileTree/components/NewFile/NewFile.d.ts +11 -0
- package/dist/modules/FileTree/components/SaveStateBadge/SaveStateBadge.d.ts +7 -0
- package/dist/modules/FileTree/components/SaveStateBadge/index.d.ts +2 -0
- package/dist/modules/FileTree/helpers.d.ts +39 -0
- package/dist/modules/FileTree/index.d.ts +7 -0
- package/dist/modules/Functions/components/FunctionsHeader/FunctionsHeader.d.ts +1 -1
- package/dist/modules/Functions/helpers.d.ts +0 -35
- package/dist/modules/Interactions/components/Workflow/helpers/whileRunning.d.ts +1 -1
- package/dist/modules/Usages/Usages.d.ts +10 -0
- package/dist/modules/Usages/components/UsageList/UsageList.d.ts +13 -0
- package/dist/modules/Usages/components/UsageList/index.d.ts +3 -0
- package/dist/modules/Usages/components/UsageRow/UsageRow.d.ts +11 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageElement/UsageElement.d.ts +8 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageElement/index.d.ts +3 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageOwner/UsageOwner.d.ts +9 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageOwner/index.d.ts +3 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageReferences/UsageReferences.d.ts +7 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageReferences/index.d.ts +3 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageTreeGroup/UsageTreeGroup.d.ts +7 -0
- package/dist/modules/Usages/components/UsageRow/components/UsageTreeGroup/index.d.ts +3 -0
- package/dist/modules/Usages/components/UsageRow/index.d.ts +3 -0
- package/dist/modules/Usages/helpers/copy.d.ts +21 -0
- package/dist/modules/Usages/helpers/grouping.d.ts +14 -0
- package/dist/modules/Usages/helpers/grouping.test.d.ts +1 -0
- package/dist/modules/Usages/helpers/providerTypes.d.ts +7 -0
- package/dist/modules/Usages/helpers/unusedParity.test.d.ts +1 -0
- package/dist/modules/Usages/helpers/usageIndex.d.ts +67 -0
- package/dist/modules/Usages/helpers/usageIndex.test.d.ts +1 -0
- package/dist/modules/Usages/hooks/useUsageIndex.d.ts +9 -0
- package/dist/modules/Usages/index.d.ts +3 -0
- package/dist/package.json.d.ts +3 -21
- package/dist/plitzi-builder.css +1 -1
- package/dist/plitzi-builder.css.gz +0 -0
- package/dist/plitzi-builder.js +2636 -2839
- package/dist/plitzi-builder.js.gz +0 -0
- package/dist/plitzi-functions-worker.js +1 -1
- package/package.json +17 -35
- package/dist/modules/AI/AiChat.d.ts +0 -2
- package/dist/modules/AI/components/AiChatContent/AiChatContent.d.ts +0 -22
- package/dist/modules/AI/components/AiChatContent/index.d.ts +0 -3
- package/dist/modules/AI/components/AiChatHeader/AiChatHeader.d.ts +0 -6
- package/dist/modules/AI/components/AiChatHeader/components/ConversationButton/ConversationButton.d.ts +0 -2
- package/dist/modules/AI/components/AiChatHeader/components/ConversationButton/index.d.ts +0 -3
- package/dist/modules/AI/components/AiChatHeader/components/HeaderActions/HeaderActions.d.ts +0 -6
- package/dist/modules/AI/components/AiChatHeader/components/HeaderActions/index.d.ts +0 -3
- package/dist/modules/AI/components/AiChatHeader/helpers.d.ts +0 -1
- package/dist/modules/AI/components/AiChatHeader/index.d.ts +0 -3
- package/dist/modules/AI/components/AiProviderSettings/AiProviderSettings.d.ts +0 -10
- package/dist/modules/AI/components/AiProviderSettings/helpers/constants.d.ts +0 -6
- package/dist/modules/AI/components/AiProviderSettings/helpers/groupModels.d.ts +0 -4
- package/dist/modules/AI/components/AiProviderSettings/index.d.ts +0 -3
- package/dist/modules/AI/components/Chat/Chat.d.ts +0 -6
- package/dist/modules/AI/components/Chat/components/LiveEntry/LiveEntry.d.ts +0 -9
- package/dist/modules/AI/components/Chat/components/LiveEntry/components/LiveHeader/LiveHeader.d.ts +0 -10
- package/dist/modules/AI/components/Chat/components/LiveEntry/components/LiveHeader/index.d.ts +0 -3
- package/dist/modules/AI/components/Chat/components/LiveEntry/components/LiveThinking/LiveThinking.d.ts +0 -7
- package/dist/modules/AI/components/Chat/components/LiveEntry/components/LiveThinking/index.d.ts +0 -3
- package/dist/modules/AI/components/Chat/components/LiveEntry/index.d.ts +0 -3
- package/dist/modules/AI/components/Chat/helpers.d.ts +0 -2
- package/dist/modules/AI/components/Chat/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/ChatInput.d.ts +0 -19
- package/dist/modules/AI/components/ChatInput/components/AttachmentThumbnail/AttachmentThumbnail.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/components/AttachmentThumbnail/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/ButtonAttachments/ButtonAttachments.d.ts +0 -12
- package/dist/modules/AI/components/ChatInput/components/ButtonAttachments/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/ButtonSend/ButtonSend.d.ts +0 -12
- package/dist/modules/AI/components/ChatInput/components/ButtonSend/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/ChatInputControls/ChatInputControls.d.ts +0 -27
- package/dist/modules/AI/components/ChatInput/components/ChatInputControls/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/EffortSelector.d.ts +0 -8
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortBars/EffortBars.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortBars/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortDropdown/EffortDropdown.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortDropdown/EffortDropdownItem.d.ts +0 -9
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortDropdown/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortTrigger/EffortTrigger.d.ts +0 -9
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/components/EffortTrigger/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/helpers.d.ts +0 -9
- package/dist/modules/AI/components/ChatInput/components/EffortSelector/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatInput/components/ModelSelector/ModelSelector.d.ts +0 -10
- package/dist/modules/AI/components/ChatInput/components/ModelSelector/components/ModelOption/ModelOption.d.ts +0 -9
- package/dist/modules/AI/components/ChatInput/components/ModelSelector/components/ModelOption/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatInput/components/ModelSelector/helpers.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/ModelSelector/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatInput/components/QuestionInput/QuestionInput.d.ts +0 -8
- package/dist/modules/AI/components/ChatInput/components/QuestionInput/helpers.d.ts +0 -11
- package/dist/modules/AI/components/ChatInput/components/QuestionInput/index.d.ts +0 -4
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/SkillsManager.d.ts +0 -8
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/components/CategoryButton/CategoryButton.d.ts +0 -10
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/components/CategoryButton/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/components/SkillItem/SkillItem.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/components/SkillItem/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/components/SkillsButton/SkillsButton.d.ts +0 -8
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/components/SkillsButton/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/data.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/helpers.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/components/SkillsManager/index.d.ts +0 -5
- package/dist/modules/AI/components/ChatInput/components/UsageBar/Ring.d.ts +0 -12
- package/dist/modules/AI/components/ChatInput/components/UsageBar/UsageBar.d.ts +0 -13
- package/dist/modules/AI/components/ChatInput/components/UsageBar/helpers.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/components/UsageBar/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatInput/hooks/useMessageHistory.d.ts +0 -7
- package/dist/modules/AI/components/ChatInput/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/ChatMessage.d.ts +0 -7
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/AIBrandPreview.d.ts +0 -7
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandColors/BrandColorItem.d.ts +0 -8
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandColors/BrandColors.d.ts +0 -7
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandColors/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandConfirmPanel/BrandConfirmPanel.d.ts +0 -14
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandConfirmPanel/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandHeader/BrandHeader.d.ts +0 -11
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandHeader/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandHero/BrandHero.d.ts +0 -9
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandHero/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandPersonality/BrandPersonality.d.ts +0 -6
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandPersonality/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandTypography/BrandTypography.d.ts +0 -8
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandTypography/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandVoice/BrandVoice.d.ts +0 -6
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/components/BrandVoice/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/helpers.d.ts +0 -2
- package/dist/modules/AI/components/ChatMessage/components/AIBrandPreview/index.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/AIColorPalettePreview.d.ts +0 -7
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/components/ColorPaletteRow/ColorPaletteRow.d.ts +0 -9
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/components/ColorPaletteRow/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/components/ColorStripItem/ColorStripItem.d.ts +0 -7
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/components/ColorStripItem/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/helpers.d.ts +0 -5
- package/dist/modules/AI/components/ChatMessage/components/AIColorPalettePreview/index.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/AISnippetPreview.d.ts +0 -12
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/AISnippetHeader/AISnippetHeader.d.ts +0 -15
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/AISnippetHeader/DisplayModeButton.d.ts +0 -9
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/AISnippetHeader/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/ConfirmPanel/ConfirmPanel.d.ts +0 -12
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/ConfirmPanel/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/helpers.d.ts +0 -5
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIStyleGuidePreview/AIStyleGuidePreview.d.ts +0 -7
- package/dist/modules/AI/components/ChatMessage/components/AIStyleGuidePreview/components/ColorScaleRow/ColorScaleRow.d.ts +0 -9
- package/dist/modules/AI/components/ChatMessage/components/AIStyleGuidePreview/components/ColorScaleRow/ColorShadeButton.d.ts +0 -9
- package/dist/modules/AI/components/ChatMessage/components/AIStyleGuidePreview/components/ColorScaleRow/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AIStyleGuidePreview/helpers.d.ts +0 -10
- package/dist/modules/AI/components/ChatMessage/components/AIStyleGuidePreview/index.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/AIWireframePreview/AIWireframePreview.d.ts +0 -8
- package/dist/modules/AI/components/ChatMessage/components/AIWireframePreview/helpers.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/AIWireframePreview/index.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/ActionButtons/ActionButtons.d.ts +0 -6
- package/dist/modules/AI/components/ChatMessage/components/ActionButtons/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AssistantMessage/AssistantMessage.d.ts +0 -15
- package/dist/modules/AI/components/ChatMessage/components/AssistantMessage/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/ResourceStep/ResourceStep.d.ts +0 -6
- package/dist/modules/AI/components/ChatMessage/components/ResourceStep/index.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/SdkElementPreview/SdkElementPreview.d.ts +0 -8
- package/dist/modules/AI/components/ChatMessage/components/SdkElementPreview/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/ThinkingBlock/ThinkingBlock.d.ts +0 -6
- package/dist/modules/AI/components/ChatMessage/components/ThinkingBlock/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/UserMessage/UserMessage.d.ts +0 -11
- package/dist/modules/AI/components/ChatMessage/components/UserMessage/components/MessageActions/MessageActions.d.ts +0 -6
- package/dist/modules/AI/components/ChatMessage/components/UserMessage/components/MessageActions/index.d.ts +0 -2
- package/dist/modules/AI/components/ChatMessage/components/UserMessage/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/helpers/extractToolVisual.d.ts +0 -30
- package/dist/modules/AI/components/ChatMessage/helpers/groupStepsIntoItems.d.ts +0 -29
- package/dist/modules/AI/components/ChatMessage/helpers/toolVisualTypes.d.ts +0 -103
- package/dist/modules/AI/components/ChatMessage/helpers/utils.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/index.d.ts +0 -3
- package/dist/modules/AI/components/CopyButton/CopyButton.d.ts +0 -7
- package/dist/modules/AI/components/CopyButton/index.d.ts +0 -2
- package/dist/modules/AI/components/HistoryPanel/HistoryPanel.d.ts +0 -10
- package/dist/modules/AI/components/HistoryPanel/components/ConversationList/ConversationList.d.ts +0 -9
- package/dist/modules/AI/components/HistoryPanel/components/ConversationList/components/ConversationItem/ConversationItem.d.ts +0 -11
- package/dist/modules/AI/components/HistoryPanel/components/ConversationList/components/ConversationItem/index.d.ts +0 -3
- package/dist/modules/AI/components/HistoryPanel/components/ConversationList/index.d.ts +0 -3
- package/dist/modules/AI/components/HistoryPanel/components/HistoryFooter/HistoryFooter.d.ts +0 -5
- package/dist/modules/AI/components/HistoryPanel/components/HistoryFooter/index.d.ts +0 -3
- package/dist/modules/AI/components/HistoryPanel/components/HistorySearch/HistorySearch.d.ts +0 -6
- package/dist/modules/AI/components/HistoryPanel/components/HistorySearch/index.d.ts +0 -3
- package/dist/modules/AI/components/HistoryPanel/helpers.d.ts +0 -1
- package/dist/modules/AI/components/HistoryPanel/index.d.ts +0 -3
- package/dist/modules/AI/components/HistoryPanel/types.d.ts +0 -10
- package/dist/modules/AI/components/MessageTools/MessageTools.d.ts +0 -7
- package/dist/modules/AI/components/MessageTools/components/MessageTool/MessageTool.d.ts +0 -4
- package/dist/modules/AI/components/MessageTools/components/MessageTool/humanizeToolName.d.ts +0 -1
- package/dist/modules/AI/components/MessageTools/components/MessageTool/index.d.ts +0 -3
- package/dist/modules/AI/components/MessageTools/index.d.ts +0 -3
- package/dist/modules/AI/components/ModeLabel/ModeLabel.d.ts +0 -6
- package/dist/modules/AI/components/ModeLabel/index.d.ts +0 -3
- package/dist/modules/AI/components/QuotaCountdown/QuotaCountdown.d.ts +0 -5
- package/dist/modules/AI/components/QuotaCountdown/helpers/formatRetryDelay.d.ts +0 -2
- package/dist/modules/AI/components/QuotaCountdown/index.d.ts +0 -3
- package/dist/modules/AI/components/ToggleMode/ToggleMode.d.ts +0 -8
- package/dist/modules/AI/components/ToggleMode/index.d.ts +0 -3
- package/dist/modules/AI/components/ToolVisualRenderer/ToolVisualRenderer.d.ts +0 -10
- package/dist/modules/AI/components/ToolVisualRenderer/index.d.ts +0 -2
- package/dist/modules/AI/components/VoiceVisualizer/VoiceVisualizer.d.ts +0 -18
- package/dist/modules/AI/components/VoiceVisualizer/helpers/drawByBlob.d.ts +0 -11
- package/dist/modules/AI/components/VoiceVisualizer/helpers/drawByLiveStream.d.ts +0 -20
- package/dist/modules/AI/components/VoiceVisualizer/helpers/getBarsData.d.ts +0 -9
- package/dist/modules/AI/components/VoiceVisualizer/helpers/index.d.ts +0 -7
- package/dist/modules/AI/components/VoiceVisualizer/helpers/initialCanvasSetup.d.ts +0 -9
- package/dist/modules/AI/components/VoiceVisualizer/helpers/paintLine.d.ts +0 -9
- package/dist/modules/AI/components/VoiceVisualizer/helpers/paintLineFromCenterToRight.d.ts +0 -8
- package/dist/modules/AI/components/VoiceVisualizer/index.d.ts +0 -2
- package/dist/modules/AI/contexts/AiChatContext.d.ts +0 -37
- package/dist/modules/AI/contexts/AiChatProvider.d.ts +0 -9
- package/dist/modules/AI/helpers/computeUsageFromMessages.d.ts +0 -3
- package/dist/modules/AI/helpers/formatDuration.d.ts +0 -2
- package/dist/modules/AI/helpers/getDateGroup.d.ts +0 -2
- package/dist/modules/AI/helpers/parseAiStream.d.ts +0 -2
- package/dist/modules/AI/helpers/relativeTime.d.ts +0 -2
- package/dist/modules/AI/hooks/useAiChat.d.ts +0 -37
- package/dist/modules/AI/hooks/useAiErrors.d.ts +0 -11
- package/dist/modules/AI/hooks/useAiProviderSettings.d.ts +0 -9
- package/dist/modules/AI/hooks/useAiUsage.d.ts +0 -8
- package/dist/modules/AI/hooks/useLiveSteps.d.ts +0 -23
- package/dist/modules/AI/hooks/useMediaRecorder.d.ts +0 -18
- package/dist/modules/AI/hooks/useStreamingText.d.ts +0 -7
- package/dist/modules/AI/hooks/useVoice.d.ts +0 -11
- package/dist/modules/AI/index.d.ts +0 -1
- package/dist/modules/AI/types.d.ts +0 -150
- package/dist/modules/Functions/components/FunctionsSidebar/components/NewFile/NewFile.d.ts +0 -7
- package/dist/serviceWorker.d.ts +0 -2
- /package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/FileItem/index.d.ts +0 -0
- /package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/FolderItem/FolderItem.d.ts +0 -0
- /package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/FolderItem/index.d.ts +0 -0
- /package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/NewFile/index.d.ts +0 -0
- /package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/SidebarSection/SidebarSection.d.ts +0 -0
- /package/dist/modules/{Functions/components/FunctionsSidebar → FileTree}/components/SidebarSection/index.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The space's own data, as its panel edits it: JSON files a provider of the space reads on the server — `query:
|
|
3
|
+
* '/data/<file>'` with `runtime: 'server'` — never served.
|
|
4
|
+
*/
|
|
5
|
+
/** What a space with no data starts from: one file, a list, to change rather than a blank page. */
|
|
6
|
+
export declare const STARTER_FILES: Record<string, string>;
|
|
7
|
+
/** A new file's name as typed, made a data file's: trimmed, and a `.json` one when it says nothing else. */
|
|
8
|
+
export declare const dataFileName: (typed: string) => string;
|
|
9
|
+
/** What is wrong with a file's text as JSON, as the parser says it — or nothing, when it reads. */
|
|
10
|
+
export declare const jsonProblemOf: (text: string) => string | undefined;
|
|
11
|
+
/** The query a provider reads a file by. */
|
|
12
|
+
export declare const queryOf: (file: string) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataDraft, DataSaveResult } from '@plitzi/sdk-shared';
|
|
2
|
+
/**
|
|
3
|
+
* The space's data draft, and saving it — through the same operation an agent's MCP and a project's `plitzi push` end
|
|
4
|
+
* in (`SpaceSaveData`): whole, against the version it was read at.
|
|
5
|
+
*/
|
|
6
|
+
declare const useData: () => {
|
|
7
|
+
draft: DataDraft | undefined;
|
|
8
|
+
error: string;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
save: (files: DataDraft["files"]) => Promise<DataSaveResult | undefined>;
|
|
11
|
+
};
|
|
12
|
+
export default useData;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CategoryChipProps = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
count: number;
|
|
6
|
+
active: boolean;
|
|
7
|
+
onSelect: (id: string) => void;
|
|
8
|
+
};
|
|
9
|
+
/** One category to show, chosen in a row of them: its name, how many it holds, and whether it is the one shown. */
|
|
10
|
+
declare const CategoryChip: ({ id, label, icon, count, active, onSelect }: CategoryChipProps) => import('react').JSX.Element;
|
|
11
|
+
export default CategoryChip;
|
|
@@ -2,5 +2,6 @@ import { ComponentDefinition } from '@plitzi/sdk-shared';
|
|
|
2
2
|
export type ElementProps = {
|
|
3
3
|
component: ComponentDefinition;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
/** One element of the catalog, dragged onto the canvas or into Layers: its icon, its whole name, what it is on hover. */
|
|
6
|
+
declare const Element: ({ component }: ElementProps) => import('react').JSX.Element;
|
|
6
7
|
export default Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ComponentDefinition } from '@plitzi/sdk-shared';
|
|
2
2
|
export type ElementCategoryProps = {
|
|
3
|
-
components
|
|
4
|
-
category
|
|
3
|
+
components: ComponentDefinition[];
|
|
4
|
+
category: string;
|
|
5
|
+
/** Said above the grid — when a search lists several categories at once. */
|
|
6
|
+
titled?: boolean;
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
/** The elements of one category, as a compact grid to drag from. */
|
|
9
|
+
declare const ElementCategory: ({ components, category, titled }: ElementCategoryProps) => import('react').JSX.Element;
|
|
7
10
|
export default ElementCategory;
|
|
@@ -11,5 +11,15 @@ export declare const getInitialItems: (parentId: string, items: string[] | undef
|
|
|
11
11
|
directItems: Record<string, Element>;
|
|
12
12
|
items: Record<string, Element>;
|
|
13
13
|
};
|
|
14
|
-
/**
|
|
15
|
-
export declare const
|
|
14
|
+
/** How a category is shown: its name and icon — a plugin's own category by the name it gave. */
|
|
15
|
+
export declare const categoryDisplay: (category: string) => {
|
|
16
|
+
label: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
};
|
|
19
|
+
/** A definition's description, cut to its first sentence: what the panel says of it on hover. */
|
|
20
|
+
export declare const summaryOf: (definition: ComponentDefinition) => string;
|
|
21
|
+
/**
|
|
22
|
+
* The catalog as the elements panel lists it: every definition an author can drag in whose label or type matches
|
|
23
|
+
* `filter`, grouped by category — the categories in the panel's order, the elements in each by their label.
|
|
24
|
+
*/
|
|
25
|
+
export declare const definitionsByCategory: (definitions: Record<string, ComponentDefinition>, filter: string) => [string, ComponentDefinition[]][];
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What can be dropped on a page: one category at a time, chosen in a row of chips — so the panel stays the same height
|
|
3
|
+
* however many elements plugins add — and the space's components as one more. A search looks through all of them.
|
|
4
|
+
*/
|
|
1
5
|
declare const Elements: () => import('react').JSX.Element;
|
|
2
6
|
export default Elements;
|
|
@@ -4,7 +4,7 @@ export type FileItemProps = {
|
|
|
4
4
|
depth: number;
|
|
5
5
|
selected: boolean;
|
|
6
6
|
modified: boolean;
|
|
7
|
-
/**
|
|
7
|
+
/** Whether it may be removed — not the file everything starts from (the functions' `index.ts`). */
|
|
8
8
|
removable: boolean;
|
|
9
9
|
onSelect: (file: string) => void;
|
|
10
10
|
onRemove: (file: string) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type NewFileProps = {
|
|
2
|
+
/** An example of a name, shown while there is none: `lib/feed.ts`. */
|
|
3
|
+
placeholder: string;
|
|
4
|
+
/** The file a typed name is — trimmed, with the extension the list's files have when it says none. */
|
|
5
|
+
nameOf: (typed: string) => string;
|
|
6
|
+
onAdd: (file: string) => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
};
|
|
9
|
+
/** A new file's name, typed where the list starts: Enter adds it — `lib/feed.ts` makes the folder too — Escape lets it go. */
|
|
10
|
+
declare const NewFile: ({ placeholder, nameOf, onAdd, onCancel }: NewFileProps) => import('react').JSX.Element;
|
|
11
|
+
export default NewFile;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SaveState } from '../../helpers';
|
|
2
|
+
export type SaveStateBadgeProps = {
|
|
3
|
+
state: SaveState;
|
|
4
|
+
};
|
|
5
|
+
/** Where the files stand, as a header shows it: a dot and a few words, in the tone of what it says. */
|
|
6
|
+
declare const SaveStateBadge: ({ state }: SaveStateBadgeProps) => import('react').JSX.Element;
|
|
7
|
+
export default SaveStateBadge;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list of files edited in a panel — the functions' source, the data's JSON: how it reads as a tree, how a save is
|
|
3
|
+
* asked for, and where the files stand.
|
|
4
|
+
*/
|
|
5
|
+
/** The editor filling the space it is given, so CodeMirror scrolls its own lines and keeps its gutter in place. */
|
|
6
|
+
export declare const EDITOR_CLASS_NAME: {
|
|
7
|
+
root: string;
|
|
8
|
+
inputContainer: string;
|
|
9
|
+
};
|
|
10
|
+
/** How far a file or a folder is indented for each folder it is in, in pixels. */
|
|
11
|
+
export declare const FILE_INDENT_PX = 12;
|
|
12
|
+
/** One row of the file list: a folder, or a file under the folders before it. */
|
|
13
|
+
export type FileRow = {
|
|
14
|
+
kind: 'folder';
|
|
15
|
+
path: string;
|
|
16
|
+
depth: number;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'file';
|
|
19
|
+
path: string;
|
|
20
|
+
name: string;
|
|
21
|
+
depth: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The files as a tree reads, top to bottom: each folder once, before what is in it, and every name indented by how
|
|
25
|
+
* deep it is — `first` before them all, when it is the file everything starts from (the functions' `index.ts`).
|
|
26
|
+
*/
|
|
27
|
+
export declare const fileRows: (files: readonly string[], first?: string) => FileRow[];
|
|
28
|
+
/** Whether a key press is "save": ⌘S on a Mac, Ctrl+S elsewhere. */
|
|
29
|
+
export declare const isSaveKey: (event: KeyboardEvent) => boolean;
|
|
30
|
+
/** Where the files stand, in a few words and a tone: what the header shows. */
|
|
31
|
+
export type SaveState = {
|
|
32
|
+
label: string;
|
|
33
|
+
tone: 'unsaved' | 'problems' | 'saved';
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Where the files stand: what the last save found wrong, changes not saved yet — in how many files — or saved, which is
|
|
37
|
+
* what the builder runs. Nothing for files never saved.
|
|
38
|
+
*/
|
|
39
|
+
export declare const saveState: (modified: number, problems: number, saved: boolean) => SaveState | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as FileItem } from './components/FileItem';
|
|
2
|
+
export { default as FolderItem } from './components/FolderItem';
|
|
3
|
+
export { default as NewFile } from './components/NewFile';
|
|
4
|
+
export { default as SaveStateBadge } from './components/SaveStateBadge';
|
|
5
|
+
export { default as SidebarSection } from './components/SidebarSection';
|
|
6
|
+
export { EDITOR_CLASS_NAME, FILE_INDENT_PX, fileRows, isSaveKey, saveState } from './helpers';
|
|
7
|
+
export type { FileRow, SaveState } from './helpers';
|
|
@@ -20,40 +20,10 @@ export declare const routeParts: (route: string, prefix: string) => {
|
|
|
20
20
|
method: string;
|
|
21
21
|
path: string;
|
|
22
22
|
};
|
|
23
|
-
/** How far a file or a folder is indented for each folder it is in, in pixels. */
|
|
24
|
-
export declare const FILE_INDENT_PX = 12;
|
|
25
23
|
/** A new file's name as typed, made a file's: trimmed, and a TypeScript one when it says nothing else. */
|
|
26
24
|
export declare const newFileName: (typed: string) => string;
|
|
27
|
-
/** One row of the file list: a folder, or a file under the folders before it. */
|
|
28
|
-
export type FileRow = {
|
|
29
|
-
kind: 'folder';
|
|
30
|
-
path: string;
|
|
31
|
-
depth: number;
|
|
32
|
-
} | {
|
|
33
|
-
kind: 'file';
|
|
34
|
-
path: string;
|
|
35
|
-
name: string;
|
|
36
|
-
depth: number;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* The files as a tree reads, top to bottom: each folder once, before what is in it, and every name indented by how
|
|
40
|
-
* deep it is — `index.ts` first, as the file everything starts from.
|
|
41
|
-
*/
|
|
42
|
-
export declare const fileRows: (files: readonly string[]) => FileRow[];
|
|
43
25
|
/** A param's value as a field shows it: text as it is, a number as its digits, anything else as nothing. */
|
|
44
26
|
export declare const fieldText: (value: unknown) => string;
|
|
45
|
-
/** Whether a key press is "save": ⌘S on a Mac, Ctrl+S elsewhere. */
|
|
46
|
-
export declare const isSaveKey: (event: KeyboardEvent) => boolean;
|
|
47
|
-
/** Where the files stand, in a few words and a tone: what the header shows. */
|
|
48
|
-
export type SaveState = {
|
|
49
|
-
label: string;
|
|
50
|
-
tone: 'unsaved' | 'problems' | 'saved';
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Where the files stand: what the last save found wrong, changes not saved yet — in how many files — or saved, which is
|
|
54
|
-
* what the builder runs. Nothing for a space with no functions.
|
|
55
|
-
*/
|
|
56
|
-
export declare const saveState: (modified: number, problems: number, saved: boolean) => SaveState | undefined;
|
|
57
27
|
/**
|
|
58
28
|
* The CPU a task may ask for from the panel, in milliseconds: from the default an invocation gets to a second, in steps
|
|
59
29
|
* a person can tell apart. More than that is asked for in the code, up to what the server allows.
|
|
@@ -122,8 +92,3 @@ export declare const withCpu: (limits: FunctionTimeLimits | undefined, cpuMs: nu
|
|
|
122
92
|
export declare const limitsBlockedBy: (ready: boolean, task: ListedTask) => string;
|
|
123
93
|
/** The task written around an offset of a file — the one the cursor is in — or none. */
|
|
124
94
|
export declare const taskAt: (tasks: readonly ListedTask[], file: string, offset: number) => ListedTask | undefined;
|
|
125
|
-
/** The editor filling the space it is given, so CodeMirror scrolls its own lines and keeps its gutter in place. */
|
|
126
|
-
export declare const EDITOR_CLASS_NAME: {
|
|
127
|
-
root: string;
|
|
128
|
-
inputContainer: string;
|
|
129
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option, OptionGroup } from '@plitzi/plitzi-ui/Select2';
|
|
2
2
|
import { WhileRunning } from '@plitzi/sdk-shared';
|
|
3
|
-
/** The
|
|
3
|
+
/** The answers to "fired again while this flow runs", as the trigger's panel offers them. */
|
|
4
4
|
export declare const WHILE_RUNNING_OPTIONS: (Exclude<Option, OptionGroup> & {
|
|
5
5
|
value: WhileRunning;
|
|
6
6
|
})[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the space uses what it declares — components, classes, style tokens and space variables, data sources — and
|
|
3
|
+
* what nothing uses. Every use is a link to the element, on whichever page, layout or component it is.
|
|
4
|
+
*
|
|
5
|
+
* A panel beside the canvas rather than a dialog over it: following uses one after another is the job, and the list
|
|
6
|
+
* has to stay where it is while each one is looked at. The kinds are picked from a list rather than tabs, so each can
|
|
7
|
+
* say how many there are, and how many nobody uses, at the panel's narrowest.
|
|
8
|
+
*/
|
|
9
|
+
declare const Usages: () => import('react').JSX.Element;
|
|
10
|
+
export default Usages;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UsageCategory, UsageItem } from '../../helpers/usageIndex';
|
|
2
|
+
export type UsageListProps = {
|
|
3
|
+
category: UsageCategory;
|
|
4
|
+
items: UsageItem[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* What the space declares of one kind, each with where it is used — and, filtered, what nothing uses.
|
|
8
|
+
*
|
|
9
|
+
* The search, the filter and the row open are kept among the builder's preferences: opening a component from here
|
|
10
|
+
* draws every panel again inside it, and the list has to be where it was when that is done.
|
|
11
|
+
*/
|
|
12
|
+
declare const UsageList: ({ category, items }: UsageListProps) => import('react').JSX.Element;
|
|
13
|
+
export default UsageList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UsageCategory, UsageItem } from '../../helpers/usageIndex';
|
|
2
|
+
export type UsageRowProps = {
|
|
3
|
+
item: UsageItem;
|
|
4
|
+
category: UsageCategory;
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Said under the name when nothing uses it. */
|
|
7
|
+
unusedText: string;
|
|
8
|
+
onToggle: (key: string) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('react').MemoExoticComponent<({ item, category, open, unusedText, onToggle }: UsageRowProps) => import('react').JSX.Element>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementUsage } from '../../../../helpers/usageIndex';
|
|
2
|
+
export type UsageElementProps = {
|
|
3
|
+
usage: ElementUsage;
|
|
4
|
+
onReveal: (usage: ElementUsage) => void;
|
|
5
|
+
};
|
|
6
|
+
/** An element that uses the item, and how: a link that takes the author to it. */
|
|
7
|
+
declare const UsageElement: ({ usage, onReveal }: UsageElementProps) => import('react').JSX.Element;
|
|
8
|
+
export default UsageElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ElementUsage } from '../../../../helpers/usageIndex';
|
|
2
|
+
export type UsageOwnerProps = {
|
|
3
|
+
owner: ElementUsage;
|
|
4
|
+
/** A component's root, which the link opens; otherwise the element that provides the item. */
|
|
5
|
+
opensComponent: boolean;
|
|
6
|
+
};
|
|
7
|
+
/** Where the item is declared — a component's own tree, a data source's provider — and the way to it. */
|
|
8
|
+
declare const UsageOwner: ({ owner, opensComponent }: UsageOwnerProps) => import('react').JSX.Element;
|
|
9
|
+
export default UsageOwner;
|
package/dist/modules/Usages/components/UsageRow/components/UsageReferences/UsageReferences.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SpaceReference } from '../../../../helpers/usageIndex';
|
|
2
|
+
export type UsageReferencesProps = {
|
|
3
|
+
references: SpaceReference[];
|
|
4
|
+
};
|
|
5
|
+
/** What uses the item and is not an element: the selectors and tokens that read it, the custom CSS, computed values. */
|
|
6
|
+
declare const UsageReferences: ({ references }: UsageReferencesProps) => import('react').JSX.Element;
|
|
7
|
+
export default UsageReferences;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TreeGroup } from '../../../../helpers/grouping';
|
|
2
|
+
export type UsageTreeGroupProps = {
|
|
3
|
+
group: TreeGroup;
|
|
4
|
+
};
|
|
5
|
+
/** The uses in one page, layout or component, under its name. */
|
|
6
|
+
declare const UsageTreeGroup: ({ group }: UsageTreeGroupProps) => import('react').JSX.Element;
|
|
7
|
+
export default UsageTreeGroup;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UsageCategory, UsageTreeKind } from './usageIndex';
|
|
2
|
+
/** The order the panel offers them in. */
|
|
3
|
+
export declare const USAGE_CATEGORIES: readonly UsageCategory[];
|
|
4
|
+
export declare const isUsageCategory: (value: string) => value is UsageCategory;
|
|
5
|
+
type CategoryCopy = {
|
|
6
|
+
/** What the category is called in the panel's picker. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** What the search box searches. */
|
|
9
|
+
search: string;
|
|
10
|
+
/** Said when the space declares none. */
|
|
11
|
+
empty: string;
|
|
12
|
+
/** Said of an item nothing uses, under its name. */
|
|
13
|
+
unused: string;
|
|
14
|
+
/** What the unused filter is called. */
|
|
15
|
+
unusedFilter: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const CATEGORY_COPY: Record<UsageCategory, CategoryCopy>;
|
|
18
|
+
/** What "unused" can and cannot know, said once over every list. */
|
|
19
|
+
export declare const UNUSED_NOTE = "\u201CUnused\u201D means nothing in this space uses it \u2014 a plugin\u2019s own code or stylesheet may still.";
|
|
20
|
+
export declare const TREE_ICON: Record<UsageTreeKind, string>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ElementUsage, SpaceReference, UsageItem, UsageTree } from './usageIndex';
|
|
2
|
+
export type TreeGroup = {
|
|
3
|
+
tree: UsageTree;
|
|
4
|
+
elements: ElementUsage[];
|
|
5
|
+
};
|
|
6
|
+
/** The uses of an item by the tree each is in, in the order the index found them: pages and layouts, then components. */
|
|
7
|
+
export declare const groupByTree: (elements: ElementUsage[]) => TreeGroup[];
|
|
8
|
+
/** `3 elements in 2 places`, or what reads it when no element does. */
|
|
9
|
+
export declare const usageSummary: (elements: ElementUsage[], references: SpaceReference[]) => string;
|
|
10
|
+
/**
|
|
11
|
+
* The count beside a name: the elements that use it; when none does, how many other things read it; and when nothing
|
|
12
|
+
* does but its name is still said somewhere — in prose, a setting — that it is named, which is why it is not unused.
|
|
13
|
+
*/
|
|
14
|
+
export declare const usageCount: (item: UsageItem) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in types that exist only to provide data, by the prefix their source is named under.
|
|
3
|
+
*
|
|
4
|
+
* Only these are listed when nothing reads them. A list, a modal or a form publishes a source too, but has a job of its
|
|
5
|
+
* own besides — one whose source nobody reads is not one to clean up — so those are listed once something reads them.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PROVIDER_TYPES: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Schema, Style } from '@plitzi/sdk-shared';
|
|
2
|
+
export type UsageCategory = 'components' | 'classes' | 'variables' | 'dataSources';
|
|
3
|
+
export type UsageTreeKind = 'page' | 'layout' | 'component';
|
|
4
|
+
/** A tree of the document an element lives in: a page or a layout of `schema.flat`, or a component's own `flat`. */
|
|
5
|
+
export type UsageTree = {
|
|
6
|
+
kind: UsageTreeKind;
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
/** One element that uses an item, and in which ways — `var(--brand) in .btn`, `apiContainer_products.data`. */
|
|
11
|
+
export type ElementUsage = {
|
|
12
|
+
elementId: string;
|
|
13
|
+
elementType: string;
|
|
14
|
+
/** Free display text, only when it says something the id does not. */
|
|
15
|
+
label?: string;
|
|
16
|
+
tree: UsageTree;
|
|
17
|
+
via: string[];
|
|
18
|
+
};
|
|
19
|
+
/** A use that is not an element: a selector, another token, the space's custom CSS, a computed value. */
|
|
20
|
+
export type SpaceReference = {
|
|
21
|
+
kind: 'selector' | 'variable' | 'customCss' | 'computed';
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
export type UsageItem = {
|
|
25
|
+
/** Unique across the whole index: `component:card`, `class:btn`, `token:color:brand`, `source:state`. */
|
|
26
|
+
key: string;
|
|
27
|
+
name: string;
|
|
28
|
+
/** What it is within its category: a token's group, `space variable`, a provider's source prefix, `global`. */
|
|
29
|
+
detail: string;
|
|
30
|
+
/** The element that declares it, where one does: a component's root, a data source's provider. */
|
|
31
|
+
owner?: ElementUsage;
|
|
32
|
+
elements: ElementUsage[];
|
|
33
|
+
references: SpaceReference[];
|
|
34
|
+
/**
|
|
35
|
+
* Declared and used by nothing the space holds. For a class, a token or a component this is sdk-authoring's rule —
|
|
36
|
+
* the one its `unused-*` suggestions follow — which is more generous than `elements` and `references`: a class
|
|
37
|
+
* named as a word anywhere, in prose included, is not called unused.
|
|
38
|
+
*/
|
|
39
|
+
unused: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type UsageIndex = Record<UsageCategory, UsageItem[]>;
|
|
42
|
+
export type UsageSource = {
|
|
43
|
+
schema: Schema;
|
|
44
|
+
style: Pick<Style, 'platform' | 'variables' | 'fonts'>;
|
|
45
|
+
/**
|
|
46
|
+
* Element type → the prefix the source it publishes is named under (`{ apiContainer: 'apiContainer' }`). A provider
|
|
47
|
+
* of these types is listed even when nothing reads it; any other element is listed as a source once something does.
|
|
48
|
+
*/
|
|
49
|
+
providerTypes?: Readonly<Record<string, string>>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Where everything the space declares is used: each component's instances, the elements wearing each class, what
|
|
53
|
+
* reads each style token and space variable, and what binds to each data source — in one pass over the document.
|
|
54
|
+
*
|
|
55
|
+
* Reads only what is written down. A class added by a plugin at run time, a token a plugin's own stylesheet reads, a
|
|
56
|
+
* source a template assembles from pieces: none of them can be seen from the document, so an item with no uses is
|
|
57
|
+
* one nothing in the SPACE uses.
|
|
58
|
+
*/
|
|
59
|
+
export declare const buildUsageIndex: (source: UsageSource) => UsageIndex;
|
|
60
|
+
/** Declared, and used by nothing the space holds: a candidate to remove. */
|
|
61
|
+
export declare const isUnused: (item: UsageItem) => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* `buildUsageIndex`, kept for the last document it was asked about: every reader of the same schema and style shares
|
|
64
|
+
* one index, and an edit rebuilds it reading again only the elements and selectors that changed — those are new
|
|
65
|
+
* objects, every other one is the object it was.
|
|
66
|
+
*/
|
|
67
|
+
export declare const usageIndexOf: (source: UsageSource) => UsageIndex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UsageIndex } from '../helpers/usageIndex';
|
|
2
|
+
/**
|
|
3
|
+
* The space's usage index, for what the builder holds now.
|
|
4
|
+
*
|
|
5
|
+
* Deferred: an edit is drawn first and the index catches up after it, so typing in a field is never held up by a
|
|
6
|
+
* rebuild — which re-reads only the elements and selectors the edit changed.
|
|
7
|
+
*/
|
|
8
|
+
declare const useUsageIndex: () => UsageIndex;
|
|
9
|
+
export default useUsageIndex;
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "@plitzi/plitzi-builder",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.5",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,7 @@ declare const _default: {
|
|
|
34
34
|
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
35
35
|
"@plitzi/nexus": "^1.4.0",
|
|
36
36
|
"@plitzi/plitzi-sdk": "workspace:*",
|
|
37
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
37
|
+
"@plitzi/plitzi-ui": "^1.6.31",
|
|
38
38
|
"@plitzi/sdk-auth": "workspace:*",
|
|
39
39
|
"@plitzi/sdk-authoring": "workspace:*",
|
|
40
40
|
"@plitzi/sdk-dev-tools": "workspace:*",
|
|
@@ -47,7 +47,6 @@ declare const _default: {
|
|
|
47
47
|
"@plitzi/sdk-shared": "workspace:*",
|
|
48
48
|
"@plitzi/sdk-style": "workspace:*",
|
|
49
49
|
"@plitzi/sdk-variables": "workspace:*",
|
|
50
|
-
"@tanstack/react-virtual": "^3.14.13",
|
|
51
50
|
"@typescript/vfs": "^1.6.5",
|
|
52
51
|
"@valtown/codemirror-ts": "^2.3.1",
|
|
53
52
|
"apollo-upload-client": "^20.0.0",
|
|
@@ -68,34 +67,18 @@ declare const _default: {
|
|
|
68
67
|
"react-dom": "^19"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
71
|
-
"@babel/compat-data": "^8.0.5",
|
|
72
|
-
"@babel/core": "^8.0.6",
|
|
73
|
-
"@babel/helper-builder-react-jsx-experimental": "^7.12.11",
|
|
74
|
-
"@babel/helper-validator-identifier": "^8.0.6",
|
|
75
|
-
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
76
|
-
"@babel/plugin-transform-private-methods": "^8.0.1",
|
|
77
|
-
"@babel/plugin-transform-runtime": "^8.0.6",
|
|
78
|
-
"@babel/polyfill": "^7.12.1",
|
|
79
|
-
"@babel/preset-env": "^8.0.6",
|
|
80
|
-
"@babel/preset-react": "^8.0.1",
|
|
81
70
|
"@plitzi/sdk-server": "workspace:*",
|
|
71
|
+
"@tailwindcss/forms": "^0.5.11",
|
|
82
72
|
"@tailwindcss/postcss": "^4.3.3",
|
|
83
|
-
"css-loader": "^7.1.5",
|
|
84
73
|
"eslint": "^9.39.5",
|
|
85
74
|
"eslint-plugin-import": "^2.32.0",
|
|
86
|
-
"flow-bin": "^0.334.0",
|
|
87
75
|
"postcss": "^8.5.28",
|
|
88
|
-
"postcss-loader": "^8.2.1",
|
|
89
76
|
"postcss-scss": "^4.0.9",
|
|
90
77
|
"prettier": "^3.9.9",
|
|
91
|
-
"prop-types": "^15.8.1",
|
|
92
78
|
"react": "^19.3.0",
|
|
93
79
|
"react-dom": "^19.3.0",
|
|
94
|
-
"react-refresh": "^0.19.0",
|
|
95
|
-
"react-test-renderer": "^19.3.0",
|
|
96
80
|
"sass": "^1.105.1",
|
|
97
81
|
"sass-embedded": "^1.105.1",
|
|
98
|
-
"sass-loader": "^17.0.1",
|
|
99
82
|
"stylelint": "^17.16.0",
|
|
100
83
|
"stylelint-order": "^8.1.1",
|
|
101
84
|
"stylelint-scss": "^7.3.0",
|
|
@@ -105,7 +88,6 @@ declare const _default: {
|
|
|
105
88
|
"vite-plugin-dts": "^5.1.2",
|
|
106
89
|
"vite-plugin-ejs": "^2.0.0",
|
|
107
90
|
"vite-plugin-mkcert": "^2.1.0",
|
|
108
|
-
"vite-plugin-react": "^4.0.1",
|
|
109
91
|
"vitest": "^5.0.3"
|
|
110
92
|
},
|
|
111
93
|
"scripts": {
|