@molecule/app-exif-panel-vue 0.0.0-stage → 1.1.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/index.js ADDED
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Vue EXIF metadata panel for photo-sharing apps.
3
+ *
4
+ * Exports `<ExifPanel>` — a structured renderer for already-parsed EXIF
5
+ * data (camera, lens, aperture, shutter, ISO, focal length, GPS,
6
+ * timestamp, software, copyright). The caller is responsible for
7
+ * decoding the raw EXIF payload (e.g. via the `exifr` library); this
8
+ * package is a styling-agnostic, i18n-aware renderer only.
9
+ *
10
+ * Also exports the `ExifData` and `ExifPanelProps` types and the pure
11
+ * formatting helpers (`formatAperture`, `formatShutter`, `formatIso`,
12
+ * `formatFocalLength`, `formatGps`, `formatTimestamp`, `formatCamera`,
13
+ * `buildMapLink`, `formatDms`).
14
+ *
15
+ * It is the Vue counterpart of `@molecule/app-exif-panel-react`: the same
16
+ * props (React names), the same ClassMap tokens and the same DOM for the
17
+ * same input.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * import { createApp, defineComponent, h } from 'vue'
22
+ * import { ExifPanel } from '@molecule/app-exif-panel-vue'
23
+ *
24
+ * const PhotoMetadata = defineComponent({
25
+ * props: { exif: { type: Object, required: true } },
26
+ * setup(props) {
27
+ * return () => h(ExifPanel, { exif: props.exif, showGps: true, compact: false })
28
+ * },
29
+ * })
30
+ *
31
+ * createApp(PhotoMetadata, { exif: parsedExif }).mount('#app')
32
+ * ```
33
+ *
34
+ * @remarks
35
+ * Requires a bonded ClassMap (`getClassMap()`) and the binding's i18n
36
+ * provider for `useTranslation()` — the same requirements as the React
37
+ * package. All user-facing text resolves through `t()` with React's keys
38
+ * and English `defaultValue`s.
39
+ *
40
+ * @module
41
+ */
42
+ export * from './ExifPanel.js';
43
+ export * from './format.js';
44
+ export * from './types.js';
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Type definitions for the EXIF panel renderer.
3
+ *
4
+ * The caller is responsible for parsing the EXIF metadata (e.g. via the
5
+ * `exifr` library) — this package only renders an already-parsed object
6
+ * with normalized field names.
7
+ *
8
+ * @module
9
+ */
10
+ /**
11
+ * Parsed EXIF metadata. Every field is optional — extra fields are
12
+ * permitted (the renderer ignores them) so callers can pass through the
13
+ * full output of their EXIF parser without filtering.
14
+ */
15
+ export interface ExifData {
16
+ /** Camera manufacturer (e.g. `"Canon"`, `"Sony"`, `"Apple"`). */
17
+ make?: string;
18
+ /** Camera model (e.g. `"EOS R5"`, `"a7 III"`, `"iPhone 15 Pro"`). */
19
+ model?: string;
20
+ /** Lens model description (e.g. `"RF 24-70mm F2.8 L IS USM"`). */
21
+ lensModel?: string;
22
+ /** Aperture as an f-number (the `N` in `f/N`). */
23
+ fNumber?: number;
24
+ /** Exposure / shutter time in seconds (e.g. `0.008` ≈ `1/125 s`). */
25
+ exposureTime?: number;
26
+ /** ISO sensitivity (e.g. `100`, `1600`). */
27
+ iso?: number;
28
+ /** Focal length in millimetres. */
29
+ focalLength?: number;
30
+ /** 35 mm-equivalent focal length, when supplied by the camera. */
31
+ focalLength35mm?: number;
32
+ /** Capture timestamp — `Date`, ISO 8601 string, or epoch millis. */
33
+ dateTimeOriginal?: Date | string | number;
34
+ /** GPS latitude in signed decimal degrees. */
35
+ gpsLatitude?: number;
36
+ /** GPS longitude in signed decimal degrees. */
37
+ gpsLongitude?: number;
38
+ /** EXIF orientation tag (1–8). */
39
+ orientation?: number;
40
+ /** Software / firmware that produced the file. */
41
+ software?: string;
42
+ /** Copyright statement embedded in the file. */
43
+ copyright?: string;
44
+ /** Pass-through for parser-specific extras the renderer ignores. */
45
+ [key: string]: unknown;
46
+ }
47
+ /**
48
+ * Props for the `<ExifPanel>` component.
49
+ */
50
+ export interface ExifPanelProps {
51
+ /** Parsed EXIF metadata. */
52
+ exif: ExifData;
53
+ /**
54
+ * Compact mode collapses the panel into a single condensed grid with
55
+ * smaller type and tighter spacing. Defaults to `false`.
56
+ */
57
+ compact?: boolean;
58
+ /**
59
+ * Whether to render the GPS coordinates row when latitude / longitude
60
+ * are present. Defaults to `true`.
61
+ */
62
+ showGps?: boolean;
63
+ /** Optional heading override. */
64
+ heading?: string;
65
+ /** Extra classes appended to the panel root. */
66
+ className?: string;
67
+ }
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;IACzC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oEAAoE;IACpE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAA;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Type definitions for the EXIF panel renderer.
3
+ *
4
+ * The caller is responsible for parsing the EXIF metadata (e.g. via the
5
+ * `exifr` library) — this package only renders an already-parsed object
6
+ * with normalized field names.
7
+ *
8
+ * @module
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
package/package.json CHANGED
@@ -1,6 +1,68 @@
1
1
  {
2
2
  "name": "@molecule/app-exif-panel-vue",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "EXIF metadata renderer for photo-sharing apps — camera, lens, aperture, shutter, ISO, focal length, GPS, timestamp",
5
+ "homepage": "https://www.molecule.dev/packages/app-exif-panel-vue",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "dev": "vue-tsc --watch",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest"
24
+ },
25
+ "keywords": [
26
+ "molecule",
27
+ "exif",
28
+ "photo",
29
+ "metadata",
30
+ "vue"
31
+ ],
32
+ "author": "Molecule Dev, Inc. (https://molecule.dev)",
33
+ "license": "Apache-2.0",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/molecule-dev/molecule.git",
37
+ "directory": "packages/app/features/exif-panel-vue"
38
+ },
39
+ "engines": {
40
+ "node": ">=20"
41
+ },
42
+ "bugs": "https://github.com/molecule-dev/molecule/issues",
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "peerDependencies": {
47
+ "@molecule/app-i18n": "^1.0.1",
48
+ "@molecule/app-ui": "^1.0.1",
49
+ "@molecule/app-ui-vue": "^1.1.0",
50
+ "@molecule/app-vue": "^3.5.0",
51
+ "vue": "^3.4.0"
52
+ },
53
+ "devDependencies": {
54
+ "@molecule/app-framework-conformance": "0.0.0",
55
+ "@molecule/app-i18n": "1.2.2",
56
+ "@molecule/app-icons": "1.0.4",
57
+ "@molecule/app-ui": "1.4.0",
58
+ "@molecule/app-ui-vue": "1.1.4",
59
+ "@molecule/app-vue": "3.7.1",
60
+ "@types/node": "26.6.5",
61
+ "jsdom": "30.1.3",
62
+ "typescript": "6.0.3",
63
+ "vite": "8.3.5",
64
+ "vitest": "4.1.12",
65
+ "vue": "3.5.44",
66
+ "vue-tsc": "3.3.13"
67
+ }
68
+ }