@tryghost/kg-unsplash-selector 0.1.17 → 0.2.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.
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { DefaultHeaderTypes } from './UnsplashTypes';
3
- import { Photo } from './UnsplashTypes';
1
+ import { default as React } from 'react';
2
+ import { DefaultHeaderTypes, Photo } from './UnsplashTypes';
3
+
4
4
  interface UnsplashModalProps {
5
5
  onClose: () => void;
6
6
  onImageInsert: (image: Photo) => void;
@@ -1,4 +1,5 @@
1
1
  import { Photo } from '../UnsplashTypes';
2
+
2
3
  export interface IUnsplashProvider {
3
4
  fetchPhotos(): Promise<Photo[]>;
4
5
  fetchNextPage(): Promise<Photo[] | null>;
@@ -1,5 +1,6 @@
1
1
  import { IUnsplashProvider } from './IUnsplashProvider';
2
2
  import { Photo } from '../UnsplashTypes';
3
+
3
4
  export declare class InMemoryUnsplashProvider implements IUnsplashProvider {
4
5
  photos: Photo[];
5
6
  PAGINATION: {
@@ -1,4 +1,5 @@
1
1
  import { Photo } from '../UnsplashTypes';
2
+
2
3
  export default class MasonryService {
3
4
  columnCount: number;
4
5
  columns: Photo[][] | [];
@@ -1,5 +1,6 @@
1
1
  import { IUnsplashProvider } from './IUnsplashProvider';
2
2
  import { Photo } from '../UnsplashTypes';
3
+
3
4
  export declare class PhotoUseCases {
4
5
  private _provider;
5
6
  constructor(provider: IUnsplashProvider);
@@ -1,5 +1,6 @@
1
1
  import { DefaultHeaderTypes, Photo } from '../UnsplashTypes';
2
2
  import { IUnsplashProvider } from './IUnsplashProvider';
3
+
3
4
  export declare class UnsplashProvider implements IUnsplashProvider {
4
5
  API_URL: string;
5
6
  HEADERS: DefaultHeaderTypes;
@@ -1,6 +1,7 @@
1
- import MasonryService from './MasonryService';
1
+ import { default as MasonryService } from './MasonryService';
2
2
  import { Photo } from '../UnsplashTypes';
3
3
  import { PhotoUseCases } from './PhotoUseCase';
4
+
4
5
  export interface IUnsplashService {
5
6
  loadNew(): Promise<void>;
6
7
  layoutPhotos(): void;
@@ -1,3 +1,4 @@
1
1
  import { Photo } from '../UnsplashTypes';
2
+
2
3
  export declare const fixturePhotos: Photo[];
3
4
  //# sourceMappingURL=unsplashFixtures.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export { UnsplashSearchModal } from './UnsplashSearchModal';
2
2
  export type { DefaultHeaderTypes, Photo as PhotoType } from './UnsplashTypes';
3
3
  export { UnsplashProvider } from './api/UnsplashProvider';
4
- import './styles/index.css';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,5 @@
1
- import React, { HTMLProps } from 'react';
1
+ import { default as React, HTMLProps } from 'react';
2
+
2
3
  type ButtonIconType = 'heart' | 'download';
3
4
  interface UnsplashButtonProps extends HTMLProps<HTMLAnchorElement> {
4
5
  icon?: ButtonIconType;
@@ -1,5 +1,6 @@
1
- import React, { ReactNode, RefObject } from 'react';
1
+ import { default as React, ReactNode, RefObject } from 'react';
2
2
  import { Photo } from '../UnsplashTypes';
3
+
3
4
  interface MasonryColumnProps {
4
5
  children: ReactNode;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { Links, Photo, User } from '../UnsplashTypes';
3
+
3
4
  export interface UnsplashImageProps {
4
5
  payload: Photo;
5
6
  srcUrl: string;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEvent, FunctionComponent, ReactNode } from 'react';
2
+
2
3
  interface UnsplashSelectorProps {
3
4
  closeModal: () => void;
4
5
  handleSearch: (e: ChangeEvent<HTMLInputElement>) => void;
@@ -1,6 +1,7 @@
1
1
  import { UnsplashImageProps } from './UnsplashImage';
2
2
  import { FC } from 'react';
3
3
  import { Photo } from '../UnsplashTypes';
4
+
4
5
  interface UnsplashZoomedProps extends Omit<UnsplashImageProps, 'zoomed'> {
5
6
  zoomed: Photo | null;
6
7
  selectImg: (photo: Photo | null) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/kg-unsplash-selector",
3
- "version": "0.1.17",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,26 +36,26 @@
36
36
  "@playwright/test": "^1.33.0",
37
37
  "@types/react": "^18.2.0",
38
38
  "@types/react-dom": "^18.2.0",
39
- "@typescript-eslint/eslint-plugin": "7.9.0",
40
- "@typescript-eslint/parser": "7.9.0",
41
- "@vitejs/plugin-react": "4.2.1",
39
+ "@typescript-eslint/eslint-plugin": "7.10.0",
40
+ "@typescript-eslint/parser": "7.10.0",
41
+ "@vitejs/plugin-react": "4.3.0",
42
42
  "@vitest/coverage-v8": "1.6.0",
43
43
  "autoprefixer": "10.4.19",
44
44
  "concurrently": "8.2.2",
45
45
  "eslint": "8.57.0",
46
46
  "eslint-plugin-react-hooks": "4.6.2",
47
47
  "eslint-plugin-react-refresh": "0.4.7",
48
- "eslint-plugin-tailwindcss": "3.15.1",
49
- "jsdom": "24.0.0",
48
+ "eslint-plugin-tailwindcss": "3.17.0",
49
+ "jsdom": "24.1.0",
50
50
  "postcss": "8.4.38",
51
- "postcss-import": "^16.0.1",
51
+ "postcss-import": "16.1.0",
52
52
  "tailwindcss": "3.4.3",
53
53
  "typescript": "5.4.5",
54
54
  "vite": "5.2.11",
55
55
  "vite-plugin-css-injected-by-js": "3.5.1",
56
- "vite-plugin-dts": "^3.7.3",
56
+ "vite-plugin-dts": "3.9.1",
57
57
  "vite-plugin-svgr": "4.2.0",
58
58
  "vitest": "1.6.0"
59
59
  },
60
- "gitHead": "96ad0e299360919da31dc75ec5343217a8a0f2bd"
60
+ "gitHead": "592c888aad1a7ac8b105967e67c8945adbdf0c6b"
61
61
  }