@wells-nelson/displays 1.0.4 → 1.1.1

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
@@ -21,9 +21,9 @@ Tokens: `--bg`, `--surface`, `--surface-2`, `--surface-hover`, `--text`, `--mute
21
21
  drag-and-drop classes. Keep app-only tokens in the app's own stylesheet.
22
22
 
23
23
  Date and time inputs (`date`, `time`, `datetime-local`) match the text inputs, and on iOS keep a
24
- fixed size whatever their value. On touch screens text can't be selected (a long press acts like an
25
- app, not a page), except in fields and anything marked `.selectable`; `Leaderboards` and
26
- `SortableTable` are.
24
+ fixed size whatever their value. Apps that put `class="touch-app"` on `<html>` get app-like touch
25
+ screens: text can't be selected (a long press acts on the control), except in fields and anything
26
+ marked `.selectable`; `Leaderboards` and `SortableTable` are. Websites leave it off.
27
27
 
28
28
  ## Icons
29
29
 
package/dist/theme.css CHANGED
@@ -157,20 +157,21 @@ button {
157
157
  }
158
158
 
159
159
  /*
160
- * Touch screens: text can't be selected by accident (a long press selects instead of acting like
161
- * an app). Fields, and anything marked `.selectable` (reports, tables, logs), still can.
162
- * `Leaderboards` and `SortableTable` are selectable.
160
+ * Apps (`<html class="touch-app">`) on touch screens: text can't be selected by accident (a long
161
+ * press selects instead of acting on the control). Fields, and anything marked `.selectable`
162
+ * (reports, tables, logs), still can; `Leaderboards` and `SortableTable` are. Websites leave the
163
+ * class off and keep normal selection.
163
164
  */
164
165
  @media (hover: none) and (pointer: coarse) {
165
- body {
166
+ .touch-app body {
166
167
  -webkit-user-select: none;
167
168
  user-select: none;
168
169
  -webkit-touch-callout: none;
169
170
  }
170
- input,
171
- textarea,
172
- [contenteditable],
173
- .selectable {
171
+ .touch-app input,
172
+ .touch-app textarea,
173
+ .touch-app [contenteditable],
174
+ .touch-app .selectable {
174
175
  -webkit-user-select: text;
175
176
  user-select: text;
176
177
  -webkit-touch-callout: default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wells-nelson/displays",
3
- "version": "1.0.4",
3
+ "version": "1.1.1",
4
4
  "description": "Svelte 5 display components and theme CSS shared by Wells Nelson apps.",
5
5
  "license": "MIT",
6
6
  "repository": {