@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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","useState","Image","PanResponder","Text","RNText","View","ChevronGlyph","useTheme","withAlpha","makeStyles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","STEP","TAG","useStyles","t","root","width","overflow","backgroundColor","colors","muted","fill","position","left","top","bottom","clip","line","surface","knob","marginTop","space","height","flexDirection","alignItems","justifyContent","borderRadius","radius","full","boxShadow","shadow","md","flip","transform","scaleX","tag","paddingHorizontal","tagStart","tagEnd","right","tagText","fontFamily","fontSize","typography","caption","lineHeight","fontWeight","color","title","CompareSlider","before","after","aspectRatio","label","labels","s","setWidth","split","setSplit","widthRef","follow","e","Math","min","max","nativeEvent","locationX","current","pan","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","onPanResponderMove","layout","x","onLayout","accessible","accessibilityLabel","accessibilityRole","accessibilityValue","now","round","accessibilityActions","name","onAccessibilityAction","step","actionName","style","panHandlers","children","source","uri","resizeMode","size","pointerEvents","maxFontSizeMultiplier","maxFontScale"],"sourceRoot":"../../../../src","sources":["blocks/detail-editor/compare-slider.tsx"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACxC,SACEC,KAAK,EACLC,YAAY,EACZC,IAAI,IAAIC,MAAM,EACdC,IAAI,QAGC,cAAc;AACrB,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,SAAS,QAAQ,sBAAmB;AAC7C,SAASC,UAAU,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;
|
|
1
|
+
{"version":3,"names":["useRef","useState","Image","PanResponder","Text","RNText","View","ChevronGlyph","useTheme","withAlpha","makeStyles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","STEP","TAG","useStyles","t","root","width","overflow","backgroundColor","colors","muted","fill","position","left","top","bottom","clip","line","surface","knob","marginTop","space","height","flexDirection","alignItems","justifyContent","borderRadius","radius","full","boxShadow","shadow","md","flip","transform","scaleX","tag","paddingHorizontal","tagStart","tagEnd","right","tagText","fontFamily","fontSize","typography","caption","lineHeight","fontWeight","color","title","CompareSlider","before","after","aspectRatio","label","labels","inset","s","setWidth","split","setSplit","widthRef","follow","e","Math","min","max","nativeEvent","locationX","current","pan","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","onPanResponderMove","layout","x","onLayout","accessible","accessibilityLabel","accessibilityRole","accessibilityValue","now","round","accessibilityActions","name","onAccessibilityAction","step","actionName","style","panHandlers","children","source","uri","resizeMode","size","pointerEvents","maxFontSizeMultiplier","maxFontScale"],"sourceRoot":"../../../../src","sources":["blocks/detail-editor/compare-slider.tsx"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACxC,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AC,CAACrB,GAAG,EAAEqB,CAAC,CAACnB,QAAQ,CAAE;QAAAsD,QAAA,eACpD/F,IAAA,CAACP,MAAM;UAAC4G,qBAAqB,EAAE7F,CAAC,CAAC8F,YAAa;UAACT,KAAK,EAAEjC,CAAC,CAAChB,OAAQ;UAAAmD,QAAA,EAC7DrC,MAAM,CAACJ;QAAM,CACR;MAAC,CACL,CAAC,eACPtD,IAAA,CAACN,IAAI;QAAC0G,aAAa,EAAC,MAAM;QAACP,KAAK,EAAE,CAACjC,CAAC,CAACrB,GAAG,EAAEqB,CAAC,CAAClB,MAAM,CAAE;QAAAqD,QAAA,eAClD/F,IAAA,CAACP,MAAM;UAAC4G,qBAAqB,EAAE7F,CAAC,CAAC8F,YAAa;UAACT,KAAK,EAAEjC,CAAC,CAAChB,OAAQ;UAAAmD,QAAA,EAC7DrC,MAAM,CAACH;QAAK,CACP;MAAC,CACL,CAAC;IAAA,CACP,CAAC,GACD,IAAI;EAAA,CACJ,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { Image, PanResponder, Platform, Text as RNText, TextInput, View } from 'react-native';
|
|
5
5
|
import { SparklesGlyph } from "../../internal/glyphs.js";
|
|
6
6
|
import { PressableBase } from "../../internal/pressable-base.js";
|
|
@@ -8,28 +8,80 @@ import { useTheme } from "../../theme/theme-provider.js";
|
|
|
8
8
|
import { withAlpha } from "../../utils/color.js";
|
|
9
9
|
import { makeStyles } from "../../utils/styles.js";
|
|
10
10
|
import { CompareSlider } from "./compare-slider.js";
|
|
11
|
-
import { DetailFocusContext } from "./focus-context.js";
|
|
12
|
-
import {
|
|
11
|
+
import { DetailFocusContext, DetailPartsContext } from "./focus-context.js";
|
|
12
|
+
import { keepWords } from "./keep-words.js";
|
|
13
|
+
import { DETAIL_FONT_FAMILY, DETAIL_STEP_COLUMNS, DETAIL_STEP_DOT, DETAIL_TABLE_LABEL, detailBlockSpace, detailLineColor, detailSteps, detailTableRows, detailFontSize, detailIsTitle, detailLineHeight, detailTracking } from "./detail-types.js";
|
|
13
14
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
const lay = Platform.OS === 'ios' ? text => text : keepWords;
|
|
14
16
|
const HANDLE = 10;
|
|
15
|
-
const BLANK_TITLE = 7;
|
|
16
17
|
const DOT = 6;
|
|
17
18
|
const MAX_TEXT = 2000;
|
|
18
19
|
const RING = 2;
|
|
19
20
|
const HALO = 0.9;
|
|
21
|
+
const PartsContext = /*#__PURE__*/createContext(null);
|
|
22
|
+
function useProbe(spec) {
|
|
23
|
+
const sink = useContext(PartsContext);
|
|
24
|
+
const node = useRef(null);
|
|
25
|
+
const latest = useRef(spec);
|
|
26
|
+
latest.current = spec;
|
|
27
|
+
const measure = useCallback(() => {
|
|
28
|
+
const now = latest.current;
|
|
29
|
+
const root = sink?.root.current;
|
|
30
|
+
const self = node.current;
|
|
31
|
+
if (!sink || !now || !root || !self) return;
|
|
32
|
+
self.measureLayout(root, (_x, y, _w, height) => sink.put(now.key, {
|
|
33
|
+
key: now.key,
|
|
34
|
+
kind: now.kind,
|
|
35
|
+
y,
|
|
36
|
+
height,
|
|
37
|
+
line: now.line ?? 0,
|
|
38
|
+
...(now.blank ? {
|
|
39
|
+
blank: true
|
|
40
|
+
} : {})
|
|
41
|
+
}), () => undefined);
|
|
42
|
+
}, [sink]);
|
|
43
|
+
const key = spec?.key;
|
|
44
|
+
const blank = !!spec?.blank;
|
|
45
|
+
const seen = useRef(blank);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (seen.current === blank) return;
|
|
48
|
+
seen.current = blank;
|
|
49
|
+
measure();
|
|
50
|
+
}, [blank, measure]);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (!sink || !key) return;
|
|
53
|
+
sink.watch(key, measure);
|
|
54
|
+
return () => {
|
|
55
|
+
sink.watch(key, null);
|
|
56
|
+
sink.put(key, null);
|
|
57
|
+
};
|
|
58
|
+
}, [sink, key, measure]);
|
|
59
|
+
if (!sink || !spec) return null;
|
|
60
|
+
return {
|
|
61
|
+
ref: node,
|
|
62
|
+
onLayout: measure
|
|
63
|
+
};
|
|
64
|
+
}
|
|
20
65
|
function Tap({
|
|
21
66
|
onPress,
|
|
22
67
|
label,
|
|
23
68
|
style,
|
|
69
|
+
part,
|
|
24
70
|
children
|
|
25
71
|
}) {
|
|
72
|
+
const probe = useProbe(part);
|
|
26
73
|
if (!onPress) {
|
|
27
74
|
return /*#__PURE__*/_jsx(View, {
|
|
75
|
+
ref: probe?.ref,
|
|
76
|
+
onLayout: probe?.onLayout,
|
|
77
|
+
collapsable: probe ? false : undefined,
|
|
28
78
|
style: style,
|
|
29
79
|
children: children
|
|
30
80
|
});
|
|
31
81
|
}
|
|
32
82
|
return /*#__PURE__*/_jsx(PressableBase, {
|
|
83
|
+
ref: probe?.ref,
|
|
84
|
+
onLayout: probe?.onLayout,
|
|
33
85
|
onPress: onPress,
|
|
34
86
|
accessibilityLabel: label,
|
|
35
87
|
feedback: "none",
|
|
@@ -37,6 +89,11 @@ function Tap({
|
|
|
37
89
|
children: children
|
|
38
90
|
});
|
|
39
91
|
}
|
|
92
|
+
const textPart = (block, layer, style, lines = true) => ({
|
|
93
|
+
key: `${block.id}/${layer.id}`,
|
|
94
|
+
kind: 'text',
|
|
95
|
+
line: lines ? style.lineHeight ?? 0 : 0
|
|
96
|
+
});
|
|
40
97
|
const useStyles = makeStyles(t => ({
|
|
41
98
|
page: {
|
|
42
99
|
overflow: 'hidden'
|
|
@@ -182,7 +239,7 @@ const useStyles = makeStyles(t => ({
|
|
|
182
239
|
flexDirection: 'row',
|
|
183
240
|
justifyContent: 'center',
|
|
184
241
|
gap: t.space[2],
|
|
185
|
-
marginTop: t.space[
|
|
242
|
+
marginTop: t.space[5]
|
|
186
243
|
},
|
|
187
244
|
dotMark: {
|
|
188
245
|
width: DOT,
|
|
@@ -356,10 +413,12 @@ function FocusText({
|
|
|
356
413
|
input,
|
|
357
414
|
result,
|
|
358
415
|
blank,
|
|
359
|
-
style
|
|
416
|
+
style,
|
|
417
|
+
part
|
|
360
418
|
}) {
|
|
361
419
|
const t = useTheme();
|
|
362
420
|
const s = useStyles();
|
|
421
|
+
const probe = useProbe(part);
|
|
363
422
|
const target = useContext(FocusTargetContext);
|
|
364
423
|
const ring = useRef(null);
|
|
365
424
|
const field = useRef(null);
|
|
@@ -386,7 +445,11 @@ function FocusText({
|
|
|
386
445
|
const ready = () => {
|
|
387
446
|
if (laid.current) return;
|
|
388
447
|
laid.current = true;
|
|
389
|
-
|
|
448
|
+
const node = field.current;
|
|
449
|
+
if (!wanted.current || !node) return;
|
|
450
|
+
node.focus();
|
|
451
|
+
const end = input?.value.length ?? 0;
|
|
452
|
+
node.setSelection?.(end, end);
|
|
390
453
|
};
|
|
391
454
|
const pan = useMemo(() => PanResponder.create({
|
|
392
455
|
onMoveShouldSetPanResponder: (_, g) => !!latest.current && latest.current.count > 1 && Math.abs(g.dx) > slop && Math.abs(g.dx) > Math.abs(g.dy),
|
|
@@ -398,14 +461,20 @@ function FocusText({
|
|
|
398
461
|
if (next >= 0 && next < now.count) now.onIndexChange(next);
|
|
399
462
|
}
|
|
400
463
|
}), [slop, swipe]);
|
|
401
|
-
const
|
|
464
|
+
const below = shown && shown.count >= 2 ? t.space[5] + DOT : 0;
|
|
465
|
+
const reach = useRef(below);
|
|
466
|
+
reach.current = below;
|
|
467
|
+
const measure = useCallback(() => {
|
|
402
468
|
const root = target?.root.current;
|
|
403
469
|
if (!target || !root || !ring.current) return;
|
|
404
470
|
ring.current.measureLayout(root, (_x, y, _w, height) => target.report({
|
|
405
471
|
y,
|
|
406
|
-
height
|
|
472
|
+
height: height + reach.current
|
|
407
473
|
}), () => undefined);
|
|
408
|
-
};
|
|
474
|
+
}, [target]);
|
|
475
|
+
useEffect(() => {
|
|
476
|
+
measure();
|
|
477
|
+
}, [below, measure]);
|
|
409
478
|
const line = text.lineHeight ?? 0;
|
|
410
479
|
const fieldStyle = {
|
|
411
480
|
...text,
|
|
@@ -431,13 +500,18 @@ function FocusText({
|
|
|
431
500
|
height: content > 0 ? Math.max(line, content) : undefined
|
|
432
501
|
}]
|
|
433
502
|
}) : shown ? /*#__PURE__*/_jsx(RNText, {
|
|
503
|
+
lineBreakStrategyIOS: "hangul-word",
|
|
434
504
|
style: text,
|
|
435
|
-
children: shown.text
|
|
505
|
+
children: lay(shown.text)
|
|
436
506
|
}) : layer.text?.trim() ? /*#__PURE__*/_jsx(RNText, {
|
|
507
|
+
lineBreakStrategyIOS: "hangul-word",
|
|
437
508
|
style: text,
|
|
438
|
-
children: layer.text
|
|
509
|
+
children: lay(layer.text)
|
|
439
510
|
}) : blank;
|
|
440
511
|
return /*#__PURE__*/_jsxs(View, {
|
|
512
|
+
ref: probe?.ref,
|
|
513
|
+
onLayout: probe?.onLayout,
|
|
514
|
+
collapsable: probe ? false : undefined,
|
|
441
515
|
style: style,
|
|
442
516
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
443
517
|
testID: "detail-focus-text",
|
|
@@ -495,16 +569,54 @@ export function DetailCanvas({
|
|
|
495
569
|
ink,
|
|
496
570
|
paper,
|
|
497
571
|
mode = 'select',
|
|
498
|
-
focus
|
|
572
|
+
focus,
|
|
573
|
+
onMeasure
|
|
499
574
|
}) {
|
|
500
575
|
const t = useTheme();
|
|
501
576
|
const s = useStyles();
|
|
502
577
|
const report = useContext(DetailFocusContext);
|
|
578
|
+
const listen = useContext(DetailPartsContext);
|
|
503
579
|
const root = useRef(null);
|
|
504
580
|
const target = useMemo(() => report ? {
|
|
505
581
|
root,
|
|
506
582
|
report
|
|
507
583
|
} : null, [report]);
|
|
584
|
+
const sink = onMeasure ?? listen;
|
|
585
|
+
const latest = useRef(sink);
|
|
586
|
+
latest.current = sink;
|
|
587
|
+
const measuring = !!sink;
|
|
588
|
+
const store = useRef(new Map());
|
|
589
|
+
const watchers = useRef(new Map());
|
|
590
|
+
const frame = useRef(null);
|
|
591
|
+
useEffect(() => () => {
|
|
592
|
+
if (frame.current !== null) cancelAnimationFrame(frame.current);
|
|
593
|
+
}, []);
|
|
594
|
+
const parts = useMemo(() => {
|
|
595
|
+
if (!measuring) return null;
|
|
596
|
+
const flush = () => {
|
|
597
|
+
frame.current = null;
|
|
598
|
+
const list = [...store.current.values()].sort((a, b) => a.y - b.y);
|
|
599
|
+
latest.current?.(list);
|
|
600
|
+
};
|
|
601
|
+
return {
|
|
602
|
+
root,
|
|
603
|
+
put: (key, part) => {
|
|
604
|
+
const now = store.current.get(key);
|
|
605
|
+
if (part) {
|
|
606
|
+
if (now && now.y === part.y && now.height === part.height && !!now.blank === !!part.blank) return;
|
|
607
|
+
store.current.set(key, part);
|
|
608
|
+
} else {
|
|
609
|
+
if (!now) return;
|
|
610
|
+
store.current.delete(key);
|
|
611
|
+
}
|
|
612
|
+
if (frame.current === null) frame.current = requestAnimationFrame(flush);
|
|
613
|
+
},
|
|
614
|
+
watch: (key, measure) => {
|
|
615
|
+
if (measure) watchers.current.set(key, measure);else watchers.current.delete(key);
|
|
616
|
+
},
|
|
617
|
+
again: () => watchers.current.forEach(measure => measure())
|
|
618
|
+
};
|
|
619
|
+
}, [measuring]);
|
|
508
620
|
const pad = t.space[5] * scale;
|
|
509
621
|
const fg = ink ?? t.colors.foreground;
|
|
510
622
|
const bandText = paper ?? t.colors.surface;
|
|
@@ -531,7 +643,8 @@ export function DetailCanvas({
|
|
|
531
643
|
before: compare.before,
|
|
532
644
|
after: compare.after,
|
|
533
645
|
aspectRatio: ratio,
|
|
534
|
-
labels: compare.labels
|
|
646
|
+
labels: compare.labels,
|
|
647
|
+
inset: t.space[1] + RING
|
|
535
648
|
}), /*#__PURE__*/_jsx(PhotoRing, {})]
|
|
536
649
|
}, layer.id);
|
|
537
650
|
}
|
|
@@ -545,6 +658,11 @@ export function DetailCanvas({
|
|
|
545
658
|
}),
|
|
546
659
|
label: '사진',
|
|
547
660
|
style: flex ? s.half : undefined,
|
|
661
|
+
part: {
|
|
662
|
+
key: `${block.id}/${layer.id}`,
|
|
663
|
+
kind: 'image',
|
|
664
|
+
blank: !url
|
|
665
|
+
},
|
|
548
666
|
children: [url ? /*#__PURE__*/_jsx(Image, {
|
|
549
667
|
source: {
|
|
550
668
|
uri: url
|
|
@@ -565,25 +683,26 @@ export function DetailCanvas({
|
|
|
565
683
|
};
|
|
566
684
|
const blankBar = (l, style) => /*#__PURE__*/_jsx(View, {
|
|
567
685
|
testID: "detail-blank-text",
|
|
568
|
-
style: [s.blank, (l.style
|
|
686
|
+
style: [s.blank, detailIsTitle(l.style) ? s.blankTitle : s.blankLine, {
|
|
569
687
|
height: style.lineHeight,
|
|
570
688
|
alignSelf: alignSelfOf(l.style?.align)
|
|
571
689
|
}]
|
|
572
690
|
});
|
|
573
|
-
const focusText = (l, style, wrap) => /*#__PURE__*/_jsx(FocusText, {
|
|
691
|
+
const focusText = (block, l, style, wrap) => /*#__PURE__*/_jsx(FocusText, {
|
|
574
692
|
layer: l,
|
|
575
693
|
text: style,
|
|
576
694
|
input: focus?.input,
|
|
577
695
|
result: focus?.result,
|
|
578
696
|
blank: blankBar(l, style),
|
|
579
|
-
style: wrap
|
|
697
|
+
style: wrap,
|
|
698
|
+
part: textPart(block, l, style, false)
|
|
580
699
|
}, l.id);
|
|
581
700
|
const cell = (block, l, style) => {
|
|
582
701
|
if (!l || l.hidden) return /*#__PURE__*/_jsx(View, {
|
|
583
702
|
style: style
|
|
584
703
|
});
|
|
585
704
|
const text = tx(l);
|
|
586
|
-
if (focused(block, l)) return focusText(l, text, style);
|
|
705
|
+
if (focused(block, l)) return focusText(block, l, text, style);
|
|
587
706
|
const blank = !l.text?.trim();
|
|
588
707
|
if (blank && !onSelect) return /*#__PURE__*/_jsx(View, {
|
|
589
708
|
style: style
|
|
@@ -595,9 +714,11 @@ export function DetailCanvas({
|
|
|
595
714
|
}),
|
|
596
715
|
label: blank ? '글' : l.text ?? '',
|
|
597
716
|
style: style,
|
|
717
|
+
part: textPart(block, l, text),
|
|
598
718
|
children: [blank ? blankBar(l, text) : /*#__PURE__*/_jsx(RNText, {
|
|
719
|
+
lineBreakStrategyIOS: "hangul-word",
|
|
599
720
|
style: text,
|
|
600
|
-
children: l.text
|
|
721
|
+
children: lay(l.text ?? '')
|
|
601
722
|
}), picked(block, l) ? /*#__PURE__*/_jsx(Handles, {}) : null]
|
|
602
723
|
});
|
|
603
724
|
};
|
|
@@ -674,7 +795,7 @@ export function DetailCanvas({
|
|
|
674
795
|
style: [s.step, {
|
|
675
796
|
gap
|
|
676
797
|
}],
|
|
677
|
-
children: [dot, focusText(l, text, s.stretch)]
|
|
798
|
+
children: [dot, focusText(block, l, text, s.stretch)]
|
|
678
799
|
}, l.id);
|
|
679
800
|
}
|
|
680
801
|
return /*#__PURE__*/_jsxs(Tap, {
|
|
@@ -686,25 +807,29 @@ export function DetailCanvas({
|
|
|
686
807
|
style: [s.step, {
|
|
687
808
|
gap
|
|
688
809
|
}],
|
|
810
|
+
part: textPart(block, l, text, false),
|
|
689
811
|
children: [dot, blank ? blankBar(l, text) : /*#__PURE__*/_jsx(RNText, {
|
|
812
|
+
lineBreakStrategyIOS: "hangul-word",
|
|
690
813
|
style: [text, s.stretch],
|
|
691
|
-
children: l.text
|
|
814
|
+
children: lay(l.text ?? '')
|
|
692
815
|
}), picked(block, l) ? /*#__PURE__*/_jsx(Handles, {}) : null]
|
|
693
816
|
}, l.id);
|
|
694
817
|
})
|
|
695
818
|
}, r))
|
|
696
819
|
});
|
|
697
820
|
};
|
|
698
|
-
const texts = (block, shown) => {
|
|
821
|
+
const texts = (block, shown, under = false) => {
|
|
699
822
|
const list = shown.filter(l => l.type === 'text' && (l.text || onSelect || focused(block, l)));
|
|
700
823
|
if (!list.length) return null;
|
|
701
824
|
return /*#__PURE__*/_jsx(View, {
|
|
702
825
|
style: [s.texts, {
|
|
703
826
|
padding: pad
|
|
827
|
+
}, under && {
|
|
828
|
+
paddingTop: pad + t.space[2] * scale
|
|
704
829
|
}],
|
|
705
830
|
children: list.map(l => {
|
|
706
831
|
const style = tx(l);
|
|
707
|
-
if (focused(block, l)) return focusText(l, style);
|
|
832
|
+
if (focused(block, l)) return focusText(block, l, style);
|
|
708
833
|
const blank = !!onSelect && !l.text?.trim();
|
|
709
834
|
return /*#__PURE__*/_jsxs(Tap, {
|
|
710
835
|
onPress: press({
|
|
@@ -712,9 +837,11 @@ export function DetailCanvas({
|
|
|
712
837
|
layer: l.id
|
|
713
838
|
}),
|
|
714
839
|
label: blank ? '글' : l.text ?? '',
|
|
840
|
+
part: textPart(block, l, style),
|
|
715
841
|
children: [blank ? blankBar(l, style) : /*#__PURE__*/_jsx(RNText, {
|
|
842
|
+
lineBreakStrategyIOS: "hangul-word",
|
|
716
843
|
style: style,
|
|
717
|
-
children: l.text
|
|
844
|
+
children: lay(l.text ?? '')
|
|
718
845
|
}), picked(block, l) ? /*#__PURE__*/_jsx(Handles, {}) : null]
|
|
719
846
|
}, l.id);
|
|
720
847
|
})
|
|
@@ -769,47 +896,51 @@ export function DetailCanvas({
|
|
|
769
896
|
});
|
|
770
897
|
default:
|
|
771
898
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
772
|
-
children: [images.map(l => image(block, l, false, 4 / 5)), texts(block, shown)]
|
|
899
|
+
children: [images.map(l => image(block, l, false, 4 / 5)), texts(block, shown, images.length > 0)]
|
|
773
900
|
});
|
|
774
901
|
}
|
|
775
902
|
};
|
|
776
|
-
return /*#__PURE__*/_jsx(
|
|
777
|
-
value:
|
|
778
|
-
children: /*#__PURE__*/_jsx(
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
uri: block.background.url
|
|
903
|
+
return /*#__PURE__*/_jsx(PartsContext.Provider, {
|
|
904
|
+
value: parts,
|
|
905
|
+
children: /*#__PURE__*/_jsx(FocusTargetContext.Provider, {
|
|
906
|
+
value: target,
|
|
907
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
908
|
+
ref: root,
|
|
909
|
+
style: [s.page, {
|
|
910
|
+
backgroundColor: doc.background ?? paper ?? t.colors.surface
|
|
911
|
+
}],
|
|
912
|
+
children: doc.blocks.map((block, index) => /*#__PURE__*/_jsxs(View, {
|
|
913
|
+
onLayout: parts?.again,
|
|
914
|
+
style: {
|
|
915
|
+
backgroundColor: block.background?.color ?? undefined,
|
|
916
|
+
paddingTop: detailBlockSpace(block.space_top) * scale,
|
|
917
|
+
paddingBottom: detailBlockSpace(block.space_bottom) * scale
|
|
792
918
|
},
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
children:
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
919
|
+
children: [block.background?.url ? /*#__PURE__*/_jsx(Image, {
|
|
920
|
+
source: {
|
|
921
|
+
uri: block.background.url
|
|
922
|
+
},
|
|
923
|
+
resizeMode: "cover",
|
|
924
|
+
style: s.fill
|
|
925
|
+
}) : null, onSelect && !edit ? /*#__PURE__*/_jsx(PressableBase, {
|
|
926
|
+
onPress: () => onSelect({
|
|
927
|
+
block: block.id
|
|
928
|
+
}),
|
|
929
|
+
accessibilityLabel: "\uBE14\uB85D",
|
|
930
|
+
feedback: "none",
|
|
931
|
+
style: s.fill
|
|
932
|
+
}) : null, body(block), picked(block) ? /*#__PURE__*/_jsx(Handles, {}) : null, !edit && selection?.block === block.id ? /*#__PURE__*/_jsx(View, {
|
|
933
|
+
pointerEvents: "none",
|
|
934
|
+
style: s.tag,
|
|
935
|
+
children: /*#__PURE__*/_jsx(RNText, {
|
|
936
|
+
style: [s.tagText, {
|
|
937
|
+
color: t.colors.primaryForeground
|
|
938
|
+
}],
|
|
939
|
+
children: String(index + 1)
|
|
940
|
+
})
|
|
941
|
+
}) : null]
|
|
942
|
+
}, block.id))
|
|
943
|
+
})
|
|
813
944
|
})
|
|
814
945
|
});
|
|
815
946
|
}
|