nio-cat 0.9.5 → 0.9.7
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 +3 -2
- package/bin/nio.js +8 -13
- package/package.json +1 -1
- package/src/agents/claude.js +4 -1
- package/src/agents/ollama.js +3 -2
- package/src/hub.js +2 -0
- package/src/notes.js +293 -0
- package/src/pair.js +3 -50
- package/src/server.js +19 -2
- package/src/usage.js +79 -0
- package/src/voice.js +21 -3
- package/src/whisper.js +148 -0
- package/web/app/app.js +256 -53
- package/web/app/demo.js +413 -0
- package/web/app/index.html +4 -2
- package/web/app/notes.css +154 -0
- package/web/app/notes.js +504 -0
- package/web/app/style.css +32 -0
- package/web/index.html +8 -3
- package/web/sw.js +2 -2
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/* nio · Notes */
|
|
2
|
+
.page:has(.nt) { max-width: 1240px; }
|
|
3
|
+
.nt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
|
|
4
|
+
.nt-title h1 { font-size: 30px; font-weight: 500; letter-spacing: -.05em; line-height: 1.1; }
|
|
5
|
+
.nt-title p { margin-top: 4px; color: var(--fg-muted); }
|
|
6
|
+
.nt-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
|
|
7
|
+
.nt-search { flex: 1; position: relative; display: flex; align-items: center; }
|
|
8
|
+
.nt-search .ico { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--fg-muted); pointer-events: none; }
|
|
9
|
+
.nt-search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); font: inherit; color: var(--fg); transition: border-color .2s, box-shadow .2s; }
|
|
10
|
+
.nt-search input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
|
|
11
|
+
.nt-new { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: min(620px, 100%); margin: 0 auto 18px; padding: 12px 12px 12px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); color: var(--fg-muted); cursor: text; box-shadow: 0 1px 2px rgba(39,34,36,.05), 0 6px 20px -14px rgba(39,34,36,.35); transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .2s; }
|
|
12
|
+
.nt-new:hover { border-color: color-mix(in srgb, var(--fg) 30%, var(--border)); box-shadow: 0 1px 2px rgba(39,34,36,.06), 0 10px 28px -14px rgba(39,34,36,.45); }
|
|
13
|
+
.nt-new:active { transform: scale(.995); }
|
|
14
|
+
.nt-new-b { display: flex; gap: 2px; }
|
|
15
|
+
.nt-new-b button, .nt-ib { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--fg-muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; transition: background .15s, color .15s, transform .15s var(--ease); }
|
|
16
|
+
.nt-new-b button:hover, .nt-ib:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }
|
|
17
|
+
.nt-ib:active, .nt-new-b button:active { transform: scale(.92); }
|
|
18
|
+
.nt-ib.on { color: var(--fg); background: color-mix(in srgb, var(--fg) 10%, transparent); }
|
|
19
|
+
.nt-ib.sm { min-width: 30px; height: 30px; }
|
|
20
|
+
.nt .ico, .nt-ed .ico, .nt-pop .ico { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
|
|
21
|
+
.nt-ib.on .ico { fill: currentColor; fill-opacity: .15; }
|
|
22
|
+
|
|
23
|
+
.nt-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 6px; scrollbar-width: none; }
|
|
24
|
+
.nt-filters::-webkit-scrollbar { display: none; }
|
|
25
|
+
.nt-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--fg-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s var(--ease); }
|
|
26
|
+
.nt-chip .ico { width: 15px; height: 15px; }
|
|
27
|
+
.nt-chip:hover { border-color: var(--fg); color: var(--fg); }
|
|
28
|
+
.nt-chip[aria-current="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
|
|
29
|
+
.nt-chip:active { transform: scale(.96); }
|
|
30
|
+
|
|
31
|
+
.nt-sec { margin: 8px 2px 10px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-muted); }
|
|
32
|
+
.nt-grid { columns: 250px; column-gap: 14px; margin-bottom: 22px; }
|
|
33
|
+
.nt[data-layout="list"] .nt-grid { columns: 1; max-width: 640px; margin-inline: auto; }
|
|
34
|
+
.nt-card { position: relative; display: block; break-inside: avoid; margin: 0 0 14px; padding: 14px 15px 12px; border: 1px solid color-mix(in srgb, var(--fg) 13%, transparent); border-radius: 14px; background: var(--nc, var(--white)); cursor: pointer; transition: box-shadow .25s var(--ease), transform .25s var(--ease), opacity .2s; }
|
|
35
|
+
.nt-card:hover { box-shadow: 0 10px 28px -16px rgba(39,34,36,.5); transform: translateY(-2px); }
|
|
36
|
+
.nt-card:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
|
|
37
|
+
.nt-card h3 { margin: 0 28px 6px 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
|
|
38
|
+
.nt-txt { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden; }
|
|
39
|
+
.nt-txt.muted { color: var(--fg-muted); }
|
|
40
|
+
.nt-its { display: grid; gap: 3px; margin-top: 4px; }
|
|
41
|
+
.nt-it { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; }
|
|
42
|
+
.nt-it input { margin: 3px 0 0; accent-color: var(--fg); flex: none; cursor: pointer; width: 15px; height: 15px; }
|
|
43
|
+
.nt-it span { overflow-wrap: anywhere; }
|
|
44
|
+
.nt-it.done span { text-decoration: line-through; color: var(--fg-muted); }
|
|
45
|
+
.nt-more { font-size: 12px; color: var(--fg-muted); margin-left: 23px; }
|
|
46
|
+
.nt-pin { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--fg-muted); cursor: pointer; opacity: 0; transition: opacity .18s, background .15s; }
|
|
47
|
+
.nt-pin .ico { width: 17px; height: 17px; }
|
|
48
|
+
.nt-card:hover .nt-pin, .nt-pin.on, .nt-pin:focus-visible { opacity: 1; }
|
|
49
|
+
.nt-pin.on { color: var(--fg); } .nt-pin.on .ico { fill: currentColor; fill-opacity: .2; }
|
|
50
|
+
.nt-pin:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); }
|
|
51
|
+
.nt-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--fg-muted); }
|
|
52
|
+
.nt-badge .ico { width: 14px; height: 14px; } .nt-badge.err { color: var(--red); }
|
|
53
|
+
.nt-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
|
|
54
|
+
.nt-label { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 9%, transparent); font-size: 12px; font-weight: 500; }
|
|
55
|
+
.nt-label button { display: grid; place-items: center; width: 16px; height: 16px; margin: 0 -5px 0 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
|
|
56
|
+
.nt-label button .ico { width: 11px; height: 11px; }
|
|
57
|
+
.nt-acts { display: flex; gap: 2px; justify-content: flex-end; height: 0; overflow: hidden; opacity: 0; margin-top: 0; transition: height .2s var(--ease), opacity .2s, margin .2s; }
|
|
58
|
+
.nt-card:hover .nt-acts, .nt-card:focus-within .nt-acts { height: 32px; opacity: 1; margin-top: 8px; }
|
|
59
|
+
.nt-acts button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--fg-muted); cursor: pointer; }
|
|
60
|
+
.nt-acts button:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); color: var(--fg); }
|
|
61
|
+
.nt-acts .ico { width: 17px; height: 17px; }
|
|
62
|
+
@media (hover: none) { .nt-acts { height: 32px; opacity: 1; margin-top: 8px; } .nt-pin { opacity: 1; } }
|
|
63
|
+
.nt-empty { padding: 56px 12px; text-align: center; color: var(--fg-muted); }
|
|
64
|
+
.nt-trash-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--fg-muted); font-size: 13px; }
|
|
65
|
+
.nt-skel { display: block; height: 110px; margin-bottom: 14px; border-radius: 14px; background: linear-gradient(100deg, var(--bg-2) 30%, color-mix(in srgb, var(--bg-2) 55%, var(--white)) 50%, var(--bg-2) 70%) 0 0 / 220% 100%; animation: nt-sh 1.3s linear infinite; break-inside: avoid; }
|
|
66
|
+
.nt-skel.tall { height: 170px; }
|
|
67
|
+
@keyframes nt-sh { to { background-position: -120% 0; } }
|
|
68
|
+
.nt-undo { margin-left: 8px; padding: 0 2px; border: 0; background: none; color: var(--lemon); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
|
|
69
|
+
|
|
70
|
+
/* colors (targetes i editor) */
|
|
71
|
+
[data-color="lemon"] { --nc: #f1efa4; } [data-color="peach"] { --nc: #f8d9c8; } [data-color="moss"] { --nc: #d6dccb; }
|
|
72
|
+
[data-color="sky"] { --nc: #d3e3ea; } [data-color="lilac"] { --nc: #e0d9ec; } [data-color="rose"] { --nc: #f1d5d1; } [data-color="sand"] { --nc: #e7ddc9; }
|
|
73
|
+
[data-color=""] { --nc: var(--white); }
|
|
74
|
+
|
|
75
|
+
/* editor */
|
|
76
|
+
.nt-ov { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(39,34,36,.32); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
|
|
77
|
+
.nt-ed { position: relative; display: flex; flex-direction: column; width: min(660px, 100%); max-height: min(88vh, 820px); border-radius: 18px; background: var(--nc, var(--white)); border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); box-shadow: 0 30px 80px -24px rgba(39,34,36,.6); transition: background .25s; }
|
|
78
|
+
.nt-ed-head { display: flex; align-items: center; gap: 6px; padding: 14px 12px 4px 20px; }
|
|
79
|
+
.nt-ed input.nt-ed-title { flex: 1; width: auto; padding: 0; border-radius: 0; box-shadow: none; min-width: 0; height: 40px; border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--fg); outline: none; }
|
|
80
|
+
.nt-ed-title::placeholder, .nt-ed-text::placeholder, .nt-item input[type=text]::placeholder { color: color-mix(in srgb, var(--fg) 40%, transparent); }
|
|
81
|
+
.nt-ed-body { flex: 1; min-height: 80px; overflow-y: auto; padding: 4px 20px 10px; overscroll-behavior: contain; }
|
|
82
|
+
.nt-ed-text { display: block; width: 100%; min-height: 96px; max-height: 52vh; padding: 0; border: 0; background: transparent; font: inherit; font-size: 15px; line-height: 1.6; color: var(--fg); resize: none; outline: none; overflow-y: auto; }
|
|
83
|
+
.nt-ed-text.nt-desc { min-height: 0; margin-bottom: 10px; }
|
|
84
|
+
.nt-item { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
|
|
85
|
+
.nt-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--fg); flex: none; cursor: pointer; }
|
|
86
|
+
.nt-item input[type=text] { flex: 1; min-width: 0; height: 30px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--fg); outline: none; }
|
|
87
|
+
.nt-item.done input[type=text] { text-decoration: line-through; color: var(--fg-muted); }
|
|
88
|
+
.nt-x { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--fg-muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
|
|
89
|
+
.nt-item:hover .nt-x, .nt-x:focus-visible { opacity: 1; } .nt-x .ico { width: 14px; height: 14px; }
|
|
90
|
+
@media (hover: none) { .nt-x { opacity: .7; } }
|
|
91
|
+
.nt-add { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; padding: 4px 0; border: 0; background: transparent; color: var(--fg-muted); font: inherit; font-size: 14px; cursor: pointer; }
|
|
92
|
+
.nt-add .ico { width: 17px; height: 17px; } .nt-add:hover { color: var(--fg); }
|
|
93
|
+
.nt-donehd { margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--fg-muted); }
|
|
94
|
+
.nt-audio { display: grid; gap: 6px; padding: 0 20px 8px; }
|
|
95
|
+
.nt-au { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; background: color-mix(in srgb, var(--fg) 6%, transparent); font-size: 13px; }
|
|
96
|
+
.nt-au .nt-ib { background: var(--fg); color: var(--bg); } .nt-au .nt-ib .ico { width: 14px; height: 14px; fill: currentColor; }
|
|
97
|
+
.nt-au-d { font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
98
|
+
.nt-au-s { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--fg-muted); }
|
|
99
|
+
.nt-au-s .ico { width: 14px; height: 14px; color: var(--moss); }
|
|
100
|
+
.nt-au[data-st="error"] .nt-au-s { color: var(--red); }
|
|
101
|
+
.nt-spin { width: 13px; height: 13px; border: 2px solid color-mix(in srgb, var(--fg) 20%, transparent); border-top-color: var(--fg); border-radius: 50%; animation: nt-rot .7s linear infinite; flex: none; }
|
|
102
|
+
@keyframes nt-rot { to { transform: rotate(360deg); } }
|
|
103
|
+
.nt-ed-labels { padding: 0 20px 6px; margin: 0; }
|
|
104
|
+
.nt-ed-foot { padding: 6px 10px 10px; }
|
|
105
|
+
.nt-tb { display: flex; align-items: center; gap: 2px; }
|
|
106
|
+
.nt-sp { flex: 1; }
|
|
107
|
+
.nt-ai-b { padding: 0 11px; } .nt-ai-b span { display: inline; }
|
|
108
|
+
.nt-done { height: 36px; padding: 0 16px; margin-left: 6px; }
|
|
109
|
+
.nt-rec { display: flex; align-items: center; gap: 10px; margin: 0 14px 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--red) 10%, var(--white)); }
|
|
110
|
+
.nt-rec[hidden], .nt-ai[hidden], .nt-ed-foot[hidden], .nt-audio[hidden], .nt-ed-labels[hidden] { display: none; }
|
|
111
|
+
.nt-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: nt-pulse 1.1s ease-in-out infinite; flex: none; }
|
|
112
|
+
@keyframes nt-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); } 50% { transform: scale(1.15); box-shadow: 0 0 0 8px transparent; } }
|
|
113
|
+
.nt-rec-t { font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
114
|
+
.nt-rec-l { flex: 1; color: var(--fg-muted); font-size: 13px; }
|
|
115
|
+
.nt .btn.sm, .nt-ed .btn.sm, .nt-pop .btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
|
|
116
|
+
|
|
117
|
+
/* finestretes */
|
|
118
|
+
.nt-pop { position: absolute; z-index: 5; min-width: 220px; max-width: min(340px, calc(100% - 16px)); padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); box-shadow: 0 18px 50px -14px rgba(39,34,36,.5); animation: nt-pop .18s var(--ease); transform-origin: bottom left; }
|
|
119
|
+
@keyframes nt-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
|
|
120
|
+
.nt-pad { display: block; padding: 6px 8px; }
|
|
121
|
+
.nt-colors { display: flex; gap: 8px; padding: 6px; flex-wrap: wrap; }
|
|
122
|
+
.nt-dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--fg) 22%, transparent); background: var(--nc, var(--white)); cursor: pointer; transition: transform .15s var(--ease); }
|
|
123
|
+
.nt-dot:hover { transform: scale(1.12); } .nt-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--fg); }
|
|
124
|
+
.nt-lf { display: flex; gap: 6px; padding: 4px; }
|
|
125
|
+
.nt-lf input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); font: inherit; font-size: 13px; color: var(--fg); }
|
|
126
|
+
.nt-lsug { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 4px 2px; }
|
|
127
|
+
.nt-sel { width: 100%; height: 34px; margin-top: 4px; padding: 0 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); font: inherit; font-size: 13px; color: var(--fg); }
|
|
128
|
+
.nt-acts-list { display: grid; gap: 2px; padding: 4px 0; }
|
|
129
|
+
.nt-acts-list button { display: grid; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font: inherit; color: var(--fg); cursor: pointer; transition: background .15s; }
|
|
130
|
+
.nt-acts-list button:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 7%, transparent); }
|
|
131
|
+
.nt-acts-list button:disabled { opacity: .45; cursor: default; }
|
|
132
|
+
.nt-acts-list b { font-size: 14px; font-weight: 600; } .nt-acts-list span { font-size: 12px; color: var(--fg-muted); }
|
|
133
|
+
.nt-note { padding: 4px 8px 2px; }
|
|
134
|
+
.nt-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; } .nt-steps .ico { width: 15px; height: 15px; vertical-align: -3px; }
|
|
135
|
+
|
|
136
|
+
/* panell de l'assistent dins l'editor */
|
|
137
|
+
.nt-ai { margin: 0 14px 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.62); border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); animation: nt-pop .22s var(--ease); max-height: 38vh; overflow: auto; }
|
|
138
|
+
.nt-ai-run, .nt-ai-err { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-muted); } .nt-ai-err { color: var(--red); justify-content: space-between; }
|
|
139
|
+
.nt-ai-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
|
|
140
|
+
.nt-ai-h span { display: inline-flex; align-items: center; gap: 6px; } .nt-ai-h .ico { width: 15px; height: 15px; } .nt-ai-h small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fg-muted); }
|
|
141
|
+
.nt-ai-b { font-size: 14px; line-height: 1.5; } .nt-ai-b pre { margin: 6px 0 0; white-space: pre-wrap; font: inherit; } .nt-ai-b ul { margin: 0; padding-left: 18px; } .nt-ai-b p { margin: 0 0 6px; }
|
|
142
|
+
.nt-ai-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
|
|
143
|
+
|
|
144
|
+
@media (max-width: 700px) {
|
|
145
|
+
.page:has(.nt) { padding-inline: 14px; }
|
|
146
|
+
.nt-title h1 { font-size: 26px; } .nt-title p { display: none; }
|
|
147
|
+
.nt-top { margin-bottom: 12px; } .nt-tools .btn span { display: none; } .nt-tools .btn { padding: 0 11px; }
|
|
148
|
+
.nt-grid { columns: 2 150px; column-gap: 10px; } .nt-card { margin-bottom: 10px; padding: 12px; }
|
|
149
|
+
.nt-ov { padding: 0; align-items: flex-end; }
|
|
150
|
+
.nt-ed { width: 100%; max-height: none; height: 100dvh; border-radius: 0; border: 0; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
|
|
151
|
+
.nt-ai-b span { display: none; } .nt-ai-b { padding: 0 9px; }
|
|
152
|
+
.nt-ed-title { font-size: 19px; }
|
|
153
|
+
}
|
|
154
|
+
@media (prefers-reduced-motion: reduce) { .nt-card, .nt-new, .nt-pop, .nt-ai { transition: none; animation: none; } .nt-rec-dot, .nt-spin, .nt-skel { animation-duration: 2s; } }
|