gyojeong 0.1.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/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +38 -0
- package/apps/review-web/dist/_headers +7 -0
- package/apps/review-web/dist/assets/feedback-contract-BsrsBZh-.js +1 -0
- package/apps/review-web/dist/assets/feedback-wrapper-DIWwO_Fr.js +3 -0
- package/apps/review-web/dist/assets/feedback-wrapper-DWKFHwo5.css +1 -0
- package/apps/review-web/dist/assets/index-BGolyauJ.css +1 -0
- package/apps/review-web/dist/assets/index-Br6KkHpV.js +17 -0
- package/apps/review-web/dist/feedback-wrapper.html +50 -0
- package/apps/review-web/dist/index.html +14 -0
- package/bin/gyojeong.mjs +49 -0
- package/package.json +43 -0
- package/scripts/check.mjs +617 -0
- package/scripts/review-cli.mjs +6718 -0
- package/scripts/review-server.mjs +6003 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# gyojeong (CLI)
|
|
2
|
+
|
|
3
|
+
Commands for [gyojeong](https://github.com/voidmatcha/gyojeong), a Korean review and
|
|
4
|
+
verification layer that runs after any drafting tool.
|
|
5
|
+
|
|
6
|
+
You normally do not run this yourself. Install the skill, and it calls these commands through
|
|
7
|
+
`npx` when it needs them:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx skills add voidmatcha/gyojeong -g
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
| Command | What it does |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `gyojeong check --source <file> --draft <file>` | Checks protected tokens, numbers, modality, and optional terms. Exit 0 pass, 1 warn, 2 fail, 3 undecidable |
|
|
18
|
+
| `gyojeong publish --source <file> --draft <file>` | Stores a review locally, starts the review server if needed, prints the link |
|
|
19
|
+
| `gyojeong feedback --review <id>` | Prints the review's feedback as JSON |
|
|
20
|
+
| `gyojeong revise --review <id> --draft <file>` | Replaces the draft under review and re-runs the checker |
|
|
21
|
+
| `gyojeong processed --review <id> --ids <id,...>` | Marks feedback as applied |
|
|
22
|
+
| `gyojeong verify-feedback --review <id> --draft <file>` | Checks whether a revised file applied the pending feedback: `resolved`, `unresolved`, or `not_verifiable` per item |
|
|
23
|
+
| `gyojeong url --review <id>` | Prints the review link, starting the server if it stopped |
|
|
24
|
+
| `gyojeong list` / `gyojeong discard --review <id>` | Lists open reviews / deletes one |
|
|
25
|
+
| `gyojeong serve` | Runs the review server in the foreground on `http://127.0.0.1:8377` |
|
|
26
|
+
|
|
27
|
+
Reviews live in `~/.local/share/gyojeong/runs/` (owner-only permissions) and are deleted when
|
|
28
|
+
the review ends. The server listens on 127.0.0.1 only and exits on its own when idle: 48 hours
|
|
29
|
+
after the last request while a review is open, 30 minutes when none is, 5 minutes after the last
|
|
30
|
+
review ends. Change these in `~/.config/gyojeong/config.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{ "review_server": { "idle_open_hours": 48, "idle_empty_minutes": 30, "idle_after_finish_minutes": 5 } }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Requirements: Node 20 or later. No GitHub account or network access is needed.
|
|
37
|
+
|
|
38
|
+
License: Apache-2.0.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Referrer-Policy: no-referrer
|
|
3
|
+
Cache-Control: no-store
|
|
4
|
+
X-Content-Type-Options: nosniff
|
|
5
|
+
X-Frame-Options: DENY
|
|
6
|
+
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=()
|
|
7
|
+
Content-Security-Policy: default-src 'self'; base-uri 'none'; connect-src 'self'; font-src 'self'; form-action 'none'; frame-ancestors 'none'; img-src 'self' data:; object-src 'none'; script-src 'self'; style-src 'self'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=()=>{if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=(e[6]??0)&15|64,e[8]=(e[8]??0)&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`},t=(e,t)=>{let n=e.body;return[n?.message??(e instanceof Error?e.message:t),n?.next_action].filter(Boolean).join(` `)},n=[`terminology`,`meaning_shift`],r={level:`experimental`,correction_required:n,correction_optional:[`unspecified`,`awkward_expression`,`omission`,`addition`,`register`],correction_forbidden:[`deletion`],feedback_categories:[`unspecified`,`deletion`,...n,`awkward_expression`,`omission`,`addition`,`register`],feedback_scopes:[`run_only`,`personal`]},i=(e,t,n,r=!1)=>({code:e,message:t,next_action:n,retryable:r}),a=(e,t,n,r,a=!1)=>Object.assign(Error(t),{status:r,body:i(e,t,n,a)}),o=async e=>{let t;try{t=await e.json()}catch{t=void 0}throw Object.assign(Error(t?.message??`로컬 검수 서버 요청에 실패했습니다.`),{status:e.status,body:t})},s=async(e,t)=>{try{let n=await fetch(e,{cache:`no-store`,...t});return n.ok||await o(n),n}catch(e){throw e.body?e:a(`local_server_unavailable`,`로컬 검수 서버에 연결할 수 없습니다.`,`에이전트에게 검수 링크를 다시 요청해 주세요. 서버가 쉬고 있으면 링크를 만들 때 다시 켜집니다.`,503,!0)}},c=async e=>{let t=await(await s(`/api/reviews/${encodeURIComponent(e)}`)).json();return{run:t.run,job:t.job,source_text:t.source_text,draft_text:t.draft_text,attachments:(t.attachments??[]).map(({file:e,...t})=>t),surface:t.source_surface??null,support:r}},l=async(e,t)=>(await s(`/api/reviews/${encodeURIComponent(e)}/attachments/${encodeURIComponent(t)}`)).blob(),u=async(e,t)=>{if(t.length===0)return[];let n=await s(`/api/review-feedback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({review_id:e,items:t})}),r;try{r=await n.json()}catch{r=void 0}if(!n.ok){let e=r;throw Object.assign(Error(e?.message??`피드백 저장에 실패했습니다.`),{status:n.status,body:e})}let i=r?.results;if(!Array.isArray(i)||i.length!==t.length)throw a(`invalid_server_response`,`로컬 검수 서버 응답이 올바르지 않습니다.`,`서버를 다시 실행해 주세요.`,502);return i},d=async(e,t=!1)=>{await s(`/api/review-finalize`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({review_id:e,force:t})})},f=120,p={unspecified:`?`,deletion:`삭제하기`,awkward_expression:`어색한 표현`,terminology:`용어`,omission:`누락`,addition:`추가`,meaning_shift:`의미 변화`,register:`문체`},m=new Set([`terminology`,`meaning_shift`]),h=new Set([`terminology`]),g=`용어 기준 후보로 남깁니다.`,_=e=>{if(e.onceOnly)return{scope:`run_only`};if(!h.has(e.category))return{scope:`run_only`,blocked:`category`};let t=(e.term||e.selectedText).normalize(`NFC`);return Array.from(t).length>f?{scope:`run_only`,blocked:`no_term`}:{scope:`personal`}},v=e=>e===`category`?`이 유형은 이번 문서에만 적용됩니다.`:`문장이 길어 이번 문서에만 적용됩니다. 단어를 지정하면 용어 기준 후보가 됩니다.`;export{v as a,d as c,u as d,_ as i,e as l,g as n,c as o,p as r,l as s,m as t,t as u};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e,d as t,i as n,n as r,o as i,r as a,t as o,u as s}from"./feedback-contract-BsrsBZh-.js";var c=new URLSearchParams(location.search),l=new URLSearchParams(location.hash.startsWith(`#`)?location.hash.slice(1):location.hash).get(`review`),u=!!l,d=null,ee=c.get(`target`),f=document.getElementById(`source`),p=null,m=null,h=``,g=document.getElementById(`reviewMode`),_=document.getElementById(`basket`),v=document.getElementById(`items`),te=document.getElementById(`count`),y=document.getElementById(`sheet`),ne=document.getElementById(`selection`),b=document.getElementById(`correction`),re=document.getElementById(`status`),ie=document.getElementById(`barMode`),x=document.getElementById(`add`),S=document.getElementById(`copyFeedback`),C=document.getElementById(`remember`),w=`gyojeong:${l||`local`}:pending`,T=c.get(`selectors`)||`h1,h2,h3,h4,h5,h6,p,li,td,th,blockquote,figcaption,[data-review-text]`,E=document.getElementById(`surface`),D=document.getElementById(`categories`),O=document.getElementById(`scope`),ae=document.getElementById(`termLabel`),k=document.getElementById(`term`),A=document.getElementById(`correctionLabel`),oe=document.getElementById(`rememberLabel`),se=document.getElementById(`scopeNote`),j=!0,M=null,N=[],P=[],F=!u,ce=!1,I={feedback_categories:Object.keys(a),correction_forbidden:[]},L=I.feedback_categories[0],R=`sentence`;u&&(S.textContent=`피드백 전송`);function z(){if(typeof crypto.randomUUID==`function`)return crypto.randomUUID();let e=new Uint8Array(16);return crypto.getRandomValues(e),`feedback-${Date.now().toString(36)}-${Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}`}function B(){try{return JSON.parse(localStorage.getItem(w)||`[]`)}catch{return[]}}function V(){try{return localStorage.setItem(w,JSON.stringify(P)),!0}catch{return!1}}function H(e){re.textContent=e,clearTimeout(H.timer),H.timer=setTimeout(()=>{re.textContent=`문장을 눌러 피드백을 남기세요.`},2200)}function U(){return I.correction_forbidden.includes(L)}function W(){return M?R===`paragraph`?{start:M.paragraphStart,end:M.paragraphEnd,text:M.paragraphText}:{start:M.start,end:M.end,text:M.text}:null}function G(){for(let e of O.children){let t=e.dataset.mode===R;e.classList.toggle(`active`,t),e.setAttribute(`aria-checked`,String(t))}let e=R===`word`;ae.hidden=!e,k.hidden=!e,J();let t=W();t&&(ne.textContent=`${M.page}${M.slide?` · ${M.slide}`:``}\n${t.text.trim()}`)}function K(){for(let e of D.children)e.classList.toggle(`active`,e.dataset.category===L),e.setAttribute(`aria-checked`,String(e.dataset.category===L));let e=U();A.hidden=e,b.hidden=e,e&&(b.value=``),A.textContent=o.has(L)?`수정문 · 필수`:`수정문 · 선택 사항`,J()}function q(){return n({category:L,onceOnly:C.checked,term:R===`word`?k.value.normalize(`NFC`).trim():void 0,selectedText:W()?.text??``})}function J(){let t=q();oe.hidden=t.blocked===`category`,se.textContent=t.blocked?e(t.blocked):t.scope===`personal`?r:`이번 문서에만 적용됩니다.`}function le(){D.setAttribute(`role`,`radiogroup`),D.setAttribute(`aria-label`,`문제 유형`),D.replaceChildren(),I.feedback_categories.includes(L)||(L=I.feedback_categories[0]);for(let e of I.feedback_categories){let t=document.createElement(`button`);t.type=`button`,t.dataset.category=e,t.setAttribute(`role`,`radio`),t.textContent=a[e]||e,t.addEventListener(`click`,()=>{L=e,K()}),D.append(t)}K()}function Y(e){ce||(ce=!0,be(),H(`원본에서 문장을 연결할 수 없어 검수용 보기로 전환합니다. (${e})`),u&&setTimeout(()=>{location.href=`/#review=${encodeURIComponent(l)}`},700))}async function X(){let e=await i(l);return d=e.job.id,e}async function ue(){if(!u)return!0;let e=await X();if(e.draft_text!==window.__feedbackDraftText)throw Error(`text-mismatch`);return fe(e),!0}async function de(e){let t=ee,n=null;if(!t&&u){let r=e??await X();t=r.surface?.target_url??null,n=r.surface?.selectors??null}if(!t)throw Error(`missing-target`);let r=new URL(t,location.href);if(r.origin!==location.origin)throw Error(`cross-origin-target`);return n&&!c.get(`selectors`)&&(T=n),r.href}function fe(e){Array.isArray(e.support?.feedback_categories)&&e.support.feedback_categories.length>0&&(I={feedback_categories:e.support.feedback_categories,correction_forbidden:e.support.correction_forbidden??[]},le())}async function pe(){let e=null;if(u&&!ee)try{e=await X()}catch(e){Y(e.message||`review-unavailable`);return}if(e?.surface?.snapshot){fe(e),me(e);return}try{p=await de(e)}catch(e){Y(e.message||`surface-unavailable`);return}w=`gyojeong:${l||`local`}:${p}`,P=B(),Q(),f.src=p}function me(e){m=e.surface.snapshot,h=e.draft_text,p=e.surface.target_url,w=`gyojeong:${l||`local`}:snapshot:${p}`,P=B(),Q(),f.hidden=!0,E.hidden=!1,F=!0,ge(),H(`원본을 캡처한 화면에 검수 레이어를 연결했습니다.`)}function he(e,t){return e.content_base64?(t.src=`data:${e.media_type};base64,${e.content_base64}`,Promise.resolve()):Promise.reject(Error(`tile-missing`))}function ge(){E.replaceChildren();let e=E.clientWidth/m.page_width,t=document.createElement(`div`);t.className=`surface-page`,t.style.width=`${m.page_width*e}px`,t.style.height=`${m.page_height*e}px`,E.append(t);for(let n of m.tiles){let r=document.createElement(`img`);r.alt=``,r.className=`surface-tile`,r.style.top=`${n.top*e}px`,r.style.width=`${m.page_width*e}px`,r.style.height=`${n.height*e}px`,t.append(r),he(n,r).catch(()=>Y(`tile-unavailable`))}if(j)for(let[n,r]of m.units.entries()){let i=`unit-${n}`,a=[...h].slice(r.start,r.end).join(``),o=P.some(e=>e.start===r.start&&e.end===r.end);for(let[n,[s,c,l,u]]of r.rects.entries()){let d=document.createElement(`button`);d.type=`button`,d.className=`surface-hit`,d.dataset.group=i,d.dataset.pinned=String(o),n===0?d.setAttribute(`aria-label`,`${a} 피드백 남기기`):(d.tabIndex=-1,d.setAttribute(`aria-hidden`,`true`)),d.style.left=`${s*e}px`,d.style.top=`${c*e}px`,d.style.width=`${l*e}px`,d.style.height=`${u*e}px`,d.addEventListener(`click`,e=>{e.preventDefault(),Se({group:i,text:a,start:r.start,end:r.end,paragraphText:r.block?[...h].slice(r.block[0],r.block[1]).join(``):a,paragraphStart:r.block?r.block[0]:r.start,paragraphEnd:r.block?r.block[1]:r.end,slide:``,page:``})}),t.append(d)}}}function _e(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(e){return!e.data.trim()||e.parentElement.closest(`.notes,[aria-hidden="true"],script,style`)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){let n=0;for(let r of e){let e=n+r.data.length;if(t<=e)return{node:r,offset:Math.max(0,t-n)};n=e}let r=e.at(-1);return r?{node:r,offset:r.data.length}:null}function ye(e){let t=_e(e);if(!t.length)return[];let n=t.map(e=>e.data).join(``);return[...new Intl.Segmenter(`ko`,{granularity:`sentence`}).segment(n)].flatMap(n=>{let r=n.segment,i=r.search(/\S/);if(i<0)return[];let a=r.length-r.trimEnd().length,o=ve(t,n.index+i),s=ve(t,n.index+r.length-a);if(!o||!s)return[];let c=e.ownerDocument.createRange();try{c.setStart(o.node,o.offset),c.setEnd(s.node,s.offset)}catch{return[]}return[{text:r.trim(),range:c,start:n.index+i,end:n.index+r.length-a}]})}function be(){for(let e of N)e.remove();N=[]}function Z(){be();let e;try{e=f.contentDocument}catch{Y(`cross-origin`);return}if(!e?.body||!j)return;let t=e.createElement(`div`);t.id=`feedback-overlay-root`,Object.assign(t.style,{position:`absolute`,inset:`0`,zIndex:`2147483646`,pointerEvents:`none`}),e.body.append(t),N.push(t);let n=[...e.querySelectorAll(T)].filter(e=>!e.closest(`.notes,.controls,.note-panel,#feedback-overlay-root,[aria-hidden="true"]`)&&e.textContent.trim().length>1),r=n.map(e=>_e(e).map(e=>e.data).join(``));window.__feedbackDraftText=r.join(`
|
|
2
|
+
|
|
3
|
+
`);let i=0,a=0;for(let[o,s]of n.entries()){let c=r[o],l=a;for(let n of ye(s)){let r=`sentence-${i++}`,a=[...n.range.getClientRects()].filter(e=>e.width>2&&e.height>2);for(let[i,o]of a.entries()){let a=e.createElement(`button`);a.type=`button`,a.disabled=!F,a.dataset.group=r,i===0?a.setAttribute(`aria-label`,`${n.text} 피드백 남기기`):(a.tabIndex=-1,a.setAttribute(`aria-hidden`,`true`));let u=P.some(e=>e.group===r||e.text===n.text&&e.slide===(s.closest(`.slide`)?.dataset.title||``));a.dataset.pinned=String(u),Object.assign(a.style,{position:`absolute`,left:`${o.left+f.contentWindow.scrollX}px`,top:`${o.top+f.contentWindow.scrollY}px`,width:`${o.width}px`,height:`${o.height}px`,margin:`0`,padding:`0`,border:`1px solid transparent`,borderRadius:`2px`,background:u?`rgba(0,0,0,.18)`:`rgba(0,0,0,.01)`,borderColor:u?`rgba(0,0,0,.78)`:`transparent`,cursor:F?`pointer`:`progress`,pointerEvents:`auto`}),a.addEventListener(`mouseenter`,()=>xe(e,r,!0)),a.addEventListener(`mouseleave`,()=>xe(e,r,!1)),a.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation(),Se({group:r,text:n.text,start:l+Array.from(c.slice(0,n.start)).length,end:l+Array.from(c.slice(0,n.end)).length,paragraphText:c,paragraphStart:l,paragraphEnd:l+Array.from(c).length,slide:s.closest(`.slide`)?.dataset.title||``,page:s.closest(`.canvas`)?.dataset.page||``})}),t.append(a)}}a+=Array.from(c).length+(o<n.length-1?2:0)}}function xe(e,t,n){for(let r of e.querySelectorAll(`[data-group="${t}"]`)){let e=r.dataset.pinned===`true`;r.style.borderColor=n||e?`rgba(0,0,0,.78)`:`transparent`,r.style.background=n?`rgba(0,0,0,.10)`:e?`rgba(0,0,0,.18)`:`rgba(0,0,0,.01)`}}function Se(e){M=e,R=`sentence`,b.value=``,k.value=``,C.checked=!1,G(),K(),y.classList.add(`open`),x.hidden=!1}function Q(){let e=P.filter(e=>!e.submitted);if(te.textContent=String(P.length),S.disabled=e.length===0,v.replaceChildren(),!P.length){let e=document.createElement(`p`);e.className=`item`,e.textContent=`아직 담긴 피드백이 없습니다.`,v.append(e);return}P.forEach((e,t)=>{let n=document.createElement(`div`);n.className=`item`;let r=document.createElement(`b`),i=a[e.category]||e.category;r.textContent=`${e.page}${e.slide?` · ${e.slide}`:``} · ${i}${e.term?` · ${e.term}`:``}${e.submitted?` · 전송됨`:``}`;let o=document.createElement(`p`);o.textContent=e.text;let s=document.createElement(`p`);s.textContent=e.correction||`수정 제안 없음`;let c=document.createElement(`button`);c.type=`button`,c.textContent=`제거`,c.addEventListener(`click`,()=>{P.splice(t,1);let e=V();Q(),$(),e||H(`검수함 변경은 현재 탭에서만 유지됩니다.`)}),n.append(r,o,s,c),v.append(n)})}f.addEventListener(`load`,async()=>{try{if(Z(),!f.contentDocument?.body){Y(`iframe-access`);return}await ue(),F=!0,Z()}catch(e){Y(e.message||`validation-failed`);return}H(`원본 iframe에 검수 레이어를 연결했습니다.`)});var $=()=>m?ge():Z(),Ce;addEventListener(`resize`,()=>{clearTimeout(Ce),Ce=setTimeout($,120)}),g.addEventListener(`click`,()=>{j=!j,g.textContent=j?`검수 모드`:`읽기 모드`,g.setAttribute(`aria-pressed`,String(j)),ie.textContent=j?`검수 중`:`읽기 중`,j||(y.classList.remove(`open`),x.hidden=!0),$()}),C.addEventListener(`change`,J),k.addEventListener(`input`,J),O.addEventListener(`click`,e=>{let t=e.target.closest(`button[data-mode]`);!t||!M||(R=t.dataset.mode,G())}),document.getElementById(`showBasket`).addEventListener(`click`,()=>{_.hidden=!_.hidden,Q()}),document.getElementById(`closeBasket`).addEventListener(`click`,()=>{_.hidden=!0}),document.getElementById(`cancel`).addEventListener(`click`,()=>{y.classList.remove(`open`),x.hidden=!0}),document.getElementById(`add`).addEventListener(`click`,()=>{if(!M){H(`선택한 문장을 다시 눌러 주세요.`);return}let e=U()?``:b.value.normalize(`NFC`).trim();if(o.has(L)&&!e){H(`이 분류에는 수정문이 필요합니다.`),b.focus();return}let t=W(),n=R===`word`?k.value.normalize(`NFC`).trim():``;if(R===`word`){if(!n){H(`어떤 표현에 대한 지적인지 적어 주세요.`),k.focus();return}if(!t.text.normalize(`NFC`).includes(n)){H(`대상 표현이 선택한 문장 안에 없습니다.`),k.focus();return}}P.push({...M,id:z(),category:L,mode:R,start:t.start,end:t.end,text:t.text,...n?{term:n}:{},scope:q().scope,correction:e,created_at:new Date().toISOString(),submitted:!1});let r=V();y.classList.remove(`open`),x.hidden=!0,Q(),$(),H(r?`검수함에 추가했습니다.`:`검수함에 추가했습니다. 현재 탭에서만 유지됩니다.`)}),document.getElementById(`copyFeedback`).addEventListener(`click`,async()=>{if(!u){await navigator.clipboard.writeText(JSON.stringify({source:f.src,feedback:P},null,2)),H(`피드백 JSON을 복사했습니다.`);return}if(!d){H(`전송 실패: 작업 정보를 아직 불러오지 못했습니다.`);return}let e=P.filter(e=>!e.submitted);S.disabled=!0,H(`${e.length}개 피드백을 전송하고 있습니다.`);try{let n=await t(l,e.map(e=>({input:{job_id:d,category:e.category,scope:e.scope||`run_only`,selection:{start:e.start,end:e.end,selected_text:e.text},...e.term?{term:e.term}:{},...e.correction?{correction:e.correction}:{}},idempotencyKey:e.id||z()})));e.forEach((e,t)=>{e.submitted=!0,e.feedback_id=n[t].feedback_id});let r=V();Q(),$(),H(r?`피드백을 전송했습니다.`:`피드백을 전송했습니다. 브라우저 검수함 상태는 저장하지 못했습니다.`)}catch(e){Q(),H(`전송 실패: ${s(e,`다시 시도해 주세요.`)}`)}}),le(),Q(),pe();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--ink:#000;--paper:#fff;--muted:#b3b3b3;--rule:#d4d4d4;--mono:"SF Mono", "Menlo", "D2Coding", "Consolas", monospace;--serif:"Apple SD Gothic Neo", "Noto Serif CJK KR", "Nanum Myeongjo", "AppleMyungjo", serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;font-family:var(--mono)}*{box-sizing:border-box}html,body{background:#dfe4e8;width:100%;height:100%;margin:0;overflow:hidden}button,textarea{font:inherit}#source{background:#fff;border:0;width:100%;height:100%}#surface{background:#fff;width:100%;height:100%;overflow:auto}.surface-page{margin:0 auto;position:relative}.surface-tile{display:block;position:absolute;left:0}.surface-hit{cursor:pointer;background:#00000003;border:1px solid #0000;border-radius:2px;margin:0;padding:0;position:absolute}.surface-hit:hover,.surface-hit:focus-visible{background:#0000001a;border-color:#000000c7}.surface-hit[data-pinned=true]{background:#0000002e;border-color:#000000c7}.mode-toggle-floating{z-index:25;border:1px solid var(--ink);background:var(--ink);min-height:30px;color:var(--paper);cursor:pointer;letter-spacing:.08em;padding:0 10px;font-size:.68rem;position:fixed;top:18px;right:18px}.mode-toggle-floating[aria-pressed=false]{background:var(--paper);color:var(--ink)}.sheet{z-index:19;background:var(--ink);max-height:62dvh;color:var(--paper);border-top:1px solid #4d4d4d;padding:22px max(16px,50vw - 20.5rem) 26px;transition:transform .16s ease-out;position:fixed;bottom:54px;left:0;right:0;overflow-y:auto;transform:translateY(calc(100% + 70px))}.sheet.open{transform:translateY(0)}.sheet-head{letter-spacing:.16em;text-transform:uppercase;justify-content:space-between;align-items:baseline;margin-bottom:12px;font-size:.68rem;display:flex}.sheet-head button{min-width:30px;min-height:30px;color:var(--paper);cursor:pointer;background:0 0;border:0;font-size:1rem}.selection{border-left:2px solid var(--paper);max-height:7.2em;color:var(--paper);font-family:var(--serif);white-space:pre-line;margin:0 0 20px;padding-left:12px;font-size:1rem;line-height:1.8;overflow-y:auto}.label{color:var(--muted);letter-spacing:.18em;text-transform:uppercase;margin:0 0 8px;font-size:.62rem}.scope,.categories{flex-wrap:wrap;gap:6px;margin-bottom:20px;display:flex}.scope button,.categories button{cursor:pointer;min-height:30px;color:var(--paper);background:0 0;border:1px solid #6b6b6b;padding:0 11px;font-size:.72rem}.scope button.active,.categories button.active{border-color:var(--paper);background:var(--paper);color:var(--ink)}.scope button:disabled{opacity:.4;cursor:default}#term{width:100%;color:var(--paper);font-family:var(--serif);background:0 0;border:1px solid #6b6b6b;margin-bottom:20px;padding:8px 12px;font-size:.98rem}textarea{resize:vertical;width:100%;min-height:76px;color:var(--paper);font-family:var(--serif);background:0 0;border:1px solid #6b6b6b;border-radius:0;padding:10px 12px;font-size:.98rem;line-height:1.5}textarea::placeholder{color:#6b6b6b}.remember{align-items:center;gap:9px;min-height:42px;font-size:.72rem;display:flex}[hidden]{display:none!important}.remember input{width:14px;height:14px;accent-color:var(--paper)}.scope-note{color:var(--muted);margin:0 0 4px;font-size:.68rem}.review-bar{z-index:20;background:var(--ink);min-height:54px;color:var(--paper);letter-spacing:.08em;align-items:center;gap:16px;padding:12px max(16px,50vw - 20.5rem);font-size:.72rem;display:flex;position:fixed;bottom:0;left:0;right:0}.bar-mode{text-transform:uppercase}.bar-count{color:var(--muted);cursor:pointer;font:inherit;letter-spacing:inherit;background:0 0;border:0;margin-right:auto;padding:0}.bar-add,.bar-send{cursor:pointer;letter-spacing:.08em;white-space:nowrap;min-height:30px;padding:0 14px;font-size:.72rem}.bar-add{color:var(--paper);background:0 0;border:1px solid #6b6b6b}.bar-send{border:1px solid var(--paper);background:var(--paper);color:var(--ink)}.bar-send:disabled{color:#6b6b6b;cursor:default;background:0 0;border-color:#4d4d4d}.bar-status{color:var(--muted);margin:0}.basket{z-index:18;border:1px solid var(--ink);background:var(--paper);width:min(360px,100vw - 36px);max-height:min(48vh,460px);color:var(--ink);padding:12px;position:fixed;bottom:70px;right:18px;overflow:auto;box-shadow:0 10px 32px #00000029}.basket[hidden]{display:none}.basket header{justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;display:flex}.basket h2{margin:0;font-size:15px}.basket button{cursor:pointer;border:1px solid var(--ink);background:var(--paper);color:var(--ink);font:.72rem var(--mono);padding:7px 9px}.item{border-top:1px solid #e0e5e8;padding:9px 2px;font-size:13px;line-height:1.45}.item:first-of-type{border-top:0}.item b{color:var(--ink)}.item p{color:#52616c;margin:4px 0 0}@media (width<=700px){.mode-toggle-floating{top:8px;right:8px}.review-bar{gap:9px;padding:10px 12px}.review-bar .bar-status{display:none}.bar-add,.bar-send{min-height:44px;padding:0 12px}.sheet{max-height:70dvh;padding:18px 16px 22px;bottom:64px}.basket{width:calc(100vw - 16px);max-height:38vh;bottom:76px;right:8px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--ink:#000;--paper:#fff;--muted:#6b6b6b;--rule:#d4d4d4;--wash:#f2f2f2;--serif:"Apple SD Gothic Neo", "Noto Serif CJK KR", "Nanum Myeongjo", "AppleMyungjo", serif;--mono:"SF Mono", "Menlo", "D2Coding", "Consolas", monospace;--column:41rem;--bar-height:54px;--safe-bottom:env(safe-area-inset-bottom,0px);--sheet-bottom:calc(var(--bar-height) + var(--safe-bottom));--sheet-max-height:62dvh;color:var(--ink);background:var(--paper);font-family:var(--mono);font-synthesis:none;text-rendering:optimizelegibility}*{box-sizing:border-box}body{background:var(--paper);min-width:320px;min-height:100dvh;margin:0}button,select,textarea,input{font:inherit;color:inherit}button,select,textarea,[tabindex]{outline-offset:2px;outline:2px solid #0000}button:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline-color:var(--ink)}.desk{width:min(var(--column) + 48px, 100vw - 32px);margin:0 auto;padding:0 0 40dvh}.topline{z-index:5;border-bottom:1px solid var(--ink);background:var(--paper);align-items:baseline;gap:14px;padding:18px 0 10px;display:flex;position:sticky;top:0}.route{letter-spacing:.06em;text-transform:lowercase;margin:0;font-size:.7rem}.badge{color:var(--muted);letter-spacing:.14em;text-transform:uppercase;margin-right:auto;font-size:.66rem}.mode-toggle{border:1px solid var(--ink);background:var(--paper);cursor:pointer;letter-spacing:.08em;min-height:30px;padding:0 10px;font-size:.68rem}.mode-toggle[aria-pressed=true]{background:var(--ink);color:var(--paper)}.doc{max-width:var(--column);font-family:var(--serif);word-break:keep-all;overflow-wrap:anywhere;margin:34px auto 0;font-size:1.08rem;line-height:2.05}.doc-block{margin:0 0 1.35em}.doc-block.doc-h1,.doc-block.doc-h2,.doc-block.doc-h3,.doc-block.doc-h4{font-family:var(--mono);letter-spacing:.2em;text-transform:uppercase;margin:2.4em 0 .9em;font-size:.72rem;font-weight:400;line-height:1.5}.doc-block.doc-h1:before,.doc-block.doc-h2:before,.doc-block.doc-h3:before{content:"";border-top:1px solid var(--ink);width:100%;margin-bottom:.9em;display:block}.doc-block.doc-pre{font-family:var(--mono);font-size:.82rem;line-height:1.7}.doc-block.doc-pre pre{border-left:2px solid var(--ink);background:var(--wash);margin:0;padding:14px 16px;overflow-x:auto}.doc code{font-family:var(--mono);font-size:.86em}.doc a{color:inherit;text-underline-offset:3px;text-decoration-thickness:1px}.doc table{border-collapse:collapse;font-size:.9rem;display:block;overflow-x:auto}.doc :is(th,td){border:1px solid var(--rule);padding:6px 10px}.doc blockquote{border-left:2px solid var(--ink);margin:0;padding-left:14px}.doc img{max-width:100%;height:auto}.preview-attachment{max-width:min(100%,760px);margin:18px 0;display:block}.preview-attachment img{border:1px solid var(--rule);object-fit:contain;max-width:100%;max-height:70vh;display:block}.preview-attachment figcaption{color:var(--muted);font-family:var(--mono);margin-top:6px;font-size:.76rem}.preview-image-note{color:var(--muted);font-family:var(--mono);font-size:.76rem;display:inline-block}.unit{cursor:pointer;transition:background .12s linear,color .12s linear}.doc:not(.is-reading) .unit:hover,.doc:not(.is-reading) .unit:focus-visible,.doc:not(.is-reading) .unit.is-hover-group{text-underline-offset:5px;outline:none;text-decoration:underline;text-decoration-thickness:1px}.doc.is-reading .unit{cursor:text}.unit.is-pinned{background:var(--ink);color:var(--paper);padding:0 1px;text-decoration:none}.unit.is-pinned :is(code,a,strong,em){color:inherit}.pin{font-family:var(--mono);vertical-align:super;margin-left:3px;font-size:.62rem;font-weight:400}.pin-scope{gap:8px;margin:0 0 12px;display:flex}.pin-scope .chip:disabled{opacity:.4;cursor:default}.pin-term{box-sizing:border-box;border:1px solid var(--rule);width:100%;min-height:44px;font-family:var(--mono);margin:0 0 12px;padding:10px 12px;font-size:.92rem}.pin-siblings{border-top:1px solid var(--rule);flex-wrap:wrap;gap:8px;margin:12px 0 0;padding-top:12px;display:flex}.pin-sibling{border:1px solid var(--rule);min-height:44px;font-family:var(--mono);color:var(--muted);cursor:pointer;background:0 0;padding:0 12px;font-size:.78rem}.pin-siblings[hidden]{display:none}.source-panel{max-width:var(--column);border:1px solid var(--rule);margin:24px auto 0}.source-panel>summary{box-sizing:border-box;min-height:44px;font-family:var(--mono);color:var(--muted);cursor:pointer;align-items:center;padding:12px 14px;font-size:.78rem;display:flex}.source-text{border-top:1px solid var(--rule);font-family:var(--serif);color:var(--muted);white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere;padding:14px;font-size:.98rem;line-height:1.85}.review-bar{z-index:20;padding:12px max(16px, calc((100vw - var(--column)) / 2));padding-bottom:calc(12px + var(--safe-bottom));background:var(--ink);color:var(--paper);letter-spacing:.08em;align-items:center;gap:16px;font-size:.72rem;display:flex;position:fixed;bottom:0;left:0;right:0}.bar-mode{text-transform:uppercase}.bar-count{color:#b3b3b3;margin-right:auto}.bar-add,.bar-send,.bar-finish{cursor:pointer;letter-spacing:.08em;white-space:nowrap;min-height:30px;padding:0 14px;font-size:.72rem}.bar-add,.bar-finish{color:var(--paper);background:0 0;border:1px solid #6b6b6b}.bar-send{border:1px solid var(--paper);background:var(--paper);color:var(--ink)}.bar-add:disabled,.bar-send:disabled,.bar-finish:disabled{color:#6b6b6b;cursor:default;background:0 0;border-color:#4d4d4d}.review-bar .status{color:#b3b3b3;margin:0}.pin-card{left:0;right:0;bottom:var(--sheet-bottom);z-index:19;max-height:var(--sheet-max-height);padding:22px max(16px, calc((100vw - var(--column)) / 2)) 26px;background:var(--ink);color:var(--paper);border-top:1px solid #4d4d4d;transition:bottom .16s ease-out,max-height .16s ease-out;animation:.16s ease-out sheet-up;position:fixed;overflow-y:auto}@keyframes sheet-up{0%{opacity:0;transform:translateY(12px)}}.pin-card-head{letter-spacing:.16em;text-transform:uppercase;justify-content:space-between;align-items:baseline;margin-bottom:12px;font-size:.68rem;display:flex}.pin-card-close{min-width:30px;min-height:30px;color:var(--paper);cursor:pointer;background:0 0;border:0;font-size:1rem}.pin-quote{border-left:2px solid var(--paper);font-family:var(--serif);max-height:7.2em;margin:0 0 20px;padding-left:12px;font-size:1rem;line-height:1.8;overflow-y:auto}.label{color:#b3b3b3;letter-spacing:.18em;text-transform:uppercase;margin:0 0 8px;font-size:.62rem}.chips{flex-wrap:wrap;gap:6px;margin-bottom:20px;display:flex}.chip{min-height:30px;color:var(--paper);cursor:pointer;background:0 0;border:1px solid #6b6b6b;padding:0 11px;font-size:.72rem}.chip.is-on{border-color:var(--paper);background:var(--paper);color:var(--ink)}.pin-correction{width:100%;min-height:76px;color:var(--paper);font-family:var(--serif);resize:vertical;background:0 0;border:1px solid #6b6b6b;border-radius:0;padding:10px 12px;font-size:.98rem}.pin-correction::placeholder{color:#6b6b6b}.pin-remember{align-items:center;gap:9px;min-height:42px;font-size:.72rem;display:flex}.pin-remember[hidden]{display:none}.pin-remember input{width:14px;height:14px;accent-color:var(--paper)}.pin-actions{align-items:center;gap:10px;margin:2px 0 18px;display:flex}.pin-actions[hidden]{display:none}.pin-remove{color:#b3b3b3;cursor:pointer;text-underline-offset:3px;background:0 0;border:0;min-height:34px;font-size:.72rem;text-decoration:underline}.pin-card .status{color:#b3b3b3;margin:10px 0 0;font-size:.72rem}.pin-actions .status{margin:0}.terminal-state{max-width:var(--column);margin:22vh auto 0}.terminal-state h1{letter-spacing:.2em;text-transform:uppercase;margin:0 0 10px;font-size:.78rem;font-weight:400}.terminal-state p,.empty-note,.status{color:var(--muted);margin:0;font-size:.78rem}@media (width<=720px){.review-bar{padding-top:6px;padding-left:12px;padding-right:12px;padding-bottom:calc(6px + var(--safe-bottom));gap:6px}.bar-add,.bar-send,.bar-finish{padding-left:10px;padding-right:10px}.doc{font-size:1.02rem;line-height:1.95}.pin-card{padding-bottom:12px;padding-left:16px;padding-right:16px}.pin-actions{margin-bottom:0}}@media (pointer:coarse){.chip,.pin-card-close,.pin-remove,.bar-add,.bar-send,.bar-finish,.mode-toggle{min-height:44px}.chip{padding:0 14px}.pin-card-close{min-width:44px}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important}}
|