@lmb-it/kitsconcerto-native 0.1.285 → 0.1.287
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/apps/mobile/src/ui/accordion/index.js +2 -2
- package/components/ImageCropper/compression.cjs +63 -0
- package/components/ImageCropper/compression.cjs.map +1 -0
- package/components/ImageCropper/compression.js +58 -0
- package/components/ImageCropper/compression.js.map +1 -0
- package/components/ImageCropper/constants.cjs +47 -0
- package/components/ImageCropper/constants.cjs.map +1 -0
- package/components/ImageCropper/constants.js +29 -0
- package/components/ImageCropper/constants.js.map +1 -0
- package/components/ImageCropper/cropperState.cjs +129 -0
- package/components/ImageCropper/cropperState.cjs.map +1 -0
- package/components/ImageCropper/cropperState.js +124 -0
- package/components/ImageCropper/cropperState.js.map +1 -0
- package/components/ImageCropper/encode.cjs +45 -0
- package/components/ImageCropper/encode.cjs.map +1 -0
- package/components/ImageCropper/encode.js +42 -0
- package/components/ImageCropper/encode.js.map +1 -0
- package/components/ImageCropper/encoderRegistry.cjs +13 -0
- package/components/ImageCropper/encoderRegistry.cjs.map +1 -0
- package/components/ImageCropper/encoderRegistry.js +9 -0
- package/components/ImageCropper/encoderRegistry.js.map +1 -0
- package/components/ImageCropper/encoders/rnImageEncoder.cjs +54 -0
- package/components/ImageCropper/encoders/rnImageEncoder.cjs.map +1 -0
- package/components/ImageCropper/encoders/rnImageEncoder.js +51 -0
- package/components/ImageCropper/encoders/rnImageEncoder.js.map +1 -0
- package/components/ImageCropper/geometry.cjs +208 -0
- package/components/ImageCropper/geometry.cjs.map +1 -0
- package/components/ImageCropper/geometry.js +186 -0
- package/components/ImageCropper/geometry.js.map +1 -0
- package/components/ImageCropper/index.cjs +640 -0
- package/components/ImageCropper/index.cjs.map +1 -0
- package/components/ImageCropper/index.js +638 -0
- package/components/ImageCropper/index.js.map +1 -0
- package/components/ImageCropper/pinchZoom.cjs +8 -0
- package/components/ImageCropper/pinchZoom.cjs.map +1 -0
- package/components/ImageCropper/pinchZoom.js +5 -0
- package/components/ImageCropper/pinchZoom.js.map +1 -0
- package/components/ImageCropper/useImageSource.cjs +101 -0
- package/components/ImageCropper/useImageSource.cjs.map +1 -0
- package/components/ImageCropper/useImageSource.js +97 -0
- package/components/ImageCropper/useImageSource.js.map +1 -0
- package/hooks/useComponentDefaults.cjs +12 -0
- package/hooks/useComponentDefaults.cjs.map +1 -1
- package/hooks/useComponentDefaults.js +12 -0
- package/hooks/useComponentDefaults.js.map +1 -1
- package/index.cjs +120 -115
- package/index.cjs.map +1 -1
- package/index.d.ts +394 -3
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +13 -1
- package/packages/types/src/Theme/defaultTheme.cjs +189 -0
- package/packages/types/src/Theme/defaultTheme.cjs.map +1 -1
- package/packages/types/src/Theme/defaultTheme.js +189 -0
- package/packages/types/src/Theme/defaultTheme.js.map +1 -1
|
@@ -1200,6 +1200,195 @@ const defaultTheme = {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
},
|
|
1202
1202
|
// ─── Sidebar ──────────────────────────────────────────
|
|
1203
|
+
// ─── ImageCropper ─────────────────────────────────
|
|
1204
|
+
// ⚠️ NUMBERS, NOT CSS STRINGS, FOR ANYTHING NATIVE ALSO READS — the
|
|
1205
|
+
// same rule `Input.inputGroup` carries: React Native's ViewStyle wants
|
|
1206
|
+
// `borderWidth: 1`, web treats the bare `1` as `1px`, and one shared
|
|
1207
|
+
// declaration then renders the same frame on both.
|
|
1208
|
+
/* ─── ImageCropper ────────────────────────────────────────
|
|
1209
|
+
⛔ EVERY NUMBER HERE IS MEASURED OFF THE MOCKUP,
|
|
1210
|
+
`UML/UI/ClientPortal/AlphaMatch - Image Cropper.dc.html`, which is
|
|
1211
|
+
the design source for this component. Changing one of them is a
|
|
1212
|
+
design change, not a tidy-up — check the mockup first.
|
|
1213
|
+
|
|
1214
|
+
⚠️ THE STAGE AND ITS CHROME DO NOT INVERT WITH THE COLOUR MODE. A
|
|
1215
|
+
photograph has to read against the stage in light mode and dark
|
|
1216
|
+
mode alike, so the dark surfaces below are literals and the alpha
|
|
1217
|
+
families (literal in both modes by construction) carry the rest.
|
|
1218
|
+
The light chrome — header, footer, card — goes through tokens. */
|
|
1219
|
+
ImageCropper: {
|
|
1220
|
+
root: {
|
|
1221
|
+
style: {
|
|
1222
|
+
backgroundColor: "surface-card",
|
|
1223
|
+
borderRadius: 20,
|
|
1224
|
+
overflow: "hidden"
|
|
1225
|
+
/* ⚠️ THE CARD'S DROP SHADOW IS NOT HERE. On web
|
|
1226
|
+
`IStyleClasses` types `shadowColor`/`shadowOpacity`/
|
|
1227
|
+
`shadowRadius`/`shadowOffset`/`elevation` as `null` —
|
|
1228
|
+
they are the NATIVE spelling, and putting them in a slot
|
|
1229
|
+
is a type error in the web project (the `handle` slot
|
|
1230
|
+
below is the pre-existing instance of exactly that).
|
|
1231
|
+
Each platform file applies the mockup's
|
|
1232
|
+
`0 24px 64px rgba(0,0,0,.35)` in its own spelling:
|
|
1233
|
+
`boxShadow` on web, `shadow*` on native. */
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
header: {
|
|
1237
|
+
style: {
|
|
1238
|
+
paddingLeft: 24,
|
|
1239
|
+
paddingRight: 24,
|
|
1240
|
+
paddingTop: 18,
|
|
1241
|
+
paddingBottom: 18,
|
|
1242
|
+
borderBottomWidth: 1,
|
|
1243
|
+
borderColor: "#F0F1F3",
|
|
1244
|
+
gap: 12
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
title: {
|
|
1248
|
+
style: {
|
|
1249
|
+
fontSize: 17,
|
|
1250
|
+
fontWeight: "800",
|
|
1251
|
+
fontColor: "text-primary",
|
|
1252
|
+
/* ⚠️ A STRING WITH UNITS. `letterSpacing` is typed
|
|
1253
|
+
`LetterSpacing<0 | (string & {})>`, so a bare -0.17 does
|
|
1254
|
+
not compile — and the mockup writes `-.01em` anyway. */
|
|
1255
|
+
letterSpacing: "-0.01em"
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
content: {
|
|
1259
|
+
style: {
|
|
1260
|
+
paddingLeft: 24,
|
|
1261
|
+
paddingRight: 24,
|
|
1262
|
+
paddingTop: 22,
|
|
1263
|
+
paddingBottom: 22,
|
|
1264
|
+
/* The mockup's left column: stage, then the tool row, 14 apart. */
|
|
1265
|
+
gap: 14
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
/* The stage. Dark on purpose: a photo reads against it in either
|
|
1269
|
+
colour mode, and a light stage makes every pale image look like
|
|
1270
|
+
it has no edges. */
|
|
1271
|
+
container: {
|
|
1272
|
+
style: {
|
|
1273
|
+
backgroundColor: "#0E1A1C",
|
|
1274
|
+
borderRadius: 14,
|
|
1275
|
+
overflow: "hidden"
|
|
1276
|
+
}
|
|
1277
|
+
},
|
|
1278
|
+
footer: {
|
|
1279
|
+
style: {
|
|
1280
|
+
paddingLeft: 24,
|
|
1281
|
+
paddingRight: 24,
|
|
1282
|
+
paddingTop: 14,
|
|
1283
|
+
paddingBottom: 14,
|
|
1284
|
+
borderTopWidth: 1,
|
|
1285
|
+
borderColor: "#F0F1F3",
|
|
1286
|
+
gap: 10
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
icon: { style: { fontColor: "#6B7280" } },
|
|
1290
|
+
text: { style: { fontSize: 12.5, fontColor: "#9CA3AF" } },
|
|
1291
|
+
/* ⛔ THE SCRIM IS AN ALPHA TOKEN, NOT A SOLID. `black-alpha-*` is
|
|
1292
|
+
literal in both colour modes — a scrim that inverted in dark mode
|
|
1293
|
+
would light UP the area the user is cropping away.
|
|
1294
|
+
|
|
1295
|
+
⚠️ 0.66, NOT 0.74. The mockup uses two different dims and they
|
|
1296
|
+
are not interchangeable: 0.66 is the scrim around the window,
|
|
1297
|
+
0.74 is the full-stage overlay while saving. */
|
|
1298
|
+
shade: { style: { backgroundColor: "rgba(6,14,16,0.66)" } },
|
|
1299
|
+
cropWindow: { style: { borderWidth: 2, borderColor: "#FFFFFF" } },
|
|
1300
|
+
gridLine: { style: { backgroundColor: "white-alpha-50" } },
|
|
1301
|
+
/* ⚠️ A ROUND KNOB WITH A TEAL RING, not a bare square. Against a
|
|
1302
|
+
photo a flat white square disappears into any pale area; the ring
|
|
1303
|
+
and the drop shadow are what keep a grip findable on a bright
|
|
1304
|
+
image, and the mockup draws the ring in the accent so a grip
|
|
1305
|
+
never reads as part of the picture.
|
|
1306
|
+
|
|
1307
|
+
⚠️ THE SIZE HERE IS THE CORNER KNOB'S. The four EDGE grips are
|
|
1308
|
+
bars, not circles — the platform files size those from
|
|
1309
|
+
`HANDLE_BAR_LONG` / `HANDLE_BAR_SHORT`, because one slot cannot
|
|
1310
|
+
carry two shapes. */
|
|
1311
|
+
handle: {
|
|
1312
|
+
style: {
|
|
1313
|
+
backgroundColor: "#FFFFFF",
|
|
1314
|
+
borderRadius: 999,
|
|
1315
|
+
width: 16,
|
|
1316
|
+
height: 16,
|
|
1317
|
+
borderWidth: 3,
|
|
1318
|
+
borderColor: "#20AAB0"
|
|
1319
|
+
/* ⛔ NO `shadow*`/`elevation` HERE, AND THIS IS THE ONE THAT
|
|
1320
|
+
BROKE A RELEASE. They are the NATIVE spelling; on web
|
|
1321
|
+
`IStyleClasses` types all five as `null`, so they are a
|
|
1322
|
+
type ERROR — and `packages/types` is built with
|
|
1323
|
+
`tsc -p tsconfig.web.json`, an EMITTING build that
|
|
1324
|
+
`publish.yml` runs as its first step and that must exit
|
|
1325
|
+
zero. Five keys here failed that step and the release
|
|
1326
|
+
never reached npm.
|
|
1327
|
+
The grip's drop shadow is applied by the platform file
|
|
1328
|
+
instead: `boxShadow` in `index.web.tsx`. Native renders
|
|
1329
|
+
no grips at all — it fixes the window and moves the
|
|
1330
|
+
image — so there is nothing to spell there. */
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
zoomChip: {
|
|
1334
|
+
style: {
|
|
1335
|
+
backgroundColor: "black-alpha-60",
|
|
1336
|
+
fontColor: "#FFFFFF",
|
|
1337
|
+
borderRadius: 13,
|
|
1338
|
+
paddingLeft: 10,
|
|
1339
|
+
paddingRight: 10,
|
|
1340
|
+
height: 26,
|
|
1341
|
+
fontSize: 11.5,
|
|
1342
|
+
fontWeight: "700"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
/* The mockup rings the preview in white and floats it, rather than
|
|
1346
|
+
outlining it — an outline on a photo reads as part of the photo. */
|
|
1347
|
+
previewFrame: {
|
|
1348
|
+
style: {
|
|
1349
|
+
borderWidth: 4,
|
|
1350
|
+
borderColor: "#FFFFFF",
|
|
1351
|
+
borderRadius: 12,
|
|
1352
|
+
overflow: "hidden",
|
|
1353
|
+
backgroundColor: "#E5E7EB"
|
|
1354
|
+
/* The float — `0 4px 14px rgba(0,0,0,.14)` — is applied by
|
|
1355
|
+
each platform file, for the reason given on `root`. */
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
/* ⛔ THE DROP TARGET LIVES ON THE STAGE, NOT INSTEAD OF IT. It used
|
|
1359
|
+
to be a light box that replaced the dark stage entirely, so
|
|
1360
|
+
choosing a photo made the whole component change colour. The
|
|
1361
|
+
mockup keeps the stage and insets a dashed frame inside it. */
|
|
1362
|
+
dropZone: {
|
|
1363
|
+
style: {
|
|
1364
|
+
borderWidth: 1.5,
|
|
1365
|
+
borderStyle: "dashed",
|
|
1366
|
+
borderColor: "white-alpha-20",
|
|
1367
|
+
borderRadius: 14,
|
|
1368
|
+
backgroundColor: "#0E1A1C",
|
|
1369
|
+
padding: 20,
|
|
1370
|
+
gap: 9
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
progressFill: { style: { backgroundColor: "#20AAB0", height: 5, borderRadius: 999 } },
|
|
1374
|
+
/* ⛔ THE SHAPE SLOT, AND IT CARRIES THE *RECTANGLE'S* RADIUS. The
|
|
1375
|
+
circle is NOT a 999 pill set here — `maskShape: 'circle'` makes
|
|
1376
|
+
the component use a true 50%, because a pill radius on a window
|
|
1377
|
+
that is wider than it is tall gives a STADIUM, not a circle.
|
|
1378
|
+
That is exactly what shipped for one render of the 16:9 cover
|
|
1379
|
+
story: 999 leaked out of this slot into the rectangle case and
|
|
1380
|
+
drew a lozenge. What belongs here is the corner rounding a
|
|
1381
|
+
RECTANGULAR window should have; the circle overrides it.
|
|
1382
|
+
|
|
1383
|
+
⚠️ 3, NOT 12 — the mockup's cover window is very nearly square
|
|
1384
|
+
cornered, because a banner crop with 12px corners does not match
|
|
1385
|
+
the banner it is cropped for. */
|
|
1386
|
+
mask: { style: { borderRadius: 3 } },
|
|
1387
|
+
/* The zoom rail sits on the dark stage on a phone, so its unfilled
|
|
1388
|
+
half is a white alpha rather than a surface token. */
|
|
1389
|
+
track: { style: { backgroundColor: "white-alpha-20", borderRadius: 999, height: 4 } },
|
|
1390
|
+
thumb: { style: { backgroundColor: "#20AAB0", borderRadius: 999 } }
|
|
1391
|
+
},
|
|
1203
1392
|
Sidebar: {
|
|
1204
1393
|
root: {
|
|
1205
1394
|
style: {
|