AbsoluteJS

Stock Images

@absolutejs/stock-imagesv0.1.1betaFrontend & UX

Provider-neutral stock photo search, selection, attribution and typed failure contracts.

#Installation

BASH
bun add @absolutejs/stock-images

#Capabilities

Overview

Provider-neutral stock photo search, selection, attribution and typed failure contracts.

Server-side only: keep provider keys out of browser bundles and generated projects. Search results retain provider descriptions, original image URLs, dimensions, attribution and license links. Metadata is not visual proof of what an image depicts; review the actual image before claiming specific equipment, people or services.

Call select(id) only when actually inserting an image. Unsplash records its required download notification before selection succeeds. Do not repeatedly call selection during render, search or hover. A failed notification means insertion must not proceed. The caller owns duplicate-click prevention and durable insertion records.

Show 4 more

Search returns pagination per provider. Failures remain distinguishable from empty results. Keys and upstream error bodies are never included in error messages. Requests time out and reject redirects. Cancellation is supported.

Preserve the returned attribution and hotlink requirements wherever images are used; a stock license is not proof of model/property releases or permission for all contexts.

Provider documentation: Unsplash, Pexels.

Live credentials are not included. Automated tests use synthetic API-shaped responses, not live-provider acceptance.

Outcomes

What you can build

Overview

Provider-neutral stock photo search, selection, attribution and typed failure contracts.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/stock-images version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Overview
Provider-neutral stock photo search, selection, attribution and typed failure contracts.

#Public entry points

Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.

Public package entry point declared in package.json.

@absolutejs/stock-images@absolutejs/stock-images/manifest@absolutejs/stock-images/manifest.json

#Package commands

Scripts declared by this project’s package manifest.

bun run buildtsc -p tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run typecheck && bun run test && bun run build && absolute-manifest verify-package
bun run formatprettier --write src tests package.json README.md
bun run testbun test tests
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

15 symbols
searchInputSchemavaluePermalink
TS
const searchInputSchema: z.ZodObject<{
    query: z.ZodString;
    page: z.ZodDefault<z.ZodNumber>;
    perPage: z.ZodDefault<z.ZodNumber>;
    orientation: z.ZodOptional<z.ZodEnum<{
        landscape: "landscape";
        portrait: "portrait";
        square: "square";
    }>>;
}, z.core.$strict>;
Exported from @absolutejs/stock-images