@jant/core 0.4.4 → 0.5.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/src/styles/ui.css CHANGED
@@ -2439,7 +2439,7 @@
2439
2439
  .link-preview {
2440
2440
  display: block;
2441
2441
  position: relative;
2442
- width: min(100%, calc(24rem * 16 / 9));
2442
+ width: min(100%, calc(24rem * 16 / 9), var(--layout-content-width));
2443
2443
  max-width: 100%;
2444
2444
  margin-top: 0.55rem;
2445
2445
  border-radius: var(--radius-lg, 0.5rem);
@@ -5167,6 +5167,7 @@
5167
5167
  padding: 6px 10px;
5168
5168
  display: flex;
5169
5169
  align-items: center;
5170
+ flex-shrink: 0;
5170
5171
  gap: 4px;
5171
5172
  background-color: var(--compose-paper-bg);
5172
5173
  }
@@ -6761,7 +6762,7 @@
6761
6762
  .compose-attachment-img {
6762
6763
  display: block;
6763
6764
  border-radius: var(--media-radius, 0.5rem);
6764
- max-height: min(320px, 28dvh);
6765
+ max-height: min(160px, 18dvh);
6765
6766
  object-fit: contain;
6766
6767
  }
6767
6768
 
@@ -6798,7 +6799,7 @@
6798
6799
  /* Single image: constrain to container width */
6799
6800
  .compose-attachment:only-child .compose-attachment-img {
6800
6801
  max-width: 100%;
6801
- max-height: min(384px, 32dvh);
6802
+ max-height: min(200px, 22dvh);
6802
6803
  }
6803
6804
 
6804
6805
  .compose-attachment:only-child .compose-attachment-preview-fallback {
@@ -7181,6 +7182,7 @@
7181
7182
  min-height: 0;
7182
7183
  display: flex;
7183
7184
  flex-direction: column;
7185
+ align-self: stretch;
7184
7186
  overflow: hidden;
7185
7187
  position: relative;
7186
7188
  }
@@ -7191,6 +7193,10 @@
7191
7193
  }
7192
7194
 
7193
7195
  .compose-editor-row .compose-attachments-dock {
7196
+ flex: 0 1 auto;
7197
+ min-height: 0;
7198
+ max-height: min(240px, 34dvh);
7199
+ overflow-y: auto;
7194
7200
  padding-inline: 0;
7195
7201
  background: transparent;
7196
7202
  }
@@ -7234,7 +7240,7 @@
7234
7240
  }
7235
7241
 
7236
7242
  .compose-reply-context.expanded {
7237
- max-height: 400px;
7243
+ max-height: min(400px, 35dvh);
7238
7244
  overflow-y: auto;
7239
7245
  }
7240
7246
 
@@ -198,6 +198,31 @@ function GitHubSyncSetupForm({
198
198
  required
199
199
  autocomplete="off"
200
200
  />
201
+ <p class="text-sm text-muted-foreground mt-1">
202
+ {i18n._(
203
+ msg({
204
+ message:
205
+ "Create the repository on GitHub first — it can be empty.",
206
+ comment:
207
+ "@context: Help text for GitHub repository input on GitHub Sync settings, telling users they must create the repo themselves",
208
+ }),
209
+ )}{" "}
210
+ <a
211
+ href="https://github.com/new"
212
+ target="_blank"
213
+ rel="noopener noreferrer"
214
+ class="underline hover:no-underline"
215
+ >
216
+ {i18n._(
217
+ msg({
218
+ message: "Create a new repository",
219
+ comment:
220
+ "@context: Link text pointing to GitHub's new repository page",
221
+ }),
222
+ )}
223
+ </a>
224
+ .
225
+ </p>
201
226
  </div>
202
227
 
203
228
  <div class="flex mt-2">
@@ -144,9 +144,24 @@ export const LinkCard: FC<TimelineCardProps> = ({
144
144
  {bodyEl}
145
145
  </>
146
146
  )}
147
- {mediaEl}
148
- {ratingEl}
149
- <PostFooter post={post} detail={isDetail} display={display?.footer} />
147
+ {(() => {
148
+ const tail = (
149
+ <>
150
+ {mediaEl}
151
+ {ratingEl}
152
+ <PostFooter
153
+ post={post}
154
+ detail={isDetail}
155
+ display={display?.footer}
156
+ />
157
+ </>
158
+ );
159
+ return !isCompact && post.media.length > 1 ? (
160
+ <div class="post-attached-group">{tail}</div>
161
+ ) : (
162
+ tail
163
+ );
164
+ })()}
150
165
  </article>
151
166
  );
152
167
  };
@@ -91,27 +91,38 @@ export const NoteCard: FC<TimelineCardProps> = ({
91
91
  dangerouslySetInnerHTML={{ __html: displayHtml }}
92
92
  />
93
93
  )}
94
- {!isCompact && post.media.length > 0 && (
95
- <div class="mt-3" data-post-media>
96
- <MediaGallery
97
- attachments={post.media}
98
- postPermalink={post.permalink}
99
- />
100
- </div>
101
- )}
102
- {!isDetail &&
103
- !isCompact &&
104
- !showFullBody &&
105
- isArticle &&
106
- post.summaryHasMore && (
107
- <a href={getContinueHref(post)} class="feed-continue-link">
108
- Continue
109
- </a>
110
- )}
111
- {!isCompact && !showHeaderRating && !display?.hideRating && (
112
- <StarRating rating={post.rating} />
113
- )}
114
- <PostFooter post={post} detail={isDetail} display={footerDisplay} />
94
+ {(() => {
95
+ const tail = (
96
+ <>
97
+ {!isCompact && post.media.length > 0 && (
98
+ <div class="mt-3" data-post-media>
99
+ <MediaGallery
100
+ attachments={post.media}
101
+ postPermalink={post.permalink}
102
+ />
103
+ </div>
104
+ )}
105
+ {!isDetail &&
106
+ !isCompact &&
107
+ !showFullBody &&
108
+ isArticle &&
109
+ post.summaryHasMore && (
110
+ <a href={getContinueHref(post)} class="feed-continue-link">
111
+ Continue
112
+ </a>
113
+ )}
114
+ {!isCompact && !showHeaderRating && !display?.hideRating && (
115
+ <StarRating rating={post.rating} />
116
+ )}
117
+ <PostFooter post={post} detail={isDetail} display={footerDisplay} />
118
+ </>
119
+ );
120
+ return !isCompact && post.media.length > 1 ? (
121
+ <div class="post-attached-group">{tail}</div>
122
+ ) : (
123
+ tail
124
+ );
125
+ })()}
115
126
  </article>
116
127
  );
117
128
  };
@@ -81,18 +81,33 @@ export const QuoteCard: FC<TimelineCardProps> = ({
81
81
  dangerouslySetInnerHTML={{ __html: commentaryHtml }}
82
82
  />
83
83
  )}
84
- {!isCompact && post.media.length > 0 && (
85
- <div class="mt-3" data-post-media>
86
- <MediaGallery
87
- attachments={post.media}
88
- postPermalink={post.permalink}
89
- />
90
- </div>
91
- )}
92
- {!isCompact && !display?.hideRating && (
93
- <StarRating rating={post.rating} />
94
- )}
95
- <PostFooter post={post} detail={isDetail} display={display?.footer} />
84
+ {(() => {
85
+ const tail = (
86
+ <>
87
+ {!isCompact && post.media.length > 0 && (
88
+ <div class="mt-3" data-post-media>
89
+ <MediaGallery
90
+ attachments={post.media}
91
+ postPermalink={post.permalink}
92
+ />
93
+ </div>
94
+ )}
95
+ {!isCompact && !display?.hideRating && (
96
+ <StarRating rating={post.rating} />
97
+ )}
98
+ <PostFooter
99
+ post={post}
100
+ detail={isDetail}
101
+ display={display?.footer}
102
+ />
103
+ </>
104
+ );
105
+ return !isCompact && post.media.length > 1 ? (
106
+ <div class="post-attached-group">{tail}</div>
107
+ ) : (
108
+ tail
109
+ );
110
+ })()}
96
111
  </article>
97
112
  );
98
113
  };