@vnejs/plugins.views.scenario.qte 0.2.0 → 0.2.2

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.
@@ -16,7 +16,7 @@ const describeArc = (sectorStart, sectorWidth) => {
16
16
  return ["M", start.x, start.y, "A", RADIUS, RADIUS, 0, largeArcFlag, 0, end.x, end.y].join(" ");
17
17
  };
18
18
  const Qte = ({ store, onMount, emit, EVENTS, PARAMS }) => {
19
- const { isShow = false, isForce = false, phase = "", result = "", item = null, locs = {}, } = useStoreState(store, onMount);
19
+ const { isShow = false, isForce = false, phase = "", result = "", item = null, locs = {} } = useStoreState(store, onMount);
20
20
  const isRealForce = useIsForceHook(isForce);
21
21
  const propsView = PARAMS.QTE_VIEW.VIEW_PROPS;
22
22
  const transition = isRealForce ? 0 : PARAMS.QTE_VIEW.TRANSITION;
@@ -31,6 +31,6 @@ const Qte = ({ store, onMount, emit, EVENTS, PARAMS }) => {
31
31
  const isPointerPaused = phase === "resolved" || phase === "outro";
32
32
  const onDialClick = useCallback(() => void emit(EVENTS.QTE_VIEW.ACTION), [emit, EVENTS.QTE_VIEW.ACTION]);
33
33
  const propsScreen = useMemo(() => ({ ...propsView.screen, isDisableAutoread: true, isIgnoreOnScreenshot: true, isShow, isForce: isRealForce, transition }), [isShow, isRealForce, propsView.screen, transition]);
34
- return (_jsx(Screen, { ...propsScreen, children: _jsx(PositionBox, { ...propsView.position, children: _jsx("div", { className: b("shell", { phase }), style: { ["--qte-intro-transition"]: `${introTransition}ms` }, children: _jsxs("div", { className: b("arena"), children: [_jsxs("svg", { className: b("dial"), viewBox: `0 0 ${CIRCLE_SIZE} ${CIRCLE_SIZE}`, onClick: onDialClick, children: [_jsx("circle", { className: b("trackShadow"), cx: CENTER, cy: CENTER, r: RADIUS }), _jsx("circle", { className: b("track"), cx: CENTER, cy: CENTER, r: RADIUS }), _jsx("path", { className: b("sector"), d: sectorPath })] }), _jsx("div", { className: b("pointerSpin", { spinning: isPointerSpinning, paused: isPointerPaused }), style: { ["--qte-duration"]: `${duration}ms` }, children: _jsx("div", { className: b("pointer") }) }), _jsx("div", { className: b("status"), "aria-live": "polite", children: locs[result] ?? "" })] }) }) }) }));
34
+ return (_jsx(Screen, { ...propsScreen, children: _jsx(PositionBox, { ...propsView.position, children: _jsx("div", { className: b("shell", { phase }), style: { ["--qte-intro-transition"]: `${introTransition}ms` }, children: _jsxs("div", { className: b("arena"), children: [_jsxs("svg", { className: b("dial"), viewBox: `0 0 ${CIRCLE_SIZE} ${CIRCLE_SIZE}`, onClick: onDialClick, "vne-cursor-type": "pointer", children: [_jsx("circle", { className: b("trackShadow"), cx: CENTER, cy: CENTER, r: RADIUS }), _jsx("circle", { className: b("track"), cx: CENTER, cy: CENTER, r: RADIUS }), _jsx("path", { className: b("sector"), d: sectorPath })] }), _jsx("div", { className: b("pointerSpin", { spinning: isPointerSpinning, paused: isPointerPaused }), style: { ["--qte-duration"]: `${duration}ms` }, children: _jsx("div", { className: b("pointer") }) }), _jsx("div", { className: b("status"), "aria-live": "polite", children: locs[result] ?? "" })] }) }) }) }));
35
35
  };
36
36
  export const render = createRenderFunc(Qte);
@@ -49,7 +49,6 @@ ${sel(b("dial"))} {
49
49
  width: 100%;
50
50
  height: 100%;
51
51
  overflow: visible;
52
- cursor: pointer;
53
52
  }
54
53
 
55
54
  ${sel(b("trackShadow"))} {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.views.scenario.qte",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,7 +51,6 @@ ${sel(b("dial"))} {
51
51
  width: 100%;
52
52
  height: 100%;
53
53
  overflow: visible;
54
- cursor: pointer;
55
54
  }
56
55
 
57
56
  ${sel(b("trackShadow"))} {
@@ -28,14 +28,7 @@ const describeArc = (sectorStart: number, sectorWidth: number) => {
28
28
  };
29
29
 
30
30
  const Qte = ({ store, onMount, emit, EVENTS, PARAMS }: QteComponentProps) => {
31
- const {
32
- isShow = false,
33
- isForce = false,
34
- phase = "",
35
- result = "",
36
- item = null,
37
- locs = {},
38
- } = useStoreState<QtePluginControllerState>(store, onMount);
31
+ const { isShow = false, isForce = false, phase = "", result = "", item = null, locs = {} } = useStoreState<QtePluginControllerState>(store, onMount);
39
32
 
40
33
  const isRealForce = useIsForceHook(isForce);
41
34
  const propsView = PARAMS.QTE_VIEW.VIEW_PROPS;
@@ -71,6 +64,7 @@ const Qte = ({ store, onMount, emit, EVENTS, PARAMS }: QteComponentProps) => {
71
64
  className={b("dial")}
72
65
  viewBox={`0 0 ${CIRCLE_SIZE} ${CIRCLE_SIZE}`}
73
66
  onClick={onDialClick}
67
+ vne-cursor-type="pointer"
74
68
  >
75
69
  <circle
76
70
  className={b("trackShadow")}