open-index/open-npm huggingface dataset:
npm package: @stonecrop/graphql-middleware
Description: GraphQL middleware for PostGraphile and Stonecrop schema
Latest version: 0.10.16

# @stonecrop/graphql-middleware

GraphQL backend for the Stonecrop framework. Provides a generic, ORM-like interface over PostGraphile.

## Usage

### Server Setup

```typescript
import { createServer } from 'postgraphile/grafserv/h3/v1'
import { grafserv } from 'postgraphile/grafserv'
import { PostGraphileAmberPreset } from 'postgraphile/presets/amber'
import { makePgService } from 'postgraphile/adaptors/pg'
import {
  createStonecropPlugin,
  loadDoctypes,
  registerBuiltinHandlers,
  registerHandler,
} from '@stonecrop/graphql-middleware'

// Load doctype definitions from JSON files
loadDoctypes('./doctypes')

// Register action handlers
registerBuiltinHandlers()
registerHandler('submitOrder', async (args, ctx) => {
  const [orderId] = args as [string]
  // Custom business logic
  return { submitted: true }
})

// Create executor for the plugin to use
const executor = {
  async query(query: string, variables?: Record<string, unknown>) {
    // Execute against PostGraphile's internal schema
    return graphqlExecute(schema, query, variables)
  },
  async mutate(mutation: string, variables?: Record<string, unknown>) {
    return this.query(mutation, variables)
  },
}

const preset: GraphileConfig.Preset = {
  extends: [PostGraphileAmberPreset],
  plugins: [createStonecropPlugin({ executor })],
  pgServices: [
    makePgService({
      connectionString: process.env.DATABASE_URL,
    }),
  ],
}
```

### Client Usage

```typescript
import { StonecropClient } from '@stonecrop/graphql-middleware'

const client = new StonecropClient({
  endpoint: 'http://localhost:4000/graphql',
})

// Get doctype metadata
const meta = await client.getMeta({ doctype: 'SalesOrder' })

// Fetch records
const orders = await client.getRecords(meta, {
  limit: 10,
  orderBy: 'createdAt',
})

// Fetch single record
const order = await client.getRecord(meta, 'uuid-here')

// Run an action
const result = await client.runAction(meta, 'submit', [order.id])
```

### Doctype Definition

```json
{
  "name": "SalesOrder",
  "tableName": "sales_orders",
  "fields": [
    { "fieldname": "id", "fieldtype": "UUID" },
    { "fieldname": "customer", "fieldtype": "Link", "required": true },
    { "fieldname": "status", "fieldtype": "Select" },
    { "fieldname": "total", "fieldtype": "Currency" }
  ],
  "workflow": {
    "states": ["Draft", "Submitted", "Cancelled"],
    "actions": {
      "submit": {
        "label": "Submit",
        "handler": "submitOrder",
        "requiredFields": ["customer"],
        "allowedStates": ["Draft"]
      }
    }
  }
}
```

## References

For full method signatures and parameter details, see [API Reference](./api.md).
npm package: @stonecrop/themes
Description: This directory contains various themes that can be used in Stonecrop applications. Each theme is a separate directory that contains the relevant stylesheets.
Author: Tyler Matteson
Latest version: 0.10.16

# Themes

This directory contains various themes that can be used in Stonecrop applications. Each theme is a separate directory that contains the relevant stylesheets.

## Themes

- `agritheory`
- `dark`
- `default`
- `excel`
- `legal`
- `verdant`
- `vue`

## Usage

To use a theme, import the corresponding stylesheet into your application. For example, to use the `dark` theme:

```javascript
import '@stonecrop/themes/dark.css';
```
npm package: @stonedeck/cli
Description: > Create stunning presentations from Markdown
Latest version: 0.7.7

# @stonedeck/cli

> Create stunning presentations from Markdown

## Install

```bash
npm install -g @stonedeck/cli
```

## Use

### See your slides while editing

```bash
stonedeck preview my-slides.md --watch
```

Opens a browser showing your presentation. Changes to your `.md` file update automatically!

### Export to HTML

```bash
stonedeck export my-slides.md
```

Creates a `.html` file you can share or present anywhere.

### Get a PDF

Export to HTML first, then open it in your browser and use "Print to PDF".

## Create your first presentation

1. Make a file called `hello.md`:

```markdown
---
StoneDeck: true
title: My First Deck
---

:::slide
---
layout: title
---
# Hello World
## Made with StoneDeck
:::

:::slide
---
layout: content
---
# Why StoneDeck?

- Write in Markdown
- Get beautiful slides
- No design skills needed
:::
```

2. Preview it:

```bash
stonedeck preview hello.md --watch
```

3. Love it? Export it:

```bash
stonedeck export hello.md
```

That's it! 🎉

## Commands

| Command | What it does |
|---------|--------------|
| `stonedeck preview <file>` | Opens slides in browser |
| `stonedeck preview <file> --watch` | Auto-reload on changes |
| `stonedeck export <file>` | Creates HTML file |

## Need more help?

Check the [full documentation](../../README.md)

## Repository

[https://github.com/matheuspellisoli/StoneDeck](https://github.com/matheuspellisoli/StoneDeck)

## License

MIT
npm package: @stonedeck/core
Description: > The engine that transforms Markdown into beautiful presentations
Latest version: 0.7.6

# @stonedeck/core

> The engine that transforms Markdown into beautiful presentations

## What is this?

This is the core package of StoneDeck. It reads your Markdown files and converts them into a structured format that can be turned into HTML slides.

**You probably don't need to use this directly** - use the [@stonedeck/cli](../cli) instead for a better experience.

## When to use this

Use this package if you're:
- Building your own presentation tool on top of StoneDeck
- Creating a custom export format (not HTML)
- Integrating StoneDeck into another application

## Quick Example

```typescript
import { processStoneDeck } from '@stonedeck/core';
import * as fs from 'fs';

// Read your markdown file
const content = fs.readFileSync('my-slides.md', 'utf-8');

// Convert to StoneDeck format
const presentation = processStoneDeck(content, 'my-slides.md');

// Now you have structured data ready to export
console.log(`Your presentation has ${presentation.slides.length} slides`);
```

## What's included

- Markdown parser for StoneDeck syntax
- Theme system (colors, fonts, backgrounds)
- Layout engine (title, content, cards, etc.)
- Smart content detection (tables, lists, images, code)

## Need help?

Check the main [StoneDeck documentation](../../README.md) or use the CLI tool directly.

## Repository

[https://github.com/matheuspellisoli/StoneDeck](https://github.com/matheuspellisoli/StoneDeck)

## License

MIT
npm package: @stonedeck/html-plugin
Description: > Export StoneDeck presentations to HTML
Latest version: 0.7.6

# @stonedeck/html-plugin

> Export StoneDeck presentations to HTML

## What is this?

This package takes a StoneDeck presentation and turns it into interactive HTML slides - no internet required, works in any browser.

**You probably don't need to use this directly** - the [@stonedeck/cli](../cli) already includes this.

## When to use this

Use this package if you're building custom tooling and need to programmatically generate HTML from StoneDeck presentations.

## Quick Example

```typescript
import { processStoneDeck } from '@stonedeck/core';
import { HtmlPlugin } from '@stonedeck/html-plugin';
import * as fs from 'fs';

// 1. Process your markdown
const markdown = fs.readFileSync('slides.md', 'utf-8');
const presentation = processStoneDeck(markdown, 'slides.md');

// 2. Convert to HTML
const plugin = new HtmlPlugin();
const html = plugin.export(presentation);

// 3. Save it
fs.writeFileSync('slides.html', html);
```

## What you get

The HTML file includes:
- All your slides, ready to present
- Navigation buttons (Previous/Next)
- Keyboard controls (arrow keys work!)
- Print-friendly styles for PDF export
- Everything embedded (no internet needed)

## Creating PDFs

1. Open the HTML file in Chrome/Firefox/Edge
2. Press Ctrl+P (or Cmd+P on Mac)
3. Choose "Save as PDF"
4. Make sure "Background graphics" is enabled
5. Save!

## Need help?

Check the main [StoneDeck documentation](../../README.md)

## Repository

[https://github.com/matheuspellisoli/StoneDeck](https://github.com/matheuspellisoli/StoneDeck)

## License

MIT