@mypixia/simplex-kiosk 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/README.md +49 -0
- package/dist/index.cjs.js +74 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +9072 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @mypixia/simplex-kiosk
|
|
2
|
+
|
|
3
|
+
Kiosk-tuned wrapper around `@mypixia/simplex-designer` for in-store
|
|
4
|
+
self-service touch screens (the MyPixia merchant kiosk feature).
|
|
5
|
+
|
|
6
|
+
What it adds on top of the designer:
|
|
7
|
+
|
|
8
|
+
- **Touch-first**: 44px minimum touch targets, no text selection / touch
|
|
9
|
+
callouts / pinch-zoom inside the editor, 16px inputs (no zoom-on-focus).
|
|
10
|
+
- **Idle reset**: `onIdle` fires after `idleTimeoutSeconds` of inactivity so
|
|
11
|
+
the kiosk shell can reset to its attract screen.
|
|
12
|
+
- **Locked-down mode**: always `mode="customize"` — kiosk customers never see
|
|
13
|
+
the merchant authoring toolset.
|
|
14
|
+
- **`enterKioskFullscreen()`** helper for true kiosk presentation.
|
|
15
|
+
|
|
16
|
+
Everything else passes through: `theme`, `product`, `aiEnabled`,
|
|
17
|
+
`onAIImageGenerate`, `onUploadImage`, `initialColor`, ... and the ref exposes
|
|
18
|
+
the designer's imperative API (`exportAllDesignsAsJSON`, `addImageFromUrl`,
|
|
19
|
+
`exportDesign`, ...).
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
import KioskDesigner, { enterKioskFullscreen } from '@mypixia/simplex-kiosk';
|
|
25
|
+
|
|
26
|
+
<KioskDesigner
|
|
27
|
+
ref={designerRef}
|
|
28
|
+
idleTimeoutSeconds={120}
|
|
29
|
+
onIdle={resetToAttractScreen}
|
|
30
|
+
theme={{ primaryColor: '#6a45d2' }}
|
|
31
|
+
product={product}
|
|
32
|
+
aiEnabled={config.aiEnabled}
|
|
33
|
+
onAIImageGenerate={generateKioskAIImage}
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Build / publish
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install # once (uses the widget2 toolchain versions)
|
|
41
|
+
npm run build # → dist/index.es.js + dist/index.cjs.js
|
|
42
|
+
npm publish # done by the maintainer
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The package bundles the designer source from `../src`, so consumers install
|
|
46
|
+
only `@mypixia/simplex-kiosk`. Until it is on npm, the merchant portal's
|
|
47
|
+
kiosk runtime embeds `@mypixia/simplex-designer` directly with the same props
|
|
48
|
+
(see `mypixia-merchant/frontend/src/pages/kiosk-runtime/KioskRun.jsx` — the
|
|
49
|
+
swap is a one-line import change).
|