diff --git a/histoire.config.js b/histoire.config.js new file mode 100644 index 0000000..0427fca --- /dev/null +++ b/histoire.config.js @@ -0,0 +1,6 @@ +import { defineConfig } from "histoire"; +import { HstSvelte } from "@histoire/plugin-svelte"; + +export default defineConfig({ + plugins: [HstSvelte()], +}); diff --git a/package.json b/package.json index ea1eb2c..28c710f 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "format": "prettier --write ." }, "devDependencies": { + "@histoire/plugin-svelte": "^0.15.9", "@sveltejs/adapter-static": "^1.0.0-next.28", "@sveltejs/kit": "^1.10.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.38", @@ -28,11 +29,13 @@ "vitest-svelte-kit": "^0.0.6" }, "dependencies": { + "@picocss/pico": "^1.5.7", "@reduxjs/toolkit": "^1.9.3", "@sveltejs/adapter-node": "^1.0.0-next.0", "@yanick/updeep-remeda": "^2.1.0", "chota": "^0.8.0", "effector": "^22.5.2", + "histoire": "^0.15.9", "lodash": "^4.17.21", "redux": "^4.1.2", "remeda": "^1.1.0", diff --git a/src/lib/components/Carrier/Carrier.story.svelte b/src/lib/components/Carrier/Carrier.story.svelte.todo similarity index 100% rename from src/lib/components/Carrier/Carrier.story.svelte rename to src/lib/components/Carrier/Carrier.story.svelte.todo diff --git a/src/lib/components/Carrier/stories.js b/src/lib/components/Carrier/stories.js.todo similarity index 100% rename from src/lib/components/Carrier/stories.js rename to src/lib/components/Carrier/stories.js.todo diff --git a/src/lib/components/Changelog.stories.svelte b/src/lib/components/Changelog.stories.svelte.todo similarity index 100% rename from src/lib/components/Changelog.stories.svelte rename to src/lib/components/Changelog.stories.svelte.todo diff --git a/src/lib/components/Cost.story.svelte b/src/lib/components/Cost.story.svelte.todo similarity index 100% rename from src/lib/components/Cost.story.svelte rename to src/lib/components/Cost.story.svelte.todo diff --git a/src/lib/components/CostMass/index.story.svelte b/src/lib/components/CostMass/index.story.svelte new file mode 100644 index 0000000..a8ed7e8 --- /dev/null +++ b/src/lib/components/CostMass/index.story.svelte @@ -0,0 +1,9 @@ + + + + + diff --git a/src/lib/components/CostMass.svelte b/src/lib/components/CostMass/index.svelte similarity index 76% rename from src/lib/components/CostMass.svelte rename to src/lib/components/CostMass/index.svelte index f00e986..024aaf6 100644 --- a/src/lib/components/CostMass.svelte +++ b/src/lib/components/CostMass/index.svelte @@ -1,8 +1,8 @@ -
{mass}mass
+
{mass}mass
{cost}
diff --git a/src/lib/components/Field/stories.js b/src/lib/components/Field/stories.js.todo similarity index 100% rename from src/lib/components/Field/stories.js rename to src/lib/components/Field/stories.js.todo diff --git a/src/lib/components/Ftl/stories.js b/src/lib/components/Ftl/stories.js.todo similarity index 100% rename from src/lib/components/Ftl/stories.js rename to src/lib/components/Ftl/stories.js.todo diff --git a/src/lib/components/Output/Print/Hull/Armour.stories.svelte b/src/lib/components/Output/Print/Hull/Armour.stories.svelte.todo similarity index 100% rename from src/lib/components/Output/Print/Hull/Armour.stories.svelte rename to src/lib/components/Output/Print/Hull/Armour.stories.svelte.todo diff --git a/src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte b/src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte.todo similarity index 100% rename from src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte rename to src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte.todo diff --git a/src/lib/components/Output/Print/Hull/Integrity/stories.js b/src/lib/components/Output/Print/Hull/Integrity/stories.js.todo similarity index 100% rename from src/lib/components/Output/Print/Hull/Integrity/stories.js rename to src/lib/components/Output/Print/Hull/Integrity/stories.js.todo diff --git a/src/lib/components/Output/Print/MainSystems/stories.js b/src/lib/components/Output/Print/MainSystems/stories.js.todo similarity index 100% rename from src/lib/components/Output/Print/MainSystems/stories.js rename to src/lib/components/Output/Print/MainSystems/stories.js.todo diff --git a/src/lib/components/Output/Print/Print.stories.svelte b/src/lib/components/Output/Print/Print.stories.svelte.todo similarity index 100% rename from src/lib/components/Output/Print/Print.stories.svelte rename to src/lib/components/Output/Print/Print.stories.svelte.todo diff --git a/src/lib/components/Output/Print/Systems/Firecons/Firecons.stories.svelte b/src/lib/components/Output/Print/Systems/Firecons/Firecons.stories.svelte.todo similarity index 100% rename from src/lib/components/Output/Print/Systems/Firecons/Firecons.stories.svelte rename to src/lib/components/Output/Print/Systems/Firecons/Firecons.stories.svelte.todo diff --git a/src/lib/components/Output/Print/Systems/Screens/Screens.stories.svelte b/src/lib/components/Output/Print/Systems/Screens/Screens.stories.svelte.todo similarity index 100% rename from src/lib/components/Output/Print/Systems/Screens/Screens.stories.svelte rename to src/lib/components/Output/Print/Systems/Screens/Screens.stories.svelte.todo diff --git a/src/lib/components/Output/Print/Weapons/stories.js b/src/lib/components/Output/Print/Weapons/stories.js.todo similarity index 100% rename from src/lib/components/Output/Print/Weapons/stories.js rename to src/lib/components/Output/Print/Weapons/stories.js.todo diff --git a/src/lib/components/ShipEdit/Carrier/Carrier.stories.svelte b/src/lib/components/ShipEdit/Carrier/Carrier.stories.svelte.todo similarity index 100% rename from src/lib/components/ShipEdit/Carrier/Carrier.stories.svelte rename to src/lib/components/ShipEdit/Carrier/Carrier.stories.svelte.todo diff --git a/src/lib/components/ShipEdit/Identification/Identification.stories.svelte b/src/lib/components/ShipEdit/Identification/Identification.stories.svelte.todo similarity index 100% rename from src/lib/components/ShipEdit/Identification/Identification.stories.svelte rename to src/lib/components/ShipEdit/Identification/Identification.stories.svelte.todo diff --git a/src/lib/components/ShipEdit/Identification/index.svelte b/src/lib/components/ShipEdit/Identification/index.svelte index 6d79133..d9abc10 100644 --- a/src/lib/components/ShipEdit/Identification/index.svelte +++ b/src/lib/components/ShipEdit/Identification/index.svelte @@ -27,8 +27,8 @@ $: if (shipTypes.length > 0 && !shipTypes.includes(shipType)) shipType = shipTypes[0]; - $: ship.dispatch.setShipType(shipType); - $: ship.dispatch.setShipClass(shipClass); + $: ship.dispatch(ship.actions.setShipType(shipType)); + $: ship.dispatch(ship.actions.setShipClass(shipClass)); diff --git a/src/lib/components/ShipEdit/ShipEdit.stories.svelte b/src/lib/components/ShipEdit/ShipEdit.stories.svelte.todo similarity index 100% rename from src/lib/components/ShipEdit/ShipEdit.stories.svelte rename to src/lib/components/ShipEdit/ShipEdit.stories.svelte.todo diff --git a/src/lib/components/ShipEdit/Weaponry/Weaponry.stories.svelte b/src/lib/components/ShipEdit/Weaponry/Weaponry.stories.svelte.todo similarity index 100% rename from src/lib/components/ShipEdit/Weaponry/Weaponry.stories.svelte rename to src/lib/components/ShipEdit/Weaponry/Weaponry.stories.svelte.todo diff --git a/src/lib/components/ShipItem.story.svelte b/src/lib/components/ShipItem.story.svelte new file mode 100644 index 0000000..4b18500 --- /dev/null +++ b/src/lib/components/ShipItem.story.svelte @@ -0,0 +1,14 @@ + + Thingy + + + + + + + diff --git a/src/lib/components/ShipItem/index.svelte b/src/lib/components/ShipItem.svelte similarity index 90% rename from src/lib/components/ShipItem/index.svelte rename to src/lib/components/ShipItem.svelte index f5fdce4..61a2194 100644 --- a/src/lib/components/ShipItem/index.svelte +++ b/src/lib/components/ShipItem.svelte @@ -2,14 +2,15 @@
-
{mass} mass
+
+ {mass} mass +
{cost}