zone5 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -0
- package/dist/cli/index.js +8276 -21
- package/dist/components/Zone5.svelte +22 -4
- package/dist/components/Zone5.svelte.d.ts +5 -3
- package/dist/components/Zone5Justified.svelte +128 -0
- package/dist/components/Zone5Justified.svelte.d.ts +10 -0
- package/dist/components/constants.d.ts +13 -0
- package/dist/components/constants.js +13 -0
- package/dist/config.d.ts +43 -0
- package/dist/config.js +2 -0
- package/dist/gallery/config.d.ts +32 -0
- package/dist/gallery/config.js +27 -0
- package/dist/index.d.ts +1 -0
- package/dist/remark.d.ts +11 -1
- package/dist/remark.js +75 -19
- package/package.json +1 -1
- package/dist/cli/index2.js +0 -238
- package/dist/cli/index3.js +0 -53
package/README.md
CHANGED
|
@@ -90,6 +90,64 @@ widths = [400, 800, 1200, 1600, 2400]
|
|
|
90
90
|
<Zone5 images={[image1, image2]} />
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
### Layout Modes
|
|
94
|
+
|
|
95
|
+
Zone5 supports three layout modes:
|
|
96
|
+
|
|
97
|
+
#### Wall Mode (Default)
|
|
98
|
+
|
|
99
|
+
Fixed-height grid layout. Images are cropped to fill their containers.
|
|
100
|
+
|
|
101
|
+
```svelte
|
|
102
|
+
<Zone5 images={images} mode="wall" />
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Waterfall Mode
|
|
106
|
+
|
|
107
|
+
Column-based masonry layout. Images are distributed across columns and maintain their aspect ratios.
|
|
108
|
+
|
|
109
|
+
```svelte
|
|
110
|
+
<Zone5 images={images} mode="waterfall" />
|
|
111
|
+
|
|
112
|
+
<!-- With custom column breakpoints -->
|
|
113
|
+
<Zone5
|
|
114
|
+
images={images}
|
|
115
|
+
mode="waterfall"
|
|
116
|
+
columnBreakpoints={{ 640: 2, 1024: 4 }}
|
|
117
|
+
/>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Justified Mode
|
|
121
|
+
|
|
122
|
+
Row-based layout (like Flickr/Google Photos). Each row fills the full width while preserving aspect ratios. Panoramic images (aspect ratio > 3) automatically get their own row.
|
|
123
|
+
|
|
124
|
+
```svelte
|
|
125
|
+
<Zone5 images={images} mode="justified" />
|
|
126
|
+
|
|
127
|
+
<!-- With custom row height and gap -->
|
|
128
|
+
<Zone5
|
|
129
|
+
images={images}
|
|
130
|
+
mode="justified"
|
|
131
|
+
targetRowHeight={250}
|
|
132
|
+
gap={12}
|
|
133
|
+
/>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Setting Mode in Markdown
|
|
137
|
+
|
|
138
|
+
Use the `zone5mode` frontmatter property:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
---
|
|
142
|
+
zone5mode: justified
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+

|
|
146
|
+

|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Valid values: `wall`, `waterfall`, `justified`
|
|
150
|
+
|
|
93
151
|
### Using in Markdown/MDX
|
|
94
152
|
|
|
95
153
|
Add the remark plugin to your `svelte.config.js`:
|