@duskmoon-dev/components 0.6.0 → 0.6.2

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.
@@ -4,7 +4,7 @@
4
4
  import { useCallback, useState } from "react";
5
5
 
6
6
  // src/generated/version.ts
7
- var version = "0.6.0";
7
+ var version = "0.6.2";
8
8
 
9
9
  // src/infrastructure.ts
10
10
  var theme = {
package/dist/styles.css CHANGED
@@ -7000,7 +7000,7 @@ html {
7000
7000
  display: block;
7001
7001
  inline-size: 100%;
7002
7002
  min-inline-size: 0;
7003
- min-block-size: 3rem;
7003
+ min-block-size: 1lh;
7004
7004
  max-block-size: 16rem;
7005
7005
  overflow: auto;
7006
7006
  box-sizing: border-box;
@@ -7015,7 +7015,8 @@ html {
7015
7015
  font-size: 0.9375rem;
7016
7016
  line-height: 1.5;
7017
7017
  overflow-wrap: anywhere;
7018
- resize: vertical;
7018
+ field-sizing: content;
7019
+ resize: none;
7019
7020
  }
7020
7021
 
7021
7022
  .chat-composer-input::placeholder,
@@ -7222,6 +7223,116 @@ html {
7222
7223
  max-inline-size: 100%;
7223
7224
  }
7224
7225
 
7226
+ /* Opt into one compact control row without changing wrapping toolbars. */
7227
+ .chat-composer-toolbar-compact {
7228
+ flex-wrap: nowrap;
7229
+ gap: 0.25rem;
7230
+ }
7231
+
7232
+ .chat-composer-toolbar-compact > .btn {
7233
+ flex-shrink: 0;
7234
+ }
7235
+
7236
+ .chat-composer-toolbar-compact > .chat-composer-actions {
7237
+ flex: 1 1 auto;
7238
+ flex-wrap: nowrap;
7239
+ min-inline-size: 0;
7240
+ gap: 0.25rem;
7241
+ }
7242
+
7243
+ .chat-composer-actions > .btn.chat-composer-config {
7244
+ flex: 0 1 auto;
7245
+ min-inline-size: 0;
7246
+ padding-inline: 0.5rem;
7247
+ }
7248
+
7249
+ .chat-composer-config > svg {
7250
+ flex-shrink: 0;
7251
+ }
7252
+
7253
+ /* Selected media stays above the editor in a bounded, horizontal strip. */
7254
+ .chat-composer-thumbnails {
7255
+ display: flex;
7256
+ flex-wrap: nowrap;
7257
+ max-block-size: 7rem;
7258
+ }
7259
+
7260
+ .chat-composer-attachment-tile {
7261
+ position: relative;
7262
+ flex: 0 0 5.5rem;
7263
+ inline-size: 5.5rem;
7264
+ block-size: 5.5rem;
7265
+ box-sizing: border-box;
7266
+ padding: 0;
7267
+ overflow: hidden;
7268
+ border-radius: var(--radius-md);
7269
+ }
7270
+
7271
+ .chat-composer-attachment-tile > .chat-composer-preview {
7272
+ inline-size: 100%;
7273
+ block-size: 100%;
7274
+ border-radius: inherit;
7275
+ }
7276
+
7277
+ .chat-composer-attachment-tile > .chat-composer-attachment-remove {
7278
+ position: absolute;
7279
+ inset-block-start: 0.125rem;
7280
+ inset-inline-end: 0.125rem;
7281
+ background-color: var(--color-surface-container);
7282
+ color: var(--color-on-surface);
7283
+ }
7284
+
7285
+ /* Compose configuration menus with the native .popover and its menu items. */
7286
+ .popover.chat-composer-menu[popover] {
7287
+ position: fixed;
7288
+ inset: auto;
7289
+ inline-size: min(22rem, calc(100dvi - 2rem));
7290
+ min-inline-size: 0;
7291
+ max-inline-size: calc(100dvi - 2rem);
7292
+ max-block-size: min(24rem, calc(100dvb - 2rem));
7293
+ box-sizing: border-box;
7294
+ overflow: auto;
7295
+ overscroll-behavior: contain;
7296
+ margin: 0.5rem;
7297
+ position-area: block-start span-inline-end;
7298
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
7299
+ }
7300
+
7301
+ .popover.chat-composer-menu-end[popover] {
7302
+ position-area: block-start span-inline-start;
7303
+ }
7304
+
7305
+ .popover.chat-composer-menu[popover]:popover-open::backdrop {
7306
+ background-color: transparent;
7307
+ }
7308
+
7309
+ .chat-composer-menu-option[aria-pressed="true"] {
7310
+ background-color: var(--color-surface-container-high);
7311
+ }
7312
+
7313
+ .chat-composer-menu .chat-composer-menu-option-warning {
7314
+ color: var(--color-on-warning-container);
7315
+ }
7316
+
7317
+ .chat-composer-menu .chat-composer-description {
7318
+ white-space: normal;
7319
+ }
7320
+
7321
+ .chat-composer-menu-row {
7322
+ display: flex;
7323
+ align-items: center;
7324
+ justify-content: space-between;
7325
+ gap: 0.75rem;
7326
+ padding: 0.5rem 0.75rem;
7327
+ font-size: 0.875rem;
7328
+ }
7329
+
7330
+ .chat-composer-menu-field {
7331
+ display: grid;
7332
+ gap: 0.75rem;
7333
+ padding: 0.5rem 0.75rem;
7334
+ }
7335
+
7225
7336
  .chat-composer-reference > .btn,
7226
7337
  .chat-composer-attachment > .btn,
7227
7338
  .chat-composer-actions > .btn {
@@ -23670,6 +23781,14 @@ html {
23670
23781
  display: none;
23671
23782
  }
23672
23783
 
23784
+ /* React's content span must not give a circular icon a text baseline. */
23785
+ .btn-circle > .btn-content {
23786
+ display: inline-flex;
23787
+ align-items: center;
23788
+ justify-content: center;
23789
+ flex-shrink: 0;
23790
+ }
23791
+
23673
23792
  .card {
23674
23793
  box-sizing: border-box;
23675
23794
  max-width: 100%;
@@ -26775,7 +26894,8 @@ html {
26775
26894
  cursor: pointer;
26776
26895
  }
26777
26896
 
26778
- .radio {
26897
+ /* React wraps its input in a label; Core styles input.radio directly. */
26898
+ label.radio {
26779
26899
  position: relative;
26780
26900
  display: inline-flex;
26781
26901
  width: auto;
@@ -26791,8 +26911,8 @@ html {
26791
26911
  cursor: pointer;
26792
26912
  }
26793
26913
 
26794
- .radio::before,
26795
- .radio::after {
26914
+ label.radio::before,
26915
+ label.radio::after {
26796
26916
  display: none;
26797
26917
  content: none;
26798
26918
  }
@@ -30111,3 +30231,62 @@ html {
30111
30231
  resize: none;
30112
30232
  line-height: 1.5rem;
30113
30233
  }
30234
+
30235
+ /* Lexical paragraph blocks represent editor lines, without prose margins. */
30236
+ .chat-composer-editor[data-lexical-editor] > p {
30237
+ margin: 0;
30238
+ }
30239
+
30240
+ @layer components {
30241
+ /* Keep the shared composer inset at half Core's default 1rem. */
30242
+ .chat-composer {
30243
+ padding: 0.5rem;
30244
+ }
30245
+
30246
+ /* The compact composition uses equal, smaller corner actions. */
30247
+ .chat-composer-toolbar-compact > .btn-circle,
30248
+ .chat-composer-toolbar-compact > .chat-composer-actions > .btn-circle {
30249
+ inline-size: 1.75rem;
30250
+ block-size: 1.75rem;
30251
+ padding: 0;
30252
+ }
30253
+
30254
+ /* Native anchoring keeps completion outside the scrolling editor. */
30255
+ .chat-composer-completions-compact[popover] {
30256
+ inline-size: anchor-size(inline);
30257
+ margin-inline: 0;
30258
+ }
30259
+
30260
+ .chat-composer-completion-list {
30261
+ margin: 0;
30262
+ padding: 0;
30263
+ list-style: none;
30264
+ }
30265
+
30266
+ .chat-composer-option-compact {
30267
+ flex-direction: row;
30268
+ align-items: center;
30269
+ gap: 0.5rem;
30270
+ }
30271
+
30272
+ .chat-composer-option-icon {
30273
+ display: inline-flex;
30274
+ flex: 0 0 auto;
30275
+ }
30276
+
30277
+ .chat-composer-option-icon > svg {
30278
+ flex-shrink: 0;
30279
+ }
30280
+
30281
+ .chat-composer-option-compact > .chat-composer-option-description {
30282
+ flex: 1 1 40%;
30283
+ min-inline-size: 0;
30284
+ overflow: hidden;
30285
+ text-overflow: ellipsis;
30286
+ white-space: nowrap;
30287
+ }
30288
+
30289
+ .chat-composer-option-source {
30290
+ flex-shrink: 0;
30291
+ }
30292
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duskmoon-dev/components",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -477,7 +477,7 @@
477
477
  }
478
478
  ],
479
479
  "peerDependencies": {
480
- "@duskmoon-dev/core": ">=1.21.0",
480
+ "@duskmoon-dev/core": ">=1.21.1",
481
481
  "react": ">=19.0.0",
482
482
  "react-dom": ">=19.0.0",
483
483
  "lexical": "0.53.0",
@@ -493,7 +493,7 @@
493
493
  "ajv-formats": "^3.0.1"
494
494
  },
495
495
  "devDependencies": {
496
- "@duskmoon-dev/core": "1.21.0",
496
+ "@duskmoon-dev/core": "1.21.1",
497
497
  "@lexical/history": "0.53.0",
498
498
  "@lexical/plain-text": "0.53.0",
499
499
  "@testing-library/react": "16.3.2",