@octane-xplat/gif 0.1.0 → 0.7.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/dist/native/index.js +1 -1
- package/dist/native/octane-client-build.json +1 -1
- package/dist/web/octane-client-build.json +1 -1
- package/package.json +26 -8
- package/src/AnimatedImage.macos.tsrx +7 -0
- package/src/{AnimatedImage.native.tsrx → AnimatedImage.tsrx} +0 -7
- package/src/index.macos.ts +2 -0
- package/src/{index.native.ts → index.ts} +1 -1
- package/src/native-elements.d.ts +8 -0
- package/types/generated/.tsrx-typegen-manifest.json +10 -0
- package/types/generated/AnimatedImage.d.ts +6 -0
- package/types/generated/AnimatedImage.web.d.ts +5 -0
- package/types/generated/index.d.ts +2 -0
- package/types/generated/index.web.d.ts +2 -0
- package/types/index.macos.d.ts +4 -0
- package/types/index.d.ts +0 -8
- /package/types/{props.d.ts → generated/props.d.ts} +0 -0
package/dist/native/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineUniversalComponent, registerElement, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
2
2
|
import { Img } from "@nativescript-community/ui-image";
|
|
3
|
-
//#region src/AnimatedImage.
|
|
3
|
+
//#region src/AnimatedImage.tsrx
|
|
4
4
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
5
5
|
"kind": "host",
|
|
6
6
|
"type": "animatedimage",
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/gif",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Animated image (GIF/animated webp) leaf for Octane xplat — web <img> + @nativescript-community/ui-image",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/octane-xplat/octane-xplat.git",
|
|
8
|
+
"directory": "packages/gif"
|
|
9
|
+
},
|
|
5
10
|
"files": [
|
|
6
11
|
"dist",
|
|
7
12
|
"types",
|
|
@@ -10,9 +15,19 @@
|
|
|
10
15
|
"type": "module",
|
|
11
16
|
"exports": {
|
|
12
17
|
".": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
"macos": {
|
|
19
|
+
"types": "./types/index.macos.d.ts",
|
|
20
|
+
"default": "./src/index.macos.ts"
|
|
21
|
+
},
|
|
22
|
+
"web": {
|
|
23
|
+
"types": "./types/generated/index.web.d.ts",
|
|
24
|
+
"default": "./dist/web/index.js"
|
|
25
|
+
},
|
|
26
|
+
"native": {
|
|
27
|
+
"types": "./types/generated/index.d.ts",
|
|
28
|
+
"default": "./dist/native/index.js"
|
|
29
|
+
},
|
|
30
|
+
"types": "./types/generated/index.d.ts",
|
|
16
31
|
"default": "./dist/native/index.js"
|
|
17
32
|
}
|
|
18
33
|
},
|
|
@@ -25,15 +40,17 @@
|
|
|
25
40
|
"devDependencies": {
|
|
26
41
|
"@nativescript-community/octane": "0.2.1",
|
|
27
42
|
"@nativescript/core": "9.1.2",
|
|
28
|
-
"@octanejs/vite-plugin": "0.1.
|
|
29
|
-
"
|
|
43
|
+
"@octanejs/vite-plugin": "0.1.61",
|
|
44
|
+
"@tsrx/typescript-plugin": "0.4.11",
|
|
45
|
+
"octane": "0.6.3",
|
|
46
|
+
"tsrx-typegen": "0.1.0",
|
|
30
47
|
"typescript": "5.9.3",
|
|
31
48
|
"vite": "8.3.0"
|
|
32
49
|
},
|
|
33
50
|
"peerDependencies": {
|
|
34
51
|
"@nativescript-community/octane": ">=0.2.1 <1",
|
|
35
52
|
"@nativescript/core": ">=9.1.0 <10",
|
|
36
|
-
"octane": ">=0.
|
|
53
|
+
"octane": ">=0.6.3 <1"
|
|
37
54
|
},
|
|
38
55
|
"peerDependenciesMeta": {
|
|
39
56
|
"@nativescript-community/octane": {
|
|
@@ -44,6 +61,7 @@
|
|
|
44
61
|
}
|
|
45
62
|
},
|
|
46
63
|
"scripts": {
|
|
47
|
-
"build": "vite build && vite build --mode native &&
|
|
64
|
+
"build": "vite build && vite build --mode native && tsrx-typegen --target octane && node ../../scripts/check-native-dist.mjs",
|
|
65
|
+
"test:packed": "node tests/packed-consumer.mjs"
|
|
48
66
|
}
|
|
49
67
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @jsxImportSource @xplat/macos/renderer */
|
|
2
|
+
import type { AnimatedImageProps } from './props'
|
|
3
|
+
|
|
4
|
+
/** Show an explicit placeholder until the AppKit host has an animation view. */
|
|
5
|
+
export function AnimatedImage(_props: AnimatedImageProps) @{
|
|
6
|
+
<label className="vx-unsupported">Animated images are unsupported by the AppKit host</label>
|
|
7
|
+
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/** @jsxImportSource @nativescript-community/octane */
|
|
2
2
|
import { registerElement } from '@nativescript-community/octane';
|
|
3
|
-
import type { Attributes } from '@nativescript-community/octane/intrinsics';
|
|
4
3
|
import { Img } from '@nativescript-community/ui-image';
|
|
5
4
|
import type { AnimatedImageProps } from './props';
|
|
6
5
|
|
|
7
|
-
declare module '@nativescript-community/octane/intrinsics' {
|
|
8
|
-
interface NativeScriptElements {
|
|
9
|
-
animatedimage: Attributes<typeof Img>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
6
|
// @nativescript-community/ui-image — Fresco DraweeView on Android,
|
|
14
7
|
// SDAnimatedImageView on iOS when `animatedImageView` is set (plain UIImageView
|
|
15
8
|
// otherwise, which would still decode but not animate).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Platform barrels — explicit .tsrx leaf imports (moduleSuffixes don't
|
|
2
2
|
// reach .tsrx; same convention as @octane-xplat/ui index.*.ts).
|
|
3
|
-
export { AnimatedImage } from './AnimatedImage.
|
|
3
|
+
export { AnimatedImage } from './AnimatedImage.tsrx';
|
|
4
4
|
export type { AnimatedImageProps } from './props';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Img } from '@nativescript-community/ui-image'
|
|
2
|
+
import type { Attributes } from '@nativescript-community/octane/intrinsics'
|
|
3
|
+
|
|
4
|
+
declare module '@nativescript-community/octane/intrinsics' {
|
|
5
|
+
interface NativeScriptElements {
|
|
6
|
+
animatedimage: Attributes<typeof Img>
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AnimatedImageProps } from './props.js';
|
|
2
|
+
/** AnimatedImage — GIF/animated-webp decode + autoplay via ui-image. `src`
|
|
3
|
+
* takes the Img grammar: remote URL, res://name, ~/bundle path, file path.
|
|
4
|
+
* There is intentionally no play/pause prop — <img> can't pause on web, so
|
|
5
|
+
* the shared contract is always-playing. */
|
|
6
|
+
export declare function AnimatedImage(props: AnimatedImageProps): unknown;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** @jsxImportSource octane */
|
|
2
|
+
import type { AnimatedImageProps } from './props.js';
|
|
3
|
+
/** AnimatedImage — a plain <img>; browsers animate GIF/webp natively.
|
|
4
|
+
* `stretch` maps to object-fit. */
|
|
5
|
+
export declare function AnimatedImage(props: AnimatedImageProps): import("octane/jsx-runtime").JSX.Element;
|
package/types/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Boundary types for @octane-xplat/gif — the mechanical wrapper over
|
|
2
|
-
// props.ts (tsrx-tsc can't emit .tsrx declarations; see ui/types/index.d.ts
|
|
3
|
-
// for the same pattern).
|
|
4
|
-
import type { UniversalComponent } from 'octane/universal'
|
|
5
|
-
import type { AnimatedImageProps } from './props'
|
|
6
|
-
|
|
7
|
-
export declare const AnimatedImage: UniversalComponent<AnimatedImageProps>
|
|
8
|
-
export type { AnimatedImageProps }
|
|
File without changes
|