@guilhermebkel/scenec 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -22
- package/dist/Adapters/FileReaderAdapter.d.ts +4 -0
- package/dist/Adapters/FileReaderAdapter.js +21 -0
- package/dist/Adapters/FontAdapter.d.ts +5 -0
- package/dist/Adapters/FontAdapter.js +9 -0
- package/dist/Adapters/ResvgAdapter.d.ts +11 -0
- package/dist/Adapters/ResvgAdapter.js +18 -0
- package/dist/Commands/BaseCommand.d.ts +11 -0
- package/dist/Commands/BaseCommand.js +13 -0
- package/dist/Commands/CatalogCommand.d.ts +6 -0
- package/dist/Commands/CatalogCommand.js +24 -0
- package/dist/Commands/CheckCommand.d.ts +5 -0
- package/dist/Commands/CheckCommand.js +8 -0
- package/dist/Commands/RenderCommand.d.ts +5 -0
- package/dist/Commands/RenderCommand.js +8 -0
- package/dist/Commands/SceneCommand.d.ts +11 -0
- package/dist/Commands/SceneCommand.js +70 -0
- package/dist/Commands/SchemaCommand.d.ts +5 -0
- package/dist/Commands/SchemaCommand.js +12 -0
- package/dist/Data/cities.json +312 -0
- package/dist/Data/europe.json +1 -0
- package/dist/Errors/SceneError.d.ts +4 -0
- package/dist/Errors/SceneError.js +11 -0
- package/dist/Errors/UnsafeSvgError.d.ts +3 -0
- package/dist/Errors/UnsafeSvgError.js +9 -0
- package/dist/Modules/CheckModule.d.ts +8 -0
- package/dist/Modules/CheckModule.js +16 -0
- package/dist/Modules/CompilationModule.d.ts +18 -0
- package/dist/Modules/CompilationModule.js +137 -0
- package/dist/Modules/CritiqueModule.d.ts +6 -0
- package/dist/Modules/CritiqueModule.js +43 -0
- package/dist/Modules/MapModule.d.ts +24 -0
- package/dist/Modules/MapModule.js +99 -0
- package/dist/Modules/ParsingModule.d.ts +17 -0
- package/dist/Modules/ParsingModule.js +88 -0
- package/dist/Modules/PlaneModule.d.ts +19 -0
- package/dist/Modules/PlaneModule.js +98 -0
- package/dist/Protocols/AssetProtocol.d.ts +62 -0
- package/dist/Protocols/AssetProtocol.js +93 -0
- package/dist/Protocols/CommandProtocol.d.ts +6 -0
- package/dist/Protocols/CommandProtocol.js +0 -0
- package/dist/Protocols/CompilationProtocol.d.ts +110 -0
- package/dist/Protocols/CompilationProtocol.js +0 -0
- package/dist/Protocols/CritiqueProtocol.d.ts +42 -0
- package/dist/Protocols/CritiqueProtocol.js +4 -0
- package/dist/Protocols/CustomAssetProtocol.d.ts +24 -0
- package/dist/Protocols/CustomAssetProtocol.js +0 -0
- package/dist/Protocols/GroupProtocol.d.ts +17 -0
- package/dist/Protocols/GroupProtocol.js +12 -0
- package/dist/Protocols/KitProtocol.d.ts +26 -0
- package/dist/Protocols/KitProtocol.js +17 -0
- package/dist/Protocols/MapProtocol.d.ts +77 -0
- package/dist/Protocols/MapProtocol.js +4 -0
- package/dist/Protocols/OptionsProtocol.js +0 -0
- package/dist/Protocols/PersonProtocol.d.ts +64 -0
- package/dist/Protocols/PersonProtocol.js +40 -0
- package/dist/Protocols/PlaneProtocol.d.ts +140 -0
- package/dist/Protocols/PlaneProtocol.js +4 -0
- package/dist/{pipeline/index.d.ts → Protocols/ResultProtocol.d.ts} +0 -2
- package/dist/Protocols/ResultProtocol.js +0 -0
- package/dist/Protocols/SceneProtocol.d.ts +625 -0
- package/dist/Protocols/SceneProtocol.js +304 -0
- package/dist/{protocols/theme.d.ts → Protocols/ThemeProtocol.d.ts} +4 -0
- package/dist/Protocols/ThemeProtocol.js +28 -0
- package/dist/Resources/Assets/BackpackAsset.d.ts +10 -0
- package/dist/Resources/Assets/BackpackAsset.js +31 -0
- package/dist/Resources/Assets/BallAsset.d.ts +10 -0
- package/dist/Resources/Assets/BallAsset.js +15 -0
- package/dist/Resources/Assets/BalloonsAsset.d.ts +10 -0
- package/dist/Resources/Assets/BalloonsAsset.js +26 -0
- package/dist/Resources/Assets/BaseAsset.d.ts +16 -0
- package/dist/Resources/Assets/BaseAsset.js +10 -0
- package/dist/Resources/Assets/BeachTowelAsset.d.ts +10 -0
- package/dist/Resources/Assets/BeachTowelAsset.js +14 -0
- package/dist/Resources/Assets/BedAsset.d.ts +12 -0
- package/dist/Resources/Assets/BedAsset.js +25 -0
- package/dist/Resources/Assets/BenchAsset.d.ts +11 -0
- package/dist/Resources/Assets/BenchAsset.js +24 -0
- package/dist/Resources/Assets/BicycleAsset.d.ts +10 -0
- package/dist/Resources/Assets/BicycleAsset.js +18 -0
- package/dist/Resources/Assets/BigPlantAsset.d.ts +10 -0
- package/dist/Resources/Assets/BigPlantAsset.js +19 -0
- package/dist/Resources/Assets/BirdAsset.d.ts +10 -0
- package/dist/Resources/Assets/BirdAsset.js +14 -0
- package/dist/Resources/Assets/BoardAsset.d.ts +12 -0
- package/dist/Resources/Assets/BoardAsset.js +44 -0
- package/dist/Resources/Assets/BoatAsset.d.ts +10 -0
- package/dist/Resources/Assets/BoatAsset.js +15 -0
- package/dist/Resources/Assets/BooksAsset.d.ts +10 -0
- package/dist/Resources/Assets/BooksAsset.js +35 -0
- package/dist/Resources/Assets/BookshelfAsset.d.ts +10 -0
- package/dist/Resources/Assets/BookshelfAsset.js +33 -0
- package/dist/Resources/Assets/BuildingAsset.d.ts +14 -0
- package/dist/Resources/Assets/BuildingAsset.js +34 -0
- package/dist/Resources/Assets/BurgerAsset.d.ts +9 -0
- package/dist/Resources/Assets/BurgerAsset.js +23 -0
- package/dist/Resources/Assets/BushAsset.d.ts +10 -0
- package/dist/Resources/Assets/BushAsset.js +17 -0
- package/dist/Resources/Assets/CabinetAsset.d.ts +14 -0
- package/dist/Resources/Assets/CabinetAsset.js +49 -0
- package/dist/Resources/Assets/CablesAsset.d.ts +10 -0
- package/dist/Resources/Assets/CablesAsset.js +16 -0
- package/dist/Resources/Assets/CakeAsset.d.ts +10 -0
- package/dist/Resources/Assets/CakeAsset.js +29 -0
- package/dist/Resources/Assets/CapAsset.d.ts +10 -0
- package/dist/Resources/Assets/CapAsset.js +18 -0
- package/dist/Resources/Assets/CarAsset.d.ts +10 -0
- package/dist/Resources/Assets/CarAsset.js +29 -0
- package/dist/Resources/Assets/CatAsset.d.ts +10 -0
- package/dist/Resources/Assets/CatAsset.js +17 -0
- package/dist/Resources/Assets/ChairAsset.d.ts +11 -0
- package/dist/Resources/Assets/ChairAsset.js +32 -0
- package/dist/Resources/Assets/ClockAsset.d.ts +11 -0
- package/dist/Resources/Assets/ClockAsset.js +22 -0
- package/dist/Resources/Assets/CloudAsset.d.ts +10 -0
- package/dist/Resources/Assets/CloudAsset.js +15 -0
- package/dist/Resources/Assets/CoffeeMachineAsset.d.ts +10 -0
- package/dist/Resources/Assets/CoffeeMachineAsset.js +23 -0
- package/dist/Resources/Assets/CounterAsset.d.ts +11 -0
- package/dist/Resources/Assets/CounterAsset.js +29 -0
- package/dist/Resources/Assets/CupAsset.d.ts +10 -0
- package/dist/Resources/Assets/CupAsset.js +17 -0
- package/dist/Resources/Assets/CustomAsset.d.ts +25 -0
- package/dist/Resources/Assets/CustomAsset.js +58 -0
- package/dist/Resources/Assets/DeskAsset.d.ts +11 -0
- package/dist/Resources/Assets/DeskAsset.js +35 -0
- package/dist/Resources/Assets/DeskSlabAsset.d.ts +18 -0
- package/dist/Resources/Assets/DeskSlabAsset.js +43 -0
- package/dist/Resources/Assets/DiplomaAsset.d.ts +10 -0
- package/dist/Resources/Assets/DiplomaAsset.js +23 -0
- package/dist/Resources/Assets/DogAsset.d.ts +10 -0
- package/dist/Resources/Assets/DogAsset.js +24 -0
- package/dist/Resources/Assets/DrawerUnitAsset.d.ts +14 -0
- package/dist/Resources/Assets/DrawerUnitAsset.js +35 -0
- package/dist/Resources/Assets/FenceAsset.d.ts +10 -0
- package/dist/Resources/Assets/FenceAsset.js +26 -0
- package/dist/Resources/Assets/FigurineAsset.d.ts +10 -0
- package/dist/Resources/Assets/FigurineAsset.js +24 -0
- package/dist/Resources/Assets/FinishFlagAsset.d.ts +10 -0
- package/dist/Resources/Assets/FinishFlagAsset.js +21 -0
- package/dist/Resources/Assets/FloorLampAsset.d.ts +10 -0
- package/dist/Resources/Assets/FloorLampAsset.js +22 -0
- package/dist/Resources/Assets/FlowersAsset.d.ts +10 -0
- package/dist/Resources/Assets/FlowersAsset.js +37 -0
- package/dist/Resources/Assets/FrameAsset.d.ts +11 -0
- package/dist/Resources/Assets/FrameAsset.js +24 -0
- package/dist/Resources/Assets/FruitBowlAsset.d.ts +10 -0
- package/dist/Resources/Assets/FruitBowlAsset.js +16 -0
- package/dist/Resources/Assets/GlassShelfAsset.d.ts +17 -0
- package/dist/Resources/Assets/GlassShelfAsset.js +25 -0
- package/dist/Resources/Assets/HeadphonesAsset.d.ts +10 -0
- package/dist/Resources/Assets/HeadphonesAsset.js +23 -0
- package/dist/Resources/Assets/HouseAsset.d.ts +10 -0
- package/dist/Resources/Assets/HouseAsset.js +42 -0
- package/dist/Resources/Assets/LabAsset.d.ts +10 -0
- package/dist/Resources/Assets/LabAsset.js +52 -0
- package/dist/Resources/Assets/LampAsset.d.ts +10 -0
- package/dist/Resources/Assets/LampAsset.js +16 -0
- package/dist/Resources/Assets/LaptopAsset.d.ts +10 -0
- package/dist/Resources/Assets/LaptopAsset.js +23 -0
- package/dist/Resources/Assets/LaptopOpenAsset.d.ts +10 -0
- package/dist/Resources/Assets/LaptopOpenAsset.js +29 -0
- package/dist/Resources/Assets/LightSwitchAsset.d.ts +11 -0
- package/dist/Resources/Assets/LightSwitchAsset.js +24 -0
- package/dist/Resources/Assets/MonitorAsset.d.ts +10 -0
- package/dist/Resources/Assets/MonitorAsset.js +40 -0
- package/dist/Resources/Assets/MoonAsset.d.ts +10 -0
- package/dist/Resources/Assets/MoonAsset.js +16 -0
- package/dist/Resources/Assets/MountainAsset.d.ts +10 -0
- package/dist/Resources/Assets/MountainAsset.js +15 -0
- package/dist/Resources/Assets/OfficeChairAsset.d.ts +10 -0
- package/dist/Resources/Assets/OfficeChairAsset.js +45 -0
- package/dist/Resources/Assets/PalmAsset.d.ts +10 -0
- package/dist/Resources/Assets/PalmAsset.js +32 -0
- package/dist/Resources/Assets/PaperCupAsset.d.ts +10 -0
- package/dist/Resources/Assets/PaperCupAsset.js +17 -0
- package/dist/Resources/Assets/PendantLampAsset.d.ts +10 -0
- package/dist/Resources/Assets/PendantLampAsset.js +16 -0
- package/dist/Resources/Assets/PennantAsset.d.ts +10 -0
- package/dist/Resources/Assets/PennantAsset.js +15 -0
- package/dist/Resources/Assets/PersonAsset.d.ts +10 -0
- package/dist/Resources/Assets/PersonAsset.js +15 -0
- package/dist/Resources/Assets/PhotoFrameAsset.d.ts +15 -0
- package/dist/Resources/Assets/PhotoFrameAsset.js +68 -0
- package/dist/Resources/Assets/PineAsset.d.ts +10 -0
- package/dist/Resources/Assets/PineAsset.js +21 -0
- package/dist/Resources/Assets/PizzaAsset.d.ts +10 -0
- package/dist/Resources/Assets/PizzaAsset.js +17 -0
- package/dist/Resources/Assets/PlantAsset.d.ts +10 -0
- package/dist/Resources/Assets/PlantAsset.js +17 -0
- package/dist/Resources/Assets/PlasticBagAsset.d.ts +10 -0
- package/dist/Resources/Assets/PlasticBagAsset.js +15 -0
- package/dist/Resources/Assets/PlateAsset.d.ts +10 -0
- package/dist/Resources/Assets/PlateAsset.js +17 -0
- package/dist/Resources/Assets/RollingCartAsset.d.ts +11 -0
- package/dist/Resources/Assets/RollingCartAsset.js +34 -0
- package/dist/Resources/Assets/RugAsset.d.ts +10 -0
- package/dist/Resources/Assets/RugAsset.js +19 -0
- package/dist/Resources/Assets/SandcastleAsset.d.ts +10 -0
- package/dist/Resources/Assets/SandcastleAsset.js +30 -0
- package/dist/Resources/Assets/SchoolAsset.d.ts +10 -0
- package/dist/Resources/Assets/SchoolAsset.js +32 -0
- package/dist/Resources/Assets/ShelfWallAsset.d.ts +11 -0
- package/dist/Resources/Assets/ShelfWallAsset.js +23 -0
- package/dist/Resources/Assets/SofaAsset.d.ts +11 -0
- package/dist/Resources/Assets/SofaAsset.js +38 -0
- package/dist/Resources/Assets/StageAsset.d.ts +10 -0
- package/dist/Resources/Assets/StageAsset.js +44 -0
- package/dist/Resources/Assets/StarAsset.d.ts +10 -0
- package/dist/Resources/Assets/StarAsset.js +14 -0
- package/dist/Resources/Assets/StarsAsset.d.ts +11 -0
- package/dist/Resources/Assets/StarsAsset.js +42 -0
- package/dist/Resources/Assets/StreetlightAsset.d.ts +10 -0
- package/dist/Resources/Assets/StreetlightAsset.js +20 -0
- package/dist/Resources/Assets/SuitcaseAsset.d.ts +10 -0
- package/dist/Resources/Assets/SuitcaseAsset.js +42 -0
- package/dist/Resources/Assets/SunAsset.d.ts +10 -0
- package/dist/Resources/Assets/SunAsset.js +22 -0
- package/dist/Resources/Assets/TableAsset.d.ts +15 -0
- package/dist/Resources/Assets/TableAsset.js +21 -0
- package/dist/Resources/Assets/TrashCanAsset.d.ts +10 -0
- package/dist/Resources/Assets/TrashCanAsset.js +31 -0
- package/dist/Resources/Assets/TreeAsset.d.ts +10 -0
- package/dist/Resources/Assets/TreeAsset.js +23 -0
- package/dist/Resources/Assets/TrophyAsset.d.ts +10 -0
- package/dist/Resources/Assets/TrophyAsset.js +16 -0
- package/dist/Resources/Assets/TumblerAsset.d.ts +10 -0
- package/dist/Resources/Assets/TumblerAsset.js +17 -0
- package/dist/Resources/Assets/TvAsset.d.ts +10 -0
- package/dist/Resources/Assets/TvAsset.js +29 -0
- package/dist/Resources/Assets/TvStandAsset.d.ts +11 -0
- package/dist/Resources/Assets/TvStandAsset.js +34 -0
- package/dist/Resources/Assets/UmbrellaAsset.d.ts +10 -0
- package/dist/Resources/Assets/UmbrellaAsset.js +17 -0
- package/dist/Resources/Assets/UniversityAsset.d.ts +10 -0
- package/dist/Resources/Assets/UniversityAsset.js +22 -0
- package/dist/Resources/Assets/VaseFlowersAsset.d.ts +10 -0
- package/dist/Resources/Assets/VaseFlowersAsset.js +16 -0
- package/dist/Resources/Assets/WindowAsset.d.ts +11 -0
- package/dist/Resources/Assets/WindowAsset.js +32 -0
- package/dist/Resources/Groups/BaseGroup.d.ts +7 -0
- package/dist/Resources/Groups/BaseGroup.js +5 -0
- package/dist/Resources/Groups/CelebrationGroup.d.ts +8 -0
- package/dist/Resources/Groups/CelebrationGroup.js +19 -0
- package/dist/Resources/Groups/ConversationGroup.d.ts +9 -0
- package/dist/Resources/Groups/ConversationGroup.js +17 -0
- package/dist/Resources/Groups/DiningGroup.d.ts +8 -0
- package/dist/Resources/Groups/DiningGroup.js +21 -0
- package/dist/Resources/Groups/MeetingGroup.d.ts +8 -0
- package/dist/Resources/Groups/MeetingGroup.js +22 -0
- package/dist/Resources/Groups/ParkBenchGroup.d.ts +8 -0
- package/dist/Resources/Groups/ParkBenchGroup.js +17 -0
- package/dist/Resources/Groups/ReadingCornerGroup.d.ts +8 -0
- package/dist/Resources/Groups/ReadingCornerGroup.js +17 -0
- package/dist/Resources/Groups/WorkspaceGroup.d.ts +10 -0
- package/dist/Resources/Groups/WorkspaceGroup.js +25 -0
- package/dist/Resources/Kits/BaseKit.d.ts +12 -0
- package/dist/Resources/Kits/BaseKit.js +11 -0
- package/dist/Resources/Kits/FlatKit.d.ts +5 -0
- package/dist/Resources/Kits/FlatKit.js +8 -0
- package/dist/Resources/Kits/HatchKit.d.ts +15 -0
- package/dist/Resources/Kits/HatchKit.js +12 -0
- package/dist/Resources/Kits/OutlineKit.d.ts +12 -0
- package/dist/Resources/Kits/OutlineKit.js +10 -0
- package/dist/Resources/Kits/PaperKit.d.ts +11 -0
- package/dist/Resources/Kits/PaperKit.js +11 -0
- package/dist/Resources/Kits/RisoKit.d.ts +16 -0
- package/dist/Resources/Kits/RisoKit.js +11 -0
- package/dist/Resources/Kits/SketchKit.d.ts +9 -0
- package/dist/Resources/Kits/SketchKit.js +11 -0
- package/dist/Resources/Themes/BaseTheme.d.ts +5 -0
- package/dist/Resources/Themes/BaseTheme.js +5 -0
- package/dist/Resources/Themes/BeachTheme.d.ts +6 -0
- package/dist/Resources/Themes/BeachTheme.js +31 -0
- package/dist/Resources/Themes/FlatAutumnTheme.d.ts +6 -0
- package/dist/Resources/Themes/FlatAutumnTheme.js +29 -0
- package/dist/Resources/Themes/FlatCoolTheme.d.ts +6 -0
- package/dist/Resources/Themes/FlatCoolTheme.js +29 -0
- package/dist/Resources/Themes/NightTheme.d.ts +6 -0
- package/dist/Resources/Themes/NightTheme.js +29 -0
- package/dist/Resources/Themes/WarmCafeTheme.d.ts +6 -0
- package/dist/Resources/Themes/WarmCafeTheme.js +29 -0
- package/dist/Services/AssetService.d.ts +12 -0
- package/dist/Services/AssetService.js +204 -0
- package/dist/Services/BackgroundService.d.ts +33 -0
- package/dist/Services/BackgroundService.js +136 -0
- package/dist/Services/BalanceCritiqueService.d.ts +13 -0
- package/dist/Services/BalanceCritiqueService.js +64 -0
- package/dist/Services/CameraService.d.ts +21 -0
- package/dist/Services/CameraService.js +121 -0
- package/dist/Services/CatalogService.d.ts +29 -0
- package/dist/Services/CatalogService.js +51 -0
- package/dist/Services/ContactCritiqueService.d.ts +19 -0
- package/dist/Services/ContactCritiqueService.js +101 -0
- package/dist/Services/ContextService.d.ts +21 -0
- package/dist/Services/ContextService.js +94 -0
- package/dist/Services/CoverageCritiqueService.d.ts +16 -0
- package/dist/Services/CoverageCritiqueService.js +84 -0
- package/dist/Services/CustomAssetService.d.ts +31 -0
- package/dist/Services/CustomAssetService.js +184 -0
- package/dist/Services/DependencyOrderService.d.ts +12 -0
- package/dist/Services/DependencyOrderService.js +73 -0
- package/dist/Services/DescriptionService.d.ts +9 -0
- package/dist/Services/DescriptionService.js +27 -0
- package/dist/Services/FramingCheckService.d.ts +15 -0
- package/dist/Services/FramingCheckService.js +93 -0
- package/dist/Services/GazeService.d.ts +6 -0
- package/dist/Services/GazeService.js +43 -0
- package/dist/Services/GroupService.d.ts +17 -0
- package/dist/Services/GroupService.js +152 -0
- package/dist/Services/KitService.d.ts +23 -0
- package/dist/Services/KitService.js +96 -0
- package/dist/Services/LightingService.d.ts +24 -0
- package/dist/Services/LightingService.js +119 -0
- package/dist/Services/MapBaseService.d.ts +24 -0
- package/dist/Services/MapBaseService.js +104 -0
- package/dist/Services/MapLabelService.d.ts +26 -0
- package/dist/Services/MapLabelService.js +185 -0
- package/dist/Services/MapLegService.d.ts +23 -0
- package/dist/Services/MapLegService.js +87 -0
- package/dist/Services/MapPanelService.d.ts +16 -0
- package/dist/Services/MapPanelService.js +89 -0
- package/dist/Services/MapPinService.d.ts +11 -0
- package/dist/Services/MapPinService.js +56 -0
- package/dist/Services/MapProjectionService.d.ts +14 -0
- package/dist/Services/MapProjectionService.js +70 -0
- package/dist/Services/MapRouteService.d.ts +17 -0
- package/dist/Services/MapRouteService.js +79 -0
- package/dist/Services/PieceService.d.ts +43 -0
- package/dist/Services/PieceService.js +154 -0
- package/dist/Services/PlacementService.d.ts +60 -0
- package/dist/Services/PlacementService.js +415 -0
- package/dist/Services/PlaneBackgroundService.d.ts +24 -0
- package/dist/Services/PlaneBackgroundService.js +170 -0
- package/dist/Services/PlaneBoxService.d.ts +27 -0
- package/dist/Services/PlaneBoxService.js +209 -0
- package/dist/Services/PlaneDepthService.d.ts +18 -0
- package/dist/Services/PlaneDepthService.js +146 -0
- package/dist/Services/PlaneLabelService.d.ts +13 -0
- package/dist/Services/PlaneLabelService.js +115 -0
- package/dist/Services/PlaneObjectService.d.ts +17 -0
- package/dist/Services/PlaneObjectService.js +147 -0
- package/dist/Services/PlanePathService.d.ts +15 -0
- package/dist/Services/PlanePathService.js +98 -0
- package/dist/Services/PlaneProjectionService.d.ts +16 -0
- package/dist/Services/PlaneProjectionService.js +90 -0
- package/dist/Services/PlaneRoadService.d.ts +13 -0
- package/dist/Services/PlaneRoadService.js +105 -0
- package/dist/Services/PlaneScatterService.d.ts +11 -0
- package/dist/Services/PlaneScatterService.js +48 -0
- package/dist/Services/PlaneSpaceService.d.ts +27 -0
- package/dist/Services/PlaneSpaceService.js +96 -0
- package/dist/Services/PlaneSpriteService.d.ts +29 -0
- package/dist/Services/PlaneSpriteService.js +95 -0
- package/dist/Services/PlaneTitleService.d.ts +17 -0
- package/dist/Services/PlaneTitleService.js +126 -0
- package/dist/Services/PlaneZoneService.d.ts +20 -0
- package/dist/Services/PlaneZoneService.js +121 -0
- package/dist/Services/RasterService.d.ts +10 -0
- package/dist/Services/RasterService.js +68 -0
- package/dist/Services/SchemaService.d.ts +3 -0
- package/dist/Services/SchemaService.js +10 -0
- package/dist/Services/SilhouetteCritiqueService.d.ts +32 -0
- package/dist/Services/SilhouetteCritiqueService.js +155 -0
- package/dist/Services/TextService.d.ts +47 -0
- package/dist/Services/TextService.js +178 -0
- package/dist/Services/ThemeService.d.ts +5 -0
- package/dist/Services/ThemeService.js +18 -0
- package/dist/Utils/BoxUtil.d.ts +4 -0
- package/dist/Utils/BoxUtil.js +8 -0
- package/dist/Utils/ColorUtil.d.ts +20 -0
- package/dist/Utils/ColorUtil.js +51 -0
- package/dist/Utils/CurveUtil.d.ts +6 -0
- package/dist/Utils/CurveUtil.js +35 -0
- package/dist/Utils/FallbackUtil.d.ts +3 -0
- package/dist/Utils/FallbackUtil.js +8 -0
- package/dist/Utils/FormatUtil.d.ts +4 -0
- package/dist/Utils/FormatUtil.js +9 -0
- package/dist/Utils/IdUtil.d.ts +4 -0
- package/dist/Utils/IdUtil.js +11 -0
- package/dist/Utils/NormalizeUtil.d.ts +4 -0
- package/dist/Utils/NormalizeUtil.js +9 -0
- package/dist/Utils/OklabUtil.d.ts +23 -0
- package/dist/Utils/OklabUtil.js +62 -0
- package/dist/Utils/PersonArmUtil.d.ts +19 -0
- package/dist/Utils/PersonArmUtil.js +84 -0
- package/dist/Utils/PersonHeadUtil.d.ts +31 -0
- package/dist/Utils/PersonHeadUtil.js +154 -0
- package/dist/Utils/PersonOutfitUtil.d.ts +48 -0
- package/dist/Utils/PersonOutfitUtil.js +178 -0
- package/dist/Utils/PersonUtil.d.ts +39 -0
- package/dist/Utils/PersonUtil.js +206 -0
- package/dist/Utils/PixelUtil.d.ts +3 -0
- package/dist/Utils/PixelUtil.js +8 -0
- package/dist/Utils/RecolorUtil.d.ts +40 -0
- package/dist/Utils/RecolorUtil.js +155 -0
- package/dist/Utils/RegistryUtil.d.ts +8 -0
- package/dist/Utils/RegistryUtil.js +19 -0
- package/dist/Utils/RequireUtil.d.ts +3 -0
- package/dist/Utils/RequireUtil.js +11 -0
- package/dist/Utils/SanitizeUtil.d.ts +25 -0
- package/dist/Utils/SanitizeUtil.js +210 -0
- package/dist/Utils/SeedUtil.d.ts +6 -0
- package/dist/Utils/SeedUtil.js +15 -0
- package/dist/Utils/ShapeUtil.d.ts +31 -0
- package/dist/Utils/ShapeUtil.js +47 -0
- package/dist/Utils/SuggestUtil.d.ts +7 -0
- package/dist/Utils/SuggestUtil.js +25 -0
- package/dist/Utils/SvgUtil.d.ts +9 -0
- package/dist/Utils/SvgUtil.js +21 -0
- package/dist/Utils/ThemeUtil.d.ts +4 -0
- package/dist/Utils/ThemeUtil.js +13 -0
- package/dist/Utils/TransportUtil.d.ts +24 -0
- package/dist/Utils/TransportUtil.js +108 -0
- package/dist/cli.js +24 -97
- package/dist/index.d.ts +10 -6
- package/dist/index.js +14 -2
- package/dist/render.d.ts +8 -5
- package/dist/render.js +21 -3
- package/dist/schema.d.ts +9 -2
- package/dist/schema.js +29 -5
- package/package.json +3 -2
- package/skills/{scenec → draw-scene}/SKILL.md +15 -19
- package/skills/{scenec → draw-scene}/references/catalog.md +14 -14
- package/skills/{scenec → draw-scene}/references/dsl.md +9 -3
- package/dist/catalog.d.ts +0 -21
- package/dist/catalog.js +0 -35
- package/dist/data/europe.json +0 -1
- package/dist/drawing/assets.d.ts +0 -8
- package/dist/drawing/assets.js +0 -612
- package/dist/drawing/kits.d.ts +0 -7
- package/dist/drawing/kits.js +0 -92
- package/dist/drawing/person.d.ts +0 -18
- package/dist/drawing/person.js +0 -287
- package/dist/drawing/themes.d.ts +0 -4
- package/dist/drawing/themes.js +0 -45
- package/dist/modes/map.d.ts +0 -5
- package/dist/modes/map.js +0 -365
- package/dist/modes/plane.d.ts +0 -5
- package/dist/modes/plane.js +0 -716
- package/dist/pipeline/compile.d.ts +0 -2
- package/dist/pipeline/compile.js +0 -581
- package/dist/pipeline/custom.d.ts +0 -2
- package/dist/pipeline/custom.js +0 -120
- package/dist/pipeline/groups.d.ts +0 -2
- package/dist/pipeline/groups.js +0 -189
- package/dist/pipeline/index.js +0 -7
- package/dist/pipeline/parse.d.ts +0 -10
- package/dist/pipeline/parse.js +0 -80
- package/dist/protocols/options.js +0 -1
- package/dist/protocols/scene.d.ts +0 -299
- package/dist/protocols/scene.js +0 -118
- package/dist/protocols/theme.js +0 -1
- package/dist/render/check.d.ts +0 -6
- package/dist/render/check.js +0 -10
- package/dist/render/critic.d.ts +0 -1
- package/dist/render/critic.js +0 -235
- package/dist/render/files.d.ts +0 -2
- package/dist/render/files.js +0 -16
- package/dist/render/fonts.d.ts +0 -2
- package/dist/render/fonts.js +0 -4
- package/dist/render/png.d.ts +0 -9
- package/dist/render/png.js +0 -13
- package/dist/utils/color.d.ts +0 -5
- package/dist/utils/color.js +0 -35
- package/dist/utils/recolor.d.ts +0 -1
- package/dist/utils/recolor.js +0 -56
- package/dist/utils/sanitize.d.ts +0 -5
- package/dist/utils/sanitize.js +0 -169
- package/dist/utils/suggest.d.ts +0 -1
- package/dist/utils/suggest.js +0 -22
- package/dist/utils/svg.d.ts +0 -2
- package/dist/utils/svg.js +0 -11
- package/skills/scenec/references/fontes.md +0 -8
- /package/dist/{protocols/options.d.ts → Protocols/OptionsProtocol.d.ts} +0 -0
- /package/skills/{scenec/recipes/anuncios-variacoes.yaml → draw-scene/recipes/ad-variations.yaml} +0 -0
- /package/skills/{scenec/recipes/carrossel.yaml → draw-scene/recipes/carousel.yaml} +0 -0
- /package/skills/{scenec/recipes/elearning.yaml → draw-scene/recipes/e-learning.yaml} +0 -0
- /package/skills/{scenec/recipes/reels-explicativo.yaml → draw-scene/recipes/explainer-reel.yaml} +0 -0
- /package/skills/{scenec/recipes/historia-ilustrada.yaml → draw-scene/recipes/illustrated-story.yaml} +0 -0
- /package/skills/{scenec/recipes/mapas-jornadas.yaml → draw-scene/recipes/journey-map.yaml} +0 -0
- /package/skills/{scenec/recipes/wrapped-personalizado.yaml → draw-scene/recipes/personalized-wrapped.yaml} +0 -0
- /package/skills/{scenec/recipes/ilustracoes-produto.yaml → draw-scene/recipes/product-illustration.yaml} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Theme } from "../Protocols/ThemeProtocol.js";
|
|
2
|
+
export declare class RecolorUtil {
|
|
3
|
+
private static readonly DEFAULT_STRENGTH;
|
|
4
|
+
private static readonly COLOR_ATTRIBUTE;
|
|
5
|
+
private static readonly MIN_SWATCH_CHROMA;
|
|
6
|
+
private static readonly GRAY_CHROMA;
|
|
7
|
+
private static readonly NEUTRAL_PULL;
|
|
8
|
+
private static readonly LIGHTNESS_PULL;
|
|
9
|
+
private static readonly HUE_WEIGHT;
|
|
10
|
+
private static readonly CHROMA_DISTANCE_SCALE;
|
|
11
|
+
private static readonly CHANNEL_MAX;
|
|
12
|
+
private static readonly SRGB_KNEE;
|
|
13
|
+
private static readonly SRGB_LINEAR_SLOPE;
|
|
14
|
+
private static readonly SRGB_INVERSE_KNEE;
|
|
15
|
+
private static readonly SRGB_OFFSET;
|
|
16
|
+
private static readonly SRGB_GAMMA_DIVISOR;
|
|
17
|
+
private static readonly SRGB_GAMMA;
|
|
18
|
+
private static readonly LAB_EPSILON;
|
|
19
|
+
private static readonly LAB_SLOPE;
|
|
20
|
+
private static readonly LAB_OFFSET;
|
|
21
|
+
private static readonly LIGHTNESS_SCALE;
|
|
22
|
+
private static readonly LIGHTNESS_SHIFT;
|
|
23
|
+
private static readonly A_SCALE;
|
|
24
|
+
private static readonly B_SCALE;
|
|
25
|
+
private static readonly WHITE_X;
|
|
26
|
+
private static readonly WHITE_Z;
|
|
27
|
+
private static readonly RGB_TO_XYZ;
|
|
28
|
+
private static readonly XYZ_TO_RGB;
|
|
29
|
+
static makeRecolor(theme: Theme, strength?: number): (svg: string) => string;
|
|
30
|
+
private static hexToLch;
|
|
31
|
+
private static recolorColor;
|
|
32
|
+
private static nearestSwatch;
|
|
33
|
+
private static toRgb;
|
|
34
|
+
private static linearize;
|
|
35
|
+
private static delinearize;
|
|
36
|
+
private static multiply;
|
|
37
|
+
private static toLab;
|
|
38
|
+
private static fromLab;
|
|
39
|
+
private static toLch;
|
|
40
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
class RecolorUtil {
|
|
2
|
+
static DEFAULT_STRENGTH = 0.75;
|
|
3
|
+
static COLOR_ATTRIBUTE = /(fill|stroke|stop-color)="(#[0-9a-fA-F]{3,6})"/g;
|
|
4
|
+
static MIN_SWATCH_CHROMA = 12;
|
|
5
|
+
static GRAY_CHROMA = 10;
|
|
6
|
+
static NEUTRAL_PULL = 0.5;
|
|
7
|
+
static LIGHTNESS_PULL = 0.4;
|
|
8
|
+
static HUE_WEIGHT = 2;
|
|
9
|
+
static CHROMA_DISTANCE_SCALE = 60;
|
|
10
|
+
static CHANNEL_MAX = 255;
|
|
11
|
+
static SRGB_KNEE = 0.04045;
|
|
12
|
+
static SRGB_LINEAR_SLOPE = 12.92;
|
|
13
|
+
static SRGB_INVERSE_KNEE = 31308e-7;
|
|
14
|
+
static SRGB_OFFSET = 0.055;
|
|
15
|
+
static SRGB_GAMMA_DIVISOR = 1.055;
|
|
16
|
+
static SRGB_GAMMA = 2.4;
|
|
17
|
+
static LAB_EPSILON = 8856e-6;
|
|
18
|
+
static LAB_SLOPE = 7.787;
|
|
19
|
+
static LAB_OFFSET = 16 / 116;
|
|
20
|
+
static LIGHTNESS_SCALE = 116;
|
|
21
|
+
static LIGHTNESS_SHIFT = 16;
|
|
22
|
+
static A_SCALE = 500;
|
|
23
|
+
static B_SCALE = 200;
|
|
24
|
+
static WHITE_X = 0.95047;
|
|
25
|
+
static WHITE_Z = 1.08883;
|
|
26
|
+
static RGB_TO_XYZ = [
|
|
27
|
+
[0.4124, 0.3576, 0.1805],
|
|
28
|
+
[0.2126, 0.7152, 0.0722],
|
|
29
|
+
[0.0193, 0.1192, 0.9505]
|
|
30
|
+
];
|
|
31
|
+
static XYZ_TO_RGB = [
|
|
32
|
+
[3.2406, -1.5372, -0.4986],
|
|
33
|
+
[-0.9689, 1.8758, 0.0415],
|
|
34
|
+
[0.0557, -0.204, 1.057]
|
|
35
|
+
];
|
|
36
|
+
static makeRecolor(theme, strength = RecolorUtil.DEFAULT_STRENGTH) {
|
|
37
|
+
const base = [theme.primary, theme.secondary, theme.accent, ...theme.foliage];
|
|
38
|
+
const colors = [...base, theme.trunk, theme.wood, theme.glass];
|
|
39
|
+
const swatches = colors.filter((color) => color.startsWith("#")).map((color) => RecolorUtil.hexToLch(color)).filter((swatch) => swatch[1] > RecolorUtil.MIN_SWATCH_CHROMA);
|
|
40
|
+
const neutral = RecolorUtil.toLab(RecolorUtil.toRgb(theme.metal));
|
|
41
|
+
const hexToRecolored = /* @__PURE__ */ new Map();
|
|
42
|
+
const recolorOne = (hex) => {
|
|
43
|
+
const cached = hexToRecolored.get(hex);
|
|
44
|
+
if (cached) {
|
|
45
|
+
return cached;
|
|
46
|
+
}
|
|
47
|
+
const recolored = RecolorUtil.recolorColor(hex, { swatches, neutral, strength });
|
|
48
|
+
hexToRecolored.set(hex, recolored);
|
|
49
|
+
return recolored;
|
|
50
|
+
};
|
|
51
|
+
return (svg) => svg.replace(
|
|
52
|
+
RecolorUtil.COLOR_ATTRIBUTE,
|
|
53
|
+
(_match, attribute, color) => `${attribute}="${recolorOne(color)}"`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
static hexToLch(hex) {
|
|
57
|
+
const rgb = RecolorUtil.toRgb(hex);
|
|
58
|
+
return RecolorUtil.toLch(RecolorUtil.toLab(rgb));
|
|
59
|
+
}
|
|
60
|
+
static recolorColor(hex, palette) {
|
|
61
|
+
const { swatches, neutral, strength } = palette;
|
|
62
|
+
const lab = RecolorUtil.toLab(RecolorUtil.toRgb(hex));
|
|
63
|
+
const [lightness, chroma, hue] = RecolorUtil.toLch(lab);
|
|
64
|
+
if (chroma < RecolorUtil.GRAY_CHROMA) {
|
|
65
|
+
const pull = strength * RecolorUtil.NEUTRAL_PULL;
|
|
66
|
+
return RecolorUtil.fromLab([
|
|
67
|
+
lightness,
|
|
68
|
+
lab[1] * (1 - strength) + neutral[1] * pull,
|
|
69
|
+
lab[2] * (1 - strength) + neutral[2] * pull
|
|
70
|
+
]);
|
|
71
|
+
}
|
|
72
|
+
const best = RecolorUtil.nearestSwatch(swatches, chroma, hue);
|
|
73
|
+
if (!best) {
|
|
74
|
+
return hex;
|
|
75
|
+
}
|
|
76
|
+
const newHue = Math.atan2(
|
|
77
|
+
Math.sin(hue) * (1 - strength) + Math.sin(best[2]) * strength,
|
|
78
|
+
Math.cos(hue) * (1 - strength) + Math.cos(best[2]) * strength
|
|
79
|
+
);
|
|
80
|
+
const newChroma = chroma * (1 - strength) + Math.min(chroma, best[1]) * strength;
|
|
81
|
+
const lightnessPull = strength * RecolorUtil.LIGHTNESS_PULL;
|
|
82
|
+
const newLightness = lightness * (1 - lightnessPull) + best[0] * lightnessPull;
|
|
83
|
+
return RecolorUtil.fromLab([newLightness, newChroma * Math.cos(newHue), newChroma * Math.sin(newHue)]);
|
|
84
|
+
}
|
|
85
|
+
static nearestSwatch(swatches, chroma, hue) {
|
|
86
|
+
let best = swatches[0];
|
|
87
|
+
let bestDistance = Infinity;
|
|
88
|
+
for (const swatch of swatches) {
|
|
89
|
+
const hueGap = Math.atan2(Math.sin(hue - swatch[2]), Math.cos(hue - swatch[2]));
|
|
90
|
+
const hueDistance = Math.abs(hueGap);
|
|
91
|
+
const chromaDistance = Math.abs(chroma - swatch[1]) / RecolorUtil.CHROMA_DISTANCE_SCALE;
|
|
92
|
+
const distance = hueDistance * RecolorUtil.HUE_WEIGHT + chromaDistance;
|
|
93
|
+
if (distance < bestDistance) {
|
|
94
|
+
bestDistance = distance;
|
|
95
|
+
best = swatch;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return best;
|
|
99
|
+
}
|
|
100
|
+
static toRgb(hex) {
|
|
101
|
+
let digits = hex.replace("#", "");
|
|
102
|
+
if (digits.length === 3) {
|
|
103
|
+
digits = Array.from(digits, (char) => char + char).join("");
|
|
104
|
+
}
|
|
105
|
+
const channel = (start) => {
|
|
106
|
+
return parseInt(digits.slice(start, start + 2), 16) / RecolorUtil.CHANNEL_MAX;
|
|
107
|
+
};
|
|
108
|
+
return [channel(0), channel(2), channel(4)];
|
|
109
|
+
}
|
|
110
|
+
static linearize(channel) {
|
|
111
|
+
return channel <= RecolorUtil.SRGB_KNEE ? channel / RecolorUtil.SRGB_LINEAR_SLOPE : ((channel + RecolorUtil.SRGB_OFFSET) / RecolorUtil.SRGB_GAMMA_DIVISOR) ** RecolorUtil.SRGB_GAMMA;
|
|
112
|
+
}
|
|
113
|
+
static delinearize(channel) {
|
|
114
|
+
return channel <= RecolorUtil.SRGB_INVERSE_KNEE ? RecolorUtil.SRGB_LINEAR_SLOPE * channel : RecolorUtil.SRGB_GAMMA_DIVISOR * channel ** (1 / RecolorUtil.SRGB_GAMMA) - RecolorUtil.SRGB_OFFSET;
|
|
115
|
+
}
|
|
116
|
+
static multiply(matrix, vector) {
|
|
117
|
+
const [row0 = [0, 0, 0], row1 = [0, 0, 0], row2 = [0, 0, 0]] = matrix;
|
|
118
|
+
const dot = (row) => (row[0] ?? 0) * vector[0] + (row[1] ?? 0) * vector[1] + (row[2] ?? 0) * vector[2];
|
|
119
|
+
return [dot(row0), dot(row1), dot(row2)];
|
|
120
|
+
}
|
|
121
|
+
static toLab(rgb) {
|
|
122
|
+
const [red, green, blue] = rgb;
|
|
123
|
+
const linear = [RecolorUtil.linearize(red), RecolorUtil.linearize(green), RecolorUtil.linearize(blue)];
|
|
124
|
+
const [rawX, tristimulusY, rawZ] = RecolorUtil.multiply(RecolorUtil.RGB_TO_XYZ, linear);
|
|
125
|
+
const relativeX = rawX / RecolorUtil.WHITE_X;
|
|
126
|
+
const relativeZ = rawZ / RecolorUtil.WHITE_Z;
|
|
127
|
+
const curve = (value) => value > RecolorUtil.LAB_EPSILON ? Math.cbrt(value) : RecolorUtil.LAB_SLOPE * value + RecolorUtil.LAB_OFFSET;
|
|
128
|
+
return [
|
|
129
|
+
RecolorUtil.LIGHTNESS_SCALE * curve(tristimulusY) - RecolorUtil.LIGHTNESS_SHIFT,
|
|
130
|
+
RecolorUtil.A_SCALE * (curve(relativeX) - curve(tristimulusY)),
|
|
131
|
+
RecolorUtil.B_SCALE * (curve(tristimulusY) - curve(relativeZ))
|
|
132
|
+
];
|
|
133
|
+
}
|
|
134
|
+
static fromLab(lab) {
|
|
135
|
+
const [lightness, greenRed, blueYellow] = lab;
|
|
136
|
+
const fy = (lightness + RecolorUtil.LIGHTNESS_SHIFT) / RecolorUtil.LIGHTNESS_SCALE;
|
|
137
|
+
const fx = fy + greenRed / RecolorUtil.A_SCALE;
|
|
138
|
+
const fz = fy - blueYellow / RecolorUtil.B_SCALE;
|
|
139
|
+
const inverse = (value) => value ** 3 > RecolorUtil.LAB_EPSILON ? value ** 3 : (value - RecolorUtil.LAB_OFFSET) / RecolorUtil.LAB_SLOPE;
|
|
140
|
+
const xyz = [inverse(fx) * RecolorUtil.WHITE_X, inverse(fy), inverse(fz) * RecolorUtil.WHITE_Z];
|
|
141
|
+
const rgb = RecolorUtil.multiply(RecolorUtil.XYZ_TO_RGB, xyz);
|
|
142
|
+
const hex = rgb.map((channel) => {
|
|
143
|
+
const encoded = RecolorUtil.delinearize(channel);
|
|
144
|
+
const clamped = Math.min(1, Math.max(0, encoded));
|
|
145
|
+
return Math.round(clamped * RecolorUtil.CHANNEL_MAX).toString(16).padStart(2, "0");
|
|
146
|
+
});
|
|
147
|
+
return `#${hex.join("")}`;
|
|
148
|
+
}
|
|
149
|
+
static toLch(lab) {
|
|
150
|
+
return [lab[0], Math.hypot(lab[1], lab[2]), Math.atan2(lab[2], lab[1])];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
RecolorUtil
|
|
155
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class RegistryUtil {
|
|
2
|
+
static indexValues<Id extends string, Item extends {
|
|
3
|
+
readonly id: Id;
|
|
4
|
+
}, Value>(items: Item[], valueOf: (item: Item) => Value): Record<Id, Value>;
|
|
5
|
+
static indexById<Id extends string, Item extends {
|
|
6
|
+
readonly id: Id;
|
|
7
|
+
}>(items: Item[]): Record<Id, Item>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class RegistryUtil {
|
|
2
|
+
static indexValues(items, valueOf) {
|
|
3
|
+
const idToValue = {};
|
|
4
|
+
for (const item of items) {
|
|
5
|
+
idToValue[item.id] = valueOf(item);
|
|
6
|
+
}
|
|
7
|
+
return idToValue;
|
|
8
|
+
}
|
|
9
|
+
static indexById(items) {
|
|
10
|
+
const idToItem = {};
|
|
11
|
+
for (const item of items) {
|
|
12
|
+
idToItem[item.id] = item;
|
|
13
|
+
}
|
|
14
|
+
return idToItem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
RegistryUtil
|
|
19
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare class SanitizeUtil {
|
|
2
|
+
private static readonly ALLOWED_ELEMENTS;
|
|
3
|
+
static isAllowedElement(name: string): boolean;
|
|
4
|
+
private static readonly LINK_ATTRIBUTES;
|
|
5
|
+
private static readonly SAFE_LINK;
|
|
6
|
+
private static readonly EXTERNAL_URL;
|
|
7
|
+
private static readonly STANDARD_ENTITY;
|
|
8
|
+
private static readonly NAME_END;
|
|
9
|
+
private static readonly QUOTE;
|
|
10
|
+
private static readonly MARKUP_HANDLERS;
|
|
11
|
+
private static skipPast;
|
|
12
|
+
private static skipDoctype;
|
|
13
|
+
private static readAttributeValue;
|
|
14
|
+
private static readAttribute;
|
|
15
|
+
private static readTag;
|
|
16
|
+
private static isSafeAttribute;
|
|
17
|
+
private static escapeAttribute;
|
|
18
|
+
private static openTag;
|
|
19
|
+
static sanitizeSvg(source: string): string;
|
|
20
|
+
private static readMarkup;
|
|
21
|
+
private static readCdata;
|
|
22
|
+
private static readElement;
|
|
23
|
+
private static closeElement;
|
|
24
|
+
private static skipElement;
|
|
25
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { UnsafeSvgError } from "../Errors/UnsafeSvgError.js";
|
|
2
|
+
class SanitizeUtil {
|
|
3
|
+
static ALLOWED_ELEMENTS = /* @__PURE__ */ new Set([
|
|
4
|
+
"svg",
|
|
5
|
+
"g",
|
|
6
|
+
"defs",
|
|
7
|
+
"title",
|
|
8
|
+
"desc",
|
|
9
|
+
"path",
|
|
10
|
+
"rect",
|
|
11
|
+
"circle",
|
|
12
|
+
"ellipse",
|
|
13
|
+
"line",
|
|
14
|
+
"polyline",
|
|
15
|
+
"polygon",
|
|
16
|
+
"text",
|
|
17
|
+
"tspan",
|
|
18
|
+
"linearGradient",
|
|
19
|
+
"radialGradient",
|
|
20
|
+
"stop",
|
|
21
|
+
"clipPath",
|
|
22
|
+
"mask",
|
|
23
|
+
"pattern",
|
|
24
|
+
"symbol",
|
|
25
|
+
"use",
|
|
26
|
+
"image",
|
|
27
|
+
"filter",
|
|
28
|
+
"feBlend",
|
|
29
|
+
"feColorMatrix",
|
|
30
|
+
"feComponentTransfer",
|
|
31
|
+
"feComposite",
|
|
32
|
+
"feConvolveMatrix",
|
|
33
|
+
"feDropShadow",
|
|
34
|
+
"feFlood",
|
|
35
|
+
"feFuncA",
|
|
36
|
+
"feFuncB",
|
|
37
|
+
"feFuncG",
|
|
38
|
+
"feFuncR",
|
|
39
|
+
"feGaussianBlur",
|
|
40
|
+
"feMerge",
|
|
41
|
+
"feMergeNode",
|
|
42
|
+
"feMorphology",
|
|
43
|
+
"feOffset",
|
|
44
|
+
"feTurbulence"
|
|
45
|
+
]);
|
|
46
|
+
static isAllowedElement(name) {
|
|
47
|
+
return SanitizeUtil.ALLOWED_ELEMENTS.has(name);
|
|
48
|
+
}
|
|
49
|
+
static LINK_ATTRIBUTES = /* @__PURE__ */ new Set(["href", "xlink:href"]);
|
|
50
|
+
static SAFE_LINK = /^(#|data:image\/(png|jpeg|jpg|webp|gif);base64,)/;
|
|
51
|
+
static EXTERNAL_URL = /url\(\s*['"]?\s*(?!#)/i;
|
|
52
|
+
static STANDARD_ENTITY = /&(?!(?:lt|gt|amp|quot|apos|#\d+|#x[0-9a-f]+);)/i;
|
|
53
|
+
static NAME_END = /[\s/>]/;
|
|
54
|
+
static QUOTE = /^["']$/;
|
|
55
|
+
static MARKUP_HANDLERS = [
|
|
56
|
+
{ prefix: "<!--", read: (source, next) => SanitizeUtil.skipPast(source, next, "-->") },
|
|
57
|
+
{ prefix: "<![CDATA[", read: (source, next, state) => SanitizeUtil.readCdata(source, next, state) },
|
|
58
|
+
{ prefix: "<?", read: (source, next) => SanitizeUtil.skipPast(source, next, "?>") },
|
|
59
|
+
{ prefix: "<!", read: (source, next) => SanitizeUtil.skipDoctype(source, next) }
|
|
60
|
+
];
|
|
61
|
+
static skipPast(source, from, terminator) {
|
|
62
|
+
const at = source.indexOf(terminator, from);
|
|
63
|
+
return at < 0 ? source.length : at + terminator.length;
|
|
64
|
+
}
|
|
65
|
+
static skipDoctype(source, from) {
|
|
66
|
+
const end = source.indexOf(">", from);
|
|
67
|
+
const bracket = source.indexOf("[", from);
|
|
68
|
+
const hasSubset = bracket >= 0 && (end < 0 || bracket < end);
|
|
69
|
+
if (!hasSubset) {
|
|
70
|
+
return SanitizeUtil.skipPast(source, from, ">");
|
|
71
|
+
}
|
|
72
|
+
const afterSubset = SanitizeUtil.skipPast(source, from, "]");
|
|
73
|
+
return SanitizeUtil.skipPast(source, afterSubset, ">");
|
|
74
|
+
}
|
|
75
|
+
static readAttributeValue(source, from) {
|
|
76
|
+
const quote = source.charAt(from);
|
|
77
|
+
if (SanitizeUtil.QUOTE.test(quote)) {
|
|
78
|
+
const close = source.indexOf(quote, from + 1);
|
|
79
|
+
const end2 = close < 0 ? source.length : close;
|
|
80
|
+
return { value: source.slice(from + 1, end2), end: end2 + 1 };
|
|
81
|
+
}
|
|
82
|
+
let end = from;
|
|
83
|
+
while (end < source.length && !/[\s>]/.test(source[end] ?? "") && !source.startsWith("/>", end)) {
|
|
84
|
+
end++;
|
|
85
|
+
}
|
|
86
|
+
return { value: source.slice(from, end), end };
|
|
87
|
+
}
|
|
88
|
+
static readAttribute(source, from) {
|
|
89
|
+
let cursor = from;
|
|
90
|
+
while (cursor < source.length && !/[\s=>]/.test(source[cursor] ?? "") && !source.startsWith("/>", cursor)) {
|
|
91
|
+
cursor++;
|
|
92
|
+
}
|
|
93
|
+
const name = source.slice(from, cursor);
|
|
94
|
+
while (/\s/.test(source[cursor] ?? "")) {
|
|
95
|
+
cursor++;
|
|
96
|
+
}
|
|
97
|
+
if (!source.startsWith("=", cursor)) {
|
|
98
|
+
return { name, value: "", end: cursor };
|
|
99
|
+
}
|
|
100
|
+
while (/[\s=]/.test(source[cursor] ?? "")) {
|
|
101
|
+
cursor++;
|
|
102
|
+
}
|
|
103
|
+
const read = SanitizeUtil.readAttributeValue(source, cursor);
|
|
104
|
+
return { name, value: read.value, end: read.end };
|
|
105
|
+
}
|
|
106
|
+
static readTag(source, from) {
|
|
107
|
+
const isClosing = source.startsWith("/", from + 1);
|
|
108
|
+
let cursor = from + (isClosing ? 2 : 1);
|
|
109
|
+
const nameStart = cursor;
|
|
110
|
+
while (cursor < source.length && !SanitizeUtil.NAME_END.test(source[cursor] ?? "")) {
|
|
111
|
+
cursor++;
|
|
112
|
+
}
|
|
113
|
+
const name = source.slice(nameStart, cursor);
|
|
114
|
+
const attributes = [];
|
|
115
|
+
let isSelfClosing = false;
|
|
116
|
+
while (cursor < source.length && !source.startsWith(">", cursor)) {
|
|
117
|
+
if (source.startsWith("/>", cursor)) {
|
|
118
|
+
isSelfClosing = true;
|
|
119
|
+
cursor++;
|
|
120
|
+
} else if (/\s/.test(source[cursor] ?? "")) {
|
|
121
|
+
cursor++;
|
|
122
|
+
} else {
|
|
123
|
+
const attribute = SanitizeUtil.readAttribute(source, cursor);
|
|
124
|
+
attributes.push([attribute.name, attribute.value]);
|
|
125
|
+
cursor = attribute.end;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return { name, attributes, isClosing, isSelfClosing, end: cursor + 1 };
|
|
129
|
+
}
|
|
130
|
+
static isSafeAttribute(name, value) {
|
|
131
|
+
const lower = name.toLowerCase();
|
|
132
|
+
if (lower.startsWith("on") || SanitizeUtil.STANDARD_ENTITY.test(value)) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
if (SanitizeUtil.LINK_ATTRIBUTES.has(lower)) {
|
|
136
|
+
return SanitizeUtil.SAFE_LINK.test(value.trim());
|
|
137
|
+
}
|
|
138
|
+
return !SanitizeUtil.EXTERNAL_URL.test(value) && !/javascript:/i.test(value);
|
|
139
|
+
}
|
|
140
|
+
static escapeAttribute(value) {
|
|
141
|
+
return value.replace(/"/g, """);
|
|
142
|
+
}
|
|
143
|
+
static openTag(tag) {
|
|
144
|
+
const attributes = tag.attributes.filter(([name, value]) => SanitizeUtil.isSafeAttribute(name, value)).map(([name, value]) => ` ${name}="${SanitizeUtil.escapeAttribute(value)}"`).join("");
|
|
145
|
+
return `<${tag.name}${attributes}${tag.isSelfClosing ? "/" : ""}>`;
|
|
146
|
+
}
|
|
147
|
+
static sanitizeSvg(source) {
|
|
148
|
+
if (/<!ENTITY/i.test(source)) {
|
|
149
|
+
throw new UnsafeSvgError("<!ENTITY> declarations are not allowed in imported SVG");
|
|
150
|
+
}
|
|
151
|
+
const state = { output: [], openElements: [], skippedDepth: 0 };
|
|
152
|
+
let cursor = 0;
|
|
153
|
+
while (cursor < source.length) {
|
|
154
|
+
const next = source.indexOf("<", cursor);
|
|
155
|
+
const textEnd = next < 0 ? source.length : next;
|
|
156
|
+
if (state.skippedDepth === 0) {
|
|
157
|
+
state.output.push(source.slice(cursor, textEnd));
|
|
158
|
+
}
|
|
159
|
+
if (next < 0) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
cursor = SanitizeUtil.readMarkup(source, next, state);
|
|
163
|
+
}
|
|
164
|
+
return state.output.join("");
|
|
165
|
+
}
|
|
166
|
+
static readMarkup(source, next, state) {
|
|
167
|
+
const handler = SanitizeUtil.MARKUP_HANDLERS.find((candidate) => source.startsWith(candidate.prefix, next));
|
|
168
|
+
return handler ? handler.read(source, next, state) : SanitizeUtil.readElement(source, next, state);
|
|
169
|
+
}
|
|
170
|
+
static readCdata(source, next, state) {
|
|
171
|
+
const end = SanitizeUtil.skipPast(source, next, "]]>");
|
|
172
|
+
const text = source.slice(next + "<![CDATA[".length, end - "]]>".length);
|
|
173
|
+
state.output.push(state.skippedDepth === 0 ? text.replace(/&/g, "&").replace(/</g, "<") : "");
|
|
174
|
+
return end;
|
|
175
|
+
}
|
|
176
|
+
static readElement(source, next, state) {
|
|
177
|
+
const tag = SanitizeUtil.readTag(source, next);
|
|
178
|
+
if (tag.isClosing) {
|
|
179
|
+
SanitizeUtil.closeElement(state);
|
|
180
|
+
} else if (state.skippedDepth > 0) {
|
|
181
|
+
SanitizeUtil.skipElement(tag, state);
|
|
182
|
+
} else if (SanitizeUtil.ALLOWED_ELEMENTS.has(tag.name)) {
|
|
183
|
+
state.output.push(SanitizeUtil.openTag(tag));
|
|
184
|
+
if (!tag.isSelfClosing) {
|
|
185
|
+
state.openElements.push({ name: tag.name, isAllowed: true });
|
|
186
|
+
}
|
|
187
|
+
} else if (!tag.isSelfClosing) {
|
|
188
|
+
state.skippedDepth = 1;
|
|
189
|
+
state.openElements.push({ name: tag.name, isAllowed: false });
|
|
190
|
+
}
|
|
191
|
+
return tag.end;
|
|
192
|
+
}
|
|
193
|
+
static closeElement(state) {
|
|
194
|
+
const closed = state.openElements.pop();
|
|
195
|
+
if (closed && !closed.isAllowed) {
|
|
196
|
+
state.skippedDepth--;
|
|
197
|
+
} else if (closed && state.skippedDepth === 0) {
|
|
198
|
+
state.output.push(`</${closed.name}>`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
static skipElement(tag, state) {
|
|
202
|
+
if (!tag.isSelfClosing) {
|
|
203
|
+
state.skippedDepth++;
|
|
204
|
+
state.openElements.push({ name: tag.name, isAllowed: false });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
export {
|
|
209
|
+
SanitizeUtil
|
|
210
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class SeedUtil {
|
|
2
|
+
static MULTIPLIER = 1664525;
|
|
3
|
+
static INCREMENT = 1013904223;
|
|
4
|
+
static MODULUS = 4294967296;
|
|
5
|
+
static sequence(seed) {
|
|
6
|
+
let state = seed >>> 0 || 1;
|
|
7
|
+
return () => {
|
|
8
|
+
state = state * SeedUtil.MULTIPLIER + SeedUtil.INCREMENT >>> 0;
|
|
9
|
+
return state / SeedUtil.MODULUS;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
SeedUtil
|
|
15
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Facing } from "../Protocols/AssetProtocol.js";
|
|
2
|
+
import type { Theme } from "../Protocols/ThemeProtocol.js";
|
|
3
|
+
export interface RectStyle {
|
|
4
|
+
rx?: number;
|
|
5
|
+
extra?: string;
|
|
6
|
+
}
|
|
7
|
+
export type RectArguments = [
|
|
8
|
+
posX: number,
|
|
9
|
+
posY: number,
|
|
10
|
+
width: number,
|
|
11
|
+
height: number,
|
|
12
|
+
fill: string,
|
|
13
|
+
style?: RectStyle
|
|
14
|
+
];
|
|
15
|
+
export interface EllipsePaint {
|
|
16
|
+
fill: string;
|
|
17
|
+
extra?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class ShapeUtil {
|
|
20
|
+
private static readonly ROUNDING_FACTOR;
|
|
21
|
+
private static readonly HALF_TURN_DEGREES;
|
|
22
|
+
private static readonly DEFAULT_SHADOW_RADIUS_Y;
|
|
23
|
+
static round(value: number): number;
|
|
24
|
+
static toRadians(degrees: number): number;
|
|
25
|
+
static circle(centerX: number, centerY: number, radius: number, fill: string, extra?: string): string;
|
|
26
|
+
static rect(...[posX, posY, width, height, fill, style]: RectArguments): string;
|
|
27
|
+
static ellipse(centerX: number, centerY: number, radiusX: number, radiusY: number, paint: string | EllipsePaint): string;
|
|
28
|
+
static shadow(theme: Theme, radiusX: number, radiusY?: number): string;
|
|
29
|
+
static directionOf(facing: Facing | undefined): 1 | -1;
|
|
30
|
+
static color(theme: Theme, value: string | undefined, fallback: string): string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
class ShapeUtil {
|
|
2
|
+
static ROUNDING_FACTOR = 100;
|
|
3
|
+
static HALF_TURN_DEGREES = 180;
|
|
4
|
+
static DEFAULT_SHADOW_RADIUS_Y = 3.5;
|
|
5
|
+
static round(value) {
|
|
6
|
+
return Math.round(value * ShapeUtil.ROUNDING_FACTOR) / ShapeUtil.ROUNDING_FACTOR;
|
|
7
|
+
}
|
|
8
|
+
static toRadians(degrees) {
|
|
9
|
+
return degrees * Math.PI / ShapeUtil.HALF_TURN_DEGREES;
|
|
10
|
+
}
|
|
11
|
+
static circle(centerX, centerY, radius, fill, extra = "") {
|
|
12
|
+
const cx = ShapeUtil.round(centerX);
|
|
13
|
+
const cy = ShapeUtil.round(centerY);
|
|
14
|
+
return `<circle cx="${cx}" cy="${cy}" r="${ShapeUtil.round(radius)}" fill="${fill}" ${extra}/>`;
|
|
15
|
+
}
|
|
16
|
+
static rect(...[posX, posY, width, height, fill, style = {}]) {
|
|
17
|
+
const { rx = 0, extra = "" } = style;
|
|
18
|
+
const column = ShapeUtil.round(posX);
|
|
19
|
+
const row = ShapeUtil.round(posY);
|
|
20
|
+
const attributes = `width="${ShapeUtil.round(width)}" height="${ShapeUtil.round(height)}" rx="${rx}" fill="${fill}"`;
|
|
21
|
+
return `<rect x="${column}" y="${row}" ${attributes} ${extra}/>`;
|
|
22
|
+
}
|
|
23
|
+
static ellipse(centerX, centerY, radiusX, radiusY, paint) {
|
|
24
|
+
const { fill, extra = "" } = typeof paint === "string" ? { fill: paint } : paint;
|
|
25
|
+
const cx = ShapeUtil.round(centerX);
|
|
26
|
+
const cy = ShapeUtil.round(centerY);
|
|
27
|
+
const radii = `rx="${ShapeUtil.round(radiusX)}" ry="${ShapeUtil.round(radiusY)}"`;
|
|
28
|
+
return `<ellipse cx="${cx}" cy="${cy}" ${radii} fill="${fill}" ${extra}/>`;
|
|
29
|
+
}
|
|
30
|
+
static shadow(theme, radiusX, radiusY = ShapeUtil.DEFAULT_SHADOW_RADIUS_Y) {
|
|
31
|
+
return ShapeUtil.ellipse(0, 0, radiusX, radiusY, theme.shadow);
|
|
32
|
+
}
|
|
33
|
+
static directionOf(facing) {
|
|
34
|
+
const facingToDirection = { left: -1, right: 1 };
|
|
35
|
+
return facingToDirection[facing ?? "right"];
|
|
36
|
+
}
|
|
37
|
+
static color(theme, value, fallback) {
|
|
38
|
+
const themed = value === void 0 ? void 0 : theme[value];
|
|
39
|
+
if (typeof themed === "string" && themed !== "") {
|
|
40
|
+
return themed;
|
|
41
|
+
}
|
|
42
|
+
return value === void 0 || value === "" ? fallback : value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
ShapeUtil
|
|
47
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class SuggestUtil {
|
|
2
|
+
private static readonly MIN_TOLERANCE;
|
|
3
|
+
private static readonly TOLERANCE_DIVISOR;
|
|
4
|
+
private static readonly DEFAULT_LIMIT;
|
|
5
|
+
static distance(first: string, second: string): number;
|
|
6
|
+
static closest(name: string, candidates: readonly string[], limit?: number): string[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
class SuggestUtil {
|
|
2
|
+
static MIN_TOLERANCE = 2;
|
|
3
|
+
static TOLERANCE_DIVISOR = 3;
|
|
4
|
+
static DEFAULT_LIMIT = 3;
|
|
5
|
+
static distance(first, second) {
|
|
6
|
+
let previous = Array.from({ length: second.length + 1 }, (_, index) => index);
|
|
7
|
+
for (let row = 1; row <= first.length; row++) {
|
|
8
|
+
const current = [row];
|
|
9
|
+
for (let column = 1; column <= second.length; column++) {
|
|
10
|
+
const substitution = (previous[column - 1] ?? 0) + (first[row - 1] === second[column - 1] ? 0 : 1);
|
|
11
|
+
current[column] = Math.min((previous[column] ?? 0) + 1, (current[column - 1] ?? 0) + 1, substitution);
|
|
12
|
+
}
|
|
13
|
+
previous = current;
|
|
14
|
+
}
|
|
15
|
+
return previous[second.length] ?? 0;
|
|
16
|
+
}
|
|
17
|
+
static closest(name, candidates, limit = SuggestUtil.DEFAULT_LIMIT) {
|
|
18
|
+
const lowered = name.toLowerCase();
|
|
19
|
+
const tolerance = Math.max(SuggestUtil.MIN_TOLERANCE, Math.ceil(lowered.length / SuggestUtil.TOLERANCE_DIVISOR));
|
|
20
|
+
return candidates.map((candidate) => ({ candidate, score: SuggestUtil.distance(lowered, candidate.toLowerCase()) })).filter(({ score }) => score <= tolerance).sort((first, second) => first.score - second.score).slice(0, limit).map(({ candidate }) => candidate);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
SuggestUtil
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScreenPoint } from "../Protocols/PlaneProtocol.js";
|
|
2
|
+
export declare class SvgUtil {
|
|
3
|
+
private static readonly SHAPE_OP;
|
|
4
|
+
private static readonly TEXT_OP;
|
|
5
|
+
static flattenOpacity(svg: string): string;
|
|
6
|
+
static escapeXml(text: string): string;
|
|
7
|
+
static polygon(points: readonly ScreenPoint[], fill: string, extra?: string): string;
|
|
8
|
+
static segment(from: ScreenPoint, to: ScreenPoint): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormatUtil } from "./FormatUtil.js";
|
|
2
|
+
class SvgUtil {
|
|
3
|
+
static SHAPE_OP = /<(rect|path|circle|ellipse|polygon|polyline|line)\b([^>]*?)\sopacity="([\d.]+)"([^>]*?)\/>/g;
|
|
4
|
+
static TEXT_OP = /<text\b([^>]*?)\sopacity="([\d.]+)"([^>]*)>/g;
|
|
5
|
+
static flattenOpacity(svg) {
|
|
6
|
+
const withText = svg.replace(SvgUtil.TEXT_OP, (match, before, opacity, after) => (before + after).includes("fill-opacity") ? match : `<text${before} fill-opacity="${opacity}"${after}>`);
|
|
7
|
+
return withText.replace(SvgUtil.SHAPE_OP, (match, tag, before, opacity, after) => /fill-opacity|stroke-opacity/.test(before + after) ? match : `<${tag}${before} fill-opacity="${opacity}" stroke-opacity="${opacity}"${after}/>`);
|
|
8
|
+
}
|
|
9
|
+
static escapeXml(text) {
|
|
10
|
+
return text.replace(/&/g, "&").replace(/</g, "<");
|
|
11
|
+
}
|
|
12
|
+
static polygon(points, fill, extra = "") {
|
|
13
|
+
return `<polygon points="${points.map((point) => `${FormatUtil.oneDecimal(point[0])},${FormatUtil.oneDecimal(point[1])}`).join(" ")}" fill="${fill}" ${extra}/>`;
|
|
14
|
+
}
|
|
15
|
+
static segment(from, to) {
|
|
16
|
+
return `M${from.map(FormatUtil.oneDecimal).join(" ")} L${to.map(FormatUtil.oneDecimal).join(" ")}`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
SvgUtil
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IdUtil } from "./IdUtil.js";
|
|
2
|
+
class ThemeUtil {
|
|
3
|
+
static resolve(theme, value, fallback) {
|
|
4
|
+
const named = IdUtil.lookup(theme, value);
|
|
5
|
+
if (typeof named === "string" && named !== "") {
|
|
6
|
+
return named;
|
|
7
|
+
}
|
|
8
|
+
return value === void 0 || value === "" ? fallback : value;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
ThemeUtil
|
|
13
|
+
};
|