@kitten-science/kitten-scientists 2.0.0-beta.10-20250403-28002ba → 2.0.0-beta.10-20250407-52a10b3
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/lib/BonfireManager.d.ts +3 -3
- package/lib/BonfireManager.d.ts.map +1 -1
- package/lib/BonfireManager.js +10 -10
- package/lib/BonfireManager.js.map +1 -1
- package/lib/Engine.d.ts +89 -89
- package/lib/Engine.d.ts.map +1 -1
- package/lib/Engine.js +17 -17
- package/lib/Engine.js.map +1 -1
- package/lib/KittenScientists.d.ts +1 -1
- package/lib/KittenScientists.d.ts.map +1 -1
- package/lib/KittenScientists.js +8 -8
- package/lib/KittenScientists.js.map +1 -1
- package/lib/ReligionManager.d.ts +2 -2
- package/lib/ReligionManager.d.ts.map +1 -1
- package/lib/ReligionManager.js +6 -6
- package/lib/ReligionManager.js.map +1 -1
- package/lib/ScienceManager.d.ts +2 -2
- package/lib/ScienceManager.d.ts.map +1 -1
- package/lib/ScienceManager.js +2 -2
- package/lib/ScienceManager.js.map +1 -1
- package/lib/SpaceManager.d.ts +2 -2
- package/lib/SpaceManager.d.ts.map +1 -1
- package/lib/SpaceManager.js +2 -2
- package/lib/SpaceManager.js.map +1 -1
- package/lib/TimeControlManager.d.ts +2 -2
- package/lib/TimeControlManager.d.ts.map +1 -1
- package/lib/TimeControlManager.js +3 -3
- package/lib/TimeControlManager.js.map +1 -1
- package/lib/TimeManager.d.ts +2 -2
- package/lib/TimeManager.d.ts.map +1 -1
- package/lib/TimeManager.js +3 -3
- package/lib/TimeManager.js.map +1 -1
- package/lib/TradeManager.d.ts +3 -3
- package/lib/TradeManager.d.ts.map +1 -1
- package/lib/TradeManager.js +4 -4
- package/lib/TradeManager.js.map +1 -1
- package/lib/UpgradeManager.js +3 -3
- package/lib/UpgradeManager.js.map +1 -1
- package/lib/VillageManager.d.ts +3 -3
- package/lib/VillageManager.d.ts.map +1 -1
- package/lib/VillageManager.js +2 -2
- package/lib/VillageManager.js.map +1 -1
- package/lib/WorkshopManager.d.ts +3 -3
- package/lib/WorkshopManager.d.ts.map +1 -1
- package/lib/WorkshopManager.js +4 -4
- package/lib/WorkshopManager.js.map +1 -1
- package/lib/helper/BulkPurchaseHelper.d.ts +1 -1
- package/lib/helper/BulkPurchaseHelper.d.ts.map +1 -1
- package/lib/helper/BulkPurchaseHelper.js +5 -5
- package/lib/helper/BulkPurchaseHelper.js.map +1 -1
- package/lib/i18n/en-US.json +20 -20
- package/lib/i18n/translations/da-DK.json +20 -20
- package/lib/i18n/translations/de-DE.json +20 -20
- package/lib/i18n/translations/fr-FR.json +20 -20
- package/lib/i18n/translations/he-IL.json +20 -20
- package/lib/i18n/translations/ko-KR.json +20 -20
- package/lib/i18n/translations/ru-RU.json +20 -20
- package/lib/i18n/translations/zh-CN.json +20 -20
- package/lib/images/Icons.d.ts +8 -8
- package/lib/images/Icons.d.ts.map +1 -1
- package/lib/images/Icons.js +8 -8
- package/lib/images/Icons.js.map +1 -1
- package/lib/settings/BonfireSettings.d.ts.map +1 -1
- package/lib/settings/BonfireSettings.js.map +1 -1
- package/lib/settings/BuildingUpgradeSettings.d.ts.map +1 -1
- package/lib/settings/BuildingUpgradeSettings.js.map +1 -1
- package/lib/settings/ElectLeaderSettings.d.ts.map +1 -1
- package/lib/settings/ElectLeaderSettings.js.map +1 -1
- package/lib/settings/EmbassySettings.d.ts.map +1 -1
- package/lib/settings/EmbassySettings.js.map +1 -1
- package/lib/settings/EngineSettings.d.ts.map +1 -1
- package/lib/settings/EngineSettings.js.map +1 -1
- package/lib/settings/LogFilterSettings.d.ts.map +1 -1
- package/lib/settings/LogFilterSettings.js.map +1 -1
- package/lib/settings/MissionSettings.d.ts.map +1 -1
- package/lib/settings/MissionSettings.js.map +1 -1
- package/lib/settings/PolicySettings.d.ts.map +1 -1
- package/lib/settings/PolicySettings.js.map +1 -1
- package/lib/settings/ReligionSettings.d.ts.map +1 -1
- package/lib/settings/ReligionSettings.js.map +1 -1
- package/lib/settings/ResetBonfireSettings.d.ts.map +1 -1
- package/lib/settings/ResetBonfireSettings.js.map +1 -1
- package/lib/settings/ResetReligionSettings.d.ts.map +1 -1
- package/lib/settings/ResetReligionSettings.js.map +1 -1
- package/lib/settings/ResetResourcesSettings.d.ts.map +1 -1
- package/lib/settings/ResetResourcesSettings.js.map +1 -1
- package/lib/settings/ResetSettings.d.ts.map +1 -1
- package/lib/settings/ResetSettings.js.map +1 -1
- package/lib/settings/ResetSpaceSettings.d.ts.map +1 -1
- package/lib/settings/ResetSpaceSettings.js.map +1 -1
- package/lib/settings/ResetTimeSettings.d.ts.map +1 -1
- package/lib/settings/ResetTimeSettings.js.map +1 -1
- package/lib/settings/ResetUpgradeSettings.d.ts.map +1 -1
- package/lib/settings/ResetUpgradeSettings.js.map +1 -1
- package/lib/settings/ResourcesSettings.d.ts.map +1 -1
- package/lib/settings/ResourcesSettings.js +1 -1
- package/lib/settings/ResourcesSettings.js.map +1 -1
- package/lib/settings/ScienceSettings.d.ts.map +1 -1
- package/lib/settings/ScienceSettings.js.map +1 -1
- package/lib/settings/Settings.d.ts.map +1 -1
- package/lib/settings/Settings.js.map +1 -1
- package/lib/settings/SpaceSettings.d.ts.map +1 -1
- package/lib/settings/SpaceSettings.js.map +1 -1
- package/lib/settings/StateSettings.d.ts.map +1 -1
- package/lib/settings/StateSettings.js.map +1 -1
- package/lib/settings/TechSettings.d.ts.map +1 -1
- package/lib/settings/TechSettings.js.map +1 -1
- package/lib/settings/TimeControlSettings.d.ts.map +1 -1
- package/lib/settings/TimeControlSettings.js.map +1 -1
- package/lib/settings/TimeSettings.d.ts.map +1 -1
- package/lib/settings/TimeSettings.js.map +1 -1
- package/lib/settings/TimeSkipHeatSettings.d.ts.map +1 -1
- package/lib/settings/TimeSkipHeatSettings.js.map +1 -1
- package/lib/settings/TimeSkipSettings.d.ts.map +1 -1
- package/lib/settings/TimeSkipSettings.js.map +1 -1
- package/lib/settings/TradeSettings.d.ts.map +1 -1
- package/lib/settings/TradeSettings.js +2 -2
- package/lib/settings/TradeSettings.js.map +1 -1
- package/lib/settings/UpgradeSettings.d.ts.map +1 -1
- package/lib/settings/UpgradeSettings.js.map +1 -1
- package/lib/settings/VillageSettings.d.ts.map +1 -1
- package/lib/settings/VillageSettings.js.map +1 -1
- package/lib/settings/WorkshopSettings.d.ts.map +1 -1
- package/lib/settings/WorkshopSettings.js.map +1 -1
- package/lib/tools/Log.d.ts +1 -1
- package/lib/tools/Log.d.ts.map +1 -1
- package/lib/tools/Log.js +4 -1
- package/lib/tools/Log.js.map +1 -1
- package/lib/types/game.d.ts +2 -2
- package/lib/types/game.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/village.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.d.ts +4 -5
- package/lib/ui/BonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.js +100 -115
- package/lib/ui/BonfireSettingsUi.js.map +1 -1
- package/lib/ui/BuildSectionTools.d.ts +2 -26
- package/lib/ui/BuildSectionTools.d.ts.map +1 -1
- package/lib/ui/BuildSectionTools.js +50 -59
- package/lib/ui/BuildSectionTools.js.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts +2 -4
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.js +16 -23
- package/lib/ui/BuildingUpgradeSettingsUi.js.map +1 -1
- package/lib/ui/EmbassySettingsUi.d.ts +4 -5
- package/lib/ui/EmbassySettingsUi.d.ts.map +1 -1
- package/lib/ui/EmbassySettingsUi.js +54 -67
- package/lib/ui/EmbassySettingsUi.js.map +1 -1
- package/lib/ui/EngineSettingsUi.d.ts +3 -3
- package/lib/ui/EngineSettingsUi.d.ts.map +1 -1
- package/lib/ui/EngineSettingsUi.js +11 -9
- package/lib/ui/EngineSettingsUi.js.map +1 -1
- package/lib/ui/InternalsUi.d.ts +2 -2
- package/lib/ui/InternalsUi.d.ts.map +1 -1
- package/lib/ui/InternalsUi.js +44 -54
- package/lib/ui/InternalsUi.js.map +1 -1
- package/lib/ui/LogFilterSettingsUi.d.ts +2 -4
- package/lib/ui/LogFilterSettingsUi.d.ts.map +1 -1
- package/lib/ui/LogFilterSettingsUi.js +24 -32
- package/lib/ui/LogFilterSettingsUi.js.map +1 -1
- package/lib/ui/MissionSettingsUi.d.ts +2 -4
- package/lib/ui/MissionSettingsUi.d.ts.map +1 -1
- package/lib/ui/MissionSettingsUi.js +15 -20
- package/lib/ui/MissionSettingsUi.js.map +1 -1
- package/lib/ui/PolicySettingsUi.d.ts +2 -4
- package/lib/ui/PolicySettingsUi.d.ts.map +1 -1
- package/lib/ui/PolicySettingsUi.js +15 -22
- package/lib/ui/PolicySettingsUi.js.map +1 -1
- package/lib/ui/ReligionSettingsUi.d.ts +4 -6
- package/lib/ui/ReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ReligionSettingsUi.js +128 -152
- package/lib/ui/ReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.d.ts +2 -2
- package/lib/ui/ResetBonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.js +33 -39
- package/lib/ui/ResetBonfireSettingsUi.js.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.d.ts +2 -2
- package/lib/ui/ResetReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.js +45 -54
- package/lib/ui/ResetReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.js +27 -34
- package/lib/ui/ResetResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ResetSettingsUi.d.ts +2 -4
- package/lib/ui/ResetSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSettingsUi.js +19 -24
- package/lib/ui/ResetSettingsUi.js.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.d.ts +2 -2
- package/lib/ui/ResetSpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.js +33 -42
- package/lib/ui/ResetSpaceSettingsUi.js.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.d.ts +2 -2
- package/lib/ui/ResetTimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.js +35 -44
- package/lib/ui/ResetTimeSettingsUi.js.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetUpgradesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.js +12 -12
- package/lib/ui/ResetUpgradesSettingsUi.js.map +1 -1
- package/lib/ui/ResourcesSettingsUi.d.ts +2 -4
- package/lib/ui/ResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResourcesSettingsUi.js +18 -22
- package/lib/ui/ResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ScienceSettingsUi.d.ts +2 -5
- package/lib/ui/ScienceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ScienceSettingsUi.js +26 -45
- package/lib/ui/ScienceSettingsUi.js.map +1 -1
- package/lib/ui/SpaceSettingsUi.d.ts +4 -5
- package/lib/ui/SpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/SpaceSettingsUi.js +47 -58
- package/lib/ui/SpaceSettingsUi.js.map +1 -1
- package/lib/ui/StateManagementUi.d.ts +2 -3
- package/lib/ui/StateManagementUi.d.ts.map +1 -1
- package/lib/ui/StateManagementUi.js +172 -179
- package/lib/ui/StateManagementUi.js.map +1 -1
- package/lib/ui/TechSettingsUi.d.ts +4 -5
- package/lib/ui/TechSettingsUi.d.ts.map +1 -1
- package/lib/ui/TechSettingsUi.js +56 -74
- package/lib/ui/TechSettingsUi.js.map +1 -1
- package/lib/ui/TimeControlSettingsUi.d.ts +3 -4
- package/lib/ui/TimeControlSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeControlSettingsUi.js +27 -39
- package/lib/ui/TimeControlSettingsUi.js.map +1 -1
- package/lib/ui/TimeSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSettingsUi.js +58 -65
- package/lib/ui/TimeSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.js +33 -49
- package/lib/ui/TimeSkipHeatSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.d.ts +2 -4
- package/lib/ui/TimeSkipSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.js +78 -106
- package/lib/ui/TimeSkipSettingsUi.js.map +1 -1
- package/lib/ui/TradeSettingsUi.d.ts +4 -5
- package/lib/ui/TradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TradeSettingsUi.js +113 -128
- package/lib/ui/TradeSettingsUi.js.map +1 -1
- package/lib/ui/UpgradeSettingsUi.d.ts +4 -5
- package/lib/ui/UpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/UpgradeSettingsUi.js +55 -71
- package/lib/ui/UpgradeSettingsUi.js.map +1 -1
- package/lib/ui/UserInterface.d.ts +4 -2
- package/lib/ui/UserInterface.d.ts.map +1 -1
- package/lib/ui/UserInterface.js +38 -21
- package/lib/ui/UserInterface.js.map +1 -1
- package/lib/ui/VillageSettingsUi.d.ts +2 -4
- package/lib/ui/VillageSettingsUi.d.ts.map +1 -1
- package/lib/ui/VillageSettingsUi.js +94 -112
- package/lib/ui/VillageSettingsUi.js.map +1 -1
- package/lib/ui/WorkshopSettingsUi.d.ts +4 -5
- package/lib/ui/WorkshopSettingsUi.d.ts.map +1 -1
- package/lib/ui/WorkshopSettingsUi.js +89 -110
- package/lib/ui/WorkshopSettingsUi.js.map +1 -1
- package/lib/ui/components/Button.d.ts +9 -9
- package/lib/ui/components/Button.d.ts.map +1 -1
- package/lib/ui/components/Button.js +31 -26
- package/lib/ui/components/Button.js.map +1 -1
- package/lib/ui/components/ButtonListItem.d.ts +4 -4
- package/lib/ui/components/ButtonListItem.d.ts.map +1 -1
- package/lib/ui/components/ButtonListItem.js +2 -7
- package/lib/ui/components/ButtonListItem.js.map +1 -1
- package/lib/ui/components/CollapsiblePanel.d.ts +15 -12
- package/lib/ui/components/CollapsiblePanel.d.ts.map +1 -1
- package/lib/ui/components/CollapsiblePanel.js +42 -26
- package/lib/ui/components/CollapsiblePanel.js.map +1 -1
- package/lib/ui/components/Container.d.ts +6 -2
- package/lib/ui/components/Container.d.ts.map +1 -1
- package/lib/ui/components/Container.js +5 -3
- package/lib/ui/components/Container.js.map +1 -1
- package/lib/ui/components/CyclesList.d.ts +7 -8
- package/lib/ui/components/CyclesList.d.ts.map +1 -1
- package/lib/ui/components/CyclesList.js +34 -27
- package/lib/ui/components/CyclesList.js.map +1 -1
- package/lib/ui/components/Delimiter.d.ts +2 -2
- package/lib/ui/components/Delimiter.d.ts.map +1 -1
- package/lib/ui/components/Delimiter.js +5 -2
- package/lib/ui/components/Delimiter.js.map +1 -1
- package/lib/ui/components/Dialog.d.ts +13 -6
- package/lib/ui/components/Dialog.d.ts.map +1 -1
- package/lib/ui/components/Dialog.js +65 -40
- package/lib/ui/components/Dialog.js.map +1 -1
- package/lib/ui/components/ExplainerListItem.d.ts +4 -2
- package/lib/ui/components/ExplainerListItem.d.ts.map +1 -1
- package/lib/ui/components/ExplainerListItem.js +6 -4
- package/lib/ui/components/ExplainerListItem.js.map +1 -1
- package/lib/ui/components/Fieldset.d.ts +5 -4
- package/lib/ui/components/Fieldset.d.ts.map +1 -1
- package/lib/ui/components/Fieldset.js +5 -3
- package/lib/ui/components/Fieldset.js.map +1 -1
- package/lib/ui/components/HeaderListItem.d.ts +5 -3
- package/lib/ui/components/HeaderListItem.d.ts.map +1 -1
- package/lib/ui/components/HeaderListItem.js +5 -3
- package/lib/ui/components/HeaderListItem.js.map +1 -1
- package/lib/ui/components/IconButton.d.ts +8 -7
- package/lib/ui/components/IconButton.d.ts.map +1 -1
- package/lib/ui/components/IconButton.js +23 -19
- package/lib/ui/components/IconButton.js.map +1 -1
- package/lib/ui/components/IconSettingsPanel.d.ts +5 -4
- package/lib/ui/components/IconSettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/IconSettingsPanel.js +4 -2
- package/lib/ui/components/IconSettingsPanel.js.map +1 -1
- package/lib/ui/components/Input.d.ts +5 -3
- package/lib/ui/components/Input.d.ts.map +1 -1
- package/lib/ui/components/Input.js +5 -3
- package/lib/ui/components/Input.js.map +1 -1
- package/lib/ui/components/LabelListItem.d.ts +10 -7
- package/lib/ui/components/LabelListItem.d.ts.map +1 -1
- package/lib/ui/components/LabelListItem.js +21 -10
- package/lib/ui/components/LabelListItem.js.map +1 -1
- package/lib/ui/components/ListItem.d.ts +8 -6
- package/lib/ui/components/ListItem.d.ts.map +1 -1
- package/lib/ui/components/ListItem.js +5 -3
- package/lib/ui/components/ListItem.js.map +1 -1
- package/lib/ui/components/OptionsListItem.d.ts +6 -6
- package/lib/ui/components/OptionsListItem.d.ts.map +1 -1
- package/lib/ui/components/OptionsListItem.js +17 -12
- package/lib/ui/components/OptionsListItem.js.map +1 -1
- package/lib/ui/components/Paragraph.d.ts +6 -2
- package/lib/ui/components/Paragraph.d.ts.map +1 -1
- package/lib/ui/components/Paragraph.js +5 -3
- package/lib/ui/components/Paragraph.js.map +1 -1
- package/lib/ui/components/RadioItem.d.ts +9 -8
- package/lib/ui/components/RadioItem.d.ts.map +1 -1
- package/lib/ui/components/RadioItem.js +13 -9
- package/lib/ui/components/RadioItem.js.map +1 -1
- package/lib/ui/components/SeasonsList.d.ts +7 -6
- package/lib/ui/components/SeasonsList.d.ts.map +1 -1
- package/lib/ui/components/SeasonsList.js +20 -13
- package/lib/ui/components/SeasonsList.js.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.d.ts +8 -8
- package/lib/ui/components/SettingLimitedListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.js +8 -9
- package/lib/ui/components/SettingLimitedListItem.js.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts +8 -7
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.js +13 -12
- package/lib/ui/components/SettingLimitedTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingListItem.d.ts +11 -12
- package/lib/ui/components/SettingListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingListItem.js +38 -38
- package/lib/ui/components/SettingListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxListItem.d.ts +8 -8
- package/lib/ui/components/SettingMaxListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxListItem.js +13 -11
- package/lib/ui/components/SettingMaxListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts +11 -8
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.js +21 -16
- package/lib/ui/components/SettingMaxTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.d.ts +9 -8
- package/lib/ui/components/SettingTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.js +16 -13
- package/lib/ui/components/SettingTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingsList.d.ts +12 -11
- package/lib/ui/components/SettingsList.d.ts.map +1 -1
- package/lib/ui/components/SettingsList.js +14 -16
- package/lib/ui/components/SettingsList.js.map +1 -1
- package/lib/ui/components/SettingsPanel.d.ts +9 -8
- package/lib/ui/components/SettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/SettingsPanel.js +10 -10
- package/lib/ui/components/SettingsPanel.js.map +1 -1
- package/lib/ui/components/TextButton.d.ts +7 -7
- package/lib/ui/components/TextButton.d.ts.map +1 -1
- package/lib/ui/components/TextButton.js +17 -13
- package/lib/ui/components/TextButton.js.map +1 -1
- package/lib/ui/components/ToolbarListItem.d.ts +6 -5
- package/lib/ui/components/ToolbarListItem.d.ts.map +1 -1
- package/lib/ui/components/ToolbarListItem.js +7 -12
- package/lib/ui/components/ToolbarListItem.js.map +1 -1
- package/lib/ui/components/UiComponent.d.ts +31 -19
- package/lib/ui/components/UiComponent.d.ts.map +1 -1
- package/lib/ui/components/UiComponent.js +84 -19
- package/lib/ui/components/UiComponent.js.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.d.ts +10 -9
- package/lib/ui/components/WorkshopCraftListItem.d.ts.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.js +20 -21
- package/lib/ui/components/WorkshopCraftListItem.js.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.d.ts +5 -3
- package/lib/ui/components/buttons/ConsumeButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.js +23 -30
- package/lib/ui/components/buttons/ConsumeButton.js.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.d.ts +6 -3
- package/lib/ui/components/buttons/ExpandoButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.js +20 -17
- package/lib/ui/components/buttons/ExpandoButton.js.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.d.ts +8 -8
- package/lib/ui/components/buttons/LimitedButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.js +27 -21
- package/lib/ui/components/buttons/LimitedButton.js.map +1 -1
- package/lib/ui/components/buttons/MaxButton.d.ts +5 -5
- package/lib/ui/components/buttons/MaxButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/MaxButton.js +5 -7
- package/lib/ui/components/buttons/MaxButton.js.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.d.ts +4 -2
- package/lib/ui/components/buttons/PaddingButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.js +5 -3
- package/lib/ui/components/buttons/PaddingButton.js.map +1 -1
- package/lib/ui/components/buttons/StockButton.d.ts +5 -3
- package/lib/ui/components/buttons/StockButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/StockButton.js +32 -40
- package/lib/ui/components/buttons/StockButton.js.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.d.ts +6 -6
- package/lib/ui/components/buttons/TriggerButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.js +16 -20
- package/lib/ui/components/buttons/TriggerButton.js.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.d.ts +6 -6
- package/lib/ui/components/buttons-text/BuyButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.js +23 -28
- package/lib/ui/components/buttons-text/BuyButton.js.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.d.ts +6 -6
- package/lib/ui/components/buttons-text/SellButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.js +23 -30
- package/lib/ui/components/buttons-text/SellButton.js.map +1 -1
- package/output/kitten-scientists.inject.js +7562 -7675
- package/package.json +7 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { TranslatedString } from "../../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
3
2
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
+
export type ExplainerListItemOptions<TKittenGameLiteral extends `$${string}`> = UiComponentOptions & ThisType<ExplainerListItem<TKittenGameLiteral>>;
|
|
4
4
|
export declare class ExplainerListItem<TKittenGameLiteral extends `$${string}`> extends UiComponent {
|
|
5
|
+
readonly options: ExplainerListItemOptions<TKittenGameLiteral>;
|
|
5
6
|
readonly element: JQuery;
|
|
6
7
|
/**
|
|
7
8
|
* Construct an element to explain an area of the UI.
|
|
@@ -11,6 +12,7 @@ export declare class ExplainerListItem<TKittenGameLiteral extends `$${string}`>
|
|
|
11
12
|
* @param key - The i18n key for the text to appear on the element.
|
|
12
13
|
* @param options - Options for this explainer.
|
|
13
14
|
*/
|
|
14
|
-
constructor(
|
|
15
|
+
constructor(parent: UiComponent, key: TranslatedString<TKittenGameLiteral>, options?: ExplainerListItemOptions<TKittenGameLiteral>);
|
|
16
|
+
toString(): string;
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=ExplainerListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplainerListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExplainerListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,wBAAwB,CAAC,kBAAkB,SAAS,IAAI,MAAM,EAAE,IAAI,kBAAkB,GAChG,QAAQ,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAElD,qBAAa,iBAAiB,CAAC,kBAAkB,SAAS,IAAI,MAAM,EAAE,CAAE,SAAQ,WAAW;IACzF,SAAiB,OAAO,EAAE,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;OAOG;gBAED,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,EACzC,OAAO,CAAC,EAAE,wBAAwB,CAAC,kBAAkB,CAAC;IASxD,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -10,11 +10,13 @@ export class ExplainerListItem extends UiComponent {
|
|
|
10
10
|
* @param key - The i18n key for the text to appear on the element.
|
|
11
11
|
* @param options - Options for this explainer.
|
|
12
12
|
*/
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
15
|
-
const element = $("<li/>", { text: host.engine.i18n(key) }).addClass(styles.explainer);
|
|
13
|
+
constructor(parent, key, options) {
|
|
14
|
+
super(parent, { ...options });
|
|
15
|
+
const element = $("<li/>", { text: parent.host.engine.i18n(key) }).addClass(styles.explainer);
|
|
16
16
|
this.element = element;
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
toString() {
|
|
19
|
+
return `[${ExplainerListItem.name}#${this.componentId}]`;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=ExplainerListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplainerListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExplainerListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAKxE,MAAM,OAAO,iBAA2D,SAAQ,WAAW;IAEhF,OAAO,CAAS;IAEzB;;;;;;;OAOG;IACH,YACE,MAAmB,EACnB,GAAyC,EACzC,OAAsD;QAEtD,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAE9F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,iBAAiB,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
-
export type FieldsetOptions = UiComponentOptions & {
|
|
4
|
-
readonly delimiter
|
|
2
|
+
export type FieldsetOptions = ThisType<Fieldset> & UiComponentOptions & {
|
|
3
|
+
readonly delimiter?: boolean;
|
|
5
4
|
};
|
|
6
5
|
export declare class Fieldset extends UiComponent {
|
|
6
|
+
readonly options: FieldsetOptions;
|
|
7
7
|
readonly element: JQuery;
|
|
8
8
|
/**
|
|
9
9
|
* Constructs a `Fieldset`.
|
|
@@ -12,6 +12,7 @@ export declare class Fieldset extends UiComponent {
|
|
|
12
12
|
* @param label The label on the fieldset.
|
|
13
13
|
* @param options Options for the fieldset.
|
|
14
14
|
*/
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(parent: UiComponent, label: string, options?: FieldsetOptions);
|
|
16
|
+
toString(): string;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=Fieldset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAC9C,kBAAkB,GAAG;IACnB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEJ,qBAAa,QAAS,SAAQ,WAAW;IACvC,SAAiB,OAAO,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;IAazE,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -11,8 +11,8 @@ export class Fieldset extends UiComponent {
|
|
|
11
11
|
* @param label The label on the fieldset.
|
|
12
12
|
* @param options Options for the fieldset.
|
|
13
13
|
*/
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
14
|
+
constructor(parent, label, options) {
|
|
15
|
+
super(parent, { ...options });
|
|
16
16
|
const element = $("<fieldset/>").addClass(styles.fieldset);
|
|
17
17
|
if (options?.delimiter) {
|
|
18
18
|
element.addClass(stylesDelimiter.delimiter);
|
|
@@ -20,7 +20,9 @@ export class Fieldset extends UiComponent {
|
|
|
20
20
|
const legend = $("<legend/>").text(label).addClass(stylesLabel.label);
|
|
21
21
|
element.append(legend);
|
|
22
22
|
this.element = element;
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
toString() {
|
|
25
|
+
return `[${Fieldset.name}#${this.componentId}]`;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.js","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Fieldset.js","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAOxE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAE9B,OAAO,CAAS;IAEzB;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,KAAa,EAAE,OAAyB;QACvE,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC3D,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC9C,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { ListItem, ListItemOptions } from "./ListItem.js";
|
|
3
2
|
import { UiComponent } from "./UiComponent.js";
|
|
4
|
-
export
|
|
3
|
+
export type HeaderListItemOptions = ThisType<HeaderListItem> & ListItemOptions;
|
|
4
|
+
export declare class HeaderListItem extends UiComponent implements ListItem {
|
|
5
|
+
readonly options: ListItemOptions;
|
|
5
6
|
readonly element: JQuery;
|
|
6
7
|
get elementLabel(): JQuery<HTMLElement>;
|
|
7
8
|
/**
|
|
@@ -12,6 +13,7 @@ export declare class HeaderListItem<TOptions extends ListItemOptions<UiComponent
|
|
|
12
13
|
* @param text The text to appear on the header element.
|
|
13
14
|
* @param options Options for the header.
|
|
14
15
|
*/
|
|
15
|
-
constructor(
|
|
16
|
+
constructor(parent: UiComponent, text: string, options?: ListItemOptions);
|
|
17
|
+
toString(): string;
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=HeaderListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC;AAE/E,qBAAa,cAAe,SAAQ,WAAY,YAAW,QAAQ;IACjE,SAAiB,OAAO,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,IAAI,YAAY,wBAEf;IAED;;;;;;;OAOG;gBACS,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;IAQxE,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -13,11 +13,13 @@ export class HeaderListItem extends UiComponent {
|
|
|
13
13
|
* @param text The text to appear on the header element.
|
|
14
14
|
* @param options Options for the header.
|
|
15
15
|
*/
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
16
|
+
constructor(parent, text, options) {
|
|
17
|
+
super(parent, { ...options });
|
|
18
18
|
const element = $("<li/>", { text }).addClass(styles.header);
|
|
19
19
|
this.element = element;
|
|
20
|
-
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `[${HeaderListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
//# sourceMappingURL=HeaderListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderListItem.js","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderListItem.js","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,6BAA6B,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/C,MAAM,OAAO,cAAe,SAAQ,WAAW;IAEpC,OAAO,CAAS;IACzB,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,MAAmB,EAAE,IAAY,EAAE,OAAyB;QACtE,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IACvF,CAAC;CACF"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
-
export type IconButtonOptions = UiComponentOptions & {
|
|
4
|
-
readonly readOnly
|
|
5
|
-
readonly inactive
|
|
2
|
+
export type IconButtonOptions = ThisType<IconButton> & UiComponentOptions & {
|
|
3
|
+
readonly readOnly?: boolean;
|
|
4
|
+
readonly inactive?: boolean;
|
|
5
|
+
readonly onClick: (event?: MouseEvent) => void | Promise<void>;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* A button that is visually represented through an SVG element.
|
|
9
9
|
*/
|
|
10
10
|
export declare class IconButton extends UiComponent {
|
|
11
|
+
readonly options: IconButtonOptions;
|
|
11
12
|
readonly element: JQuery;
|
|
12
13
|
readOnly: boolean;
|
|
13
14
|
inactive: boolean;
|
|
@@ -19,8 +20,8 @@ export declare class IconButton extends UiComponent {
|
|
|
19
20
|
* @param title The `title` of the element.
|
|
20
21
|
* @param options Options for the icon button.
|
|
21
22
|
*/
|
|
22
|
-
constructor(
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
constructor(parent: UiComponent, pathData: string, title: string, options?: IconButtonOptions);
|
|
24
|
+
toString(): string;
|
|
25
|
+
click(): void | Promise<void>;
|
|
25
26
|
}
|
|
26
27
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC,GAClD,kBAAkB,GAAG;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CAAC;AAEJ;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,SAAiB,OAAO,EAAE,iBAAiB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;OAOG;gBACS,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAkC7F,QAAQ,IAAI,MAAM;IAIlB,KAAK;CAON"}
|
|
@@ -15,40 +15,44 @@ export class IconButton extends UiComponent {
|
|
|
15
15
|
* @param title The `title` of the element.
|
|
16
16
|
* @param options Options for the icon button.
|
|
17
17
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
super(
|
|
18
|
+
constructor(parent, pathData, title, options) {
|
|
19
|
+
super(parent, {
|
|
20
|
+
...options,
|
|
21
|
+
onRefresh: () => {
|
|
22
|
+
if (this.readOnly) {
|
|
23
|
+
this.element.addClass(stylesButton.readonly);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.element.removeClass(stylesButton.readonly);
|
|
27
|
+
}
|
|
28
|
+
if (this.inactive) {
|
|
29
|
+
this.element.addClass(stylesButton.inactive);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.element.removeClass(stylesButton.inactive);
|
|
33
|
+
}
|
|
34
|
+
options?.onRefresh?.();
|
|
35
|
+
},
|
|
36
|
+
});
|
|
20
37
|
const element = $("<div/>", {
|
|
21
38
|
html: `<svg style="width: 18px; height: 18px;" viewBox="0 -960 960 960" fill="currentColor"><path d="${pathData}"/></svg>`,
|
|
22
39
|
title,
|
|
23
40
|
}).addClass(stylesButton.iconButton);
|
|
24
41
|
this.element = element;
|
|
25
|
-
this.addChildren(options?.children);
|
|
26
42
|
this.readOnly = options?.readOnly ?? false;
|
|
27
43
|
this.inactive = options?.inactive ?? false;
|
|
28
44
|
this.element.on("click", () => {
|
|
29
45
|
this.click();
|
|
30
46
|
});
|
|
31
47
|
}
|
|
48
|
+
toString() {
|
|
49
|
+
return `[${IconButton.name}#${this.componentId}]`;
|
|
50
|
+
}
|
|
32
51
|
click() {
|
|
33
52
|
if (this.readOnly) {
|
|
34
53
|
return;
|
|
35
54
|
}
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
refreshUi() {
|
|
39
|
-
super.refreshUi();
|
|
40
|
-
if (this.readOnly) {
|
|
41
|
-
this.element.addClass(stylesButton.readonly);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.element.removeClass(stylesButton.readonly);
|
|
45
|
-
}
|
|
46
|
-
if (this.inactive) {
|
|
47
|
-
this.element.addClass(stylesButton.inactive);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.element.removeClass(stylesButton.inactive);
|
|
51
|
-
}
|
|
55
|
+
return this.options?.onClick?.call(this);
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AASxE;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IAEhC,OAAO,CAAS;IACzB,QAAQ,CAAU;IAClB,QAAQ,CAAU;IAElB;;;;;;;OAOG;IACH,YAAY,MAAmB,EAAE,QAAgB,EAAE,KAAa,EAAE,OAA2B;QAC3F,KAAK,CAAC,MAAM,EAAE;YACZ,GAAG,OAAO;YACV,SAAS,EAAE,GAAG,EAAE;gBACd,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAC/C,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAClD,CAAC;gBAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAC/C,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAClD,CAAC;gBAED,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;YACzB,CAAC;SACF,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE;YAC1B,IAAI,EAAE,iGAAiG,QAAQ,WAAW;YAC1H,KAAK;SACN,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAErC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QAE3C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACpD,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { Setting } from "../../settings/Settings.js";
|
|
3
|
-
import { CollapsiblePanel, type
|
|
2
|
+
import { CollapsiblePanel, type CollapsiblePanelOptions } from "./CollapsiblePanel.js";
|
|
4
3
|
import { type LabelListItemOptions } from "./LabelListItem.js";
|
|
5
|
-
|
|
4
|
+
import type { UiComponent } from "./UiComponent.js";
|
|
5
|
+
export type IconSettingsPanelOptions = ThisType<IconSettingsPanel> & LabelListItemOptions & CollapsiblePanelOptions & {
|
|
6
6
|
/**
|
|
7
7
|
* When set to an SVG path, will be used as an icon on the panel.
|
|
8
8
|
*/
|
|
9
9
|
readonly icon: string;
|
|
10
10
|
};
|
|
11
11
|
export declare class IconSettingsPanel<TSetting extends Setting = Setting> extends CollapsiblePanel {
|
|
12
|
+
readonly options: IconSettingsPanelOptions;
|
|
12
13
|
readonly setting: TSetting;
|
|
13
14
|
/**
|
|
14
15
|
* Constructs a settings panel that can have an icon.
|
|
@@ -18,6 +19,6 @@ export declare class IconSettingsPanel<TSetting extends Setting = Setting> exten
|
|
|
18
19
|
* @param setting An setting for which this is the settings panel.
|
|
19
20
|
* @param options Options for the panel.
|
|
20
21
|
*/
|
|
21
|
-
constructor(
|
|
22
|
+
constructor(parent: UiComponent, label: string, setting: TSetting, options?: IconSettingsPanelOptions);
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=IconSettingsPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSettingsPanel.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"IconSettingsPanel.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAiB,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,GAChE,oBAAoB,GACpB,uBAAuB,GAAG;IACxB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEJ,qBAAa,iBAAiB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,gBAAgB;IACzF,SAAiB,OAAO,EAAE,wBAAwB,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAE3B;;;;;;;OAOG;gBAED,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,EACjB,OAAO,CAAC,EAAE,wBAAwB;CAarC"}
|
|
@@ -10,8 +10,10 @@ export class IconSettingsPanel extends CollapsiblePanel {
|
|
|
10
10
|
* @param setting An setting for which this is the settings panel.
|
|
11
11
|
* @param options Options for the panel.
|
|
12
12
|
*/
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
13
|
+
constructor(parent, label, setting, options) {
|
|
14
|
+
super(parent, new LabelListItem(parent, label, {
|
|
15
|
+
icon: options?.icon,
|
|
16
|
+
}), {
|
|
15
17
|
initiallyExpanded: options?.initiallyExpanded,
|
|
16
18
|
});
|
|
17
19
|
this.setting = setting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSettingsPanel.js","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconSettingsPanel.js","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAgC,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,aAAa,EAA6B,MAAM,oBAAoB,CAAC;AAY9E,MAAM,OAAO,iBAAsD,SAAQ,gBAAgB;IAEhF,OAAO,CAAW;IAE3B;;;;;;;OAOG;IACH,YACE,MAAmB,EACnB,KAAa,EACb,OAAiB,EACjB,OAAkC;QAElC,KAAK,CACH,MAAM,EACN,IAAI,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE;YAC/B,IAAI,EAAE,OAAO,EAAE,IAAI;SACpB,CAAC,EACF;YACE,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;SAC9C,CACF,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
-
export type InputOptions = UiComponentOptions & {
|
|
2
|
+
export type InputOptions = ThisType<Input> & UiComponentOptions & {
|
|
4
3
|
readonly onChange?: (value: string) => void;
|
|
5
4
|
readonly onEnter?: (currentValue: string) => void;
|
|
6
5
|
readonly onEscape?: (currentValue: string) => void;
|
|
7
6
|
readonly selected?: boolean;
|
|
8
7
|
readonly value?: string;
|
|
8
|
+
readonly classes?: Array<string>;
|
|
9
9
|
};
|
|
10
10
|
export declare class Input extends UiComponent {
|
|
11
|
+
readonly options: InputOptions;
|
|
11
12
|
readonly element: JQuery<HTMLInputElement>;
|
|
12
13
|
/**
|
|
13
14
|
* Constructs an input field.
|
|
@@ -16,6 +17,7 @@ export declare class Input extends UiComponent {
|
|
|
16
17
|
* @param label - The label on the input element.
|
|
17
18
|
* @param options - Options for the UI element.
|
|
18
19
|
*/
|
|
19
|
-
constructor(
|
|
20
|
+
constructor(parent: UiComponent, options?: InputOptions);
|
|
21
|
+
toString(): string;
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,GACxC,kBAAkB,GAAG;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AAEJ,qBAAa,KAAM,SAAQ,WAAW;IACpC,SAAiB,OAAO,EAAE,YAAY,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE3C;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY;IAkCvD,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -8,8 +8,8 @@ export class Input extends UiComponent {
|
|
|
8
8
|
* @param label - The label on the input element.
|
|
9
9
|
* @param options - Options for the UI element.
|
|
10
10
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
11
|
+
constructor(parent, options) {
|
|
12
|
+
super(parent, { ...options });
|
|
13
13
|
this.element = $('<input type="text"/>').addClass("ks-input");
|
|
14
14
|
for (const className of options?.classes ?? []) {
|
|
15
15
|
this.element.addClass(className);
|
|
@@ -34,7 +34,9 @@ export class Input extends UiComponent {
|
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
|
|
37
|
+
}
|
|
38
|
+
toString() {
|
|
39
|
+
return `[${Input.name}#${this.componentId}]`;
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAYxE,MAAM,OAAO,KAAM,SAAQ,WAAW;IAE3B,OAAO,CAA2B;IAE3C;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,OAAsB;QACrD,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAmB,sBAAsB,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAEhF,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,CAAC;QAED,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACxC,CAAC;QAED,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC;YACnC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAwB,EAAE,EAAE;YACpD,QAAQ,KAAK,CAAC,GAAG,EAAE,CAAC;gBAClB,KAAK,OAAO;oBACV,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC1C,MAAM;gBACR,KAAK,QAAQ;oBACX,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC3C,MAAM;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { Container } from "./Container.js";
|
|
3
2
|
import { ListItem, type ListItemOptions } from "./ListItem.js";
|
|
4
3
|
import type { UiComponent, UiComponentInterface } from "./UiComponent.js";
|
|
5
|
-
export type LabelListItemOptions
|
|
6
|
-
readonly childrenHead: Array<UiComponent>;
|
|
4
|
+
export type LabelListItemOptions = ThisType<LabelListItem> & ListItemOptions & {
|
|
7
5
|
/**
|
|
8
6
|
* When set to an SVG path, will be used as an icon on the label.
|
|
9
7
|
*/
|
|
10
|
-
readonly icon
|
|
8
|
+
readonly icon?: string;
|
|
11
9
|
/**
|
|
12
10
|
* Should an indicator be rendered in front of the element,
|
|
13
11
|
* to indicate that this is an upgrade of a prior setting?
|
|
14
12
|
*/
|
|
15
|
-
readonly upgradeIndicator
|
|
13
|
+
readonly upgradeIndicator?: boolean;
|
|
16
14
|
};
|
|
17
|
-
export declare class LabelListItem
|
|
15
|
+
export declare class LabelListItem extends ListItem {
|
|
16
|
+
readonly options: LabelListItemOptions;
|
|
18
17
|
readonly head: Container;
|
|
19
18
|
readonly elementLabel: JQuery;
|
|
20
19
|
/**
|
|
@@ -24,6 +23,10 @@ export declare class LabelListItem<TOptions extends LabelListItemOptions<UiCompo
|
|
|
24
23
|
* @param label The label on the setting element.
|
|
25
24
|
* @param options Options for the list item.
|
|
26
25
|
*/
|
|
27
|
-
constructor(
|
|
26
|
+
constructor(parent: UiComponent, label: string, options?: LabelListItemOptions);
|
|
27
|
+
toString(): string;
|
|
28
|
+
addChildHead(child: UiComponentInterface): this;
|
|
29
|
+
addChildrenHead(children?: Iterable<UiComponentInterface>): this;
|
|
30
|
+
requestRefresh(withChildren?: boolean, depth?: number): void;
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=LabelListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"LabelListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GACxD,eAAe,GAAG;IAChB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEJ,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAiB,OAAO,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB;IAsB9E,QAAQ,IAAI,MAAM;IAIlB,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IAI/C,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,IAAI;IAOhE,cAAc,CAAC,YAAY,UAAQ,EAAE,KAAK,SAAI;CAI/C"}
|
|
@@ -12,23 +12,17 @@ export class LabelListItem extends ListItem {
|
|
|
12
12
|
* @param label The label on the setting element.
|
|
13
13
|
* @param options Options for the list item.
|
|
14
14
|
*/
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
17
|
-
this.head = new Container(
|
|
15
|
+
constructor(parent, label, options) {
|
|
16
|
+
super(parent, options);
|
|
17
|
+
this.head = new Container(parent);
|
|
18
18
|
this.head.element.addClass(stylesListItem.head);
|
|
19
19
|
this.addChild(this.head);
|
|
20
20
|
this.elementLabel = $("<label/>", {
|
|
21
21
|
text: `${options?.upgradeIndicator === true ? "⮤ " : ""}${label}`,
|
|
22
22
|
})
|
|
23
23
|
.addClass(styles.label)
|
|
24
|
-
.addClass(stylesListItem.label)
|
|
25
|
-
.on("click", () => {
|
|
26
|
-
this.click();
|
|
27
|
-
});
|
|
24
|
+
.addClass(stylesListItem.label);
|
|
28
25
|
this.head.element.append(this.elementLabel);
|
|
29
|
-
for (const child of options?.childrenHead ?? []) {
|
|
30
|
-
this.head.addChild(child);
|
|
31
|
-
}
|
|
32
26
|
if (options?.icon) {
|
|
33
27
|
const iconElement = $("<div/>", {
|
|
34
28
|
html: `<svg style="width: 15px; height: 15px;" viewBox="0 -960 960 960" fill="currentColor"><path d="${options.icon}"/></svg>`,
|
|
@@ -36,5 +30,22 @@ export class LabelListItem extends ListItem {
|
|
|
36
30
|
this.elementLabel.prepend(iconElement);
|
|
37
31
|
}
|
|
38
32
|
}
|
|
33
|
+
toString() {
|
|
34
|
+
return `[${LabelListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
35
|
+
}
|
|
36
|
+
addChildHead(child) {
|
|
37
|
+
this.head.addChild(child);
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
addChildrenHead(children) {
|
|
41
|
+
for (const child of children ?? []) {
|
|
42
|
+
this.head.addChild(child);
|
|
43
|
+
}
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
requestRefresh(withChildren = false, depth = 0) {
|
|
47
|
+
super.requestRefresh(withChildren, depth);
|
|
48
|
+
this.head.requestRefresh(true, depth + 1);
|
|
49
|
+
}
|
|
39
50
|
}
|
|
40
51
|
//# sourceMappingURL=LabelListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelListItem.js","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabelListItem.js","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAwB,MAAM,eAAe,CAAC;AAC/D,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAiBnD,MAAM,OAAO,aAAc,SAAQ,QAAQ;IAEhC,IAAI,CAAY;IAChB,YAAY,CAAS;IAE9B;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,KAAa,EAAE,OAA8B;QAC5E,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAEvB,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,UAAU,EAAE;YAChC,IAAI,EAAE,GAAG,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE;SAClE,CAAC;aACC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;aACtB,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE5C,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;YAClB,MAAM,WAAW,GAAG,CAAC,CAAC,QAAQ,EAAE;gBAC9B,IAAI,EAAE,iGAAiG,OAAO,CAAC,IAAI,WAAW;aAC/H,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IACtF,CAAC;IAED,YAAY,CAAC,KAA2B;QACtC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,QAAyC;QACvD,KAAK,MAAM,KAAK,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,YAAY,GAAG,KAAK,EAAE,KAAK,GAAG,CAAC;QAC5C,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export type ListItemOptions<TChild extends UiComponentInterface = UiComponentInterface> = UiComponentOptions<TChild> & {
|
|
1
|
+
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
2
|
+
export type ListItemOptions = ThisType<ListItem> & UiComponentOptions & {
|
|
4
3
|
/**
|
|
5
4
|
* Should there be additional padding below this element?
|
|
6
5
|
*/
|
|
7
|
-
readonly delimiter
|
|
6
|
+
readonly delimiter?: boolean;
|
|
7
|
+
readonly classes?: Array<string>;
|
|
8
8
|
};
|
|
9
|
-
export declare class ListItem
|
|
9
|
+
export declare class ListItem extends UiComponent {
|
|
10
|
+
readonly options: ListItemOptions;
|
|
10
11
|
readonly element: JQuery;
|
|
11
12
|
/**
|
|
12
13
|
* Construct a new simple list item with only a container element.
|
|
@@ -14,6 +15,7 @@ export declare class ListItem<TOptions extends ListItemOptions<UiComponent> = Li
|
|
|
14
15
|
* @param host The userscript instance.
|
|
15
16
|
* @param options Options for the list item.
|
|
16
17
|
*/
|
|
17
|
-
constructor(
|
|
18
|
+
constructor(parent: UiComponent, options?: ListItemOptions);
|
|
19
|
+
toString(): string;
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAC9C,kBAAkB,GAAG;IACnB;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AAEJ,qBAAa,QAAS,SAAQ,WAAW;IACvC,SAAiB,OAAO,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,eAAe;IAc1D,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -8,8 +8,8 @@ export class ListItem extends UiComponent {
|
|
|
8
8
|
* @param host The userscript instance.
|
|
9
9
|
* @param options Options for the list item.
|
|
10
10
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
11
|
+
constructor(parent, options) {
|
|
12
|
+
super(parent, { ...options });
|
|
13
13
|
this.element = $("<li/>");
|
|
14
14
|
for (const className of options?.classes ?? []) {
|
|
15
15
|
this.element.addClass(className);
|
|
@@ -17,7 +17,9 @@ export class ListItem extends UiComponent {
|
|
|
17
17
|
if (options?.delimiter === true) {
|
|
18
18
|
this.element.addClass(stylesDelimiter.delimiter);
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `[${ListItem.name}#${this.componentId}]`;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAWxE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAE9B,OAAO,CAAS;IAEzB;;;;;OAKG;IACH,YAAY,MAAmB,EAAE,OAAyB;QACxD,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAE1B,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,EAAE,SAAS,KAAK,IAAI,EAAE,CAAC;YAChC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAClD,CAAC;CACF"}
|