open-index/open-npm huggingface dataset:
npm package: @payload-bites/activity-log
Description: keep an eye on everything happening in your cms
Author: Riley Langbein
Latest version: 1.6.1

# Activity log

Keep an eye on everything happening in your cms.

## Quick start

1. Install the plugin:

```shell
pnpm add @payload-bites/activity-log
```

2. Add the plugin to your `payload.config.ts`:

```ts
import { activityLogPlugin } from "@payload-bites/activity-log";

export default buildConfig({
  plugins: [
    activityLogPlugin({
      collections: {
        posts: {},
        pages: {
          enableUpdateLogging: false,
          enableIpAddressLogging: false,
          enableDeviceInfoLogging: false,
        },
      },
      globals: {
        footer: {},
      },
      enableDraftAutosaveLogging: false,
      overrideActivityLogCollection: (collection) => ({
        ...collection,
        access: {
          ...collection?.access,
          update: () => true,
          create: () => true,
        },
        admin: {
          ...collection?.admin,
          group: "Reporting",
        },
      }),
    }),
  ],
});
```

## Defaults

For defaults, refer to [defaults.ts](./src/defaults.ts).

## Options

For options, refer to [types.ts](./src/types.ts).

## Roadmap

- [ ] Capture user logins and logouts
- [ ] Record failed login attempts
- [ ] Custom fields in activity log collection
- [ ] Export to CSV or JSON
npm package: @payload-bites/audit-fields
Description: add createdBy and lastModifiedBy fields to collections and globals
Author: Riley Langbein
Latest version: 1.6.0

# Audit fields

Add createdBy and lastModifiedBy audit fields to collections and globals.

## Quick start

1. Install the plugin:

```shell
pnpm add @payload-bites/audit-fields
```

2. Add the plugin to your `payload.config.ts`:

```ts
/// ....
import { auditFieldsPlugin } from "@payload-bites/audit-fields";

export default buildConfig({
  // ...
  plugins: [
    // ...
    auditFieldsPlugin({
      // ...
    }),
  ],
});
```

## Defaults

For defaults, refer to [defaults.ts](./src/defaults.ts).

## Options

For options, refer to [types.ts](./src/types.ts).
npm package: @payload-bites/content-freeze
Description: make sure your team are putting the tools down during critical moments
Author: Riley Langbein
Latest version: 1.2.0

# Content Freeze

Make sure your team puts the tools down during critical moments. This plugin disables create, update, and delete operations across specified collections and globals when a content freeze is active.

https://github.com/user-attachments/assets/0170fa47-4017-45bb-85bd-40c25040a8d8

## Use cases

- **Deployment freezes**: Prevent content changes during critical deployments.
- **Marketing campaigns**: Lock content before major campaigns go live.
- **Audit periods**: Freeze content during compliance audits.
- **Release management**: Coordinate content changes with software releases.
- **Emergency situations**: Quickly lock down your CMS when needed.

## Quick start

1. Install the plugin:

```shell
pnpm add @payload-bites/content-freeze
```

2. Add the plugin to your `payload.config.ts`:

```ts
import { contentFreezePlugin } from "@payload-bites/content-freeze";

export default buildConfig({
  // ...
  plugins: [
    // ...
    contentFreezePlugin({
      // optional but recommended for custom access control
      overrideContentFreezeSettingsGlobal: (global) => ({
        ...global,
        access: {
          ...global.access,
          read: ({ req }) => req.user?.role === "admin",
          update: ({ req }) => req.user?.role === "admin",
        },
      }),
    }),
    // ...
  ],
  // ...
});
```

## Usage

### Activating a content freeze

1. Navigate to the **Content freeze settings** global in your admin panel.
2. Select the collections and/or globals you would like to be placed under content freeze.
3. Optionally, add a custom message to display in the banner.
4. Check the **Enable content freeze** checkbox.
5. Save the global.

A banner will appear at the top of all admin screens, and create/update/delete operations will be blocked on the selected collections and globals.

### Deactivating a content freeze

1. Navigate to the **Content freeze settings** global.
2. Uncheck the **Enable content freeze** checkbox.
3. Save the global.

The banner will disappear and normal usage can resume.

## Options

For all available options, refer to [types.ts](./src/types.ts).

## Defaults

For default values, refer to [defaults.ts](./src/defaults.ts).

## How it works

When the content freeze is active:

- **Collections**: Create, update, and delete operations are blocked.
- **Globals**: Update operations are blocked.
- **Settings global**: Remains accessible to authorized users so they can deactivate the freeze.
- **Banner**: Displays across all admin screens with your custom message.

The plugin wraps existing access controls, so your original access rules are still evaluated when the freeze is not active.

## Roadmap

- [x] Translations.
- [ ] Scheduled publish of content freeze.
npm package: @payload-bites/fullscreen-editor
Description: fullscreen mode for the lexical rich text editor
Author: Riley Langbein
Latest version: 1.7.2

# Fullscreen editor

Provides a fullscreen mode for the lexical rich text editor.

https://github.com/user-attachments/assets/22ba5cf7-6cb2-4695-8dbf-f06b37c77b66

## Quick start

1. Install the plugin:

```shell
pnpm add @payload-bites/fullscreen-editor
```

2. Add the feature to your lexical editor in `payload.config.ts`:

```ts
// ...
import { FullscreenEditorFeature } from "@payload-bites/fullscreen-editor";

export default buildConfig({
  // ...
  editor: lexicalEditor({
    features: ({ defaultFeatures }) => [
      ...defaultFeatures,
      // ...
      FixedToolbarFeature(), // optional
      FullscreenEditorFeature(),
    ],
  }),
});
```

## Caveats

- If fullscreen mode is enabled and you resize your browser screen across the 768px threshold, the rich-text field remounts which causes the ".focused-editor" class to be removed, leaving you with a blank screen. To fix this you need to either refresh the browser or remove the ".focus-mode" class from the body element using your browser dev tools.

## Roadmap

- [ ] Focus trap around editor in fullscreen mode.
- [x] Translations.
npm package: @payload-bites/image-search
Description: search for images in Payload using various online image providers
Author: Riley Langbein
Latest version: 3.4.2

# Image search

Search for images from the comfort of your own CMS using various image providers.

https://github.com/user-attachments/assets/b99bb160-788f-4689-9e40-005a6fe0bced

## Compatibility table

| Payload version    | Image search version |
| ------------------ | -------------------- |
| v3.18.0 or earlier | Incompatible         |
| v3.19.0 to v3.23.0 | v1.x                 |
| v3.24.0 or v3.42.0 | v2.x                 |
| v3.43.0 or later   | v3.x                 |

## Quick start

1. Install the plugin:

```shell
pnpm add @payload-bites/image-search
```

2. Add environment variables:

| Name             | CORS URL                    | Description                                    |
| ---------------- | --------------------------- | ---------------------------------------------- |
| API_KEY_UNSPLASH | https://images.unsplash.com | The key you configured to use the Unsplash API |
| API_KEY_PEXELS   | https://images.pexels.com   | The key you configured to use the Pexels API   |
| API_KEY_PIXABAY  | https://pixabay.com         | The key you configured to use the Pixabay API  |

> [!IMPORTANT]
> At least one API key is required to use this plugin.

3. Add the plugin to your `payload.config.ts`:

```ts
/// ....
import { imageSearchPlugin } from "@payload-bites/image-search";

export default buildConfig({
  // ...
  plugins: [
    // ...
    imageSearchPlugin({
      // ...
    }),
  ],
});
```

## Defaults

For defaults, refer to [defaults.ts](./src/defaults.ts).

## Options

For options, refer to [types.ts](./src/types.ts).

## Providers

A provider is an online image library that allows you to view and download images for use in your own projects. In order to use them, you must register an API key with the provider and assign it to its respective environment variable in your project.

- [Unsplash](https://unsplash.com/developers)
- [Pixels](https://www.pexels.com/api/)
- [Pixabay](https://pixabay.com/api/docs/)

## Liability

Before using any provider, ensure you have reviewed and agreed to their terms and usage policies. Contributors to this plugin are not responsible for how these images are used.

## Roadmap

- [ ] Image search bulk upload (awaiting custom component implementation by Payload team - [discussion](https://github.com/payloadcms/payload/discussions/10191)).
- [x] Translations.
- [x] Custom access control for provider endpoints.
npm package: @payload-bites/soft-delete
Description: never lose your payload documents again
Author: Riley Langbein
Latest version: 3.3.0

# Soft delete

Never lose your Payload documents again, soft delete is here to save the day.

> [!IMPORTANT]
> This plugin has been moved to maintenance mode due the release of the [trash](https://payloadcms.com/docs/trash/overview) feature. From v3.49.0 onwards, I recommend using the implementation in the core product instead.

https://github.com/user-attachments/assets/4d7334d1-d7f2-4ab7-9421-0c84dfcf38cb

## Compatibility table

| Payload version    | Soft delete version |
| ------------------ | ------------------- |
| v3.23.0 or earlier | Incompatible        |
| v3.24.0 to 3.38.0  | v1.x                |
| v3.39.0 to 3.50.0  | v2.x                |
| v3.51.0 or later   | v3.x                |

## Quick start

1. Install the plugin:

```shell
pnpm add @payload-bites/soft-delete
```

2. Add the plugin to your `payload.config.ts`:

```ts
// ...
import { softDeletePlugin } from "@payload-bites/soft-delete";

export default buildConfig({
  // ...
  plugins: [
    // ...
    softDeletePlugin({
      collections: {
        posts: {},
        "posts-with-drafts": {
          // ...
          enableRestore: false,
          enableHardDelete: false,
          softDeleteAccess: (args) => args.req.user.role === "admin",
        },
      },
    }),
  ],
});
```

## Defaults

For defaults, refer to [defaults.ts](./src/defaults.ts).

## Options

For options, refer to [types.ts](./src/types.ts).

## Querying

You can retrieve active or soft deleted documents by checking for the existence of the `deletedAt` field.

### Local API

```ts
const result = await payload.find({
  collection: "posts",
  where: {
    deletedAt: {
      exists: false,
    },
  },
});
```

### REST API

```ts
import { stringify } from "qs-esm";
import type { Where } from "payload";

const query: Where = {
  deletedAt: {
    exists: false,
  },
};

const getPosts = async () => {
  const stringifiedQuery = stringify(
    {
      where: query,
    },
    { addQueryPrefix: true },
  );

  const response = await fetch(
    `http://localhost:3000/api/posts${stringifiedQuery}`,
  );
};
```

### GraphQL API

```ts
query {
  Posts(where: { deletedAt: { exists: false } }) {
    docs {
      title
    }
  }
}
```

## Caveats

- It is currently not possible to soft delete a draft document that has invalid fields (e.g. required) unless the document has a previously valid published version or you resolve the invalid fields.

## Roadmap

- [x] Add modal to hard delete.
- [x] Enable/disable restore functionality per collection.
- [x] Enable/disable hard delete functionality per collection.
- [ ] Schedule automatic deletion after certain number of days.
- [x] Documentation (including API examples).
- [x] Translations.