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 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
+ ![Photo 1](./photo1.jpg?z5)
146
+ ![Photo 2](./photo2.jpg?z5)
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`: