@unofficialbox/box-open-elements 0.23.0 → 0.25.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.
Files changed (54) hide show
  1. package/README.md +15 -13
  2. package/dist/components/actions/button.d.ts +1 -0
  3. package/dist/components/actions/button.js +16 -3
  4. package/dist/components/actions/segmented-control.d.ts +1 -0
  5. package/dist/components/actions/segmented-control.js +20 -6
  6. package/dist/components/feedback/alert.js +1 -1
  7. package/dist/components/feedback/progress-bar.js +2 -2
  8. package/dist/components/forms/checkbox.d.ts +1 -0
  9. package/dist/components/forms/checkbox.js +6 -2
  10. package/dist/components/forms/code-editor.d.ts +86 -0
  11. package/dist/components/forms/code-editor.js +447 -0
  12. package/dist/components/forms/combobox.js +7 -8
  13. package/dist/components/forms/number-input.d.ts +1 -0
  14. package/dist/components/forms/number-input.js +8 -2
  15. package/dist/components/forms/select.d.ts +1 -0
  16. package/dist/components/forms/select.js +3 -1
  17. package/dist/components/forms/text-area.js +5 -7
  18. package/dist/components/forms/text-field.d.ts +1 -0
  19. package/dist/components/forms/text-field.js +2 -0
  20. package/dist/components/navigation/accordion.d.ts +7 -0
  21. package/dist/components/navigation/accordion.js +31 -8
  22. package/dist/components/output/code-block.js +3 -1
  23. package/dist/components/overlays/drawer.js +2 -2
  24. package/dist/core/form-associated.d.ts +1 -0
  25. package/dist/core/form-associated.js +3 -0
  26. package/dist/entries/code-editor.d.ts +1 -0
  27. package/dist/entries/code-editor.js +1 -0
  28. package/dist/foundations/geometry/tokens.d.ts +2 -2
  29. package/dist/foundations/geometry/tokens.js +3 -3
  30. package/dist/foundations/icons/box-iconography.generated.js +1 -0
  31. package/dist/foundations/icons/glyphs/constants.d.ts +472 -0
  32. package/dist/foundations/icons/glyphs/constants.js +473 -0
  33. package/dist/foundations/icons/glyphs/index.d.ts +1 -1
  34. package/dist/foundations/icons/glyphs/index.js +1 -1
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.js +1 -0
  37. package/dist/patterns/flow-builder/flow-builder.d.ts +7 -1
  38. package/dist/patterns/flow-builder/flow-builder.js +32 -15
  39. package/dist/patterns/flow-builder/model.d.ts +2 -0
  40. package/dist/patterns/flow-builder/model.js +3 -3
  41. package/dist/patterns/flow-builder/primitives.d.ts +1 -0
  42. package/dist/patterns/flow-builder/primitives.js +5 -4
  43. package/dist/patterns/insights/metric-card.js +2 -2
  44. package/dist/patterns/process-modeler/bridge.d.ts +10 -0
  45. package/dist/patterns/process-modeler/bridge.js +173 -0
  46. package/dist/patterns/process-modeler/geometry.d.ts +18 -0
  47. package/dist/patterns/process-modeler/geometry.js +307 -0
  48. package/dist/patterns/process-modeler/index.d.ts +4 -0
  49. package/dist/patterns/process-modeler/index.js +4 -0
  50. package/dist/patterns/process-modeler/model.d.ts +135 -0
  51. package/dist/patterns/process-modeler/model.js +113 -0
  52. package/dist/patterns/process-modeler/process-modeler.d.ts +130 -0
  53. package/dist/patterns/process-modeler/process-modeler.js +1507 -0
  54. package/package.json +21 -3
@@ -1 +1 @@
1
- export { icon2Chat, icon2ChatQuestion, icon2OverlaySquares, icon3OverlaySquares, icon3SquareCircle, icon3Tier, icon4Squares, icon4Squares2, icon6Dots, iconAddSmall, iconAddSquares, iconAddToCart, iconAid, iconAppCloud, iconArrowDown, iconArrowRight, iconAttachment, iconAudio, iconAward, iconBadge, iconBag, iconBank, iconBattery, iconBell, iconBinders, iconBolt, iconBoltBubble, iconBrain, iconBriefcase, iconBroadcast, iconBrowser, iconBrush, iconCalendar, iconCalendar2, iconCalendarAdded, iconCart, iconCart2, iconCash, iconCautionFile, iconCautionPhone, iconCautionTriangle, iconCenter, iconChatBubble, iconChatQuestion, iconCheck, iconCheckmark, iconClipboard, iconClock1, iconClock2, iconClock3, iconCloud, iconCloudServer, iconCode, iconCodeBrowser, iconCompass, iconComputer, iconComputerBadge, iconComputerDownload, iconComputerUpoad, iconConnectedDots, iconConnectedTogether, iconContainerLines, iconContainerLines2, iconCubeDotLine, iconCubeLine, iconCycle, iconDesktopLaptop, iconDevices, iconDistribute, iconDistribute2, iconDna, iconDollarSign, iconDonutCoffee, iconDownload, iconDrop, iconEnterpriseBuilding, iconEnvelope, iconEnvelopeBug, iconEnvelopeDoc, iconEnvelopeShred, iconExclamationMark, iconEye, iconFileApproved, iconFileBlank, iconFileBug, iconFileCheck, iconFileCloud, iconFileCopy, iconFileDocument, iconFileImage, iconFileInfographic, iconFileInsights, iconFileMove, iconFileMusic, iconFilePlus, iconFilePresentations, iconFileSpeed, iconFileSpreadsheet, iconFileText, iconFileVideo, iconFingerPrint, iconFlight, iconFolder, iconFolderUp, iconFolderUpload, iconFtpFolder, iconFunnel, iconGear, iconGears, iconGraduationCap, iconGraphIncrease, iconGraphMeasure, iconGroupCall, iconHeart, iconHome, iconImage, iconKeySafe, iconLeavesGrowing, iconLight, iconLineGraphV2, iconLineGraph, iconLink, iconLock, iconMagnifyingGlass, iconMartini, iconMaze, iconMedTool, iconMegaphone, iconMetadata, iconMicrophone, iconMinus, iconMixedMediaDownload, iconMusicNote, iconNotePad, iconNumber0, iconNumber1, iconNumber2, iconNumber3, iconNumber4, iconNumber5, iconNumber6, iconNumber7, iconNumber8, iconNumber9, iconOMaru, iconOverlay, iconPaper, iconPen, iconPerson, iconPhone, iconPhone2, iconPhoneBrowser, iconPieChart, iconPieChart3, iconPin, iconPin2, iconPlane, iconPlay, iconPlus, iconPodium, iconPoint, iconPointCenter, iconQuestionMark, iconRaft, iconRetailTag, iconRightToForget, iconRing, iconRocket, iconScale, iconScale2, iconScan, iconServer, iconShakeLove, iconSharedUsers, iconShield2Tone, iconShieldCheck, iconShieldVarified, iconSlice, iconSlider, iconSmbBuilding, iconSolidArrowDown, iconSolidArrowRight, iconSolidCheck, iconSolidCheckmark, iconSolidClock1, iconSolidClock2, iconSolidCompass, iconSolidDollarSign, iconSolidExclamationMark, iconSolidMinus, iconSolidOMaru, iconSolidPlay, iconSolidPlus, iconSolidQuestionMark, iconSolidXBatsu, iconSpeachBubble, iconSpotlight, iconSprayBottle, iconSquaresScale, iconSquaresScaleTop, iconSquaresTogether, iconStar, iconStopHand, iconStorage, iconStorageCloud, iconStorageKey, iconSun, iconTarget, iconTeam, iconTeamAdd, iconThumb, iconToggle, iconTools, iconTrophy, iconTruck, iconTwoFiles, iconTyping, iconTypingNow, iconUpDown, iconUpload, iconUploadCloud, iconUsb, iconUserAlert, iconUserVerified, iconUserVerifiedUnknown, iconUserBadge, iconUserPrimary, iconUserTimed, iconVideo, iconVideoCamera, iconVideoCamera2, iconWriting, iconXBatsu, iconZones, icon2Chat2, icon2ChatQuestion2, icon2OverlaySquares2, icon3OverlaySquares2, icon3SquareCircle2, icon3Tier2, icon4Squares3, icon4Squares1, icon6Dots2, iconAddSmall2, iconAddSquares2, iconAddToCart2, iconAid2, iconAppCloud2, iconArrowDown2, iconArrowRight2, iconAttachment2, iconAudio2, iconAward2, iconBadge2, iconBag2, iconBank2, iconBattery2, iconBell2, iconBinders2, iconBolt2, iconBoltBubble2, iconBrain2, iconBriefcase2, iconBroadcast2, iconBrowser2, iconBrush2, iconCalendar3, iconCalendar1, iconCalendarAdded2, iconCart3, iconCart1, iconCash2, iconCautionFile2, iconCautionPhone2, iconCautionTriangle2, iconCenter2, iconChatBubble2, iconChatQuestion2, iconCheck2, iconCheckmark2, iconClipboard2, iconClock12, iconClock22, iconClock32, iconCloud2, iconCloudServer2, iconCode2, iconCodeBrowser2, iconCompass2, iconComputer2, iconComputerBadge2, iconComputerDownload2, iconComputerUpoad2, iconConnectedDots2, iconConnectedTogether2, iconContainerLines3, iconContainerLines22, iconCubeDotLine2, iconCubeLine2, iconCycle2, iconDesktopLaptop2, iconDevices2, iconDistribute3, iconDistribute1, iconDna2, iconDollarSign2, iconDonutCoffee2, iconDownload2, iconDrop2, iconEnterpriseBuilding2, iconEnvelope2, iconEnvelopeBug2, iconEnvelopeDoc2, iconEnvelopeShred2, iconExclamationMark2, iconEye2, iconFileApproved2, iconFileBlank2, iconFileBug2, iconFileCheck2, iconFileCloud2, iconFileCopy2, iconFileDocument2, iconFileImage2, iconFileInfographic2, iconFileInsights2, iconFileMove2, iconFileMusic2, iconFilePlus2, iconFilePresentations2, iconFileSpeed2, iconFileSpreadsheet2, iconFileText2, iconFileVideo2, iconFingerPrint2, iconFlight2, iconFolder2, iconFolderUp2, iconFolderUpload2, iconFtpFolder2, iconFunnel2, iconGear2, iconGears2, iconGraduationCap2, iconGraphIncrease2, iconGraphMeasure2, iconGroupCall2, iconHeart2, iconHome2, iconImage2, iconKeySafe2, iconLeavesGrowing2, iconLight2, iconLineGraphV22, iconLineGraph2, iconLink2, iconLock2, iconMagnifyingGlass2, iconMartini2, iconMaze2, iconMedTool2, iconMegaphone2, iconMetadata2, iconMicrophone2, iconMinus2, iconMixedMediaDownload2, iconMusicNote2, iconNotePad2, iconNumber02, iconNumber12, iconNumber22, iconNumber32, iconNumber42, iconNumber52, iconNumber62, iconNumber72, iconNumber82, iconNumber92, iconOMaru2, iconOverlay2, iconPaper2, iconPen2, iconPerson2, iconPhone3, iconPhone1, iconPhoneBrowser2, iconPieChart2, iconPieChart32, iconPin3, iconPin1, iconPlane2, iconPlay2, iconPlus2, iconPodium2, iconPoint2, iconPointCenter2, iconQuestionMark2, iconRaft2, iconRetailTag2, iconRightToForget2, iconRing2, iconRocket2, iconScale3, iconScale1, iconScan2, iconServer2, iconShakeLove2, iconSharedUsers2, iconShield2Tone2, iconShieldCheck2, iconShieldVarified2, iconSlice2, iconSlider2, iconSmbBuilding2, iconSolidArrowDown2, iconSolidArrowRight2, iconSolidCheck2, iconSolidCheckmark2, iconSolidClock12, iconSolidClock22, iconSolidCompass2, iconSolidDollarSign2, iconSolidExclamationMark2, iconSolidMinus2, iconSolidOMaru2, iconSolidPlay2, iconSolidPlus2, iconSolidQuestionMark2, iconSolidXBatsu2, iconSpeachBubble2, iconSpotlight2, iconSprayBottle2, iconSquaresScale2, iconSquaresScaleTop2, iconSquaresTogether2, iconStar2, iconStopHand2, iconStorage2, iconStorageCloud2, iconStorageKey2, iconSun2, iconTarget2, iconTeam2, iconTeamAdd2, iconThumb2, iconToggle2, iconTools2, iconTrophy2, iconTruck2, iconTwoFiles2, iconTyping2, iconTypingNow2, iconUpDown2, iconUpload2, iconUploadCloud2, iconUsb2, iconUserAlert2, iconUserVerifiedUnknown2, iconUserVerified2, iconUserBadge2, iconUserPrimary2, iconUserTimed2, iconVideo2, iconVideoCamera3, iconVideoCamera1, iconWhiteArrowRight, iconWhiteCheck, iconWhitePlus, iconWhiteStop, iconWriting2, iconXBatsu2, iconZones2, } from "../box-iconography.generated.js";
1
+ export { icon2Chat, icon2ChatQuestion, icon2OverlaySquares, icon3OverlaySquares, icon3SquareCircle, icon3Tier, icon4Squares, icon4Squares2, icon6Dots, iconAddSmall, iconAddSquares, iconAddToCart, iconAid, iconAppCloud, iconArrowDown, iconArrowRight, iconAttachment, iconAudio, iconAward, iconBadge, iconBag, iconBank, iconBattery, iconBell, iconBinders, iconBolt, iconBoltBubble, iconBrain, iconBriefcase, iconBroadcast, iconBrowser, iconBrush, iconCalendar, iconCalendar2, iconCalendarAdded, iconCart, iconCart2, iconCash, iconCautionFile, iconCautionPhone, iconCautionTriangle, iconCenter, iconChatBubble, iconChatQuestion, iconCheck, iconCheckmark, iconClipboard, iconClock1, iconClock2, iconClock3, iconCloud, iconCloudServer, iconCode, iconCodeBrowser, iconCompass, iconComputer, iconComputerBadge, iconComputerDownload, iconComputerUpoad, iconConnectedDots, iconConnectedTogether, iconContainerLines, iconContainerLines2, iconCubeDotLine, iconCubeLine, iconCycle, iconDesktopLaptop, iconDevices, iconDistribute, iconDistribute2, iconDna, iconDollarSign, iconDonutCoffee, iconDownload, iconDrop, iconEnterpriseBuilding, iconEnvelope, iconEnvelopeBug, iconEnvelopeDoc, iconEnvelopeShred, iconExclamationMark, iconEye, iconFileApproved, iconFileBlank, iconFileBug, iconFileCheck, iconFileCloud, iconFileCopy, iconFileDocument, iconFileImage, iconFileInfographic, iconFileInsights, iconFileMove, iconFileMusic, iconFilePlus, iconFilePresentations, iconFileSpeed, iconFileSpreadsheet, iconFileText, iconFileVideo, iconFingerPrint, iconFlight, iconFolder, iconFolderUp, iconFolderUpload, iconFtpFolder, iconFunnel, iconGear, iconGears, iconGraduationCap, iconGraphIncrease, iconGraphMeasure, iconGroupCall, iconHeart, iconHome, iconImage, iconKeySafe, iconLeavesGrowing, iconLight, iconLineGraphV2, iconLineGraph, iconLink, iconLock, iconMagnifyingGlass, iconMartini, iconMaze, iconMedTool, iconMegaphone, iconMetadata, iconMicrophone, iconMinus, iconMixedMediaDownload, iconMusicNote, iconNotePad, iconNumber0, iconNumber1, iconNumber2, iconNumber3, iconNumber4, iconNumber5, iconNumber6, iconNumber7, iconNumber8, iconNumber9, iconOMaru, iconOverlay, iconPaper, iconPen, iconPerson, iconPhone, iconPhone2, iconPhoneBrowser, iconPieChart, iconPieChart3, iconPin, iconPin2, iconPlane, iconPlay, iconPlus, iconPodium, iconPoint, iconPointCenter, iconQuestionMark, iconRaft, iconRetailTag, iconRightToForget, iconRing, iconRocket, iconScale, iconScale2, iconScan, iconServer, iconShakeLove, iconSharedUsers, iconShield2Tone, iconShieldCheck, iconShieldVarified, iconSlice, iconSlider, iconSmbBuilding, iconSolidArrowDown, iconSolidArrowRight, iconSolidCheck, iconSolidCheckmark, iconSolidClock1, iconSolidClock2, iconSolidCompass, iconSolidDollarSign, iconSolidExclamationMark, iconSolidMinus, iconSolidOMaru, iconSolidPlay, iconSolidPlus, iconSolidQuestionMark, iconSolidXBatsu, iconSpeachBubble, iconSpotlight, iconSprayBottle, iconSquaresScale, iconSquaresScaleTop, iconSquaresTogether, iconStar, iconStopHand, iconStorage, iconStorageCloud, iconStorageKey, iconSun, iconTarget, iconTeam, iconTeamAdd, iconThumb, iconToggle, iconTools, iconTrophy, iconTruck, iconTwoFiles, iconTyping, iconTypingNow, iconUpDown, iconUpload, iconUploadCloud, iconUsb, iconUserAlert, iconUserVerified, iconUserVerifiedUnknown, iconUserBadge, iconUserPrimary, iconUserTimed, iconVideo, iconVideoCamera, iconVideoCamera2, iconWriting, iconXBatsu, iconZones, icon2Chat2, icon2ChatQuestion2, icon2OverlaySquares2, icon3OverlaySquares2, icon3SquareCircle2, icon3Tier2, icon4Squares3, icon4Squares1, icon6Dots2, iconAddSmall2, iconAddSquares2, iconAddToCart2, iconAid2, iconAppCloud2, iconArrowDown2, iconArrowRight2, iconAttachment2, iconAudio2, iconAward2, iconBadge2, iconBag2, iconBank2, iconBattery2, iconBell2, iconBinders2, iconBolt2, iconBoltBubble2, iconBrain2, iconBriefcase2, iconBroadcast2, iconBrowser2, iconBrush2, iconCalendar3, iconCalendar1, iconCalendarAdded2, iconCart3, iconCart1, iconCash2, iconCautionFile2, iconCautionPhone2, iconCautionTriangle2, iconCenter2, iconChatBubble2, iconChatQuestion2, iconCheck2, iconCheckmark2, iconClipboard2, iconClock12, iconClock22, iconClock32, iconCloud2, iconCloudServer2, iconCode2, iconCodeBrowser2, iconCompass2, iconComputer2, iconComputerBadge2, iconComputerDownload2, iconComputerUpoad2, iconConnectedDots2, iconConnectedTogether2, iconContainerLines3, iconContainerLines22, iconCubeDotLine2, iconCubeLine2, iconCycle2, iconDesktopLaptop2, iconDevices2, iconDistribute3, iconDistribute1, iconDna2, iconDollarSign2, iconDonutCoffee2, iconDownload2, iconDrop2, iconEnterpriseBuilding2, iconEnvelope2, iconEnvelopeBug2, iconEnvelopeDoc2, iconEnvelopeShred2, iconExclamationMark2, iconEye2, iconFileApproved2, iconFileBlank2, iconFileBug2, iconFileCheck2, iconFileCloud2, iconFileCopy2, iconFileDocument2, iconFileImage2, iconFileInfographic2, iconFileInsights2, iconFileMove2, iconFileMusic2, iconFilePlus2, iconFilePresentations2, iconFileSpeed2, iconFileSpreadsheet2, iconFileText2, iconFileVideo2, iconFingerPrint2, iconFlight2, iconFolder2, iconFolderUp2, iconFolderUpload2, iconFtpFolder2, iconFunnel2, iconGear2, iconGears2, iconGraduationCap2, iconGraphIncrease2, iconGraphMeasure2, iconGroupCall2, iconHeart2, iconHome2, iconImage2, iconKeySafe2, iconLeavesGrowing2, iconLight2, iconLineGraphV22, iconLineGraph2, iconLink2, iconLock2, iconMagnifyingGlass2, iconMartini2, iconMaze2, iconMedTool2, iconMegaphone2, iconMetadata2, iconMicrophone2, iconMinus2, iconMixedMediaDownload2, iconMusicNote2, iconNotePad2, iconNumber02, iconNumber12, iconNumber22, iconNumber32, iconNumber42, iconNumber52, iconNumber62, iconNumber72, iconNumber82, iconNumber92, iconOMaru2, iconOverlay2, iconPaper2, iconPen2, iconPerson2, iconPhone3, iconPhone1, iconPhoneBrowser2, iconPieChart2, iconPieChart32, iconPin3, iconPin1, iconPlane2, iconPlay2, iconPlus2, iconPodium2, iconPoint2, iconPointCenter2, iconQuestionMark2, iconRaft2, iconRetailTag2, iconRightToForget2, iconRing2, iconRocket2, iconScale3, iconScale1, iconScan2, iconServer2, iconShakeLove2, iconSharedUsers2, iconShield2Tone2, iconShieldCheck2, iconShieldVarified2, iconSlice2, iconSlider2, iconSmbBuilding2, iconSolidArrowDown2, iconSolidArrowRight2, iconSolidCheck2, iconSolidCheckmark2, iconSolidClock12, iconSolidClock22, iconSolidCompass2, iconSolidDollarSign2, iconSolidExclamationMark2, iconSolidMinus2, iconSolidOMaru2, iconSolidPlay2, iconSolidPlus2, iconSolidQuestionMark2, iconSolidXBatsu2, iconSpeachBubble2, iconSpotlight2, iconSprayBottle2, iconSquaresScale2, iconSquaresScaleTop2, iconSquaresTogether2, iconStar2, iconStopHand2, iconStorage2, iconStorageCloud2, iconStorageKey2, iconSun2, iconTarget2, iconTeam2, iconTeamAdd2, iconThumb2, iconToggle2, iconTools2, iconTrophy2, iconTruck2, iconTwoFiles2, iconTyping2, iconTypingNow2, iconUpDown2, iconUpload2, iconUploadCloud2, iconUsb2, iconUserAlert2, iconUserVerifiedUnknown2, iconUserVerified2, iconUserBadge2, iconUserPrimary2, iconUserTimed2, iconVideo2, iconVideoCamera3, iconVideoCamera1, iconWhiteArrowRight, iconWhiteCheck, iconWhitePlus, iconWhiteStop, iconWriting2, iconXBatsu2, iconZones2, } from "./constants.js";
@@ -1,2 +1,2 @@
1
1
  /* auto-generated by tools/iconography/generate-box-iconography.ts */
2
- export { icon2Chat, icon2ChatQuestion, icon2OverlaySquares, icon3OverlaySquares, icon3SquareCircle, icon3Tier, icon4Squares, icon4Squares2, icon6Dots, iconAddSmall, iconAddSquares, iconAddToCart, iconAid, iconAppCloud, iconArrowDown, iconArrowRight, iconAttachment, iconAudio, iconAward, iconBadge, iconBag, iconBank, iconBattery, iconBell, iconBinders, iconBolt, iconBoltBubble, iconBrain, iconBriefcase, iconBroadcast, iconBrowser, iconBrush, iconCalendar, iconCalendar2, iconCalendarAdded, iconCart, iconCart2, iconCash, iconCautionFile, iconCautionPhone, iconCautionTriangle, iconCenter, iconChatBubble, iconChatQuestion, iconCheck, iconCheckmark, iconClipboard, iconClock1, iconClock2, iconClock3, iconCloud, iconCloudServer, iconCode, iconCodeBrowser, iconCompass, iconComputer, iconComputerBadge, iconComputerDownload, iconComputerUpoad, iconConnectedDots, iconConnectedTogether, iconContainerLines, iconContainerLines2, iconCubeDotLine, iconCubeLine, iconCycle, iconDesktopLaptop, iconDevices, iconDistribute, iconDistribute2, iconDna, iconDollarSign, iconDonutCoffee, iconDownload, iconDrop, iconEnterpriseBuilding, iconEnvelope, iconEnvelopeBug, iconEnvelopeDoc, iconEnvelopeShred, iconExclamationMark, iconEye, iconFileApproved, iconFileBlank, iconFileBug, iconFileCheck, iconFileCloud, iconFileCopy, iconFileDocument, iconFileImage, iconFileInfographic, iconFileInsights, iconFileMove, iconFileMusic, iconFilePlus, iconFilePresentations, iconFileSpeed, iconFileSpreadsheet, iconFileText, iconFileVideo, iconFingerPrint, iconFlight, iconFolder, iconFolderUp, iconFolderUpload, iconFtpFolder, iconFunnel, iconGear, iconGears, iconGraduationCap, iconGraphIncrease, iconGraphMeasure, iconGroupCall, iconHeart, iconHome, iconImage, iconKeySafe, iconLeavesGrowing, iconLight, iconLineGraphV2, iconLineGraph, iconLink, iconLock, iconMagnifyingGlass, iconMartini, iconMaze, iconMedTool, iconMegaphone, iconMetadata, iconMicrophone, iconMinus, iconMixedMediaDownload, iconMusicNote, iconNotePad, iconNumber0, iconNumber1, iconNumber2, iconNumber3, iconNumber4, iconNumber5, iconNumber6, iconNumber7, iconNumber8, iconNumber9, iconOMaru, iconOverlay, iconPaper, iconPen, iconPerson, iconPhone, iconPhone2, iconPhoneBrowser, iconPieChart, iconPieChart3, iconPin, iconPin2, iconPlane, iconPlay, iconPlus, iconPodium, iconPoint, iconPointCenter, iconQuestionMark, iconRaft, iconRetailTag, iconRightToForget, iconRing, iconRocket, iconScale, iconScale2, iconScan, iconServer, iconShakeLove, iconSharedUsers, iconShield2Tone, iconShieldCheck, iconShieldVarified, iconSlice, iconSlider, iconSmbBuilding, iconSolidArrowDown, iconSolidArrowRight, iconSolidCheck, iconSolidCheckmark, iconSolidClock1, iconSolidClock2, iconSolidCompass, iconSolidDollarSign, iconSolidExclamationMark, iconSolidMinus, iconSolidOMaru, iconSolidPlay, iconSolidPlus, iconSolidQuestionMark, iconSolidXBatsu, iconSpeachBubble, iconSpotlight, iconSprayBottle, iconSquaresScale, iconSquaresScaleTop, iconSquaresTogether, iconStar, iconStopHand, iconStorage, iconStorageCloud, iconStorageKey, iconSun, iconTarget, iconTeam, iconTeamAdd, iconThumb, iconToggle, iconTools, iconTrophy, iconTruck, iconTwoFiles, iconTyping, iconTypingNow, iconUpDown, iconUpload, iconUploadCloud, iconUsb, iconUserAlert, iconUserVerified, iconUserVerifiedUnknown, iconUserBadge, iconUserPrimary, iconUserTimed, iconVideo, iconVideoCamera, iconVideoCamera2, iconWriting, iconXBatsu, iconZones, icon2Chat2, icon2ChatQuestion2, icon2OverlaySquares2, icon3OverlaySquares2, icon3SquareCircle2, icon3Tier2, icon4Squares3, icon4Squares1, icon6Dots2, iconAddSmall2, iconAddSquares2, iconAddToCart2, iconAid2, iconAppCloud2, iconArrowDown2, iconArrowRight2, iconAttachment2, iconAudio2, iconAward2, iconBadge2, iconBag2, iconBank2, iconBattery2, iconBell2, iconBinders2, iconBolt2, iconBoltBubble2, iconBrain2, iconBriefcase2, iconBroadcast2, iconBrowser2, iconBrush2, iconCalendar3, iconCalendar1, iconCalendarAdded2, iconCart3, iconCart1, iconCash2, iconCautionFile2, iconCautionPhone2, iconCautionTriangle2, iconCenter2, iconChatBubble2, iconChatQuestion2, iconCheck2, iconCheckmark2, iconClipboard2, iconClock12, iconClock22, iconClock32, iconCloud2, iconCloudServer2, iconCode2, iconCodeBrowser2, iconCompass2, iconComputer2, iconComputerBadge2, iconComputerDownload2, iconComputerUpoad2, iconConnectedDots2, iconConnectedTogether2, iconContainerLines3, iconContainerLines22, iconCubeDotLine2, iconCubeLine2, iconCycle2, iconDesktopLaptop2, iconDevices2, iconDistribute3, iconDistribute1, iconDna2, iconDollarSign2, iconDonutCoffee2, iconDownload2, iconDrop2, iconEnterpriseBuilding2, iconEnvelope2, iconEnvelopeBug2, iconEnvelopeDoc2, iconEnvelopeShred2, iconExclamationMark2, iconEye2, iconFileApproved2, iconFileBlank2, iconFileBug2, iconFileCheck2, iconFileCloud2, iconFileCopy2, iconFileDocument2, iconFileImage2, iconFileInfographic2, iconFileInsights2, iconFileMove2, iconFileMusic2, iconFilePlus2, iconFilePresentations2, iconFileSpeed2, iconFileSpreadsheet2, iconFileText2, iconFileVideo2, iconFingerPrint2, iconFlight2, iconFolder2, iconFolderUp2, iconFolderUpload2, iconFtpFolder2, iconFunnel2, iconGear2, iconGears2, iconGraduationCap2, iconGraphIncrease2, iconGraphMeasure2, iconGroupCall2, iconHeart2, iconHome2, iconImage2, iconKeySafe2, iconLeavesGrowing2, iconLight2, iconLineGraphV22, iconLineGraph2, iconLink2, iconLock2, iconMagnifyingGlass2, iconMartini2, iconMaze2, iconMedTool2, iconMegaphone2, iconMetadata2, iconMicrophone2, iconMinus2, iconMixedMediaDownload2, iconMusicNote2, iconNotePad2, iconNumber02, iconNumber12, iconNumber22, iconNumber32, iconNumber42, iconNumber52, iconNumber62, iconNumber72, iconNumber82, iconNumber92, iconOMaru2, iconOverlay2, iconPaper2, iconPen2, iconPerson2, iconPhone3, iconPhone1, iconPhoneBrowser2, iconPieChart2, iconPieChart32, iconPin3, iconPin1, iconPlane2, iconPlay2, iconPlus2, iconPodium2, iconPoint2, iconPointCenter2, iconQuestionMark2, iconRaft2, iconRetailTag2, iconRightToForget2, iconRing2, iconRocket2, iconScale3, iconScale1, iconScan2, iconServer2, iconShakeLove2, iconSharedUsers2, iconShield2Tone2, iconShieldCheck2, iconShieldVarified2, iconSlice2, iconSlider2, iconSmbBuilding2, iconSolidArrowDown2, iconSolidArrowRight2, iconSolidCheck2, iconSolidCheckmark2, iconSolidClock12, iconSolidClock22, iconSolidCompass2, iconSolidDollarSign2, iconSolidExclamationMark2, iconSolidMinus2, iconSolidOMaru2, iconSolidPlay2, iconSolidPlus2, iconSolidQuestionMark2, iconSolidXBatsu2, iconSpeachBubble2, iconSpotlight2, iconSprayBottle2, iconSquaresScale2, iconSquaresScaleTop2, iconSquaresTogether2, iconStar2, iconStopHand2, iconStorage2, iconStorageCloud2, iconStorageKey2, iconSun2, iconTarget2, iconTeam2, iconTeamAdd2, iconThumb2, iconToggle2, iconTools2, iconTrophy2, iconTruck2, iconTwoFiles2, iconTyping2, iconTypingNow2, iconUpDown2, iconUpload2, iconUploadCloud2, iconUsb2, iconUserAlert2, iconUserVerifiedUnknown2, iconUserVerified2, iconUserBadge2, iconUserPrimary2, iconUserTimed2, iconVideo2, iconVideoCamera3, iconVideoCamera1, iconWhiteArrowRight, iconWhiteCheck, iconWhitePlus, iconWhiteStop, iconWriting2, iconXBatsu2, iconZones2, } from "../box-iconography.generated.js";
2
+ export { icon2Chat, icon2ChatQuestion, icon2OverlaySquares, icon3OverlaySquares, icon3SquareCircle, icon3Tier, icon4Squares, icon4Squares2, icon6Dots, iconAddSmall, iconAddSquares, iconAddToCart, iconAid, iconAppCloud, iconArrowDown, iconArrowRight, iconAttachment, iconAudio, iconAward, iconBadge, iconBag, iconBank, iconBattery, iconBell, iconBinders, iconBolt, iconBoltBubble, iconBrain, iconBriefcase, iconBroadcast, iconBrowser, iconBrush, iconCalendar, iconCalendar2, iconCalendarAdded, iconCart, iconCart2, iconCash, iconCautionFile, iconCautionPhone, iconCautionTriangle, iconCenter, iconChatBubble, iconChatQuestion, iconCheck, iconCheckmark, iconClipboard, iconClock1, iconClock2, iconClock3, iconCloud, iconCloudServer, iconCode, iconCodeBrowser, iconCompass, iconComputer, iconComputerBadge, iconComputerDownload, iconComputerUpoad, iconConnectedDots, iconConnectedTogether, iconContainerLines, iconContainerLines2, iconCubeDotLine, iconCubeLine, iconCycle, iconDesktopLaptop, iconDevices, iconDistribute, iconDistribute2, iconDna, iconDollarSign, iconDonutCoffee, iconDownload, iconDrop, iconEnterpriseBuilding, iconEnvelope, iconEnvelopeBug, iconEnvelopeDoc, iconEnvelopeShred, iconExclamationMark, iconEye, iconFileApproved, iconFileBlank, iconFileBug, iconFileCheck, iconFileCloud, iconFileCopy, iconFileDocument, iconFileImage, iconFileInfographic, iconFileInsights, iconFileMove, iconFileMusic, iconFilePlus, iconFilePresentations, iconFileSpeed, iconFileSpreadsheet, iconFileText, iconFileVideo, iconFingerPrint, iconFlight, iconFolder, iconFolderUp, iconFolderUpload, iconFtpFolder, iconFunnel, iconGear, iconGears, iconGraduationCap, iconGraphIncrease, iconGraphMeasure, iconGroupCall, iconHeart, iconHome, iconImage, iconKeySafe, iconLeavesGrowing, iconLight, iconLineGraphV2, iconLineGraph, iconLink, iconLock, iconMagnifyingGlass, iconMartini, iconMaze, iconMedTool, iconMegaphone, iconMetadata, iconMicrophone, iconMinus, iconMixedMediaDownload, iconMusicNote, iconNotePad, iconNumber0, iconNumber1, iconNumber2, iconNumber3, iconNumber4, iconNumber5, iconNumber6, iconNumber7, iconNumber8, iconNumber9, iconOMaru, iconOverlay, iconPaper, iconPen, iconPerson, iconPhone, iconPhone2, iconPhoneBrowser, iconPieChart, iconPieChart3, iconPin, iconPin2, iconPlane, iconPlay, iconPlus, iconPodium, iconPoint, iconPointCenter, iconQuestionMark, iconRaft, iconRetailTag, iconRightToForget, iconRing, iconRocket, iconScale, iconScale2, iconScan, iconServer, iconShakeLove, iconSharedUsers, iconShield2Tone, iconShieldCheck, iconShieldVarified, iconSlice, iconSlider, iconSmbBuilding, iconSolidArrowDown, iconSolidArrowRight, iconSolidCheck, iconSolidCheckmark, iconSolidClock1, iconSolidClock2, iconSolidCompass, iconSolidDollarSign, iconSolidExclamationMark, iconSolidMinus, iconSolidOMaru, iconSolidPlay, iconSolidPlus, iconSolidQuestionMark, iconSolidXBatsu, iconSpeachBubble, iconSpotlight, iconSprayBottle, iconSquaresScale, iconSquaresScaleTop, iconSquaresTogether, iconStar, iconStopHand, iconStorage, iconStorageCloud, iconStorageKey, iconSun, iconTarget, iconTeam, iconTeamAdd, iconThumb, iconToggle, iconTools, iconTrophy, iconTruck, iconTwoFiles, iconTyping, iconTypingNow, iconUpDown, iconUpload, iconUploadCloud, iconUsb, iconUserAlert, iconUserVerified, iconUserVerifiedUnknown, iconUserBadge, iconUserPrimary, iconUserTimed, iconVideo, iconVideoCamera, iconVideoCamera2, iconWriting, iconXBatsu, iconZones, icon2Chat2, icon2ChatQuestion2, icon2OverlaySquares2, icon3OverlaySquares2, icon3SquareCircle2, icon3Tier2, icon4Squares3, icon4Squares1, icon6Dots2, iconAddSmall2, iconAddSquares2, iconAddToCart2, iconAid2, iconAppCloud2, iconArrowDown2, iconArrowRight2, iconAttachment2, iconAudio2, iconAward2, iconBadge2, iconBag2, iconBank2, iconBattery2, iconBell2, iconBinders2, iconBolt2, iconBoltBubble2, iconBrain2, iconBriefcase2, iconBroadcast2, iconBrowser2, iconBrush2, iconCalendar3, iconCalendar1, iconCalendarAdded2, iconCart3, iconCart1, iconCash2, iconCautionFile2, iconCautionPhone2, iconCautionTriangle2, iconCenter2, iconChatBubble2, iconChatQuestion2, iconCheck2, iconCheckmark2, iconClipboard2, iconClock12, iconClock22, iconClock32, iconCloud2, iconCloudServer2, iconCode2, iconCodeBrowser2, iconCompass2, iconComputer2, iconComputerBadge2, iconComputerDownload2, iconComputerUpoad2, iconConnectedDots2, iconConnectedTogether2, iconContainerLines3, iconContainerLines22, iconCubeDotLine2, iconCubeLine2, iconCycle2, iconDesktopLaptop2, iconDevices2, iconDistribute3, iconDistribute1, iconDna2, iconDollarSign2, iconDonutCoffee2, iconDownload2, iconDrop2, iconEnterpriseBuilding2, iconEnvelope2, iconEnvelopeBug2, iconEnvelopeDoc2, iconEnvelopeShred2, iconExclamationMark2, iconEye2, iconFileApproved2, iconFileBlank2, iconFileBug2, iconFileCheck2, iconFileCloud2, iconFileCopy2, iconFileDocument2, iconFileImage2, iconFileInfographic2, iconFileInsights2, iconFileMove2, iconFileMusic2, iconFilePlus2, iconFilePresentations2, iconFileSpeed2, iconFileSpreadsheet2, iconFileText2, iconFileVideo2, iconFingerPrint2, iconFlight2, iconFolder2, iconFolderUp2, iconFolderUpload2, iconFtpFolder2, iconFunnel2, iconGear2, iconGears2, iconGraduationCap2, iconGraphIncrease2, iconGraphMeasure2, iconGroupCall2, iconHeart2, iconHome2, iconImage2, iconKeySafe2, iconLeavesGrowing2, iconLight2, iconLineGraphV22, iconLineGraph2, iconLink2, iconLock2, iconMagnifyingGlass2, iconMartini2, iconMaze2, iconMedTool2, iconMegaphone2, iconMetadata2, iconMicrophone2, iconMinus2, iconMixedMediaDownload2, iconMusicNote2, iconNotePad2, iconNumber02, iconNumber12, iconNumber22, iconNumber32, iconNumber42, iconNumber52, iconNumber62, iconNumber72, iconNumber82, iconNumber92, iconOMaru2, iconOverlay2, iconPaper2, iconPen2, iconPerson2, iconPhone3, iconPhone1, iconPhoneBrowser2, iconPieChart2, iconPieChart32, iconPin3, iconPin1, iconPlane2, iconPlay2, iconPlus2, iconPodium2, iconPoint2, iconPointCenter2, iconQuestionMark2, iconRaft2, iconRetailTag2, iconRightToForget2, iconRing2, iconRocket2, iconScale3, iconScale1, iconScan2, iconServer2, iconShakeLove2, iconSharedUsers2, iconShield2Tone2, iconShieldCheck2, iconShieldVarified2, iconSlice2, iconSlider2, iconSmbBuilding2, iconSolidArrowDown2, iconSolidArrowRight2, iconSolidCheck2, iconSolidCheckmark2, iconSolidClock12, iconSolidClock22, iconSolidCompass2, iconSolidDollarSign2, iconSolidExclamationMark2, iconSolidMinus2, iconSolidOMaru2, iconSolidPlay2, iconSolidPlus2, iconSolidQuestionMark2, iconSolidXBatsu2, iconSpeachBubble2, iconSpotlight2, iconSprayBottle2, iconSquaresScale2, iconSquaresScaleTop2, iconSquaresTogether2, iconStar2, iconStopHand2, iconStorage2, iconStorageCloud2, iconStorageKey2, iconSun2, iconTarget2, iconTeam2, iconTeamAdd2, iconThumb2, iconToggle2, iconTools2, iconTrophy2, iconTruck2, iconTwoFiles2, iconTyping2, iconTypingNow2, iconUpDown2, iconUpload2, iconUploadCloud2, iconUsb2, iconUserAlert2, iconUserVerifiedUnknown2, iconUserVerified2, iconUserBadge2, iconUserPrimary2, iconUserTimed2, iconVideo2, iconVideoCamera3, iconVideoCamera1, iconWhiteArrowRight, iconWhiteCheck, iconWhitePlus, iconWhiteStop, iconWriting2, iconXBatsu2, iconZones2, } from "./constants.js";
package/dist/index.d.ts CHANGED
@@ -146,3 +146,4 @@ export * from "./foundations/status/index.js";
146
146
  export * from "./patterns/run/progress.js";
147
147
  export * from "./patterns/undo/index.js";
148
148
  export * from "./patterns/flow-builder/index.js";
149
+ export * from "./patterns/process-modeler/index.js";
package/dist/index.js CHANGED
@@ -160,3 +160,4 @@ export * from "./foundations/status/index.js";
160
160
  export * from "./patterns/run/progress.js";
161
161
  export * from "./patterns/undo/index.js";
162
162
  export * from "./patterns/flow-builder/index.js";
163
+ export * from "./patterns/process-modeler/index.js";
@@ -27,7 +27,11 @@ export declare class FlowBuilder<N extends FlowNodeBase = FlowNode> extends Base
27
27
  private headingEl?;
28
28
  private renderedRenderer?;
29
29
  private observer?;
30
- private narrow;
30
+ private narrowValue;
31
+ private visible;
32
+ get narrow(): boolean;
33
+ /** Focus a rendered card without changing selection or opening the editor. */
34
+ focusNode(node: N): void;
31
35
  private insertion?;
32
36
  private invoker?;
33
37
  private spine;
@@ -39,6 +43,8 @@ export declare class FlowBuilder<N extends FlowNodeBase = FlowNode> extends Base
39
43
  private drawer;
40
44
  private error;
41
45
  static get observedAttributes(): string[];
46
+ get headingLevel(): number;
47
+ set headingLevel(value: number);
42
48
  get nodes(): N[];
43
49
  set nodes(value: N[]);
44
50
  /** How to read the host document; defaults to `body` / `branches` ({@link FlowNode}). */
@@ -1,4 +1,6 @@
1
1
  import { BaseElement } from "../../core/index.js";
2
+ import { Drawer } from "../../components/overlays/drawer.js";
3
+ Drawer.register();
2
4
  import { announce } from "../../foundations/a11y/index.js";
3
5
  import { defaultFlowModel, nodeAtPath, nodeDescription, nodeTitle } from "./model.js";
4
6
  import { FLOW_SPINE_PARTS, InsertPoint, KIND_PICKER_PARTS } from "./primitives.js";
@@ -20,7 +22,11 @@ export class FlowBuilder extends BaseElement {
20
22
  headingEl;
21
23
  renderedRenderer;
22
24
  observer;
23
- narrow = false;
25
+ narrowValue = false;
26
+ visible = true;
27
+ get narrow() { return this.narrowValue; }
28
+ /** Focus a rendered card without changing selection or opening the editor. */
29
+ focusNode(node) { this.spine?.focusNode(node); }
24
30
  insertion;
25
31
  invoker;
26
32
  spine;
@@ -31,7 +37,9 @@ export class FlowBuilder extends BaseElement {
31
37
  inspector;
32
38
  drawer;
33
39
  error;
34
- static get observedAttributes() { return ["start-label", "end-label"]; }
40
+ static get observedAttributes() { return ["start-label", "end-label", "heading-level"]; }
41
+ get headingLevel() { const level = Number(this.getAttribute("heading-level") ?? 2); return Number.isInteger(level) && level >= 1 && level <= 6 ? level : 2; }
42
+ set headingLevel(value) { this.setAttribute("heading-level", String(value)); }
35
43
  get nodes() { return this.nodesValue; }
36
44
  set nodes(value) { this.nodesValue = value; this.refresh(); }
37
45
  /** How to read the host document; defaults to `body` / `branches` ({@link FlowNode}). */
@@ -56,12 +64,18 @@ export class FlowBuilder extends BaseElement {
56
64
  this.refresh();
57
65
  }
58
66
  connectedCallback() {
67
+ this.visible = this.getClientRects().length > 0;
59
68
  super.connectedCallback();
60
69
  if (typeof ResizeObserver !== "undefined") {
61
- this.observer = new ResizeObserver(entries => this.setNarrow(entries[0].contentRect.width < 800));
70
+ this.observer = new ResizeObserver(entries => {
71
+ const rect = entries[0].contentRect;
72
+ this.visible = rect.width > 0 && rect.height > 0 && this.getClientRects().length > 0;
73
+ this.setNarrow(this.visible && rect.width < 800);
74
+ this.updateInspector();
75
+ });
62
76
  this.observer.observe(this);
63
77
  }
64
- this.setNarrow((this.getBoundingClientRect().width || this.ownerDocument.defaultView?.innerWidth || 1024) < 800);
78
+ this.setNarrow(this.visible && this.getBoundingClientRect().width < 800);
65
79
  }
66
80
  disconnectedCallback() {
67
81
  this.observer?.disconnect();
@@ -75,23 +89,24 @@ export class FlowBuilder extends BaseElement {
75
89
  setNarrow(narrow) {
76
90
  if (this.narrow === narrow)
77
91
  return;
78
- this.narrow = narrow;
92
+ this.narrowValue = narrow;
79
93
  this.shadowRoot.querySelector("[part=layout]").dataset.narrow = String(narrow);
80
94
  this.updateInspector();
95
+ this.dispatchEvent(new CustomEvent("narrow-changed", { detail: { narrow }, bubbles: true, composed: true }));
81
96
  }
82
97
  renderTemplate() {
83
98
  this.shadowRoot.innerHTML = `<style>
84
99
  :host{display:block;min-width:0;font:inherit;color:var(--boe-token-text-text,#222)}
85
100
  :host([hidden]){display:none!important}
86
- [part=layout]{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,320px);gap:24px;align-items:start}
101
+ [part=layout]{display:grid;grid-template-columns:minmax(0,1fr) minmax(var(--boe-flow-inspector-min-width,240px),var(--boe-flow-inspector-width,320px));gap:24px;align-items:start}
87
102
  [part=layout][data-narrow=true]{grid-template-columns:minmax(0,1fr)}
88
- aside{min-width:0;padding:16px;border:1px solid var(--boe-token-stroke-stroke,#ddd);border-radius:12px;background:var(--boe-token-surface-surface,#fff)}
103
+ [part=inspector]{min-width:0;position:sticky;top:var(--boe-flow-inspector-top,16px);max-height:calc(100dvh - var(--boe-flow-inspector-top,16px) - 16px);overflow:auto;box-sizing:border-box;padding:16px;border:1px solid var(--boe-token-stroke-stroke,#ddd);border-radius:12px;background:var(--boe-token-surface-surface,#fff)}
89
104
  [part=picker-popup]{position:fixed;z-index:1000;max-width:min(360px,calc(100vw - 24px));max-height:65vh;overflow:auto;padding:16px;background:var(--boe-token-surface-surface,#fff);border:1px solid var(--boe-token-stroke-stroke,#ddd);border-radius:12px;box-shadow:0 8px 32px #0003}
90
105
  [part=error]{color:var(--boe-token-text-status-text-error,#b92340);margin-bottom:16px;overflow-wrap:anywhere}
91
- [hidden]{display:none!important} h2{font:inherit;font-weight:650;margin:0 0 12px}
92
- </style><div part="error" hidden></div><div part="layout"><box-flow-spine exportparts="${FLOW_SPINE_PARTS.join(", ")}"></box-flow-spine><aside part="inspector"><box-kind-picker exportparts="${KIND_PICKER_PARTS.join(", ")}"></box-kind-picker><div part="editor"></div></aside></div><div part="picker-popup" hidden><box-kind-picker exportparts="${KIND_PICKER_PARTS.join(", ")}"></box-kind-picker></div><box-drawer position="bottom" size="large"></box-drawer>`;
106
+ [hidden]{display:none!important} [part=inspector-heading]{font:inherit;font-weight:650;margin:0 0 12px}
107
+ </style><div part="error" hidden></div><div part="layout"><box-flow-spine exportparts="${FLOW_SPINE_PARTS.join(", ")}"></box-flow-spine><div part="inspector" role="region" aria-label="Add a step"><box-kind-picker exportparts="${KIND_PICKER_PARTS.join(", ")}"></box-kind-picker><div part="editor"></div></div></div><div part="picker-popup" hidden><box-kind-picker exportparts="${KIND_PICKER_PARTS.join(", ")}"></box-kind-picker></div><box-drawer position="bottom" size="large"></box-drawer>`;
93
108
  this.spine = this.shadowRoot.querySelector("box-flow-spine");
94
- this.aside = this.shadowRoot.querySelector("aside");
109
+ this.aside = this.shadowRoot.querySelector("[part=inspector]");
95
110
  this.palette = this.aside.querySelector("box-kind-picker");
96
111
  this.inspector = this.aside.querySelector("[part=editor]");
97
112
  this.popup = this.shadowRoot.querySelector("[part=picker-popup]");
@@ -130,7 +145,7 @@ export class FlowBuilder extends BaseElement {
130
145
  });
131
146
  this.palette.addEventListener("kind-pick", event => this.insert(event.detail.kind, { list: this.nodes, index: this.nodes.length, label: "Append to flow" }));
132
147
  this.drawer.addEventListener("open-changed", event => {
133
- if (!event.detail.open && this.narrow && this.selectedValue)
148
+ if (!event.detail.open && this.visible && this.narrow && this.selectedValue)
134
149
  this.select(null);
135
150
  });
136
151
  }
@@ -198,6 +213,7 @@ export class FlowBuilder extends BaseElement {
198
213
  this.spine.nodes = this.nodes;
199
214
  this.spine.catalog = this.catalog;
200
215
  this.spine.model = this.model;
216
+ this.spine.headingLevel = Math.min(6, this.headingLevel + 1);
201
217
  this.spine.startLabel = this.startLabel;
202
218
  this.spine.endLabel = this.endLabel;
203
219
  this.spine.selected = this.selected;
@@ -208,13 +224,14 @@ export class FlowBuilder extends BaseElement {
208
224
  this.updateInspector();
209
225
  }
210
226
  updateInspector() {
227
+ this.aside.setAttribute("aria-label", this.selected ? "Step editor" : "Add a step");
211
228
  this.aside.hidden = this.narrow;
212
229
  this.palette.hidden = Boolean(this.selected);
213
230
  const target = this.narrow ? this.drawer : this.aside;
214
231
  if (this.inspector.parentElement !== target)
215
232
  target.append(this.inspector);
216
- if (this.inspected === this.selected && this.renderedRenderer === this.renderer) {
217
- this.drawer.open = this.narrow && Boolean(this.selected);
233
+ if (this.inspected === this.selected && this.renderedRenderer === this.renderer && (!this.selected || this.headingEl?.tagName === `H${this.headingLevel}`)) {
234
+ this.drawer.open = this.visible && this.narrow && Boolean(this.selected);
218
235
  return;
219
236
  }
220
237
  this.cleanupInspector?.();
@@ -223,7 +240,7 @@ export class FlowBuilder extends BaseElement {
223
240
  this.inspected = this.selected;
224
241
  this.renderedRenderer = this.renderer;
225
242
  if (this.selected) {
226
- const heading = document.createElement("h2");
243
+ const heading = document.createElement(`h${this.headingLevel}`);
227
244
  heading.setAttribute("part", "inspector-heading");
228
245
  heading.textContent = nodeTitle(this.selected, this.catalog, this.model);
229
246
  this.inspector.append(heading);
@@ -237,7 +254,7 @@ export class FlowBuilder extends BaseElement {
237
254
  }
238
255
  this.drawer.heading = nodeTitle(this.selected, this.catalog, this.model);
239
256
  }
240
- this.drawer.open = this.narrow && Boolean(this.selected);
257
+ this.drawer.open = this.visible && this.narrow && Boolean(this.selected);
241
258
  }
242
259
  }
243
260
  FlowBuilder.register();
@@ -33,6 +33,8 @@ export interface FlowChildList {
33
33
  * (selection, undo, validation paths) is preserved.
34
34
  */
35
35
  export interface FlowModel<N extends FlowNodeBase = FlowNodeBase> {
36
+ /** Catalog entry used to draw this node; does not change its document kind. */
37
+ kind?(node: N): string | undefined;
36
38
  /** Nested lists under `node`, in display order. */
37
39
  children(node: N): FlowChildList[];
38
40
  /** A distinct name for the node; falls back to its kind's label. */
@@ -8,10 +8,10 @@ export const defaultFlowModel = {
8
8
  description: node => node.description,
9
9
  status: node => node.status,
10
10
  };
11
- export const nodeTitle = (node, catalog = [], model = defaultFlowModel) => model.title?.(node) || catalog.find(kind => kind.kind === node.kind)?.label || "Step";
12
- export const nodeDescription = (node, catalog = [], model = defaultFlowModel) => model.description?.(node) || catalog.find(kind => kind.kind === node.kind)?.description || "";
11
+ export const nodeTitle = (node, catalog = [], model = defaultFlowModel) => model.title?.(node) || catalog.find(kind => kind.kind === (model.kind?.(node) ?? node.kind))?.label || "Step";
12
+ export const nodeDescription = (node, catalog = [], model = defaultFlowModel) => model.description?.(node) || catalog.find(kind => kind.kind === (model.kind?.(node) ?? node.kind))?.description || "";
13
13
  export function cardLabel(node, catalog = [], invalid = false, model = defaultFlowModel) {
14
- const kind = catalog.find(entry => entry.kind === node.kind);
14
+ const kind = catalog.find(entry => entry.kind === (model.kind?.(node) ?? node.kind));
15
15
  const title = nodeTitle(node, catalog, model);
16
16
  return [title, kind?.label !== title ? kind?.label : "", nodeDescription(node, catalog, model), model.status?.(node), invalid ? "Needs attention" : ""].filter(Boolean).join(". ");
17
17
  }
@@ -46,6 +46,7 @@ export declare class FlowSpine extends BaseElement {
46
46
  invalid: FlowNodeBase | null;
47
47
  startLabel: string;
48
48
  endLabel: string;
49
+ headingLevel: number;
49
50
  private cards;
50
51
  protected renderTemplate(): void;
51
52
  refresh(): void;
@@ -24,7 +24,7 @@ export class FlowCard extends BaseElement {
24
24
  renderTemplate() {
25
25
  this.shadowRoot.innerHTML = `<style>${styles}
26
26
  button { width:100%; text-align:start; display:grid; gap:6px; padding:16px; border:1px solid var(--boe-token-stroke-stroke,#ddd); border-radius:var(--boe-profile-radius-med,8px); background:var(--boe-token-surface-surface,#fff); overflow-wrap:anywhere; }
27
- button[aria-pressed=true] { border-color:var(--boe-token-surface-surface-brand,#0061d5); background:color-mix(in srgb,var(--boe-token-surface-surface-brand,#0061d5) 8%,var(--boe-token-surface-surface,#fff)); }
27
+ button[aria-pressed=true] { border-color:var(--boe-token-surface-surface-brand,#0061d5); background:color-mix(in srgb,var(--boe-token-surface-surface-brand,#0061d5) 5%,var(--boe-token-surface-surface,#fff)); }
28
28
  button[data-invalid=true] { border-color:var(--boe-token-text-status-text-error,#b92340); }
29
29
  button.has-icon{grid-template-columns:20px minmax(0,1fr);column-gap:12px} button.has-icon [part=icon]{grid-column:1;grid-row:1/span 4} button.has-icon [part=title],button.has-icon [part=kind],button.has-icon [part=description],button.has-icon [part=status],button.has-icon [part=error]{grid-column:2}
30
30
  [part=icon]{color:var(--boe-token-surface-surface-brand,#0061d5);width:20px;height:20px} [part=icon][data-tone=neutral]{color:var(--boe-token-text-text-secondary,#666)} [part=icon] svg{display:block;width:20px;height:20px} [part=title] { font-weight:650; } [part=kind],[part=description] { color:var(--boe-token-text-text-secondary,#666); } [part=error] { color:var(--boe-token-text-status-text-error,#b92340); }
@@ -36,7 +36,7 @@ export class FlowCard extends BaseElement {
36
36
  this.update(); }
37
37
  focus(options) { this.shadowRoot?.querySelector("button")?.focus(options); }
38
38
  update() {
39
- const kind = this.catalog.find(kind => kind.kind === this.node.kind);
39
+ const kind = this.catalog.find(kind => kind.kind === (this.model.kind?.(this.node) ?? this.node.kind));
40
40
  const title = nodeTitle(this.node, this.catalog, this.model);
41
41
  const button = this.shadowRoot.querySelector("button");
42
42
  button.setAttribute("aria-pressed", String(this.selected));
@@ -148,8 +148,9 @@ export class FlowSpine extends BaseElement {
148
148
  invalid = null;
149
149
  startLabel = "Flow starts";
150
150
  endLabel = "Flow ends";
151
+ headingLevel = 3;
151
152
  cards = new Map();
152
- renderTemplate() { this.shadowRoot.innerHTML = `<style>${styles} [part=spine]{display:grid;gap:0;min-width:0} [part=branches]{display:flex;gap:16px;overflow-x:auto;max-width:100%;padding:8px} [part=branch]{flex:1 0 240px;min-width:0} [part=body]{margin:0 0 0 16px;border-inline-start:2px solid var(--boe-token-stroke-stroke,#ddd);padding:8px 12px} [part=endpoint]{text-align:center;font-weight:600;padding:12px} [part=branch-header]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:1em 0} h3{font:inherit;font-weight:600;margin:0} [part=branch-remove],[part=branch-add]{border:1px solid var(--boe-token-stroke-stroke,#ddd);border-radius:16px;background:var(--boe-token-surface-surface,#fff);padding:4px 10px} [part=branch-add]{justify-self:center;margin:4px 0}</style><div part="spine"></div>`; }
153
+ renderTemplate() { this.shadowRoot.innerHTML = `<style>${styles} [part=spine]{display:grid;gap:0;min-width:0} [part=branches]{display:flex;gap:16px;overflow-x:auto;max-width:100%;padding:8px} [part=branch]{flex:1 0 240px;min-width:0} [part=body]{margin:0 0 0 16px;border-inline-start:2px solid var(--boe-token-stroke-stroke,#ddd);padding:8px 12px} [part=endpoint]{text-align:center;font-weight:600;padding:12px} [part=branch-header]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:1em 0} [part=branch-label]{font:inherit;font-weight:600;margin:0} [part=branch-remove],[part=branch-add]{border:1px solid var(--boe-token-stroke-stroke,#ddd);border-radius:16px;background:var(--boe-token-surface-surface,#fff);padding:4px 10px} [part=branch-add]{justify-self:center;margin:4px 0}</style><div part="spine"></div>`; }
153
154
  refresh() { if (this.isRendered)
154
155
  this.update(); }
155
156
  /** Re-render one card after its fields change, without rebuilding the spine. */
@@ -208,7 +209,7 @@ export class FlowSpine extends BaseElement {
208
209
  column.setAttribute("aria-label", label);
209
210
  const header = document.createElement("div");
210
211
  header.setAttribute("part", "branch-header");
211
- const heading = document.createElement("h3");
212
+ const heading = document.createElement(`h${this.headingLevel}`);
212
213
  heading.setAttribute("part", "branch-label");
213
214
  heading.textContent = label;
214
215
  header.append(heading);
@@ -39,7 +39,7 @@ const elementStyles = `
39
39
  font-size: 0.76rem;
40
40
  font-weight: 700;
41
41
  letter-spacing: 0.08em;
42
- text-transform: uppercase;
42
+ text-transform: none;
43
43
  color: var(--boe-token-text-text-secondary, #6f6f6f);
44
44
  }
45
45
 
@@ -68,7 +68,7 @@ const elementStyles = `
68
68
  font-size: 0.74rem;
69
69
  font-weight: 700;
70
70
  letter-spacing: 0.05em;
71
- text-transform: uppercase;
71
+ text-transform: none;
72
72
  }
73
73
 
74
74
  [part="value"] {
@@ -0,0 +1,10 @@
1
+ import type { NodePath } from "../flow-builder/model.js";
2
+ import type { ProcessCheck, ProcessLayout, ProcessLoadOptions, ProcessPositionSnapshot, ProcessProjection } from "./model.js";
3
+ /** Restore only current paths with explicitly matching host fingerprints. */
4
+ export declare function restoreProcessPositions<N>(projection: ProcessProjection<N>, positions: ProcessLoadOptions["positions"]): ProcessLayout;
5
+ /** Detached, ID-sorted entries; stale layout IDs and unplaced boxes are omitted. */
6
+ export declare function snapshotProcessPositions<N>(projection: ProcessProjection<N>, layout: ProcessLayout): readonly ProcessPositionSnapshot[];
7
+ /** Resolve a host field path to its deepest projected box, without string coercion. */
8
+ export declare function normalizeProcessSelectionPath<N>(projection: ProcessProjection<N>, path: NodePath | null | undefined): NodePath | null;
9
+ /** Generic topology only. Hosts own workflow vocabulary and semantic validation. */
10
+ export declare function graphChecks<N>(projection: ProcessProjection<N>): readonly ProcessCheck[];
@@ -0,0 +1,173 @@
1
+ const validPosition = (position) => Number.isFinite(position.x) && Number.isFinite(position.y) &&
2
+ (position.width === undefined || (Number.isFinite(position.width) && position.width > 0)) &&
3
+ (position.height === undefined || (Number.isFinite(position.height) && position.height > 0));
4
+ /** Restore only current paths with explicitly matching host fingerprints. */
5
+ export function restoreProcessPositions(projection, positions) {
6
+ const savedPositions = Array.isArray(positions)
7
+ ? Object.fromEntries(positions.filter(entry => entry.path).map(entry => [JSON.stringify(entry.path), entry]))
8
+ : positions;
9
+ const boxes = {};
10
+ for (const box of projection.boxes) {
11
+ if (!box.path || box.fingerprint === undefined)
12
+ continue;
13
+ const key = JSON.stringify(box.path);
14
+ const saved = savedPositions && Object.hasOwn(savedPositions, key) ? savedPositions[key] : undefined;
15
+ if (!saved || saved.fingerprint === undefined || saved.fingerprint !== box.fingerprint ||
16
+ !saved.position || !validPosition(saved.position))
17
+ continue;
18
+ Object.defineProperty(boxes, box.id, {
19
+ value: { ...saved.position }, enumerable: true, configurable: true, writable: true,
20
+ });
21
+ }
22
+ return { boxes };
23
+ }
24
+ /** Detached, ID-sorted entries; stale layout IDs and unplaced boxes are omitted. */
25
+ export function snapshotProcessPositions(projection, layout) {
26
+ const snapshots = [];
27
+ for (const box of projection.boxes) {
28
+ if (!Object.hasOwn(layout.boxes, box.id))
29
+ continue;
30
+ const position = layout.boxes[box.id];
31
+ if (!position || !validPosition(position))
32
+ continue;
33
+ snapshots.push({
34
+ id: box.id,
35
+ ...(box.path ? { path: [...box.path] } : {}),
36
+ ...(box.fingerprint !== undefined ? { fingerprint: box.fingerprint } : {}),
37
+ position: { ...position },
38
+ });
39
+ }
40
+ return snapshots.sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
41
+ }
42
+ /** Resolve a host field path to its deepest projected box, without string coercion. */
43
+ export function normalizeProcessSelectionPath(projection, path) {
44
+ if (path == null)
45
+ return null;
46
+ let selected;
47
+ for (const box of projection.boxes) {
48
+ if (box.path && box.path.length <= path.length &&
49
+ box.path.every((segment, index) => segment === path[index]) &&
50
+ (!selected || box.path.length > selected.length))
51
+ selected = box.path;
52
+ }
53
+ return selected ? [...selected] : null;
54
+ }
55
+ const branchKinds = new Set(["decision", "choice", "weighted", "weighted-choice", "parallel", "fork"]);
56
+ const parallelKinds = new Set(["parallel", "fork"]);
57
+ /** Generic topology only. Hosts own workflow vocabulary and semantic validation. */
58
+ export function graphChecks(projection) {
59
+ const boxes = new Map(projection.boxes.map(box => [box.id, box]));
60
+ const outgoing = new Map(projection.boxes.map(box => [box.id, []]));
61
+ const incoming = new Map(projection.boxes.map(box => [box.id, []]));
62
+ for (const line of projection.lines) {
63
+ if (!boxes.has(line.from) || !boxes.has(line.to))
64
+ continue;
65
+ outgoing.get(line.from).push(line.to);
66
+ incoming.get(line.to).push(line.from);
67
+ }
68
+ // Iterative strongly connected components keep long host graphs off the call stack.
69
+ const visited = new Set();
70
+ const finished = [];
71
+ for (const id of boxes.keys()) {
72
+ if (visited.has(id))
73
+ continue;
74
+ visited.add(id);
75
+ const stack = [{ id, next: 0 }];
76
+ while (stack.length) {
77
+ const top = stack[stack.length - 1];
78
+ const targets = outgoing.get(top.id);
79
+ if (top.next < targets.length) {
80
+ const target = targets[top.next++];
81
+ if (!visited.has(target)) {
82
+ visited.add(target);
83
+ stack.push({ id: target, next: 0 });
84
+ }
85
+ }
86
+ else {
87
+ finished.push(top.id);
88
+ stack.pop();
89
+ }
90
+ }
91
+ }
92
+ visited.clear();
93
+ const loops = new Set();
94
+ for (const id of finished.reverse()) {
95
+ if (visited.has(id))
96
+ continue;
97
+ const component = [];
98
+ const stack = [id];
99
+ visited.add(id);
100
+ while (stack.length) {
101
+ const current = stack.pop();
102
+ component.push(current);
103
+ for (const source of incoming.get(current)) {
104
+ if (!visited.has(source)) {
105
+ visited.add(source);
106
+ stack.push(source);
107
+ }
108
+ }
109
+ }
110
+ if (component.length > 1 || outgoing.get(id).includes(id)) {
111
+ for (const member of component)
112
+ loops.add(member);
113
+ }
114
+ }
115
+ const reachable = (start) => {
116
+ const distances = new Map([[start, 0]]);
117
+ const queue = [start];
118
+ for (let i = 0; i < queue.length; i++) {
119
+ const id = queue[i];
120
+ for (const target of outgoing.get(id)) {
121
+ if (!distances.has(target)) {
122
+ distances.set(target, distances.get(id) + 1);
123
+ queue.push(target);
124
+ }
125
+ }
126
+ }
127
+ return distances;
128
+ };
129
+ const allPathsMeet = (start, join) => {
130
+ const queue = [start];
131
+ const seen = new Set();
132
+ for (let i = 0; i < queue.length; i++) {
133
+ const id = queue[i];
134
+ if (id === join || seen.has(id))
135
+ continue;
136
+ seen.add(id);
137
+ const targets = outgoing.get(id);
138
+ if (!targets.length || loops.has(id))
139
+ return false;
140
+ queue.push(...targets);
141
+ }
142
+ return true;
143
+ };
144
+ const checks = [];
145
+ for (const box of projection.boxes) {
146
+ const add = (message) => checks.push({
147
+ message, boxId: box.id, ...(box.path ? { path: [...box.path] } : {}),
148
+ });
149
+ if (loops.has(box.id))
150
+ add("This box is part of a loop. Remove a connection to break the loop.");
151
+ const targets = outgoing.get(box.id);
152
+ if (targets.length < 2)
153
+ continue;
154
+ if (!branchKinds.has(box.kind)) {
155
+ add("This step leads to multiple places. Use a Decision, Weighted choice or Parallel to branch.");
156
+ continue;
157
+ }
158
+ const routes = targets.map(reachable);
159
+ const candidates = [...routes[0].keys()].filter(id => id !== box.id && routes.every(route => route.has(id)));
160
+ candidates.sort((a, b) => Math.max(...routes.map(route => route.get(a))) - Math.max(...routes.map(route => route.get(b))) ||
161
+ (a < b ? -1 : a > b ? 1 : 0));
162
+ const join = candidates.find(id => targets.every(target => allPathsMeet(target, id)));
163
+ if (!join) {
164
+ add(parallelKinds.has(box.kind)
165
+ ? "Parallel paths must meet at a Wait for all (join) box."
166
+ : "These branch paths do not meet. Connect every path to a common next box.");
167
+ }
168
+ else if (parallelKinds.has(box.kind) && boxes.get(join).kind !== "join") {
169
+ add("Parallel paths must meet at a Wait for all (join) box.");
170
+ }
171
+ }
172
+ return checks;
173
+ }
@@ -0,0 +1,18 @@
1
+ import type { ProcessLayout, ProcessLine, ProcessProjection } from "./model.js";
2
+ export interface ProcessPoint {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ /** Stable left-to-right layers; cycles break at the smallest remaining ID. */
7
+ export declare function arrangeProcess(projection: ProcessProjection): ProcessLayout;
8
+ /**
9
+ * Authored points are interior waypoints; layout points override projection points.
10
+ * Explicit sides use centered ports with outward leads; unset sides snap to the
11
+ * nearest edge. Returns [] for missing endpoints, blocked ports or impossible
12
+ * waypoints (inside an obstacle), never an obstacle-crossing fallback.
13
+ */
14
+ export declare function routeProcessLine(line: ProcessLine, layout: ProcessLayout, projection: ProcessProjection): ProcessPoint[];
15
+ /** Halfway along the polyline's length, not halfway between its endpoints. */
16
+ export declare function lineMidpoint(points: readonly ProcessPoint[]): ProcessPoint;
17
+ /** Segment-distance hit testing, including zero-length and diagonal segments. */
18
+ export declare function nearProcessLine(point: ProcessPoint, points: readonly ProcessPoint[], tolerance?: number): boolean;