@vnejs/uis.react.sprite 0.1.8 → 0.1.10
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/dist/Sprite.d.ts +1 -1
- package/dist/Sprite.d.ts.map +1 -1
- package/dist/Sprite.js +2 -1
- package/dist/Sprite.js.map +1 -1
- package/dist/Sprite.types.d.ts +1 -1
- package/dist/Sprite.types.d.ts.map +1 -1
- package/package.json +6 -8
- package/src/Sprite.change.stories.tsx +2 -2
- package/src/Sprite.default.stories.tsx +2 -2
- package/src/Sprite.move.stories.tsx +2 -2
- package/src/Sprite.tsx +4 -1
- package/src/Sprite.types.tsx +2 -1
package/dist/Sprite.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type SpriteProps } from "./Sprite.types.js";
|
|
2
|
-
export declare const Sprite: ({ parts, indexSrc, boxProps, partsProps, transition, transitionBox, }: SpriteProps) => import("react
|
|
2
|
+
export declare const Sprite: ({ parts, indexSrc, boxProps, partsProps, transition, transitionBox, }: SpriteProps) => import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Sprite.d.ts.map
|
package/dist/Sprite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sprite.d.ts","sourceRoot":"","sources":["../src/Sprite.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sprite.d.ts","sourceRoot":"","sources":["../src/Sprite.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,MAAM,0EAOhB,WAAW,gCAyBb,CAAC"}
|
package/dist/Sprite.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { Image
|
|
3
|
+
import { Image } from "@vnejs/uis.react.image";
|
|
4
|
+
import { PositionBox } from "@vnejs/uis.react.position-box";
|
|
4
5
|
const POSE_STYLE = { opacity: 0, visibility: "hidden" };
|
|
5
6
|
export const Sprite = ({ parts = [], indexSrc = "", boxProps = {}, partsProps = {}, transition = null, transitionBox = null, }) => {
|
|
6
7
|
const realBoxProps = useMemo(() => {
|
package/dist/Sprite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sprite.js","sourceRoot":"","sources":["../src/Sprite.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Sprite.js","sourceRoot":"","sources":["../src/Sprite.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAI5D,MAAM,UAAU,GAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AAEvE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,EAAE,EACb,UAAU,GAAG,EAAE,EACf,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,IAAI,GACR,EAAE,EAAE;IAChB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,MAAM,MAAM,GAA4B,EAAE,GAAG,QAAQ,EAAE,CAAC;QAExD,IAAI,aAAa,KAAK,IAAI;YAAE,MAAM,CAAC,UAAU,GAAG,aAAa,CAAC;QAE9D,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9B,OAAO,CACL,MAAC,WAAW,OAAK,YAAY,aAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,KAAC,KAAK,OAEA,KAAK,KACL,UAAU,EACd,UAAU,EAAE,UAAU,IAHjB,CAAC,CAIN,CACH,CAAC,EACF,cACE,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,UAAU,GACjB,IACU,CACf,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/Sprite.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
2
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
3
3
|
export type SpriteImagePartProps = {
|
|
4
4
|
translateX?: CssInsertValueNumber;
|
|
5
5
|
translateY?: CssInsertValueNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sprite.types.d.ts","sourceRoot":"","sources":["../src/Sprite.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Sprite.types.d.ts","sourceRoot":"","sources":["../src/Sprite.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEnG,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;Q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AU,CAAC,EAAE,oBAAoB,CAAC;IAClC,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/uis.react.sprite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npx @vnejs/monorepo package",
|
|
8
|
-
"publish:major:uis:react": "npm run publish:major",
|
|
9
|
-
"publish:minor:uis:react": "npm run publish:minor",
|
|
10
|
-
"publish:patch:uis:react": "npm run publish:patch",
|
|
11
8
|
"publish:major": "npx @vnejs/monorepo publish major --access public",
|
|
12
9
|
"publish:minor": "npx @vnejs/monorepo publish minor --access public",
|
|
13
10
|
"publish:patch": "npx @vnejs/monorepo publish patch --access public"
|
|
@@ -15,12 +12,13 @@
|
|
|
15
12
|
"peerDependencies": {
|
|
16
13
|
"@vnejs/uis.utils": "~0.1.0"
|
|
17
14
|
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@vnejs/uis.react": "~0.1.0"
|
|
20
|
-
},
|
|
21
15
|
"files": [
|
|
22
16
|
"dist",
|
|
23
17
|
"src",
|
|
24
18
|
"tsconfig.json"
|
|
25
|
-
]
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@vnejs/uis.react.image": "~0.1.0",
|
|
22
|
+
"@vnejs/uis.react.position-box": "~0.1.0"
|
|
23
|
+
}
|
|
26
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import { renderWithVneWrap, DEFAULT_ARGS, ARGS } from "@vnejs/uis.react";
|
|
3
|
+
import { renderWithVneWrap, DEFAULT_ARGS, ARGS } from "@vnejs/uis.react.storybook";
|
|
4
4
|
|
|
5
|
-
import { Sprite } from "
|
|
5
|
+
import { Sprite } from "./Sprite.js";
|
|
6
6
|
|
|
7
7
|
export const Common = {
|
|
8
8
|
args: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
|
|
3
|
-
import { renderWithVneWrap, ARGS, DEFAULT_ARGS } from "@vnejs/uis.react";
|
|
3
|
+
import { renderWithVneWrap, ARGS, DEFAULT_ARGS } from "@vnejs/uis.react.storybook";
|
|
4
4
|
|
|
5
|
-
import { Sprite } from "
|
|
5
|
+
import { Sprite } from "./Sprite.js";
|
|
6
6
|
|
|
7
7
|
export const Common = {
|
|
8
8
|
args: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import { renderWithVneWrap, VneWrap } from "@vnejs/uis.react";
|
|
3
|
+
import { renderWithVneWrap, VneWrap } from "@vnejs/uis.react.storybook";
|
|
4
4
|
|
|
5
|
-
import { Sprite } from "
|
|
5
|
+
import { Sprite } from "./Sprite.js";
|
|
6
6
|
|
|
7
7
|
const LEFT_X = 480 * 2;
|
|
8
8
|
const RIGHT_X = 480 * 6;
|
package/src/Sprite.tsx
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
+
|
|
2
3
|
import type { CSSProperties } from "react";
|
|
3
4
|
|
|
4
|
-
import { Image
|
|
5
|
+
import { Image } from "@vnejs/uis.react.image";
|
|
6
|
+
|
|
7
|
+
import { PositionBox } from "@vnejs/uis.react.position-box";
|
|
5
8
|
|
|
6
9
|
import { type SpriteProps } from "./Sprite.types.js";
|
|
7
10
|
|
package/src/Sprite.types.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
2
1
|
import type { ReactNode } from "react";
|
|
3
2
|
|
|
3
|
+
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
4
|
+
|
|
4
5
|
export type SpriteImagePartProps = {
|
|
5
6
|
translateX?: CssInsertValueNumber;
|
|
6
7
|
translateY?: CssInsertValueNumber;
|