diff --git a/.histoire/dist/histoire.json b/.histoire/dist/histoire.json index 6f7df4d..aa0d89d 100644 --- a/.histoire/dist/histoire.json +++ b/.histoire/dist/histoire.json @@ -153,6 +153,119 @@ ], "virtual": false, "markdownFile": null + }, + { + "id": "src-routes-export-print-printship-index-story-svelte", + "title": "PrintShip", + "group": null, + "layout": { + "type": "single", + "iframe": true + }, + "icon": null, + "iconColor": null, + "docsOnly": false, + "variants": [ + { + "id": "_default", + "title": "default" + } + ], + "relativePath": "src/routes/export/print/PrintShip/index.story.svelte", + "supportPluginId": "svelte3", + "treePath": [ + "Export", + "PrintShip" + ], + "virtual": false, + "markdownFile": null + }, + { + "id": "src-routes-export-print-printship-armor-index-story-svelte", + "title": "Armor", + "group": null, + "layout": { + "type": "single", + "iframe": true + }, + "icon": null, + "iconColor": null, + "docsOnly": false, + "variants": [ + { + "id": "src-routes-export-print-printship-armor-index-story-svelte-0", + "title": "untitled", + "icon": null, + "iconColor": null + } + ], + "relativePath": "src/routes/export/print/PrintShip/Armor/index.story.svelte", + "supportPluginId": "svelte3", + "treePath": [ + "Export", + "PrintShip", + "Armor" + ], + "virtual": false, + "markdownFile": null + }, + { + "id": "src-routes-export-print-printship-hull-index-story-svelte", + "title": "Hull", + "group": null, + "layout": { + "type": "single", + "iframe": true + }, + "icon": null, + "iconColor": null, + "docsOnly": false, + "variants": [ + { + "id": "src-routes-export-print-printship-hull-index-story-svelte-0", + "title": "untitled", + "icon": null, + "iconColor": null + } + ], + "relativePath": "src/routes/export/print/PrintShip/Hull/index.story.svelte", + "supportPluginId": "svelte3", + "treePath": [ + "Export", + "PrintShip", + "Hull" + ], + "virtual": false, + "markdownFile": null + }, + { + "id": "src-routes-export-print-printship-screens-index-story-svelte", + "title": "Screens", + "group": null, + "layout": { + "type": "single", + "iframe": true + }, + "icon": null, + "iconColor": null, + "docsOnly": false, + "variants": [ + { + "id": "src-routes-export-print-printship-screens-index-story-svelte-0", + "title": "untitled", + "icon": null, + "iconColor": null + } + ], + "relativePath": "src/routes/export/print/PrintShip/Screens/index.story.svelte", + "supportPluginId": "svelte3", + "treePath": [ + "Export", + "PrintShip", + "Screens" + ], + "virtual": false, + "markdownFile": null } ], "markdownFiles": [] diff --git a/.histoire/screenshots/src-lib-components-costmass-index-story-svelte-_default-1280x800.png b/.histoire/screenshots/src-lib-components-costmass-index-story-svelte-_default-1280x800.png index 1773dfc..16820fb 100644 Binary files a/.histoire/screenshots/src-lib-components-costmass-index-story-svelte-_default-1280x800.png and b/.histoire/screenshots/src-lib-components-costmass-index-story-svelte-_default-1280x800.png differ diff --git a/.histoire/screenshots/src-lib-components-shipedit-identification-story-svelte-_default-1280x800.png b/.histoire/screenshots/src-lib-components-shipedit-identification-story-svelte-_default-1280x800.png index 8b561f2..a976754 100644 Binary files a/.histoire/screenshots/src-lib-components-shipedit-identification-story-svelte-_default-1280x800.png and b/.histoire/screenshots/src-lib-components-shipedit-identification-story-svelte-_default-1280x800.png differ diff --git a/.histoire/screenshots/src-routes-export-print-printship-armor-index-story-svelte-src-routes-export-print-printship-armor-index-story-svelte-0-1280x800.png b/.histoire/screenshots/src-routes-export-print-printship-armor-index-story-svelte-src-routes-export-print-printship-armor-index-story-svelte-0-1280x800.png new file mode 100644 index 0000000..120f122 Binary files /dev/null and b/.histoire/screenshots/src-routes-export-print-printship-armor-index-story-svelte-src-routes-export-print-printship-armor-index-story-svelte-0-1280x800.png differ diff --git a/.histoire/screenshots/src-routes-export-print-printship-hull-index-story-svelte-src-routes-export-print-printship-hull-index-story-svelte-0-1280x800.png b/.histoire/screenshots/src-routes-export-print-printship-hull-index-story-svelte-src-routes-export-print-printship-hull-index-story-svelte-0-1280x800.png new file mode 100644 index 0000000..28bd9c4 Binary files /dev/null and b/.histoire/screenshots/src-routes-export-print-printship-hull-index-story-svelte-src-routes-export-print-printship-hull-index-story-svelte-0-1280x800.png differ diff --git a/.histoire/screenshots/src-routes-export-print-printship-index-story-svelte-_default-1280x800.png b/.histoire/screenshots/src-routes-export-print-printship-index-story-svelte-_default-1280x800.png new file mode 100644 index 0000000..9ee9cf8 Binary files /dev/null and b/.histoire/screenshots/src-routes-export-print-printship-index-story-svelte-_default-1280x800.png differ diff --git a/.histoire/screenshots/src-routes-export-print-printship-screens-index-story-svelte-src-routes-export-print-printship-screens-index-story-svelte-0-1280x800.png b/.histoire/screenshots/src-routes-export-print-printship-screens-index-story-svelte-src-routes-export-print-printship-screens-index-story-svelte-0-1280x800.png new file mode 100644 index 0000000..af2cbe4 Binary files /dev/null and b/.histoire/screenshots/src-routes-export-print-printship-screens-index-story-svelte-src-routes-export-print-printship-screens-index-story-svelte-0-1280x800.png differ diff --git a/package.json b/package.json index d4c882e..1999381 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@histoire/plugin-screenshot": "^0.16.1", "@histoire/plugin-svelte": "^0.16.1", "@sveltejs/adapter-static": "^2.0.2", - "@sveltejs/kit": "^1.15.8", + "@sveltejs/kit": "^1.15.9", "@sveltejs/vite-plugin-svelte": "^2.1.1", "@testing-library/svelte": "^3.2.2", "@testing-library/user-event": "^14.4.3", @@ -46,7 +46,7 @@ "svelte-copy-clipboard-action": "^0.0.3", "svelte-moveable": "^0.38.1", "updux": "link:../../updux", - "vite": "^4.3.2", + "vite": "^4.3.3", "yaml": "^2.2.2" }, "prettier": { diff --git a/src/lib/components/Output/Print/Hull/Armour.stories.svelte.todo b/src/lib/components/Output/Print/Hull/Armour.stories.svelte.todo deleted file mode 100644 index a4fe341..0000000 --- a/src/lib/components/Output/Print/Hull/Armour.stories.svelte.todo +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte.todo b/src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte.todo deleted file mode 100644 index c855685..0000000 --- a/src/lib/components/Output/Print/Hull/Integrity/Integrity.stories.svelte.todo +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/src/lib/components/Output/Print/Hull/Integrity/index.svelte b/src/lib/components/Output/Print/Hull/Integrity/index.svelte deleted file mode 100644 index 4aa042f..0000000 --- a/src/lib/components/Output/Print/Hull/Integrity/index.svelte +++ /dev/null @@ -1,83 +0,0 @@ -
{ - ship.dispatch.setUITransform({ system: "hull", translate }); - }} - style:transform={hull?.uiTransform} -> - {#each rows as row, i (i)} -
- {#each row as threshold, j (j)} -
- {#if threshold} - crew loss threshold - {/if} -
- {/each} -
- {/each} -
- - - - diff --git a/src/lib/components/Output/Print/Hull/Integrity/stories.js.todo b/src/lib/components/Output/Print/Hull/Integrity/stories.js.todo deleted file mode 100644 index bef2dab..0000000 --- a/src/lib/components/Output/Print/Hull/Integrity/stories.js.todo +++ /dev/null @@ -1,23 +0,0 @@ -import Component from "."; - -export default { - title: "printouts/hull/integrity", -}; - -export const basic = () => ({ - Component, - props: { - ship_mass: 50, - rating: 14, - advanced: false, - }, -}); - -export const advanced = () => ({ - Component, - props: { - ship_mass: 50, - rating: 14, - advanced: true, - }, -}); diff --git a/src/lib/components/Output/Print/Hull/index.svelte b/src/lib/components/Output/Print/Hull/index.svelte deleted file mode 100644 index 681608f..0000000 --- a/src/lib/components/Output/Print/Hull/index.svelte +++ /dev/null @@ -1,19 +0,0 @@ -
- - -
- - diff --git a/src/lib/components/ShipEdit/Identification.svelte b/src/lib/components/ShipEdit/Identification.svelte index 5ca8fbf..fe354be 100644 --- a/src/lib/components/ShipEdit/Identification.svelte +++ b/src/lib/components/ShipEdit/Identification.svelte @@ -34,8 +34,6 @@ export let isCarrier = false; export let reqs = {}; - $: console.log("in the comp", isCarrier, shipClass); - export let api = getContext("api"); $: shipTypes = candidateShipTypes(reqs.mass, isCarrier).map( diff --git a/src/lib/components/ShipEdit/Weaponry.svelte b/src/lib/components/ShipEdit/Weaponry.svelte index 6ff4423..7e3dec6 100644 --- a/src/lib/components/ShipEdit/Weaponry.svelte +++ b/src/lib/components/ShipEdit/Weaponry.svelte @@ -29,6 +29,3 @@ export let weapons = []; - - diff --git a/src/routes/export/print/PrintShip/Armor/index.story.svelte b/src/routes/export/print/PrintShip/Armor/index.story.svelte new file mode 100644 index 0000000..5682b95 --- /dev/null +++ b/src/routes/export/print/PrintShip/Armor/index.story.svelte @@ -0,0 +1,13 @@ + + + + + + + diff --git a/src/lib/components/Output/Print/Hull/Armor.svelte b/src/routes/export/print/PrintShip/Armor/index.svelte similarity index 71% rename from src/lib/components/Output/Print/Hull/Armor.svelte rename to src/routes/export/print/PrintShip/Armor/index.svelte index e2b4c63..0afcfae 100644 --- a/src/lib/components/Output/Print/Hull/Armor.svelte +++ b/src/routes/export/print/PrintShip/Armor/index.svelte @@ -1,7 +1,7 @@
- {#each armor as layer,i (i)} + {#each layers as layer, i (i)}
- {#each Array.from({length: layer}) as j} + {#each Array.from({ length: layer }) as j}
{/each}
@@ -9,11 +9,7 @@
diff --git a/src/routes/export/print/PrintShip/Hull/index.svelte b/src/routes/export/print/PrintShip/Hull/index.svelte index 1da5781..43b2f36 100644 --- a/src/routes/export/print/PrintShip/Hull/index.svelte +++ b/src/routes/export/print/PrintShip/Hull/index.svelte @@ -1,6 +1,6 @@
{#each rows as row, i (i)} -
+
{#each row as threshold, j (j)}
{#if threshold} @@ -50,7 +50,7 @@ diff --git a/src/routes/export/print/PrintShip/index.story.svelte b/src/routes/export/print/PrintShip/index.story.svelte index e70d2da..037357f 100644 --- a/src/routes/export/print/PrintShip/index.story.svelte +++ b/src/routes/export/print/PrintShip/index.story.svelte @@ -35,7 +35,7 @@ }, }, hull: { - rating: 0, + rating: 10, min: 1, max: 10, reqs: { @@ -44,8 +44,8 @@ }, }, screens: { - standard: 0, - advanced: 0, + standard: 2, + advanced: 1, reqs: { cost: 0, mass: 0, @@ -56,7 +56,7 @@ cost: 0, mass: 0, }, - layers: [], + layers: [3, 2], }, carrier: { nbrBays: 0, diff --git a/src/routes/export/print/PrintShip/index.svelte b/src/routes/export/print/PrintShip/index.svelte index 2ad85cf..bcdacaf 100644 --- a/src/routes/export/print/PrintShip/index.svelte +++ b/src/routes/export/print/PrintShip/index.svelte @@ -3,11 +3,20 @@ @@ -16,10 +25,14 @@ import Identification from "./Identification.svelte"; import MainSystems from "./MainSystems/index.svelte"; import Hull from "./Hull/index.svelte"; + import Armor from "./Armor/index.svelte"; + import Screens from "./Screens/index.svelte"; export let identification = {}; export let propulsion = {}; export let structure = {}; + + $: screens = structure?.screens ?? {};