@ezpg/app-ui 0.20.0 → 0.22.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/CHANGELOG.md +37 -0
- package/lib/module/adjust/adjust-template.js +1 -0
- package/lib/module/adjust/adjust-template.js.map +1 -1
- package/lib/module/adjust/axis-adjust.js +181 -0
- package/lib/module/adjust/axis-adjust.js.map +1 -0
- package/lib/module/adjust/axis-tabs.js +81 -0
- package/lib/module/adjust/axis-tabs.js.map +1 -0
- package/lib/module/adjust/axis-wheel.js +286 -0
- package/lib/module/adjust/axis-wheel.js.map +1 -0
- package/lib/module/adjust/index.js +4 -0
- package/lib/module/adjust/index.js.map +1 -1
- package/lib/module/adjust/store-sample.js +436 -0
- package/lib/module/adjust/store-sample.js.map +1 -0
- package/lib/module/blocks/choice-art/choice-art.js +589 -0
- package/lib/module/blocks/choice-art/choice-art.js.map +1 -0
- package/lib/module/blocks/choice-art/index.js +4 -0
- package/lib/module/blocks/choice-art/index.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
- package/lib/module/blocks/detail-editor/compare-slider.js +5 -2
- package/lib/module/blocks/detail-editor/compare-slider.js.map +1 -1
- package/lib/module/blocks/detail-editor/detail-canvas.js +192 -61
- package/lib/module/blocks/detail-editor/detail-canvas.js.map +1 -1
- package/lib/module/blocks/detail-editor/detail-types.js +57 -0
- package/lib/module/blocks/detail-editor/detail-types.js.map +1 -1
- package/lib/module/blocks/detail-editor/draft-preview.js +22 -0
- package/lib/module/blocks/detail-editor/draft-preview.js.map +1 -1
- package/lib/module/blocks/detail-editor/focus-context.js +1 -0
- package/lib/module/blocks/detail-editor/focus-context.js.map +1 -1
- package/lib/module/blocks/detail-editor/index.js +2 -2
- package/lib/module/blocks/detail-editor/index.js.map +1 -1
- package/lib/module/blocks/detail-editor/keep-words.js +34 -0
- package/lib/module/blocks/detail-editor/keep-words.js.map +1 -0
- package/lib/module/blocks/detail-editor/layout-picker.js +192 -8
- package/lib/module/blocks/detail-editor/layout-picker.js.map +1 -1
- package/lib/module/blocks/detail-request/detail-request.js +213 -0
- package/lib/module/blocks/detail-request/detail-request.js.map +1 -0
- package/lib/module/blocks/detail-request/index.js +4 -0
- package/lib/module/blocks/detail-request/index.js.map +1 -0
- package/lib/module/blocks/detail-studio/action-chips.js +72 -0
- package/lib/module/blocks/detail-studio/action-chips.js.map +1 -0
- package/lib/module/blocks/detail-studio/adjust-tiles.js +3 -3
- package/lib/module/blocks/detail-studio/adjust-tiles.js.map +1 -1
- package/lib/module/blocks/detail-studio/asset-grid.js +33 -16
- package/lib/module/blocks/detail-studio/asset-grid.js.map +1 -1
- package/lib/module/blocks/detail-studio/confirm-row.js +3 -0
- package/lib/module/blocks/detail-studio/confirm-row.js.map +1 -1
- package/lib/module/blocks/detail-studio/detail-studio-template.js +2 -6
- package/lib/module/blocks/detail-studio/detail-studio-template.js.map +1 -1
- package/lib/module/blocks/detail-studio/edge-fade.js +74 -0
- package/lib/module/blocks/detail-studio/edge-fade.js.map +1 -0
- package/lib/module/blocks/detail-studio/image-prompt.js +8 -10
- package/lib/module/blocks/detail-studio/image-prompt.js.map +1 -1
- package/lib/module/blocks/detail-studio/index.js +7 -5
- package/lib/module/blocks/detail-studio/index.js.map +1 -1
- package/lib/module/blocks/detail-studio/rewrite-tray.js +17 -64
- package/lib/module/blocks/detail-studio/rewrite-tray.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-cover.js +41 -0
- package/lib/module/blocks/detail-studio/section-cover.js.map +1 -0
- package/lib/module/blocks/detail-studio/section-edit-template.js +103 -12
- package/lib/module/blocks/detail-studio/section-edit-template.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-kind-grid.js +2 -3
- package/lib/module/blocks/detail-studio/section-kind-grid.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-settings.js +127 -61
- package/lib/module/blocks/detail-studio/section-settings.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-bar.js +46 -25
- package/lib/module/blocks/detail-studio/studio-bar.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-dock.js +21 -39
- package/lib/module/blocks/detail-studio/studio-dock.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-glyphs.js +92 -0
- package/lib/module/blocks/detail-studio/studio-glyphs.js.map +1 -0
- package/lib/module/blocks/detail-studio/studio-sheet.js +5 -3
- package/lib/module/blocks/detail-studio/studio-sheet.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-steps.js +60 -0
- package/lib/module/blocks/detail-studio/studio-steps.js.map +1 -0
- package/lib/module/blocks/detail-studio/studio-toggle.js +130 -0
- package/lib/module/blocks/detail-studio/studio-toggle.js.map +1 -0
- package/lib/module/blocks/detail-studio/{photo-tool-bar.js → studio-tools.js} +63 -42
- package/lib/module/blocks/detail-studio/studio-tools.js.map +1 -0
- package/lib/module/blocks/detail-studio/text-format-panel.js +16 -8
- package/lib/module/blocks/detail-studio/text-format-panel.js.map +1 -1
- package/lib/module/blocks/index.js +2 -0
- package/lib/module/blocks/index.js.map +1 -1
- package/lib/module/components/button/button.js +13 -5
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/chip/chip.js +5 -1
- package/lib/module/components/chip/chip.js.map +1 -1
- package/lib/module/components/chip-group/chip-group.js +1 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -1
- package/lib/module/components/credit/credit.js +6 -2
- package/lib/module/components/credit/credit.js.map +1 -1
- package/lib/module/components/dropdown-menu/dropdown-menu.js +9 -4
- package/lib/module/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/lib/module/components/page-header/page-header.js +25 -1
- package/lib/module/components/page-header/page-header.js.map +1 -1
- package/lib/module/components/segmented-control/segmented-control.js +3 -1
- package/lib/module/components/segmented-control/segmented-control.js.map +1 -1
- package/lib/module/components/skeleton/skeleton.js +4 -2
- package/lib/module/components/skeleton/skeleton.js.map +1 -1
- package/lib/module/components/slider/slider.js +53 -16
- package/lib/module/components/slider/slider.js.map +1 -1
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toast/toast.js +8 -4
- package/lib/module/components/toast/toast.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/glyphs.js +459 -1
- package/lib/module/internal/glyphs.js.map +1 -1
- package/lib/module/internal/line-icons.js +1 -0
- package/lib/module/internal/line-icons.js.map +1 -1
- package/lib/module/internal/retry-glyph.js +5 -2
- package/lib/module/internal/retry-glyph.js.map +1 -1
- package/lib/module/internal/undo-glyph.js +11 -8
- package/lib/module/internal/undo-glyph.js.map +1 -1
- package/lib/module/sortable/section-board.js +73 -89
- package/lib/module/sortable/section-board.js.map +1 -1
- package/lib/module/templates/design-pick-template.js +8 -1
- package/lib/module/templates/design-pick-template.js.map +1 -1
- package/lib/module/templates/index.js +1 -0
- package/lib/module/templates/index.js.map +1 -1
- package/lib/module/templates/intro-template.js +3 -3
- package/lib/module/templates/intro-template.js.map +1 -1
- package/lib/module/templates/preview-edit-template.js +422 -0
- package/lib/module/templates/preview-edit-template.js.map +1 -0
- package/lib/module/templates/result-template.js +2 -1
- package/lib/module/templates/result-template.js.map +1 -1
- package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -1
- package/lib/typescript/src/adjust/axis-adjust.d.ts +25 -0
- package/lib/typescript/src/adjust/axis-adjust.d.ts.map +1 -0
- package/lib/typescript/src/adjust/axis-tabs.d.ts +15 -0
- package/lib/typescript/src/adjust/axis-tabs.d.ts.map +1 -0
- package/lib/typescript/src/adjust/axis-wheel.d.ts +15 -0
- package/lib/typescript/src/adjust/axis-wheel.d.ts.map +1 -0
- package/lib/typescript/src/adjust/index.d.ts +4 -0
- package/lib/typescript/src/adjust/index.d.ts.map +1 -1
- package/lib/typescript/src/adjust/store-sample.d.ts +46 -0
- package/lib/typescript/src/adjust/store-sample.d.ts.map +1 -0
- package/lib/typescript/src/blocks/choice-art/choice-art.d.ts +73 -0
- package/lib/typescript/src/blocks/choice-art/choice-art.d.ts.map +1 -0
- package/lib/typescript/src/blocks/choice-art/index.d.ts +2 -0
- package/lib/typescript/src/blocks/choice-art/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts +2 -1
- package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts +3 -1
- package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts +11 -0
- package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts +4 -1
- package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts +9 -0
- package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/index.d.ts +3 -2
- package/lib/typescript/src/blocks/detail-editor/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts +2 -0
- package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts +6 -1
- package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-request/detail-request.d.ts +24 -0
- package/lib/typescript/src/blocks/detail-request/detail-request.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-request/index.d.ts +2 -0
- package/lib/typescript/src/blocks/detail-request/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts +12 -0
- package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/asset-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/confirm-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/detail-studio-template.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts +10 -0
- package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/image-prompt.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/index.d.ts +7 -5
- package/lib/typescript/src/blocks/detail-studio/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts +3 -3
- package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts +7 -0
- package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts +9 -0
- package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-kind-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts +11 -13
- package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts +6 -2
- package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts +0 -2
- package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts +6 -0
- package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-sheet.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts +11 -0
- package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts +14 -0
- package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts +19 -0
- package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts +2 -1
- package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts.map +1 -1
- package/lib/typescript/src/blocks/index.d.ts +2 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/button.d.ts +3 -1
- package/lib/typescript/src/components/button/button.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/chip.d.ts +2 -1
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
- package/lib/typescript/src/components/credit/credit.d.ts +1 -0
- package/lib/typescript/src/components/credit/credit.d.ts.map +1 -1
- package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +2 -0
- package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/lib/typescript/src/components/page-header/page-header.d.ts +1 -0
- package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -1
- package/lib/typescript/src/components/segmented-control/segmented-control.d.ts +2 -0
- package/lib/typescript/src/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +2 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/slider.d.ts +2 -1
- package/lib/typescript/src/components/slider/slider.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +1 -1
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts +4 -1
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/glyphs.d.ts +13 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
- package/lib/typescript/src/internal/line-icons.d.ts +1 -0
- package/lib/typescript/src/internal/line-icons.d.ts.map +1 -1
- package/lib/typescript/src/internal/retry-glyph.d.ts.map +1 -1
- package/lib/typescript/src/internal/undo-glyph.d.ts.map +1 -1
- package/lib/typescript/src/sortable/section-board.d.ts.map +1 -1
- package/lib/typescript/src/templates/design-pick-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/index.d.ts +2 -0
- package/lib/typescript/src/templates/index.d.ts.map +1 -1
- package/lib/typescript/src/templates/intro-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/preview-edit-template.d.ts +39 -0
- package/lib/typescript/src/templates/preview-edit-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/result-template.d.ts +2 -1
- package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adjust/adjust-template.tsx +1 -0
- package/src/adjust/axis-adjust.tsx +206 -0
- package/src/adjust/axis-tabs.tsx +81 -0
- package/src/adjust/axis-wheel.tsx +309 -0
- package/src/adjust/index.ts +15 -0
- package/src/adjust/store-sample.tsx +519 -0
- package/src/blocks/choice-art/choice-art.tsx +500 -0
- package/src/blocks/choice-art/index.ts +29 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +1 -1
- package/src/blocks/detail-editor/compare-slider.tsx +3 -1
- package/src/blocks/detail-editor/detail-canvas.tsx +264 -69
- package/src/blocks/detail-editor/detail-types.ts +37 -0
- package/src/blocks/detail-editor/draft-preview.tsx +46 -2
- package/src/blocks/detail-editor/focus-context.ts +13 -0
- package/src/blocks/detail-editor/index.ts +11 -1
- package/src/blocks/detail-editor/keep-words.ts +36 -0
- package/src/blocks/detail-editor/layout-picker.tsx +188 -6
- package/src/blocks/detail-request/detail-request.tsx +198 -0
- package/src/blocks/detail-request/index.ts +11 -0
- package/src/blocks/detail-studio/action-chips.tsx +77 -0
- package/src/blocks/detail-studio/adjust-tiles.tsx +3 -3
- package/src/blocks/detail-studio/asset-grid.tsx +30 -16
- package/src/blocks/detail-studio/confirm-row.tsx +3 -0
- package/src/blocks/detail-studio/detail-studio-template.tsx +2 -6
- package/src/blocks/detail-studio/edge-fade.tsx +76 -0
- package/src/blocks/detail-studio/image-prompt.tsx +6 -9
- package/src/blocks/detail-studio/index.ts +19 -16
- package/src/blocks/detail-studio/rewrite-tray.tsx +16 -56
- package/src/blocks/detail-studio/section-cover.tsx +44 -0
- package/src/blocks/detail-studio/section-edit-template.tsx +138 -13
- package/src/blocks/detail-studio/section-kind-grid.tsx +2 -2
- package/src/blocks/detail-studio/section-settings.tsx +124 -69
- package/src/blocks/detail-studio/studio-bar.tsx +61 -41
- package/src/blocks/detail-studio/studio-dock.tsx +19 -37
- package/src/blocks/detail-studio/studio-glyphs.tsx +77 -0
- package/src/blocks/detail-studio/studio-sheet.tsx +7 -3
- package/src/blocks/detail-studio/studio-steps.tsx +58 -0
- package/src/blocks/detail-studio/studio-toggle.tsx +130 -0
- package/src/blocks/detail-studio/studio-tools.tsx +126 -0
- package/src/blocks/detail-studio/text-format-panel.tsx +26 -14
- package/src/blocks/index.tsx +2 -0
- package/src/components/button/button.tsx +12 -5
- package/src/components/chip/chip.tsx +9 -1
- package/src/components/chip-group/chip-group.tsx +2 -0
- package/src/components/credit/credit.tsx +9 -2
- package/src/components/dropdown-menu/dropdown-menu.tsx +18 -7
- package/src/components/page-header/page-header.tsx +28 -1
- package/src/components/segmented-control/segmented-control.tsx +10 -2
- package/src/components/skeleton/skeleton.tsx +5 -2
- package/src/components/slider/slider.tsx +66 -14
- package/src/components/toast/index.ts +1 -0
- package/src/components/toast/toast.tsx +12 -4
- package/src/index.tsx +13 -0
- package/src/internal/glyphs.tsx +411 -0
- package/src/internal/line-icons.ts +2 -0
- package/src/internal/retry-glyph.tsx +7 -2
- package/src/internal/undo-glyph.tsx +12 -11
- package/src/sortable/section-board.tsx +71 -76
- package/src/templates/design-pick-template.tsx +9 -1
- package/src/templates/index.ts +7 -0
- package/src/templates/intro-template.tsx +14 -12
- package/src/templates/preview-edit-template.tsx +467 -0
- package/src/templates/result-template.tsx +3 -0
- package/lib/module/blocks/detail-studio/keyboard-bar.js +0 -67
- package/lib/module/blocks/detail-studio/keyboard-bar.js.map +0 -1
- package/lib/module/blocks/detail-studio/photo-tool-bar.js.map +0 -1
- package/lib/module/blocks/detail-studio/section-thumb.js +0 -49
- package/lib/module/blocks/detail-studio/section-thumb.js.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts +0 -18
- package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts +0 -19
- package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts +0 -14
- package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts.map +0 -1
- package/src/blocks/detail-studio/keyboard-bar.tsx +0 -73
- package/src/blocks/detail-studio/photo-tool-bar.tsx +0 -100
- package/src/blocks/detail-studio/section-thumb.tsx +0 -41
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
2
|
|
|
3
|
+
const OPEN = 'transparent';
|
|
4
|
+
|
|
3
5
|
const g = StyleSheet.create({
|
|
4
6
|
center: { alignItems: 'center', justifyContent: 'center' },
|
|
5
|
-
open: {
|
|
7
|
+
open: { transform: [{ rotate: '45deg' }] },
|
|
6
8
|
head: { position: 'absolute' },
|
|
7
9
|
});
|
|
8
10
|
|
|
@@ -19,7 +21,10 @@ export function RetryGlyph({ color, size }: { color: string; size: number }) {
|
|
|
19
21
|
height: ring,
|
|
20
22
|
borderRadius: ring / 2,
|
|
21
23
|
borderWidth: stroke,
|
|
22
|
-
|
|
24
|
+
borderTopColor: OPEN,
|
|
25
|
+
borderRightColor: color,
|
|
26
|
+
borderBottomColor: color,
|
|
27
|
+
borderLeftColor: color,
|
|
23
28
|
},
|
|
24
29
|
]}
|
|
25
30
|
/>
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
2
|
|
|
3
|
+
const OPEN = 'transparent';
|
|
4
|
+
|
|
3
5
|
const g = StyleSheet.create({
|
|
4
|
-
arc: {
|
|
5
|
-
|
|
6
|
-
borderTopColor: 'transparent',
|
|
7
|
-
transform: [{ rotate: '-45deg' }],
|
|
8
|
-
},
|
|
9
|
-
head: { position: 'absolute', transform: [{ rotate: '-6deg' }] },
|
|
6
|
+
arc: { position: 'absolute', transform: [{ rotate: '-55deg' }] },
|
|
7
|
+
head: { position: 'absolute', transform: [{ rotate: '45deg' }] },
|
|
10
8
|
});
|
|
11
9
|
|
|
12
10
|
export function UndoGlyph({ color, size }: { color: string; size: number }) {
|
|
13
11
|
const unit = size / 18;
|
|
14
12
|
const stroke = Math.max(1.5, unit * 1.7);
|
|
15
13
|
const ring = unit * 13;
|
|
16
|
-
const head = unit *
|
|
14
|
+
const head = unit * 4.8;
|
|
17
15
|
return (
|
|
18
16
|
<View style={{ width: size, height: size }}>
|
|
19
17
|
<View
|
|
@@ -26,7 +24,10 @@ export function UndoGlyph({ color, size }: { color: string; size: number }) {
|
|
|
26
24
|
height: ring,
|
|
27
25
|
borderRadius: ring / 2,
|
|
28
26
|
borderWidth: stroke,
|
|
29
|
-
|
|
27
|
+
borderTopColor: OPEN,
|
|
28
|
+
borderRightColor: color,
|
|
29
|
+
borderBottomColor: color,
|
|
30
|
+
borderLeftColor: color,
|
|
30
31
|
},
|
|
31
32
|
]}
|
|
32
33
|
/>
|
|
@@ -34,14 +35,14 @@ export function UndoGlyph({ color, size }: { color: string; size: number }) {
|
|
|
34
35
|
style={[
|
|
35
36
|
g.head,
|
|
36
37
|
{
|
|
37
|
-
left: unit *
|
|
38
|
-
top: unit * 1.
|
|
38
|
+
left: unit * 6.6,
|
|
39
|
+
top: unit * 1.45,
|
|
39
40
|
width: head,
|
|
40
41
|
height: head,
|
|
41
42
|
borderLeftWidth: stroke,
|
|
42
43
|
borderBottomWidth: stroke,
|
|
43
44
|
borderColor: color,
|
|
44
|
-
borderRadius: unit * 0.
|
|
45
|
+
borderRadius: unit * 0.5,
|
|
45
46
|
},
|
|
46
47
|
]}
|
|
47
48
|
/>
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
import { View } from 'react-native';
|
|
11
11
|
import Animated, { useAnimatedRef } from 'react-native-reanimated';
|
|
12
12
|
import Sortable from 'react-native-sortables';
|
|
13
|
-
import { SECTION_THUMB } from '../blocks/detail-studio/section-thumb';
|
|
14
13
|
import { Skeleton } from '../components/skeleton/skeleton';
|
|
15
14
|
import { Text } from '../components/text/text';
|
|
16
15
|
import type { SectionAnchor } from '../components/dropdown-menu/dropdown-menu';
|
|
@@ -46,42 +45,46 @@ export type SectionBoardProps = {
|
|
|
46
45
|
const MOVE_LABELS: [string, string] = ['위로 이동', '아래로 이동'];
|
|
47
46
|
const WAIT_LINE = 120;
|
|
48
47
|
|
|
49
|
-
const rowHeight = (t: Theme) =>
|
|
48
|
+
const rowHeight = (t: Theme) => t.listRow.threeLine;
|
|
49
|
+
|
|
50
|
+
const thumbSize = (t: Theme) => t.space[16];
|
|
50
51
|
|
|
51
52
|
const useStyles = makeStyles((t) => ({
|
|
52
53
|
scroll: { flex: 1 },
|
|
54
|
+
content: { paddingTop: t.space[1], paddingBottom: t.space[4] },
|
|
53
55
|
card: {
|
|
54
56
|
marginHorizontal: t.space[4],
|
|
55
|
-
borderRadius: t.radius.
|
|
57
|
+
borderRadius: t.radius.md * 2,
|
|
56
58
|
backgroundColor: t.colors.surface,
|
|
57
59
|
},
|
|
58
60
|
row: {
|
|
59
61
|
height: rowHeight(t),
|
|
60
62
|
flexDirection: 'row',
|
|
61
63
|
alignItems: 'center',
|
|
62
|
-
|
|
64
|
+
paddingLeft: t.space[3],
|
|
65
|
+
paddingRight: t.space[1],
|
|
63
66
|
backgroundColor: t.colors.surface,
|
|
64
67
|
},
|
|
65
68
|
first: {
|
|
66
|
-
borderTopLeftRadius: t.radius.
|
|
67
|
-
borderTopRightRadius: t.radius.
|
|
69
|
+
borderTopLeftRadius: t.radius.md * 2,
|
|
70
|
+
borderTopRightRadius: t.radius.md * 2,
|
|
68
71
|
},
|
|
69
72
|
last: {
|
|
70
|
-
borderBottomLeftRadius: t.radius.
|
|
71
|
-
borderBottomRightRadius: t.radius.
|
|
73
|
+
borderBottomLeftRadius: t.radius.md * 2,
|
|
74
|
+
borderBottomRightRadius: t.radius.md * 2,
|
|
72
75
|
},
|
|
73
76
|
pressed: { backgroundColor: t.colors.background },
|
|
74
|
-
lifted: { borderRadius: t.radius.
|
|
77
|
+
lifted: { borderRadius: t.radius.md * 2, boxShadow: t.shadow.lift },
|
|
75
78
|
line: {
|
|
76
79
|
position: 'absolute',
|
|
77
80
|
top: 0,
|
|
78
81
|
right: 0,
|
|
79
|
-
left:
|
|
82
|
+
left: 0,
|
|
80
83
|
height: 1,
|
|
81
84
|
backgroundColor: t.colors.border,
|
|
82
85
|
},
|
|
83
86
|
grip: {
|
|
84
|
-
width: t.
|
|
87
|
+
width: t.minTouchSize,
|
|
85
88
|
height: t.minTouchSize,
|
|
86
89
|
alignItems: 'center',
|
|
87
90
|
justifyContent: 'center',
|
|
@@ -93,21 +96,11 @@ const useStyles = makeStyles((t) => ({
|
|
|
93
96
|
alignItems: 'center',
|
|
94
97
|
},
|
|
95
98
|
thumb: {
|
|
96
|
-
width:
|
|
97
|
-
height:
|
|
99
|
+
width: thumbSize(t),
|
|
100
|
+
height: thumbSize(t),
|
|
98
101
|
overflow: 'hidden',
|
|
99
|
-
borderRadius: t.radius.
|
|
100
|
-
backgroundColor: t.colors.
|
|
101
|
-
},
|
|
102
|
-
ring: {
|
|
103
|
-
position: 'absolute',
|
|
104
|
-
left: 0,
|
|
105
|
-
right: 0,
|
|
106
|
-
top: 0,
|
|
107
|
-
bottom: 0,
|
|
108
|
-
borderRadius: t.radius.md,
|
|
109
|
-
borderWidth: 1,
|
|
110
|
-
borderColor: t.colors.border,
|
|
102
|
+
borderRadius: t.radius.lg,
|
|
103
|
+
backgroundColor: t.colors.muted,
|
|
111
104
|
},
|
|
112
105
|
text: { flex: 1, paddingLeft: t.space[3], paddingRight: t.space[1] },
|
|
113
106
|
snippet: {
|
|
@@ -124,8 +117,9 @@ const useStyles = makeStyles((t) => ({
|
|
|
124
117
|
justifyContent: 'center',
|
|
125
118
|
},
|
|
126
119
|
wait: { marginTop: t.space[2] },
|
|
127
|
-
flag: { marginRight: -t.space[
|
|
120
|
+
flag: { marginRight: -t.space[3] },
|
|
128
121
|
turn: { transform: [{ rotate: '90deg' }] },
|
|
122
|
+
space: { width: t.minTouchSize * 2 },
|
|
129
123
|
}));
|
|
130
124
|
|
|
131
125
|
type RowProps = {
|
|
@@ -135,7 +129,7 @@ type RowProps = {
|
|
|
135
129
|
active: boolean;
|
|
136
130
|
lifted: boolean;
|
|
137
131
|
onPress: (key: string) => void;
|
|
138
|
-
onMore: (key: string,
|
|
132
|
+
onMore: (key: string, index: number) => void;
|
|
139
133
|
onMove: (from: number, to: number) => void;
|
|
140
134
|
hiddenLabel: string;
|
|
141
135
|
moreLabel: string;
|
|
@@ -157,7 +151,6 @@ const Row = memo(function SectionRow({
|
|
|
157
151
|
}: RowProps) {
|
|
158
152
|
const t = useTheme();
|
|
159
153
|
const s = useStyles();
|
|
160
|
-
const more = useRef<ComponentRef<typeof View>>(null);
|
|
161
154
|
const hidden = !!item.hidden;
|
|
162
155
|
if (item.pending) {
|
|
163
156
|
return (
|
|
@@ -165,17 +158,15 @@ const Row = memo(function SectionRow({
|
|
|
165
158
|
style={[s.row, index === 0 && s.first, index === count - 1 && s.last]}
|
|
166
159
|
>
|
|
167
160
|
{index > 0 ? <View pointerEvents="none" style={s.line} /> : null}
|
|
168
|
-
<Sortable.Handle mode="fixed-order">
|
|
169
|
-
<View style={s.grip} />
|
|
170
|
-
</Sortable.Handle>
|
|
171
161
|
<View style={s.main} accessible accessibilityLabel={item.title}>
|
|
172
162
|
<View style={s.thumb}>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
163
|
+
{item.thumb ?? (
|
|
164
|
+
<Skeleton
|
|
165
|
+
width={thumbSize(t)}
|
|
166
|
+
height={thumbSize(t)}
|
|
167
|
+
radius={t.radius.lg}
|
|
168
|
+
/>
|
|
169
|
+
)}
|
|
179
170
|
</View>
|
|
180
171
|
<View style={s.text}>
|
|
181
172
|
<Text weight="semibold" tone="muted" numberOfLines={1}>
|
|
@@ -189,17 +180,12 @@ const Row = memo(function SectionRow({
|
|
|
189
180
|
/>
|
|
190
181
|
</View>
|
|
191
182
|
</View>
|
|
192
|
-
<
|
|
183
|
+
<Sortable.Handle mode="fixed-order">
|
|
184
|
+
<View style={s.space} />
|
|
185
|
+
</Sortable.Handle>
|
|
193
186
|
</View>
|
|
194
187
|
);
|
|
195
188
|
}
|
|
196
|
-
const openMore = () => {
|
|
197
|
-
const box = more.current;
|
|
198
|
-
if (!box) return;
|
|
199
|
-
box.measureInWindow((x, y, width, height) =>
|
|
200
|
-
onMore(item.key, { x, y, width, height })
|
|
201
|
-
);
|
|
202
|
-
};
|
|
203
189
|
return (
|
|
204
190
|
<View
|
|
205
191
|
style={[
|
|
@@ -213,18 +199,6 @@ const Row = memo(function SectionRow({
|
|
|
213
199
|
{index > 0 && !lifted ? (
|
|
214
200
|
<View pointerEvents="none" style={s.line} />
|
|
215
201
|
) : null}
|
|
216
|
-
<Sortable.Handle>
|
|
217
|
-
<View
|
|
218
|
-
style={s.grip}
|
|
219
|
-
accessibilityElementsHidden
|
|
220
|
-
importantForAccessibility="no-hide-descendants"
|
|
221
|
-
>
|
|
222
|
-
<GripGlyph
|
|
223
|
-
color={lifted ? t.colors.title : t.colors.faint}
|
|
224
|
-
size={t.iconSize.md}
|
|
225
|
-
/>
|
|
226
|
-
</View>
|
|
227
|
-
</Sortable.Handle>
|
|
228
202
|
<PressableBase
|
|
229
203
|
onPress={() => onPress(item.key)}
|
|
230
204
|
accessibilityLabel={item.title}
|
|
@@ -241,10 +215,7 @@ const Row = memo(function SectionRow({
|
|
|
241
215
|
feedback="none"
|
|
242
216
|
style={s.main}
|
|
243
217
|
>
|
|
244
|
-
<View style={[s.thumb, hidden && s.faded]}>
|
|
245
|
-
{item.thumb}
|
|
246
|
-
<View pointerEvents="none" style={s.ring} />
|
|
247
|
-
</View>
|
|
218
|
+
<View style={[s.thumb, hidden && s.faded]}>{item.thumb}</View>
|
|
248
219
|
<View style={s.text}>
|
|
249
220
|
<Text weight="semibold" numberOfLines={1} style={hidden && s.faded}>
|
|
250
221
|
{item.title}
|
|
@@ -269,18 +240,28 @@ const Row = memo(function SectionRow({
|
|
|
269
240
|
<EyeOffGlyph color={t.colors.mutedForeground} size={t.iconSize.md} />
|
|
270
241
|
</View>
|
|
271
242
|
) : null}
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
243
|
+
<PressableBase
|
|
244
|
+
onPress={() => onMore(item.key, index)}
|
|
245
|
+
accessibilityLabel={moreLabel}
|
|
246
|
+
feedback="small"
|
|
247
|
+
style={s.icon}
|
|
248
|
+
>
|
|
249
|
+
<View style={s.turn}>
|
|
250
|
+
<MoreGlyph color={t.colors.mutedForeground} size={t.iconSize.md} />
|
|
251
|
+
</View>
|
|
252
|
+
</PressableBase>
|
|
253
|
+
<Sortable.Handle>
|
|
254
|
+
<View
|
|
255
|
+
style={s.grip}
|
|
256
|
+
accessibilityElementsHidden
|
|
257
|
+
importantForAccessibility="no-hide-descendants"
|
|
278
258
|
>
|
|
279
|
-
<
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
259
|
+
<GripGlyph
|
|
260
|
+
color={lifted ? t.colors.title : t.colors.faint}
|
|
261
|
+
size={t.iconSize.md}
|
|
262
|
+
/>
|
|
263
|
+
</View>
|
|
264
|
+
</Sortable.Handle>
|
|
284
265
|
</View>
|
|
285
266
|
);
|
|
286
267
|
});
|
|
@@ -300,6 +281,7 @@ export function SectionBoard({
|
|
|
300
281
|
const t = useTheme();
|
|
301
282
|
const s = useStyles();
|
|
302
283
|
const scroller = useAnimatedRef<Animated.ScrollView>();
|
|
284
|
+
const card = useRef<ComponentRef<typeof View>>(null);
|
|
303
285
|
const [lifted, setLifted] = useState<string | null>(null);
|
|
304
286
|
const live = useRef({ items, onPress, onMore, onReorder, bottomSpace });
|
|
305
287
|
live.current = { items, onPress, onMore, onReorder, bottomSpace };
|
|
@@ -311,8 +293,17 @@ export function SectionBoard({
|
|
|
311
293
|
|
|
312
294
|
const press = useCallback((key: string) => live.current.onPress(key), []);
|
|
313
295
|
const openMore = useCallback(
|
|
314
|
-
(key: string,
|
|
315
|
-
|
|
296
|
+
(key: string, index: number) =>
|
|
297
|
+
card.current?.measureInWindow((x, y, width) =>
|
|
298
|
+
live.current.onMore(key, {
|
|
299
|
+
x,
|
|
300
|
+
y: y + index * row,
|
|
301
|
+
width,
|
|
302
|
+
height: row,
|
|
303
|
+
pitch: row,
|
|
304
|
+
})
|
|
305
|
+
),
|
|
306
|
+
[row]
|
|
316
307
|
);
|
|
317
308
|
const move = useCallback((from: number, to: number) => {
|
|
318
309
|
const list = live.current.items;
|
|
@@ -348,7 +339,7 @@ export function SectionBoard({
|
|
|
348
339
|
<Animated.ScrollView
|
|
349
340
|
ref={scroller}
|
|
350
341
|
style={s.scroll}
|
|
351
|
-
contentContainerStyle={
|
|
342
|
+
contentContainerStyle={s.content}
|
|
352
343
|
scrollEventThrottle={16}
|
|
353
344
|
onScroll={(e) => {
|
|
354
345
|
offset.current = e.nativeEvent.contentOffset.y;
|
|
@@ -363,7 +354,11 @@ export function SectionBoard({
|
|
|
363
354
|
}}
|
|
364
355
|
>
|
|
365
356
|
{items.length ? (
|
|
366
|
-
<View
|
|
357
|
+
<View
|
|
358
|
+
ref={card}
|
|
359
|
+
collapsable={false}
|
|
360
|
+
style={[s.card, { paddingBottom: bottomSpace }]}
|
|
361
|
+
>
|
|
367
362
|
<Sortable.Grid
|
|
368
363
|
data={[...items]}
|
|
369
364
|
keyExtractor={(item) => item.key}
|
|
@@ -44,6 +44,7 @@ export type DesignPickTemplateProps<T extends string> = {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
const BAR_BORDER = 1;
|
|
47
|
+
const ROOMY = 3;
|
|
47
48
|
|
|
48
49
|
export function designPickBarSpace(bottomInset = 0): number {
|
|
49
50
|
const gap = tokens.space[2];
|
|
@@ -78,6 +79,10 @@ const useStyles = makeStyles((t) => ({
|
|
|
78
79
|
paddingHorizontal: t.space[3],
|
|
79
80
|
borderRadius: t.radius.full,
|
|
80
81
|
},
|
|
82
|
+
tight: {
|
|
83
|
+
minWidth: t.space[10],
|
|
84
|
+
paddingHorizontal: t.space[2],
|
|
85
|
+
},
|
|
81
86
|
thumb: {
|
|
82
87
|
position: 'absolute',
|
|
83
88
|
left: 0,
|
|
@@ -134,11 +139,13 @@ const useStyles = makeStyles((t) => ({
|
|
|
134
139
|
function Option({
|
|
135
140
|
label,
|
|
136
141
|
selected,
|
|
142
|
+
tight,
|
|
137
143
|
onPress,
|
|
138
144
|
onLayout,
|
|
139
145
|
}: {
|
|
140
146
|
label: string;
|
|
141
147
|
selected: boolean;
|
|
148
|
+
tight: boolean;
|
|
142
149
|
onPress: () => void;
|
|
143
150
|
onLayout: (event: LayoutChangeEvent) => void;
|
|
144
151
|
}) {
|
|
@@ -158,7 +165,7 @@ function Option({
|
|
|
158
165
|
feedback="none"
|
|
159
166
|
onPress={onPress}
|
|
160
167
|
onLayout={onLayout}
|
|
161
|
-
style={s.option}
|
|
168
|
+
style={[s.option, tight && s.tight]}
|
|
162
169
|
>
|
|
163
170
|
<SteadyText
|
|
164
171
|
selected={selected}
|
|
@@ -236,6 +243,7 @@ export function DesignPickTemplate<T extends string>({
|
|
|
236
243
|
key={option.value}
|
|
237
244
|
label={option.label}
|
|
238
245
|
selected={selected}
|
|
246
|
+
tight={options.length > ROOMY}
|
|
239
247
|
onPress={() => {
|
|
240
248
|
if (selected) return;
|
|
241
249
|
haptic('select');
|
package/src/templates/index.ts
CHANGED
|
@@ -47,3 +47,10 @@ export type {
|
|
|
47
47
|
SheetBlockProps,
|
|
48
48
|
SheetFormTemplateProps,
|
|
49
49
|
} from './sheet-form-template';
|
|
50
|
+
export { PreviewEditTemplate } from './preview-edit-template';
|
|
51
|
+
export type {
|
|
52
|
+
PreviewDevice,
|
|
53
|
+
PreviewEditChoice,
|
|
54
|
+
PreviewEditTemplateProps,
|
|
55
|
+
PreviewEditTool,
|
|
56
|
+
} from './preview-edit-template';
|
|
@@ -109,18 +109,20 @@ export function IntroTemplate({
|
|
|
109
109
|
}
|
|
110
110
|
style={s.pager}
|
|
111
111
|
>
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
112
|
+
{width
|
|
113
|
+
? pages.map((page) => (
|
|
114
|
+
<View key={page.key} style={[s.page, { width }]}>
|
|
115
|
+
{page.art(art)}
|
|
116
|
+
<Text
|
|
117
|
+
variant="screenTitle"
|
|
118
|
+
accessibilityRole="header"
|
|
119
|
+
style={s.title}
|
|
120
|
+
>
|
|
121
|
+
{page.title}
|
|
122
|
+
</Text>
|
|
123
|
+
</View>
|
|
124
|
+
))
|
|
125
|
+
: null}
|
|
124
126
|
</ScrollView>
|
|
125
127
|
<View
|
|
126
128
|
style={[
|