@octane-xplat/gif 0.1.0 → 0.7.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Alec Larson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -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.native.tsrx
3
+ //#region src/AnimatedImage.tsrx
4
4
  var __octaneUniversalPlan0 = universalPlan("nativescript", {
5
5
  "kind": "host",
6
6
  "type": "animatedimage",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "buildId": "6d4d5e50-5abb-4b45-9287-419436cba763",
3
+ "buildId": "9548aea3-5773-43db-8c9c-63904df2b879",
4
4
  "mode": "production",
5
5
  "capabilities": {
6
6
  "independentHydration": false
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "buildId": "bdcff4a8-56d9-4b9d-82b0-696a3d259344",
3
+ "buildId": "2b1aca33-1496-413d-a7a0-d4b6e4f2d591",
4
4
  "mode": "production",
5
5
  "capabilities": {
6
6
  "independentHydration": false
package/package.json CHANGED
@@ -1,7 +1,27 @@
1
1
  {
2
2
  "name": "@octane-xplat/gif",
3
- "version": "0.1.0",
4
- "description": "Animated image (GIF/animated webp) leaf for Octane xplat — web <img> + @nativescript-community/ui-image",
3
+ "version": "0.7.1",
4
+ "description": "Animated images (GIF/animated webp) for Octane xplat — web <img> + @nativescript-community/ui-image",
5
+ "keywords": [
6
+ "octane",
7
+ "xplat",
8
+ "cross-platform",
9
+ "gif",
10
+ "animated-image",
11
+ "animated-webp",
12
+ "image",
13
+ "nativescript",
14
+ "ios",
15
+ "android",
16
+ "web"
17
+ ],
18
+ "license": "MIT",
19
+ "homepage": "https://github.com/octane-xplat/octane-xplat/tree/main/packages/gif",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/octane-xplat/octane-xplat.git",
23
+ "directory": "packages/gif"
24
+ },
5
25
  "files": [
6
26
  "dist",
7
27
  "types",
@@ -10,9 +30,19 @@
10
30
  "type": "module",
11
31
  "exports": {
12
32
  ".": {
13
- "types": "./types/index.d.ts",
14
- "web": "./dist/web/index.js",
15
- "native": "./dist/native/index.js",
33
+ "macos": {
34
+ "types": "./types/index.macos.d.ts",
35
+ "default": "./src/index.macos.ts"
36
+ },
37
+ "web": {
38
+ "types": "./types/generated/index.web.d.ts",
39
+ "default": "./dist/web/index.js"
40
+ },
41
+ "native": {
42
+ "types": "./types/generated/index.d.ts",
43
+ "default": "./dist/native/index.js"
44
+ },
45
+ "types": "./types/generated/index.d.ts",
16
46
  "default": "./dist/native/index.js"
17
47
  }
18
48
  },
@@ -25,15 +55,17 @@
25
55
  "devDependencies": {
26
56
  "@nativescript-community/octane": "0.2.1",
27
57
  "@nativescript/core": "9.1.2",
28
- "@octanejs/vite-plugin": "0.1.60",
29
- "octane": "0.5.0",
58
+ "@octanejs/vite-plugin": "0.1.61",
59
+ "@tsrx/typescript-plugin": "0.4.11",
60
+ "octane": "0.6.3",
61
+ "tsrx-typegen": "0.1.0",
30
62
  "typescript": "5.9.3",
31
63
  "vite": "8.3.0"
32
64
  },
33
65
  "peerDependencies": {
34
66
  "@nativescript-community/octane": ">=0.2.1 <1",
35
67
  "@nativescript/core": ">=9.1.0 <10",
36
- "octane": ">=0.1.51 <1"
68
+ "octane": ">=0.6.3 <1"
37
69
  },
38
70
  "peerDependenciesMeta": {
39
71
  "@nativescript-community/octane": {
@@ -44,6 +76,7 @@
44
76
  }
45
77
  },
46
78
  "scripts": {
47
- "build": "vite build && vite build --mode native && tsc -p tsconfig.types.json"
79
+ "build": "vite build && vite build --mode native && tsrx-typegen --target octane && node ../../scripts/check-native-dist.mjs",
80
+ "test:packed": "node tests/packed-consumer.mjs"
48
81
  }
49
82
  }
@@ -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).
@@ -0,0 +1,2 @@
1
+ export { AnimatedImage } from './AnimatedImage.macos.tsrx'
2
+ export type { AnimatedImageProps } from './props'
@@ -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.native.tsrx';
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,10 @@
1
+ {
2
+ "version": 1,
3
+ "files": [
4
+ "AnimatedImage.d.ts",
5
+ "AnimatedImage.web.d.ts",
6
+ "index.d.ts",
7
+ "index.web.d.ts",
8
+ "props.d.ts"
9
+ ]
10
+ }
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { AnimatedImage } from './AnimatedImage.js';
2
+ export type { AnimatedImageProps } from './props.js';
@@ -0,0 +1,2 @@
1
+ export { AnimatedImage } from './AnimatedImage.web.js';
2
+ export type { AnimatedImageProps } from './props.js';
@@ -0,0 +1,4 @@
1
+ import type { AnimatedImageProps } from './generated/props.js'
2
+
3
+ export type { AnimatedImageProps } from './generated/props.js'
4
+ export declare function AnimatedImage(props: AnimatedImageProps): unknown
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