privateboard 0.1.8 → 0.1.9
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/dist/cli.js +879 -180
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/public/adjourn-overlay.css +2 -1
- package/public/agent-profile.css +525 -0
- package/public/agent-profile.js +278 -1
- package/public/app.js +269 -113
- package/public/index.html +304 -126
- package/public/magazine.html +1257 -838
- package/public/newspaper.html +1389 -1267
- package/public/ppt.html +2623 -0
- package/public/room-settings.css +40 -4
- package/public/room-settings.js +44 -2
- package/public/user-settings.css +23 -21
- package/public/user-settings.js +1 -4
- package/public/bento.html +0 -1396
package/public/room-settings.css
CHANGED
|
@@ -120,6 +120,40 @@
|
|
|
120
120
|
content: "▸ ";
|
|
121
121
|
color: var(--lime, #6FB572);
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
/* ─── Title clamp ──────────────────────────────────────────────
|
|
125
|
+
Long room titles get clamped to 2 lines. The Show more / less
|
|
126
|
+
toggle is rendered `hidden` and unhidden by room-settings.js's
|
|
127
|
+
post-mount measurement only when the title actually overflows. */
|
|
128
|
+
.rs-title-wrap {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 4px;
|
|
132
|
+
min-width: 0;
|
|
133
|
+
}
|
|
134
|
+
.rs-head .title.is-clamped {
|
|
135
|
+
display: -webkit-box;
|
|
136
|
+
-webkit-line-clamp: 2;
|
|
137
|
+
-webkit-box-orient: vertical;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
}
|
|
140
|
+
.rs-title-toggle {
|
|
141
|
+
align-self: flex-start;
|
|
142
|
+
appearance: none;
|
|
143
|
+
background: transparent;
|
|
144
|
+
border: none;
|
|
145
|
+
font-family: var(--mono);
|
|
146
|
+
font-size: 9.5px;
|
|
147
|
+
letter-spacing: 0.14em;
|
|
148
|
+
text-transform: uppercase;
|
|
149
|
+
color: var(--text-soft, #8E8B83);
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
padding: 0;
|
|
152
|
+
transition: color 0.12s;
|
|
153
|
+
}
|
|
154
|
+
.rs-title-toggle:hover { color: var(--lime, #6FB572); }
|
|
155
|
+
.rs-title-toggle::before { content: "[ "; color: var(--text-faint, #3A382F); }
|
|
156
|
+
.rs-title-toggle::after { content: " ]"; color: var(--text-faint, #3A382F); }
|
|
123
157
|
.rs-head .close-btn {
|
|
124
158
|
width: 24px; height: 24px;
|
|
125
159
|
background: transparent;
|
|
@@ -863,11 +897,13 @@
|
|
|
863
897
|
.rs-action.danger { color: var(--red, #B5706A); border-color: rgba(181, 112, 106, 0.4); }
|
|
864
898
|
.rs-action.danger:hover { background: var(--red, #B5706A); color: var(--bg, #0A0A0A); border-color: var(--red, #B5706A); }
|
|
865
899
|
|
|
866
|
-
/* Icon-only buttons in the room-head action bar
|
|
900
|
+
/* Icon-only buttons in the room-head action bar · sized to match
|
|
901
|
+
the avatar / cast-count tile (22px tall) so the whole right-side
|
|
902
|
+
toolbar lands on a single line at the new compact header height. */
|
|
867
903
|
.head-icon-btn,
|
|
868
904
|
.room-settings-trigger {
|
|
869
|
-
width:
|
|
870
|
-
height:
|
|
905
|
+
width: 24px;
|
|
906
|
+
height: 22px;
|
|
871
907
|
display: inline-flex;
|
|
872
908
|
align-items: center;
|
|
873
909
|
justify-content: center;
|
|
@@ -876,7 +912,7 @@
|
|
|
876
912
|
border: 0.5px solid var(--line-strong, #3A3A35);
|
|
877
913
|
color: var(--text-soft, #8E8B83);
|
|
878
914
|
font-family: var(--mono);
|
|
879
|
-
font-size:
|
|
915
|
+
font-size: 12px;
|
|
880
916
|
line-height: 1;
|
|
881
917
|
cursor: pointer;
|
|
882
918
|
text-decoration: none;
|
package/public/room-settings.js
CHANGED
|
@@ -290,9 +290,12 @@
|
|
|
290
290
|
</div>
|
|
291
291
|
|
|
292
292
|
<header class="rs-head">
|
|
293
|
-
<div>
|
|
293
|
+
<div class="rs-head-text">
|
|
294
294
|
<div class="meta">// room #<span class="rs-number">${ROOM_STATE.number}</span> · <span class="live">${ROOM_STATE.status}</span> · <span class="rs-turns">${ROOM_STATE.turns}</span> turns</div>
|
|
295
|
-
<div class="
|
|
295
|
+
<div class="rs-title-wrap">
|
|
296
|
+
<div class="title rs-title is-clamped" data-rs-title>${escape(ROOM_STATE.title)}</div>
|
|
297
|
+
<button type="button" class="rs-title-toggle" data-rs-title-toggle hidden>Show more</button>
|
|
298
|
+
</div>
|
|
296
299
|
</div>
|
|
297
300
|
<button type="button" class="close-btn" aria-label="Close">✕</button>
|
|
298
301
|
</header>
|
|
@@ -628,6 +631,29 @@
|
|
|
628
631
|
overlay.classList.add("open");
|
|
629
632
|
overlay.setAttribute("aria-hidden", "false");
|
|
630
633
|
document.body.style.overflow = "hidden";
|
|
634
|
+
// Title clamp · run AFTER the overlay becomes visible so the
|
|
635
|
+
// title element has real dimensions to measure. Resets to clamped
|
|
636
|
+
// every open (a previously-expanded title shouldn't stick across
|
|
637
|
+
// close + reopen). Double-rAF gives layout + line-clamp a beat to
|
|
638
|
+
// settle on cold opens (Safari can return stale scrollHeight on a
|
|
639
|
+
// single rAF after a display switch).
|
|
640
|
+
applyTitleClamp();
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function applyTitleClamp() {
|
|
644
|
+
const titleEl = modal.querySelector("[data-rs-title]");
|
|
645
|
+
const titleBtn = modal.querySelector("[data-rs-title-toggle]");
|
|
646
|
+
if (!titleEl || !titleBtn) return;
|
|
647
|
+
titleEl.classList.add("is-clamped");
|
|
648
|
+
titleBtn.textContent = "Show more";
|
|
649
|
+
titleBtn.hidden = true;
|
|
650
|
+
requestAnimationFrame(() => {
|
|
651
|
+
requestAnimationFrame(() => {
|
|
652
|
+
if (titleEl.scrollHeight > titleEl.clientHeight + 1) {
|
|
653
|
+
titleBtn.hidden = false;
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
});
|
|
631
657
|
}
|
|
632
658
|
function close() {
|
|
633
659
|
if (!overlay) return;
|
|
@@ -880,6 +906,22 @@
|
|
|
880
906
|
|
|
881
907
|
// Close (X) — discards staged changes via close().
|
|
882
908
|
overlay.querySelector(".close-btn").addEventListener("click", close);
|
|
909
|
+
|
|
910
|
+
// Title clamp · click handler attaches once at init and persists
|
|
911
|
+
// across opens (the toggle button DOM node is reused). The actual
|
|
912
|
+
// overflow measurement happens inside open() via applyTitleClamp,
|
|
913
|
+
// because at init time the overlay is `display: none` so the
|
|
914
|
+
// title element has 0×0 dimensions and scrollHeight is meaningless.
|
|
915
|
+
const titleBtn = modal.querySelector("[data-rs-title-toggle]");
|
|
916
|
+
if (titleBtn) {
|
|
917
|
+
titleBtn.addEventListener("click", (e) => {
|
|
918
|
+
e.preventDefault();
|
|
919
|
+
const titleEl = modal.querySelector("[data-rs-title]");
|
|
920
|
+
if (!titleEl) return;
|
|
921
|
+
const expanded = titleEl.classList.toggle("is-clamped") === false;
|
|
922
|
+
titleBtn.textContent = expanded ? "Show less" : "Show more";
|
|
923
|
+
});
|
|
924
|
+
}
|
|
883
925
|
// Confirm — push staged changes to the backend then close.
|
|
884
926
|
modal.querySelector("[data-rs-confirm]").addEventListener("click", (e) => {
|
|
885
927
|
e.preventDefault();
|
package/public/user-settings.css
CHANGED
|
@@ -69,33 +69,36 @@
|
|
|
69
69
|
}
|
|
70
70
|
.us-classification .right { color: var(--text-faint, #3A382F); letter-spacing: 0.12em; }
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.us-head .us-close {
|
|
89
|
-
width: 28px; height: 28px;
|
|
72
|
+
/* Close button · absolute-positioned in the modal's top-right
|
|
73
|
+
corner, pinned BELOW the classification strip so it doesn't
|
|
74
|
+
overlap "// LOCAL" at the right edge of that strip. The strip is
|
|
75
|
+
~22-24px tall (6px + 9px font + 6px + 0.5px border). The button
|
|
76
|
+
sits at 48px from the modal top — roughly aligned with the
|
|
77
|
+
first pane's `padding-top: 18px` baseline, so it visually
|
|
78
|
+
anchors to the section content rather than crowding the strip
|
|
79
|
+
below. The previous header strip (`.us-head`) that hosted this
|
|
80
|
+
button has been retired — first the "Preference" title, then
|
|
81
|
+
the surrounding bar with its dashed divider. */
|
|
82
|
+
.us-close {
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 38px;
|
|
85
|
+
right: 14px;
|
|
86
|
+
z-index: 1;
|
|
87
|
+
width: 24px; height: 24px;
|
|
90
88
|
background: transparent;
|
|
91
89
|
border: 0.5px solid var(--line-bright, #2A2A26);
|
|
92
90
|
color: var(--text-dim, #5C5A52);
|
|
93
|
-
font-size:
|
|
91
|
+
font-size: 12px;
|
|
92
|
+
line-height: 1;
|
|
94
93
|
cursor: pointer;
|
|
95
94
|
font-family: var(--mono);
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
padding: 0;
|
|
96
99
|
transition: all 0.12s;
|
|
97
100
|
}
|
|
98
|
-
.us-
|
|
101
|
+
.us-close:hover {
|
|
99
102
|
border-color: var(--lime, #6FB572);
|
|
100
103
|
color: var(--lime, #6FB572);
|
|
101
104
|
}
|
|
@@ -803,7 +806,6 @@
|
|
|
803
806
|
|
|
804
807
|
@media (max-width: 600px) {
|
|
805
808
|
.user-settings-overlay { padding: 12px; }
|
|
806
|
-
.us-head { padding-left: 14px; padding-right: 14px; }
|
|
807
809
|
.us-pane { padding: 14px; }
|
|
808
810
|
.us-foot { padding: 10px 14px; }
|
|
809
811
|
}
|
package/public/user-settings.js
CHANGED
|
@@ -988,10 +988,7 @@
|
|
|
988
988
|
<span class="right">// local</span>
|
|
989
989
|
</div>
|
|
990
990
|
|
|
991
|
-
<
|
|
992
|
-
<div class="us-title">Preference</div>
|
|
993
|
-
<button type="button" class="us-close" aria-label="Close">✕</button>
|
|
994
|
-
</header>
|
|
991
|
+
<button type="button" class="us-close" aria-label="Close">✕</button>
|
|
995
992
|
|
|
996
993
|
<div class="us-frame">
|
|
997
994
|
<nav class="us-nav" role="tablist">
|