react-justified-layout-ts 1.1.5 → 1.1.7
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/dist/components/TSJustifiedLayout/TSJustifiedLayout.js +10 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/stories/ConfiguredJustifiedLayout.d.ts +1 -1
- package/dist/stories/ConfiguredJustifiedLayout.js +2 -161
- package/dist/stories/JustifiedLayout.stories.d.ts +3 -2
- package/dist/stories/JustifiedLayout.stories.js +178 -3
- package/package.json +1 -1
|
@@ -85,18 +85,22 @@ function TSJustifiedLayout({ children, layoutItems, itemSpacing = 10, rowSpacing
|
|
|
85
85
|
let childNodeCounter = -1;
|
|
86
86
|
/**
|
|
87
87
|
* Clone the children element, and inject the height of the element as a prop
|
|
88
|
-
* @param isLast If the element belongs to the last row, and therefore should use height instead of flex
|
|
89
88
|
*/
|
|
90
|
-
function renderChildren(
|
|
89
|
+
function renderChildren() {
|
|
91
90
|
childNodeCounter++;
|
|
92
|
-
return (0, react_1.cloneElement)(children[childNodeCounter], Object.assign(Object.assign({}, children[childNodeCounter].props), { style: Object.assign(Object.assign(
|
|
91
|
+
return (0, react_1.cloneElement)(children[childNodeCounter], Object.assign(Object.assign({}, children[childNodeCounter].props), { style: Object.assign(Object.assign({}, children[childNodeCounter].props.style), { maxWidth: '100%' }) }));
|
|
93
92
|
}
|
|
94
93
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
95
|
-
react_1.default.createElement("div", { style: { width: "100%" } }),
|
|
96
94
|
react_1.default.createElement("div", { style: { width: "100%" } }, rows.map((value, index, array) => {
|
|
97
95
|
let isLastRow = index === array.length - 1 && showWidows;
|
|
98
|
-
return react_1.default.createElement("div", { style:
|
|
99
|
-
|
|
96
|
+
return react_1.default.createElement("div", { style: {
|
|
97
|
+
display: "flex",
|
|
98
|
+
flexDirection: "row",
|
|
99
|
+
gap: itemSpacing,
|
|
100
|
+
marginBottom: rowSpacing,
|
|
101
|
+
aspectRatio: width / value.height
|
|
102
|
+
} }, value.items.map((aspectRatio) => {
|
|
103
|
+
return react_1.default.createElement("div", { style: isLastRow ? { aspectRatio: aspectRatio } : { flex: aspectRatio } }, renderChildren());
|
|
100
104
|
}));
|
|
101
105
|
}))));
|
|
102
106
|
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TSJustifiedLayout } from "./components/TSJustifiedLayout/TSJustifiedLayout";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TSJustifiedLayout = void 0;
|
|
4
|
+
var TSJustifiedLayout_1 = require("./components/TSJustifiedLayout/TSJustifiedLayout");
|
|
5
|
+
Object.defineProperty(exports, "TSJustifiedLayout", { enumerable: true, get: function () { return TSJustifiedLayout_1.TSJustifiedLayout; } });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TSJustifiedLayoutProps } from "../components/TSJustifiedLayout/TSJustifiedLayout";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export declare const ConfiguredJustifiedLayout: ({ layoutItems, rowSpacing, width, itemSpacing, targetRowHeight, targetRowHeightTolerance, showWidows, ...props }: TSJustifiedLayoutProps) => React.JSX.Element;
|
|
3
|
+
export declare const ConfiguredJustifiedLayout: ({ layoutItems, rowSpacing, width, itemSpacing, targetRowHeight, targetRowHeightTolerance, showWidows, children, ...props }: TSJustifiedLayoutProps) => React.JSX.Element;
|
|
@@ -17,167 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.ConfiguredJustifiedLayout = void 0;
|
|
18
18
|
const TSJustifiedLayout_1 = require("../components/TSJustifiedLayout/TSJustifiedLayout");
|
|
19
19
|
const react_1 = __importDefault(require("react"));
|
|
20
|
-
const displayedImages = [
|
|
21
|
-
{
|
|
22
|
-
"title": "Castor Evolved",
|
|
23
|
-
"artist": "@TOOMIRO",
|
|
24
|
-
"tags": [
|
|
25
|
-
"Castor",
|
|
26
|
-
"Featured"
|
|
27
|
-
],
|
|
28
|
-
"href": "https://x.com/FaintAlcor/status/1749579348045111636?s=20",
|
|
29
|
-
"published": "2024-01-22",
|
|
30
|
-
"aspectRatio": 1.48,
|
|
31
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/castor_evolved.webp",
|
|
32
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/castor_evolved.png",
|
|
33
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/castor_evolved.png"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"title": "Techwear Ninja v2",
|
|
37
|
-
"artist": "@edadrz",
|
|
38
|
-
"tags": [
|
|
39
|
-
"Rastaban Form",
|
|
40
|
-
"Techwear",
|
|
41
|
-
"Hibernal Assassin"
|
|
42
|
-
],
|
|
43
|
-
"href": "https://x.com/edadrz2/status/1750189393833517203?s=20",
|
|
44
|
-
"published": "2024-01-24",
|
|
45
|
-
"aspectRatio": 0.7857142857142857,
|
|
46
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/techwear_ninja_v2.webp",
|
|
47
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/techwear_ninja_v2.png",
|
|
48
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/techwear_ninja_v2.png"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"title": "Glimmer on the Shore",
|
|
52
|
-
"artist": "@SiN_remyheart",
|
|
53
|
-
"tags": [
|
|
54
|
-
"Jupiter Form",
|
|
55
|
-
"Featured"
|
|
56
|
-
],
|
|
57
|
-
"href": "https://x.com/SiN_remyheart/status/1750043825161244678?s=20",
|
|
58
|
-
"published": "2024-01-24",
|
|
59
|
-
"aspectRatio": 1.15625,
|
|
60
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/glimmer_on_the_shore.webp",
|
|
61
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/glimmer_on_the_shore.png",
|
|
62
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/glimmer_on_the_shore.png"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"title": "Farmer Sketch",
|
|
66
|
-
"artist": "@KuroPenguinEx",
|
|
67
|
-
"tags": [
|
|
68
|
-
"Aquarius Form"
|
|
69
|
-
],
|
|
70
|
-
"href": "https://x.com/FaintAlcor/status/1751444972904063414?s=20",
|
|
71
|
-
"published": "2024-01-27",
|
|
72
|
-
"aspectRatio": 0.7069555302166477,
|
|
73
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/farmer_sketch.webp",
|
|
74
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/farmer_sketch.webp%7D",
|
|
75
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/farmer_sketch.png"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"parent": "Farmer Sketch",
|
|
79
|
-
"tags": [
|
|
80
|
-
"Aquarius Form"
|
|
81
|
-
],
|
|
82
|
-
"href": "",
|
|
83
|
-
"aspectRatio": 0.7069555302166477,
|
|
84
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/farmer_sketch/0.webp",
|
|
85
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/farmer_sketch/0.webp",
|
|
86
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/farmer_sketch/0.png"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"title": "My Room",
|
|
90
|
-
"artist": "@ito_44_3",
|
|
91
|
-
"tags": [
|
|
92
|
-
"Thuban Form"
|
|
93
|
-
],
|
|
94
|
-
"href": "https://x.com/ito_44_3/status/1759850276633419776?s=20",
|
|
95
|
-
"published": "2024-02-02",
|
|
96
|
-
"aspectRatio": 1.4166666666666667,
|
|
97
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/my_room.webp",
|
|
98
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/my_room.webp",
|
|
99
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/my_room.png"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"title": "Triangulum Combat Suit",
|
|
103
|
-
"artist": "@neumokun",
|
|
104
|
-
"tags": [
|
|
105
|
-
"Triangulum Form"
|
|
106
|
-
],
|
|
107
|
-
"href": "https://bsky.app/profile/neumokun.bsky.social/post/3klncrgkl5z24",
|
|
108
|
-
"published": "2024-02-17",
|
|
109
|
-
"aspectRatio": 0.7501875468867217,
|
|
110
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/triangulum_combat_suit.webp",
|
|
111
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/triangulum_combat_suit.webp",
|
|
112
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/triangulum_combat_suit.png"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"tags": [
|
|
116
|
-
"Eclipse Deity"
|
|
117
|
-
],
|
|
118
|
-
"href": "",
|
|
119
|
-
"aspectRatio": 0.8243310619910255,
|
|
120
|
-
"parent": "Eclipse Deity v3",
|
|
121
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/eclipse_deity_v3/0.webp",
|
|
122
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/eclipse_deity_v3/0.webp",
|
|
123
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/eclipse_deity_v3/0.png"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"title": "Biogenesis Suit Design",
|
|
127
|
-
"artist": "@EmberWickArt",
|
|
128
|
-
"tags": [
|
|
129
|
-
"Superhero",
|
|
130
|
-
"Bodysuit"
|
|
131
|
-
],
|
|
132
|
-
"href": "https://x.com/EmberWickArt/status/1795127025331577256",
|
|
133
|
-
"published": "2024-05-27",
|
|
134
|
-
"aspectRatio": 1.0115606936416186,
|
|
135
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/biogenesis_suit_design.webp",
|
|
136
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/biogenesis_suit_design.webp",
|
|
137
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/biogenesis_suit_design.png"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"title": "Alan and Alcor",
|
|
141
|
-
"artist": "@kongzorim",
|
|
142
|
-
"tags": [
|
|
143
|
-
"Aldhibah Form",
|
|
144
|
-
"Rastaban Form",
|
|
145
|
-
"Standard Outfit"
|
|
146
|
-
],
|
|
147
|
-
"href": "https://x.com/kongzorim/status/1795818089080385818",
|
|
148
|
-
"published": "2024-05-29",
|
|
149
|
-
"aspectRatio": 0.7056150600454398,
|
|
150
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/alan_and_alcor.webp",
|
|
151
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/alan_and_alcor.webp",
|
|
152
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/alan_and_alcor.png"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"tags": [
|
|
156
|
-
""
|
|
157
|
-
],
|
|
158
|
-
"href": "",
|
|
159
|
-
"aspectRatio": 1.7777777777777777,
|
|
160
|
-
"parent": "Proud Summer Beach YCH",
|
|
161
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/proud_summer_beach_ych/0.webp",
|
|
162
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/proud_summer_beach_ych/0.webp",
|
|
163
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/proud_summer_beach_ych/0.png"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"title": "Soma's Spring Outfit",
|
|
167
|
-
"artist": "@kaerukbin",
|
|
168
|
-
"tags": [
|
|
169
|
-
"Soma"
|
|
170
|
-
],
|
|
171
|
-
"href": "https://skeb.jp/@kaerukbin/works/4",
|
|
172
|
-
"published": "2024-05-31",
|
|
173
|
-
"aspectRatio": 0.763189448441247,
|
|
174
|
-
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/soma_s_spring_outfit.webp",
|
|
175
|
-
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/soma_s_spring_outfit.webp",
|
|
176
|
-
"src": "https://alcorsiteartbucket.s3.amazonaws.com/soma_s_spring_outfit.png"
|
|
177
|
-
}
|
|
178
|
-
];
|
|
179
20
|
const ConfiguredJustifiedLayout = (_a) => {
|
|
180
|
-
var { layoutItems
|
|
181
|
-
return react_1.default.createElement(TSJustifiedLayout_1.TSJustifiedLayout, Object.assign({ layoutItems:
|
|
21
|
+
var { layoutItems, rowSpacing = 8, width = 1000, itemSpacing = 8, targetRowHeight = 320, targetRowHeightTolerance = 0.10, showWidows = true, children } = _a, props = __rest(_a, ["layoutItems", "rowSpacing", "width", "itemSpacing", "targetRowHeight", "targetRowHeightTolerance", "showWidows", "children"]);
|
|
22
|
+
return react_1.default.createElement(TSJustifiedLayout_1.TSJustifiedLayout, Object.assign({ layoutItems: layoutItems, width: width, itemSpacing: itemSpacing, targetRowHeight: 320, targetRowHeightTolerance: targetRowHeightTolerance, rowSpacing: rowSpacing, showWidows: showWidows }, props), children.map((child) => child));
|
|
182
23
|
};
|
|
183
24
|
exports.ConfiguredJustifiedLayout = ConfiguredJustifiedLayout;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ layoutItems, rowSpacing, width, itemSpacing, targetRowHeight, targetRowHeightTolerance, showWidows, ...props }: import("../components/TSJustifiedLayout/TSJustifiedLayout").TSJustifiedLayoutProps) =>
|
|
5
|
+
component: ({ layoutItems, rowSpacing, width, itemSpacing, targetRowHeight, targetRowHeightTolerance, showWidows, children, ...props }: import("../components/TSJustifiedLayout/TSJustifiedLayout").TSJustifiedLayoutProps) => React.JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
type Story = StoryObj<typeof meta>;
|
|
9
9
|
export declare const Primary: Story;
|
|
10
|
+
export declare const Secondary: Story;
|
|
@@ -1,12 +1,175 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Primary = void 0;
|
|
6
|
+
exports.Secondary = exports.Primary = void 0;
|
|
4
7
|
const ConfiguredJustifiedLayout_1 = require("./ConfiguredJustifiedLayout");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
5
9
|
const meta = {
|
|
6
10
|
title: 'JustifiedLayout/Basic',
|
|
7
11
|
component: ConfiguredJustifiedLayout_1.ConfiguredJustifiedLayout,
|
|
8
12
|
};
|
|
9
13
|
exports.default = meta;
|
|
14
|
+
const displayedImages = [
|
|
15
|
+
{
|
|
16
|
+
"title": "Castor Evolved",
|
|
17
|
+
"artist": "@TOOMIRO",
|
|
18
|
+
"tags": [
|
|
19
|
+
"Castor",
|
|
20
|
+
"Featured"
|
|
21
|
+
],
|
|
22
|
+
"href": "https://x.com/FaintAlcor/status/1749579348045111636?s=20",
|
|
23
|
+
"published": "2024-01-22",
|
|
24
|
+
"aspectRatio": 1.48,
|
|
25
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/castor_evolved.webp",
|
|
26
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/castor_evolved.png",
|
|
27
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/castor_evolved.png"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Techwear Ninja v2",
|
|
31
|
+
"artist": "@edadrz",
|
|
32
|
+
"tags": [
|
|
33
|
+
"Rastaban Form",
|
|
34
|
+
"Techwear",
|
|
35
|
+
"Hibernal Assassin"
|
|
36
|
+
],
|
|
37
|
+
"href": "https://x.com/edadrz2/status/1750189393833517203?s=20",
|
|
38
|
+
"published": "2024-01-24",
|
|
39
|
+
"aspectRatio": 0.7857142857142857,
|
|
40
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/techwear_ninja_v2.webp",
|
|
41
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/techwear_ninja_v2.png",
|
|
42
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/techwear_ninja_v2.png"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Glimmer on the Shore",
|
|
46
|
+
"artist": "@SiN_remyheart",
|
|
47
|
+
"tags": [
|
|
48
|
+
"Jupiter Form",
|
|
49
|
+
"Featured"
|
|
50
|
+
],
|
|
51
|
+
"href": "https://x.com/SiN_remyheart/status/1750043825161244678?s=20",
|
|
52
|
+
"published": "2024-01-24",
|
|
53
|
+
"aspectRatio": 1.15625,
|
|
54
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/glimmer_on_the_shore.webp",
|
|
55
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/glimmer_on_the_shore.png",
|
|
56
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/glimmer_on_the_shore.png"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"title": "Farmer Sketch",
|
|
60
|
+
"artist": "@KuroPenguinEx",
|
|
61
|
+
"tags": [
|
|
62
|
+
"Aquarius Form"
|
|
63
|
+
],
|
|
64
|
+
"href": "https://x.com/FaintAlcor/status/1751444972904063414?s=20",
|
|
65
|
+
"published": "2024-01-27",
|
|
66
|
+
"aspectRatio": 0.7069555302166477,
|
|
67
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/farmer_sketch.webp",
|
|
68
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/farmer_sketch.webp%7D",
|
|
69
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/farmer_sketch.png"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"parent": "Farmer Sketch",
|
|
73
|
+
"tags": [
|
|
74
|
+
"Aquarius Form"
|
|
75
|
+
],
|
|
76
|
+
"href": "",
|
|
77
|
+
"aspectRatio": 0.7069555302166477,
|
|
78
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/farmer_sketch/0.webp",
|
|
79
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/farmer_sketch/0.webp",
|
|
80
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/farmer_sketch/0.png"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"title": "My Room",
|
|
84
|
+
"artist": "@ito_44_3",
|
|
85
|
+
"tags": [
|
|
86
|
+
"Thuban Form"
|
|
87
|
+
],
|
|
88
|
+
"href": "https://x.com/ito_44_3/status/1759850276633419776?s=20",
|
|
89
|
+
"published": "2024-02-02",
|
|
90
|
+
"aspectRatio": 1.4166666666666667,
|
|
91
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/my_room.webp",
|
|
92
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/my_room.webp",
|
|
93
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/my_room.png"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"title": "Triangulum Combat Suit",
|
|
97
|
+
"artist": "@neumokun",
|
|
98
|
+
"tags": [
|
|
99
|
+
"Triangulum Form"
|
|
100
|
+
],
|
|
101
|
+
"href": "https://bsky.app/profile/neumokun.bsky.social/post/3klncrgkl5z24",
|
|
102
|
+
"published": "2024-02-17",
|
|
103
|
+
"aspectRatio": 0.7501875468867217,
|
|
104
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/triangulum_combat_suit.webp",
|
|
105
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/triangulum_combat_suit.webp",
|
|
106
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/triangulum_combat_suit.png"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"tags": [
|
|
110
|
+
"Eclipse Deity"
|
|
111
|
+
],
|
|
112
|
+
"href": "",
|
|
113
|
+
"aspectRatio": 0.8243310619910255,
|
|
114
|
+
"parent": "Eclipse Deity v3",
|
|
115
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/eclipse_deity_v3/0.webp",
|
|
116
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/eclipse_deity_v3/0.webp",
|
|
117
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/eclipse_deity_v3/0.png"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"title": "Biogenesis Suit Design",
|
|
121
|
+
"artist": "@EmberWickArt",
|
|
122
|
+
"tags": [
|
|
123
|
+
"Superhero",
|
|
124
|
+
"Bodysuit"
|
|
125
|
+
],
|
|
126
|
+
"href": "https://x.com/EmberWickArt/status/1795127025331577256",
|
|
127
|
+
"published": "2024-05-27",
|
|
128
|
+
"aspectRatio": 1.0115606936416186,
|
|
129
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/biogenesis_suit_design.webp",
|
|
130
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/biogenesis_suit_design.webp",
|
|
131
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/biogenesis_suit_design.png"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"title": "Alan and Alcor",
|
|
135
|
+
"artist": "@kongzorim",
|
|
136
|
+
"tags": [
|
|
137
|
+
"Aldhibah Form",
|
|
138
|
+
"Rastaban Form",
|
|
139
|
+
"Standard Outfit"
|
|
140
|
+
],
|
|
141
|
+
"href": "https://x.com/kongzorim/status/1795818089080385818",
|
|
142
|
+
"published": "2024-05-29",
|
|
143
|
+
"aspectRatio": 0.7056150600454398,
|
|
144
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/alan_and_alcor.webp",
|
|
145
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/alan_and_alcor.webp",
|
|
146
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/alan_and_alcor.png"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"tags": [
|
|
150
|
+
""
|
|
151
|
+
],
|
|
152
|
+
"href": "",
|
|
153
|
+
"aspectRatio": 1.7777777777777777,
|
|
154
|
+
"parent": "Proud Summer Beach YCH",
|
|
155
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/proud_summer_beach_ych/0.webp",
|
|
156
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/proud_summer_beach_ych/0.webp",
|
|
157
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/proud_summer_beach_ych/0.png"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"title": "Soma's Spring Outfit",
|
|
161
|
+
"artist": "@kaerukbin",
|
|
162
|
+
"tags": [
|
|
163
|
+
"Soma"
|
|
164
|
+
],
|
|
165
|
+
"href": "https://skeb.jp/@kaerukbin/works/4",
|
|
166
|
+
"published": "2024-05-31",
|
|
167
|
+
"aspectRatio": 0.763189448441247,
|
|
168
|
+
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/soma_s_spring_outfit.webp",
|
|
169
|
+
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/soma_s_spring_outfit.webp",
|
|
170
|
+
"src": "https://alcorsiteartbucket.s3.amazonaws.com/soma_s_spring_outfit.png"
|
|
171
|
+
}
|
|
172
|
+
];
|
|
10
173
|
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
11
174
|
exports.Primary = {
|
|
12
175
|
args: {
|
|
@@ -15,8 +178,20 @@ exports.Primary = {
|
|
|
15
178
|
targetRowHeight: undefined,
|
|
16
179
|
rowSpacing: undefined,
|
|
17
180
|
itemSpacing: undefined,
|
|
18
|
-
layoutItems:
|
|
181
|
+
layoutItems: displayedImages.map(value => value.aspectRatio),
|
|
182
|
+
targetRowHeightTolerance: undefined,
|
|
183
|
+
children: displayedImages.map(value => react_1.default.createElement("img", { src: value.webp }))
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
exports.Secondary = {
|
|
187
|
+
args: {
|
|
188
|
+
width: 847,
|
|
189
|
+
showWidows: true,
|
|
190
|
+
targetRowHeight: undefined,
|
|
191
|
+
rowSpacing: undefined,
|
|
192
|
+
itemSpacing: undefined,
|
|
193
|
+
layoutItems: displayedImages.slice(1, 5).map(value => value.aspectRatio),
|
|
19
194
|
targetRowHeightTolerance: undefined,
|
|
20
|
-
children:
|
|
195
|
+
children: displayedImages.slice(1, 5).map(value => react_1.default.createElement("img", { src: value.webp }))
|
|
21
196
|
},
|
|
22
197
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-justified-layout-ts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "A component based off Flickr's justified layout that is compatible with Typescript",
|
|
5
5
|
"main": "./dist/TSJustifiedLayout.js",
|
|
6
6
|
"types": "./dist/TSJustifiedLayout.d.ts",
|