@georeferencing/react 0.0.0-stage → 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.
@@ -0,0 +1,440 @@
1
+ .rg-editor {
2
+ --rg-accent: #12695b;
3
+ --rg-border: #d4ded9;
4
+ --rg-paper: #fffef9;
5
+ color: #20322f;
6
+ background: var(--rg-paper);
7
+ font:
8
+ 14px / 1.5 system-ui,
9
+ sans-serif;
10
+ padding: 24px;
11
+ border: 1px solid var(--rg-border);
12
+ }
13
+ .rg-editor *,
14
+ .rg-guard * {
15
+ box-sizing: border-box;
16
+ }
17
+ .rg-editor h1 {
18
+ font-size: 25px;
19
+ letter-spacing: -0.7px;
20
+ line-height: 1.2;
21
+ margin: 5px 0 18px;
22
+ font-weight: 550;
23
+ }
24
+ .rg-editor h2,
25
+ .rg-guard h2 {
26
+ font-size: 16px;
27
+ margin: 0 0 12px;
28
+ font-weight: 650;
29
+ }
30
+ .rg-editor p {
31
+ margin: 8px 0;
32
+ }
33
+ .rg-editor small,
34
+ .rg-editor caption,
35
+ .rg-hint {
36
+ color: #5b6c65;
37
+ font-size: 12px;
38
+ }
39
+ .rg-eyebrow {
40
+ font-size: 10px;
41
+ letter-spacing: 2px;
42
+ font-weight: 700;
43
+ color: var(--rg-accent);
44
+ }
45
+ .rg-editor-heading,
46
+ .rg-panel-heading {
47
+ display: flex;
48
+ justify-content: space-between;
49
+ align-items: baseline;
50
+ gap: 12px;
51
+ }
52
+ .rg-dirty {
53
+ font-size: 11px;
54
+ white-space: nowrap;
55
+ border-bottom: 2px solid #c48e45;
56
+ }
57
+ .rg-toolbar {
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ gap: 6px;
61
+ align-items: center;
62
+ margin: 10px 0;
63
+ }
64
+ .rg-file {
65
+ position: relative;
66
+ overflow: hidden;
67
+ display: inline-flex;
68
+ }
69
+ .rg-editor button:not(:where(.ol-viewport *)),
70
+ .rg-editor .rg-file,
71
+ .rg-guard button {
72
+ font: inherit;
73
+ font-size: 12px;
74
+ padding: 7px 11px;
75
+ border: 1px solid #b7c8bf;
76
+ border-radius: 3px;
77
+ background: #fffef9;
78
+ color: #20322f;
79
+ cursor: pointer;
80
+ }
81
+ .rg-editor button:not(:where(.ol-viewport *)):hover,
82
+ .rg-editor .rg-file:hover {
83
+ border-color: #12695b;
84
+ background: #eef4ee;
85
+ }
86
+ .rg-editor button:not(:where(.ol-viewport *)):disabled,
87
+ .rg-guard button:disabled {
88
+ opacity: 0.45;
89
+ cursor: not-allowed;
90
+ }
91
+ .rg-editor button:not(:where(.ol-viewport *))[aria-pressed="true"],
92
+ .rg-editor .rg-primary {
93
+ background: var(--rg-accent);
94
+ color: white;
95
+ border-color: var(--rg-accent);
96
+ }
97
+ .rg-editor :focus-visible,
98
+ .rg-guard :focus-visible {
99
+ outline: 3px solid #de9c38;
100
+ outline-offset: 2px;
101
+ }
102
+ .rg-file input[type="file"] {
103
+ position: absolute;
104
+ inset: 0;
105
+ opacity: 0;
106
+ cursor: pointer;
107
+ width: 100%;
108
+ }
109
+ .rg-file:focus-within {
110
+ outline: 3px solid #de9c38;
111
+ outline-offset: 2px;
112
+ }
113
+ .rg-editor input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
114
+ .rg-editor select {
115
+ width: 100%;
116
+ border: 1px solid #c4d0c8;
117
+ border-radius: 3px;
118
+ padding: 6px;
119
+ font: inherit;
120
+ background: white;
121
+ color: #20322f;
122
+ }
123
+ .rg-editor input[type="range"] {
124
+ width: 100%;
125
+ accent-color: var(--rg-accent);
126
+ }
127
+ .rg-editor input[type="checkbox"] {
128
+ accent-color: var(--rg-accent);
129
+ }
130
+ .rg-editor label {
131
+ display: block;
132
+ font-size: 12px;
133
+ margin: 8px 0;
134
+ }
135
+ .rg-editor .rg-inline {
136
+ display: flex;
137
+ align-items: center;
138
+ gap: 8px;
139
+ }
140
+ .rg-workbench {
141
+ display: grid;
142
+ grid-template-columns: minmax(220px, 1fr) minmax(210px, 0.65fr);
143
+ gap: 22px;
144
+ padding-top: 16px;
145
+ border-top: 1px solid var(--rg-border);
146
+ }
147
+ .rg-image-view {
148
+ width: 100%;
149
+ height: 330px;
150
+ background: #e5e9e0;
151
+ border: 1px solid #cbd4c8;
152
+ touch-action: none;
153
+ cursor: crosshair;
154
+ }
155
+ .rg-image-meta {
156
+ font-size: 11px;
157
+ margin-bottom: 9px;
158
+ overflow-wrap: anywhere;
159
+ }
160
+ .rg-empty {
161
+ height: 330px;
162
+ display: flex;
163
+ flex-direction: column;
164
+ justify-content: center;
165
+ align-items: center;
166
+ text-align: center;
167
+ padding: 24px;
168
+ background: #f1f3eb;
169
+ border: 1px dashed #9dab9e;
170
+ }
171
+ .rg-cross {
172
+ font-size: 38px;
173
+ font-weight: 200;
174
+ color: #678476;
175
+ }
176
+ .rg-editor section + section {
177
+ margin-top: 20px;
178
+ padding-top: 18px;
179
+ border-top: 1px solid var(--rg-border);
180
+ }
181
+ .rg-fit-summary {
182
+ font-variant-numeric: tabular-nums;
183
+ }
184
+ .rg-table-scroll {
185
+ overflow-x: auto;
186
+ margin: 12px 0;
187
+ }
188
+ .rg-editor table {
189
+ border-collapse: collapse;
190
+ width: 100%;
191
+ font-size: 12px;
192
+ }
193
+ .rg-editor th,
194
+ .rg-editor td {
195
+ padding: 7px 4px;
196
+ text-align: left;
197
+ border-bottom: 1px solid #e1e7df;
198
+ white-space: nowrap;
199
+ }
200
+ .rg-editor td input[type="number"] {
201
+ min-width: 90px;
202
+ max-width: 130px;
203
+ font-variant-numeric: tabular-nums;
204
+ }
205
+ .rg-editor caption {
206
+ caption-side: bottom;
207
+ text-align: left;
208
+ padding-top: 7px;
209
+ }
210
+ .rg-editor details {
211
+ margin-top: 14px;
212
+ }
213
+ .rg-editor summary {
214
+ cursor: pointer;
215
+ font-size: 12px;
216
+ font-weight: 600;
217
+ padding: 8px 0;
218
+ }
219
+ .rg-coordinate-entry,
220
+ .rg-output-fields {
221
+ display: grid;
222
+ grid-template-columns: repeat(2, minmax(0, 1fr));
223
+ gap: 6px 14px;
224
+ }
225
+ .rg-feature {
226
+ display: flex;
227
+ justify-content: space-between;
228
+ gap: 8px;
229
+ align-items: center;
230
+ border-bottom: 1px solid var(--rg-border);
231
+ padding: 5px 0;
232
+ font-size: 12px;
233
+ flex-wrap: wrap;
234
+ }
235
+ .rg-feature > input {
236
+ flex-basis: 100%;
237
+ }
238
+ .rg-status {
239
+ margin-top: 20px;
240
+ padding: 12px;
241
+ background: #eef2e9;
242
+ border-left: 3px solid #7c917c;
243
+ font-size: 12px;
244
+ overflow-wrap: anywhere;
245
+ }
246
+ .rg-guard {
247
+ color: #20322f;
248
+ border: 1px solid #9dab9e;
249
+ border-radius: 5px;
250
+ max-width: 460px;
251
+ padding: 28px;
252
+ font:
253
+ 14px / 1.5 system-ui,
254
+ sans-serif;
255
+ }
256
+ .rg-guard::backdrop {
257
+ background: #10292170;
258
+ }
259
+ .rg-histogram {
260
+ max-height: 70px;
261
+ width: 100%;
262
+ color: #12695b;
263
+ }
264
+ .rg-editor progress {
265
+ width: 100%;
266
+ accent-color: var(--rg-accent);
267
+ }
268
+ @media (max-width: 750px) {
269
+ .rg-workbench {
270
+ grid-template-columns: 1fr;
271
+ }
272
+ .rg-editor {
273
+ padding: 16px;
274
+ }
275
+ .rg-editor-heading {
276
+ display: block;
277
+ }
278
+ }
279
+
280
+ /* Guided two-view layout; all selectors remain scoped to the editor. */
281
+ .rg-preview-controls {
282
+ display: flex;
283
+ align-items: center;
284
+ gap: 16px;
285
+ }
286
+ .rg-preview-controls label {
287
+ min-width: 115px;
288
+ }
289
+ .rg-readiness {
290
+ display: block;
291
+ margin-top: 4px;
292
+ }
293
+ .rg-guided {
294
+ padding: 18px;
295
+ }
296
+ .rg-steps {
297
+ display: flex;
298
+ flex-wrap: wrap;
299
+ gap: 12px 28px;
300
+ list-style: none;
301
+ margin: 0;
302
+ padding: 0 0 14px;
303
+ border-bottom: 1px solid var(--rg-border);
304
+ font-size: 12px;
305
+ color: #5b6c65;
306
+ }
307
+ .rg-steps [aria-current="step"] {
308
+ color: var(--rg-accent);
309
+ font-weight: 750;
310
+ }
311
+ .rg-matching-bar {
312
+ display: flex;
313
+ justify-content: space-between;
314
+ align-items: center;
315
+ gap: 20px;
316
+ padding: 12px 0 4px;
317
+ }
318
+ .rg-instruction strong {
319
+ font-size: 16px;
320
+ }
321
+ .rg-instruction p {
322
+ max-width: 600px;
323
+ font-size: 12px;
324
+ color: #5b6c65;
325
+ }
326
+ .rg-match-tools {
327
+ margin: 0 0 12px;
328
+ }
329
+ .rg-match-tools label {
330
+ display: flex;
331
+ align-items: center;
332
+ gap: 10px;
333
+ margin-left: auto;
334
+ }
335
+ .rg-match-tools select {
336
+ max-width: 225px;
337
+ }
338
+ .rg-paired-views {
339
+ display: grid;
340
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
341
+ gap: 18px;
342
+ }
343
+ .rg-source-pane,
344
+ .rg-reference-pane {
345
+ min-width: 0;
346
+ border-top: 3px solid transparent;
347
+ padding-top: 10px;
348
+ }
349
+ .rg-paired-views [data-active="true"] {
350
+ border-top-color: var(--rg-accent);
351
+ }
352
+ .rg-guided .rg-image-view,
353
+ .rg-guided .rg-empty {
354
+ height: clamp(280px, 44vh, 480px);
355
+ }
356
+ .rg-guided .rg-image-panel .rg-panel-heading {
357
+ min-height: 39px;
358
+ }
359
+ .rg-guided .rg-image-panel .rg-panel-heading h2 {
360
+ margin: 0;
361
+ }
362
+ .rg-guided .rg-image-meta {
363
+ margin-top: 4px;
364
+ }
365
+ .rg-view-tabs {
366
+ display: none;
367
+ }
368
+ .rg-review-panels {
369
+ display: grid;
370
+ grid-template-columns: repeat(2, minmax(0, 1fr));
371
+ gap: 24px;
372
+ padding: 18px 0;
373
+ }
374
+ .rg-review-panels section + section {
375
+ margin-top: 0;
376
+ padding-top: 0;
377
+ border-top: none;
378
+ }
379
+ .rg-guided .rg-gcp-panel {
380
+ border-top: 1px solid var(--rg-border);
381
+ margin-top: 18px;
382
+ padding-top: 16px;
383
+ }
384
+ .rg-guided .rg-gcp-panel > .rg-toolbar,
385
+ .rg-guided .rg-gcp-panel > .rg-hint {
386
+ display: none;
387
+ }
388
+ .rg-advanced {
389
+ margin-top: 16px;
390
+ }
391
+ @media (max-width: 720px) {
392
+ .rg-guided {
393
+ padding: 12px;
394
+ }
395
+ .rg-matching-bar {
396
+ flex-direction: column;
397
+ align-items: stretch;
398
+ gap: 4px;
399
+ }
400
+ .rg-preview-controls {
401
+ justify-content: space-between;
402
+ }
403
+ .rg-match-tools label {
404
+ margin-left: 0;
405
+ width: 100%;
406
+ }
407
+ .rg-paired-views {
408
+ grid-template-columns: minmax(0, 1fr);
409
+ }
410
+ .rg-paired-views[data-mobile-view="image"] .rg-reference-pane,
411
+ .rg-paired-views[data-mobile-view="map"] .rg-source-pane {
412
+ display: none;
413
+ }
414
+ .rg-view-tabs {
415
+ display: flex;
416
+ gap: 8px;
417
+ }
418
+ .rg-guided .rg-image-view,
419
+ .rg-guided .rg-empty {
420
+ height: 340px;
421
+ }
422
+ .rg-review-panels {
423
+ grid-template-columns: minmax(0, 1fr);
424
+ }
425
+ }
426
+
427
+ .rg-guided .rg-image-panel .rg-panel-heading .rg-file {
428
+ margin: 0;
429
+ }
430
+ .rg-view-tabs {
431
+ border: 0;
432
+ margin: 0;
433
+ padding: 0;
434
+ }
435
+ .rg-guided .rg-matching-bar {
436
+ position: sticky;
437
+ top: 0;
438
+ z-index: 5;
439
+ background: var(--rg-paper);
440
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Start a browser download and revoke its temporary object URL after one second. Invoke
3
+ * from a client-side user action; this utility performs no upload.
4
+ */
5
+ export declare function downloadBlob(blob: Blob, name: string): void;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Start a browser download and revoke its temporary object URL after one second. Invoke
3
+ * from a client-side user action; this utility performs no upload.
4
+ */
5
+ export function downloadBlob(blob, name) {
6
+ const url = URL.createObjectURL(blob), a = document.createElement("a");
7
+ a.href = url;
8
+ a.download = name;
9
+ a.click();
10
+ setTimeout(() => URL.revokeObjectURL(url), 1000);
11
+ }
package/package.json CHANGED
@@ -1,6 +1,60 @@
1
1
  {
2
+ "version": "0.1.0",
3
+ "license": "MIT",
4
+ "type": "module",
5
+ "engines": {
6
+ "node": ">=22.12.0"
7
+ },
8
+ "homepage": "https://github.com/tobilg/georeferencing#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/tobilg/georeferencing/issues"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
2
15
  "name": "@georeferencing/react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
16
+ "description": "React panels and editor for the headless georeferencing core and optional export plugins",
17
+ "sideEffects": [
18
+ "**/*.css"
19
+ ],
20
+ "files": [
21
+ "dist",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js"
31
+ },
32
+ "./styles.css": "./dist/styles.css"
33
+ },
34
+ "dependencies": {
35
+ "@georeferencing/core": "^0.1.0"
36
+ },
37
+ "peerDependencies": {
38
+ "react": ">=19.3.0 <20",
39
+ "react-dom": ">=19.3.0 <20",
40
+ "ol": ">=10.10.0 <11"
41
+ },
42
+ "devDependencies": {
43
+ "typescript": "5.9.3",
44
+ "react": "19.3.0",
45
+ "react-dom": "19.3.0",
46
+ "ol": "10.10.0",
47
+ "@types/react": "19.2.14",
48
+ "@types/react-dom": "19.2.3"
49
+ },
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/tobilg/georeferencing.git",
53
+ "directory": "packages/react"
54
+ },
55
+ "scripts": {
56
+ "build": "node ../../scripts/build-package.mjs react",
57
+ "dev": "node ../../scripts/build-package.mjs react --watch",
58
+ "typecheck": "tsc --noEmit --noUnusedLocals --noUnusedParameters"
59
+ }
6
60
  }