@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
|
@@ -19,6 +19,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
19
19
|
row: {
|
|
20
20
|
flexDirection: 'row',
|
|
21
21
|
gap: t.space[2],
|
|
22
|
+
paddingTop: t.space[5],
|
|
22
23
|
paddingHorizontal: t.space[4],
|
|
23
24
|
},
|
|
24
25
|
item: { flex: 1 },
|
|
@@ -30,6 +31,8 @@ export function ConfirmRow({ secondary, primary }: ConfirmRowProps) {
|
|
|
30
31
|
<Button
|
|
31
32
|
variant={variant}
|
|
32
33
|
size="md"
|
|
34
|
+
pill
|
|
35
|
+
steady
|
|
33
36
|
cost={action.cost}
|
|
34
37
|
disabled={action.disabled}
|
|
35
38
|
loading={action.loading}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { ScrollView,
|
|
2
|
+
import { ScrollView, View } from 'react-native';
|
|
3
3
|
import { useTheme } from '../../theme/theme-provider';
|
|
4
4
|
import { makeStyles } from '../../utils/styles';
|
|
5
5
|
|
|
@@ -41,11 +41,7 @@ export function DetailStudioTemplate({
|
|
|
41
41
|
) : (
|
|
42
42
|
<View style={s.body}>{children}</View>
|
|
43
43
|
)}
|
|
44
|
-
{dock
|
|
45
|
-
<View pointerEvents="box-none" style={StyleSheet.absoluteFill}>
|
|
46
|
-
{dock}
|
|
47
|
-
</View>
|
|
48
|
-
) : null}
|
|
44
|
+
{dock}
|
|
49
45
|
</View>
|
|
50
46
|
);
|
|
51
47
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { withAlpha } from '../../utils/color';
|
|
3
|
+
import { makeStyles } from '../../utils/styles';
|
|
4
|
+
|
|
5
|
+
export type EdgeFadeProps = {
|
|
6
|
+
side: 'right' | 'bottom';
|
|
7
|
+
size: number;
|
|
8
|
+
color: string;
|
|
9
|
+
steps?: number;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const STEPS = 12;
|
|
13
|
+
|
|
14
|
+
const useStyles = makeStyles(() => ({
|
|
15
|
+
right: {
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
top: 0,
|
|
18
|
+
right: 0,
|
|
19
|
+
bottom: 0,
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
},
|
|
22
|
+
bottom: {
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
left: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
bottom: 0,
|
|
27
|
+
},
|
|
28
|
+
band: { position: 'absolute', top: 0, right: 0, bottom: 0, left: 0 },
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
export function fadeLayers(steps: number): number[] {
|
|
32
|
+
const out: number[] = [];
|
|
33
|
+
let shown = 0;
|
|
34
|
+
for (let i = 0; i < steps; i++) {
|
|
35
|
+
const goal = (i + 1) / (steps + 1);
|
|
36
|
+
out.push(1 - (1 - goal) / (1 - shown));
|
|
37
|
+
shown = goal;
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function EdgeFade({ side, size, color, steps = STEPS }: EdgeFadeProps) {
|
|
43
|
+
const s = useStyles();
|
|
44
|
+
const across = side === 'right';
|
|
45
|
+
const layers = fadeLayers(steps);
|
|
46
|
+
return (
|
|
47
|
+
<View
|
|
48
|
+
pointerEvents="none"
|
|
49
|
+
testID="edge-fade"
|
|
50
|
+
style={[s[side], across ? { width: size } : { height: size }]}
|
|
51
|
+
>
|
|
52
|
+
{layers.map((alpha, i) => {
|
|
53
|
+
const start = (size * i) / steps;
|
|
54
|
+
return (
|
|
55
|
+
<View
|
|
56
|
+
key={i}
|
|
57
|
+
style={[
|
|
58
|
+
s.band,
|
|
59
|
+
across ? { left: start } : { top: start },
|
|
60
|
+
{ backgroundColor: withAlpha(color, alpha) },
|
|
61
|
+
]}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
|
+
})}
|
|
65
|
+
</View>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function hasMore(
|
|
70
|
+
offset: number,
|
|
71
|
+
view: number,
|
|
72
|
+
content: number,
|
|
73
|
+
slack = 1
|
|
74
|
+
): boolean {
|
|
75
|
+
return content - (offset + view) > slack;
|
|
76
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Image, Text, TextInput, View } from 'react-native';
|
|
2
|
-
import { ChipGroup } from '../../components/chip-group/chip-group';
|
|
3
2
|
import { PencilGlyph } from '../../internal/glyphs';
|
|
4
3
|
import { PressableBase } from '../../internal/pressable-base';
|
|
5
4
|
import { useTheme } from '../../theme/theme-provider';
|
|
6
5
|
import { makeStyles } from '../../utils/styles';
|
|
6
|
+
import { ActionChips } from './action-chips';
|
|
7
7
|
|
|
8
8
|
export type ImagePromptProps = {
|
|
9
9
|
source: string | null;
|
|
@@ -61,7 +61,8 @@ const useStyles = makeStyles((t) => ({
|
|
|
61
61
|
justifyContent: 'center',
|
|
62
62
|
borderRadius: t.radius.full,
|
|
63
63
|
},
|
|
64
|
-
chips: { paddingTop: t.space[1]
|
|
64
|
+
chips: { paddingTop: t.space[1] },
|
|
65
|
+
track: { paddingHorizontal: t.space[5] },
|
|
65
66
|
}));
|
|
66
67
|
|
|
67
68
|
export function ImagePrompt({
|
|
@@ -133,14 +134,10 @@ export function ImagePrompt({
|
|
|
133
134
|
</View>
|
|
134
135
|
{suggestions?.length ? (
|
|
135
136
|
<View style={s.chips}>
|
|
136
|
-
<
|
|
137
|
-
scroll
|
|
138
|
-
size="md"
|
|
139
|
-
value={null}
|
|
140
|
-
onValueChange={(word) => {
|
|
141
|
-
if (word) onChangeText(word);
|
|
142
|
-
}}
|
|
137
|
+
<ActionChips
|
|
143
138
|
items={suggestions.map((word) => ({ value: word, label: word }))}
|
|
139
|
+
onPick={onChangeText}
|
|
140
|
+
inset={s.track}
|
|
144
141
|
/>
|
|
145
142
|
</View>
|
|
146
143
|
) : null}
|
|
@@ -7,11 +7,6 @@ export {
|
|
|
7
7
|
type SectionKindGridProps,
|
|
8
8
|
type SectionKindItem,
|
|
9
9
|
} from './section-kind-grid';
|
|
10
|
-
export {
|
|
11
|
-
SECTION_THUMB,
|
|
12
|
-
SectionThumb,
|
|
13
|
-
type SectionThumbProps,
|
|
14
|
-
} from './section-thumb';
|
|
15
10
|
export {
|
|
16
11
|
StudioBar,
|
|
17
12
|
type StudioBarProps,
|
|
@@ -19,7 +14,6 @@ export {
|
|
|
19
14
|
} from './studio-bar';
|
|
20
15
|
export {
|
|
21
16
|
StudioDock,
|
|
22
|
-
studioDockSpace,
|
|
23
17
|
type StudioDockItem,
|
|
24
18
|
type StudioDockProps,
|
|
25
19
|
} from './studio-dock';
|
|
@@ -28,20 +22,16 @@ export {
|
|
|
28
22
|
type ConfirmAction,
|
|
29
23
|
type ConfirmRowProps,
|
|
30
24
|
} from './confirm-row';
|
|
31
|
-
export {
|
|
32
|
-
KeyboardBar,
|
|
33
|
-
type KeyboardBarItem,
|
|
34
|
-
type KeyboardBarProps,
|
|
35
|
-
} from './keyboard-bar';
|
|
36
25
|
export { RewriteTray, type RewriteTrayProps } from './rewrite-tray';
|
|
37
26
|
export {
|
|
38
27
|
SectionEditTemplate,
|
|
39
28
|
type SectionEditTemplateProps,
|
|
40
29
|
} from './section-edit-template';
|
|
41
30
|
export {
|
|
31
|
+
SECTION_SPACES,
|
|
42
32
|
SectionSettings,
|
|
43
33
|
type SectionSettingsProps,
|
|
44
|
-
type
|
|
34
|
+
type SectionSpace,
|
|
45
35
|
} from './section-settings';
|
|
46
36
|
export { StudioSheet, type StudioSheetProps } from './studio-sheet';
|
|
47
37
|
export {
|
|
@@ -50,10 +40,17 @@ export {
|
|
|
50
40
|
type TextFormatTab,
|
|
51
41
|
} from './text-format-panel';
|
|
52
42
|
export {
|
|
53
|
-
|
|
54
|
-
type
|
|
55
|
-
type
|
|
56
|
-
} from './
|
|
43
|
+
StudioTools,
|
|
44
|
+
type StudioToolItem,
|
|
45
|
+
type StudioToolsProps,
|
|
46
|
+
} from './studio-tools';
|
|
47
|
+
export {
|
|
48
|
+
StudioSteps,
|
|
49
|
+
type StudioStep,
|
|
50
|
+
type StudioStepsProps,
|
|
51
|
+
} from './studio-steps';
|
|
52
|
+
export { SectionCover, type SectionCoverProps } from './section-cover';
|
|
53
|
+
export { DotsGlyph, MinusGlyph, RetryGlyph, WaveGlyph } from './studio-glyphs';
|
|
57
54
|
export {
|
|
58
55
|
AdjustTiles,
|
|
59
56
|
type AdjustTile,
|
|
@@ -65,3 +62,9 @@ export {
|
|
|
65
62
|
type AssetGridProps,
|
|
66
63
|
} from './asset-grid';
|
|
67
64
|
export { ImagePrompt, type ImagePromptProps } from './image-prompt';
|
|
65
|
+
export {
|
|
66
|
+
StudioToggle,
|
|
67
|
+
StudioToggleList,
|
|
68
|
+
type StudioToggleListProps,
|
|
69
|
+
type StudioToggleProps,
|
|
70
|
+
} from './studio-toggle';
|
|
@@ -1,85 +1,45 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
|
-
import { ChipGroup } from '../../components/chip-group/chip-group';
|
|
3
2
|
import { CreditCost } from '../../components/credit/credit';
|
|
4
|
-
import {
|
|
5
|
-
import { PressableBase } from '../../internal/pressable-base';
|
|
6
|
-
import { useTheme } from '../../theme/theme-provider';
|
|
3
|
+
import type { IconSlot } from '../../internal/icon';
|
|
7
4
|
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
import { StudioTools } from './studio-tools';
|
|
8
6
|
|
|
9
7
|
export type RewriteTrayProps<T extends string> = {
|
|
10
|
-
items: readonly { value: T; label: string }[];
|
|
8
|
+
items: readonly { value: T; label: string; icon: IconSlot }[];
|
|
11
9
|
onPick: (value: T) => void;
|
|
12
|
-
onKeyboard: () => void;
|
|
13
10
|
cost?: number | null;
|
|
14
11
|
disabled?: boolean;
|
|
15
|
-
keyboardLabel?: string;
|
|
16
12
|
};
|
|
17
13
|
|
|
18
|
-
const SEP = 20;
|
|
19
|
-
|
|
20
14
|
const useStyles = makeStyles((t) => ({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
paddingLeft: t.space[2],
|
|
26
|
-
},
|
|
27
|
-
key: {
|
|
28
|
-
width: t.minTouchSize,
|
|
29
|
-
height: t.minTouchSize,
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
borderRadius: t.radius.md,
|
|
33
|
-
},
|
|
34
|
-
sep: {
|
|
35
|
-
width: 1,
|
|
36
|
-
height: SEP,
|
|
37
|
-
marginLeft: t.space[1],
|
|
38
|
-
marginRight: t.space[2],
|
|
39
|
-
backgroundColor: t.colors.border,
|
|
40
|
-
},
|
|
41
|
-
cost: { marginRight: t.space[2] },
|
|
42
|
-
chips: { flex: 1, overflow: 'hidden' },
|
|
43
|
-
track: { marginLeft: -t.layout.screenX, marginRight: 0 },
|
|
15
|
+
root: { gap: t.space[2], paddingTop: t.space[1] },
|
|
16
|
+
cost: { alignItems: 'center' },
|
|
44
17
|
}));
|
|
45
18
|
|
|
46
19
|
export function RewriteTray<T extends string>({
|
|
47
20
|
items,
|
|
48
21
|
onPick,
|
|
49
|
-
onKeyboard,
|
|
50
22
|
cost,
|
|
51
23
|
disabled,
|
|
52
|
-
keyboardLabel = '직접 고치기',
|
|
53
24
|
}: RewriteTrayProps<T>) {
|
|
54
|
-
const t = useTheme();
|
|
55
25
|
const s = useStyles();
|
|
56
26
|
return (
|
|
57
|
-
<View style={s.
|
|
58
|
-
<PressableBase
|
|
59
|
-
onPress={onKeyboard}
|
|
60
|
-
accessibilityLabel={keyboardLabel}
|
|
61
|
-
style={s.key}
|
|
62
|
-
>
|
|
63
|
-
<KeyboardGlyph color={t.colors.title} size={t.iconSize.md} />
|
|
64
|
-
</PressableBase>
|
|
65
|
-
<View style={s.sep} />
|
|
27
|
+
<View style={s.root}>
|
|
66
28
|
{cost != null ? (
|
|
67
29
|
<View style={s.cost}>
|
|
68
30
|
<CreditCost value={cost} />
|
|
69
31
|
</View>
|
|
70
32
|
) : null}
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/>
|
|
82
|
-
</View>
|
|
33
|
+
<StudioTools
|
|
34
|
+
docked={false}
|
|
35
|
+
items={items.map((item) => ({
|
|
36
|
+
key: item.value,
|
|
37
|
+
icon: item.icon,
|
|
38
|
+
label: item.label,
|
|
39
|
+
disabled,
|
|
40
|
+
onPress: () => onPick(item.value),
|
|
41
|
+
}))}
|
|
42
|
+
/>
|
|
83
43
|
</View>
|
|
84
44
|
);
|
|
85
45
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Image, StyleSheet, View } from 'react-native';
|
|
2
|
+
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
|
|
6
|
+
export type SectionCoverProps = {
|
|
7
|
+
uri?: string | null;
|
|
8
|
+
icon: IconSlot;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const useStyles = makeStyles((t) => ({
|
|
12
|
+
box: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
top: 0,
|
|
15
|
+
right: 0,
|
|
16
|
+
bottom: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
backgroundColor: t.colors.muted,
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
export function SectionCover({ uri, icon }: SectionCoverProps) {
|
|
25
|
+
const t = useTheme();
|
|
26
|
+
const s = useStyles();
|
|
27
|
+
return (
|
|
28
|
+
<View style={s.box}>
|
|
29
|
+
{uri ? (
|
|
30
|
+
<Image
|
|
31
|
+
source={{ uri }}
|
|
32
|
+
resizeMode="cover"
|
|
33
|
+
style={StyleSheet.absoluteFill}
|
|
34
|
+
accessibilityIgnoresInvertColors
|
|
35
|
+
/>
|
|
36
|
+
) : (
|
|
37
|
+
renderIcon(icon, {
|
|
38
|
+
color: t.colors.mutedForeground,
|
|
39
|
+
size: t.iconSize.md,
|
|
40
|
+
})
|
|
41
|
+
)}
|
|
42
|
+
</View>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -10,7 +10,9 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
10
10
|
import { makeStyles } from '../../utils/styles';
|
|
11
11
|
import {
|
|
12
12
|
DetailFocusContext,
|
|
13
|
+
DetailPartsContext,
|
|
13
14
|
type DetailFocusRect,
|
|
15
|
+
type DetailPart,
|
|
14
16
|
} from '../detail-editor/focus-context';
|
|
15
17
|
|
|
16
18
|
export type SectionEditTemplateProps = {
|
|
@@ -25,10 +27,74 @@ export type SectionEditTemplateProps = {
|
|
|
25
27
|
const useStyles = makeStyles((t) => ({
|
|
26
28
|
root: { flex: 1, backgroundColor: t.colors.surface },
|
|
27
29
|
scroll: { flex: 1 },
|
|
28
|
-
accessory: { backgroundColor: t.colors.
|
|
30
|
+
accessory: { backgroundColor: t.colors.surface },
|
|
29
31
|
sheet: { position: 'absolute', left: 0, right: 0, bottom: 0 },
|
|
30
32
|
}));
|
|
31
33
|
|
|
34
|
+
const EPS = 0.5;
|
|
35
|
+
|
|
36
|
+
function lineStop(part: DetailPart, at: number): boolean {
|
|
37
|
+
if (part.line <= 0) return false;
|
|
38
|
+
const steps = (at - part.y) / part.line;
|
|
39
|
+
const k = Math.round(steps);
|
|
40
|
+
return (
|
|
41
|
+
k >= 1 &&
|
|
42
|
+
part.y + k * part.line < part.y + part.height - EPS &&
|
|
43
|
+
Math.abs(steps - k) * part.line < EPS
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function sheetEdge(
|
|
48
|
+
edge: number,
|
|
49
|
+
parts: readonly DetailPart[],
|
|
50
|
+
gap: number,
|
|
51
|
+
reach?: { min: number; max: number }
|
|
52
|
+
): number {
|
|
53
|
+
const texts = parts.filter((p) => p.kind === 'text' && p.height > 0);
|
|
54
|
+
const cuts = (at: number) =>
|
|
55
|
+
texts.some(
|
|
56
|
+
(p) =>
|
|
57
|
+
at > p.y - gap + EPS &&
|
|
58
|
+
at < p.y + p.height + gap - EPS &&
|
|
59
|
+
!lineStop(p, at)
|
|
60
|
+
);
|
|
61
|
+
if (!cuts(edge)) return edge;
|
|
62
|
+
const stops = texts.flatMap((p) => {
|
|
63
|
+
const list = [p.y - gap, p.y + p.height + gap];
|
|
64
|
+
if (p.line > 0) {
|
|
65
|
+
for (let at = p.y + p.line; at < p.y + p.height - EPS; at += p.line) {
|
|
66
|
+
list.push(at);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return list;
|
|
70
|
+
});
|
|
71
|
+
let best = edge;
|
|
72
|
+
let far = Infinity;
|
|
73
|
+
for (const at of stops) {
|
|
74
|
+
if (cuts(at)) continue;
|
|
75
|
+
if (reach && (at < reach.min - EPS || at > reach.max + EPS)) continue;
|
|
76
|
+
const away = Math.abs(at - edge);
|
|
77
|
+
if (away < far) {
|
|
78
|
+
far = away;
|
|
79
|
+
best = at;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return best;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function typingOffset(
|
|
86
|
+
box: { top: number; bottom: number },
|
|
87
|
+
viewport: number,
|
|
88
|
+
gap: number,
|
|
89
|
+
margin: number
|
|
90
|
+
): number {
|
|
91
|
+
const next =
|
|
92
|
+
box.bottom - box.top + gap + margin > viewport
|
|
93
|
+
? box.top - margin
|
|
94
|
+
: box.bottom + gap - viewport;
|
|
95
|
+
return Math.max(0, next);
|
|
96
|
+
}
|
|
97
|
+
|
|
32
98
|
function useKeyboardShown() {
|
|
33
99
|
const [shown, setShown] = useState(false);
|
|
34
100
|
useEffect(() => {
|
|
@@ -56,7 +122,12 @@ export function SectionEditTemplate({
|
|
|
56
122
|
const scroller = useRef<ComponentRef<typeof ScrollView>>(null);
|
|
57
123
|
const offset = useRef(0);
|
|
58
124
|
const pageTop = useRef(0);
|
|
125
|
+
const [content, setContent] = useState(0);
|
|
59
126
|
const [height, setHeight] = useState(0);
|
|
127
|
+
const [pageHeight, setPageHeight] = useState(0);
|
|
128
|
+
const fresh = useRef(true);
|
|
129
|
+
const [parts, setParts] = useState<DetailPart[]>([]);
|
|
130
|
+
const listen = useRef((list: DetailPart[]) => setParts(list)).current;
|
|
60
131
|
const [sheetHeight, setSheetHeight] = useState(0);
|
|
61
132
|
const [focus, setFocus] = useState<DetailFocusRect | null>(null);
|
|
62
133
|
const report = useRef((rect: DetailFocusRect | null) =>
|
|
@@ -68,13 +139,27 @@ export function SectionEditTemplate({
|
|
|
68
139
|
)
|
|
69
140
|
).current;
|
|
70
141
|
const margin = t.space[4];
|
|
142
|
+
const gap = t.space[1];
|
|
71
143
|
const viewport = height - sheetHeight;
|
|
144
|
+
const pinned = keyboard || !!panel;
|
|
72
145
|
|
|
73
146
|
useEffect(() => {
|
|
74
147
|
if (!focus || viewport <= 0) return;
|
|
75
|
-
const top = pageTop.current + focus.y - margin;
|
|
76
|
-
const end = pageTop.current + focus.y + focus.height + margin;
|
|
77
148
|
const now = offset.current;
|
|
149
|
+
const box = {
|
|
150
|
+
top: pageTop.current + focus.y,
|
|
151
|
+
bottom: pageTop.current + focus.y + focus.height,
|
|
152
|
+
};
|
|
153
|
+
if (pinned) {
|
|
154
|
+
const most = Math.max(0, content - height);
|
|
155
|
+
const next = Math.min(most, typingOffset(box, viewport, gap, margin));
|
|
156
|
+
if (Math.abs(next - now) > EPS) {
|
|
157
|
+
scroller.current?.scrollTo({ y: next, animated: true });
|
|
158
|
+
}
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const top = box.top - margin;
|
|
162
|
+
const end = box.bottom + margin;
|
|
78
163
|
const next =
|
|
79
164
|
end - top > viewport || top < now
|
|
80
165
|
? top
|
|
@@ -84,7 +169,43 @@ export function SectionEditTemplate({
|
|
|
84
169
|
if (next !== now) {
|
|
85
170
|
scroller.current?.scrollTo({ y: Math.max(0, next), animated: true });
|
|
86
171
|
}
|
|
87
|
-
}, [focus, viewport, margin]);
|
|
172
|
+
}, [focus, viewport, margin, gap, pinned, content, height]);
|
|
173
|
+
|
|
174
|
+
useEffect(() => {
|
|
175
|
+
if (sheetHeight <= 0) {
|
|
176
|
+
fresh.current = true;
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (focus || keyboard || viewport <= 0) return;
|
|
180
|
+
if (!parts.length) return;
|
|
181
|
+
const now = offset.current;
|
|
182
|
+
const page = pageTop.current;
|
|
183
|
+
const most = Math.max(0, content - height);
|
|
184
|
+
const bottom = page + pageHeight;
|
|
185
|
+
const rest = bottom - viewport;
|
|
186
|
+
if (fresh.current && rest > 0 && most < rest - EPS) return;
|
|
187
|
+
const base = fresh.current && rest > 0 ? rest : now;
|
|
188
|
+
fresh.current = false;
|
|
189
|
+
const edge =
|
|
190
|
+
sheetEdge(base + viewport - page, parts, margin / 2, {
|
|
191
|
+
min: viewport - page,
|
|
192
|
+
max: most + viewport - page,
|
|
193
|
+
}) + page;
|
|
194
|
+
const next = Math.min(most, Math.max(0, edge - viewport));
|
|
195
|
+
if (Math.abs(next - now) > EPS) {
|
|
196
|
+
scroller.current?.scrollTo({ y: next, animated: true });
|
|
197
|
+
}
|
|
198
|
+
}, [
|
|
199
|
+
focus,
|
|
200
|
+
keyboard,
|
|
201
|
+
sheetHeight,
|
|
202
|
+
viewport,
|
|
203
|
+
parts,
|
|
204
|
+
margin,
|
|
205
|
+
height,
|
|
206
|
+
content,
|
|
207
|
+
pageHeight,
|
|
208
|
+
]);
|
|
88
209
|
|
|
89
210
|
const docked = !!accessory || !!panel;
|
|
90
211
|
const below = !panel && !keyboard ? bottomInset : 0;
|
|
@@ -104,16 +225,20 @@ export function SectionEditTemplate({
|
|
|
104
225
|
offset.current = e.nativeEvent.contentOffset.y;
|
|
105
226
|
}}
|
|
106
227
|
onLayout={(e) => setHeight(e.nativeEvent.layout.height)}
|
|
228
|
+
onContentSizeChange={(_w, h) => setContent(h)}
|
|
107
229
|
>
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
230
|
+
<DetailPartsContext.Provider value={listen}>
|
|
231
|
+
<DetailFocusContext.Provider value={report}>
|
|
232
|
+
<View
|
|
233
|
+
onLayout={(e) => {
|
|
234
|
+
pageTop.current = e.nativeEvent.layout.y;
|
|
235
|
+
setPageHeight(e.nativeEvent.layout.height);
|
|
236
|
+
}}
|
|
237
|
+
>
|
|
238
|
+
{children}
|
|
239
|
+
</View>
|
|
240
|
+
</DetailFocusContext.Provider>
|
|
241
|
+
</DetailPartsContext.Provider>
|
|
117
242
|
</ScrollView>
|
|
118
243
|
{accessory ? (
|
|
119
244
|
<View style={[s.accessory, { paddingBottom: below }]}>{accessory}</View>
|
|
@@ -5,6 +5,7 @@ import { PressableBase } from '../../internal/pressable-base';
|
|
|
5
5
|
import { makeStyles } from '../../utils/styles';
|
|
6
6
|
import {
|
|
7
7
|
DETAIL_STEP_COLUMNS,
|
|
8
|
+
detailIsTitle,
|
|
8
9
|
type DetailBlock,
|
|
9
10
|
type DetailLayer,
|
|
10
11
|
} from '../detail-editor/detail-types';
|
|
@@ -24,7 +25,6 @@ const COLUMNS = 3;
|
|
|
24
25
|
const ART = 128;
|
|
25
26
|
const TITLE_BAR = 6;
|
|
26
27
|
const LINE_BAR = 4;
|
|
27
|
-
const TITLE_SIZE = 7;
|
|
28
28
|
const DOT = 10;
|
|
29
29
|
const MAX_ROWS = 6;
|
|
30
30
|
|
|
@@ -142,7 +142,7 @@ function bars(s: Styles, layers: readonly DetailLayer[], prefix: string) {
|
|
|
142
142
|
.map((l) => (
|
|
143
143
|
<View
|
|
144
144
|
key={`${prefix}${l.id}`}
|
|
145
|
-
style={(l.style
|
|
145
|
+
style={detailIsTitle(l.style) ? s.title : s.line}
|
|
146
146
|
/>
|
|
147
147
|
));
|
|
148
148
|
}
|