Index of every page on this site: llms.txt
All skills
onmax avatar

/nuxt-protokit

@b4e1a3f official
by Maxonmax/nuxt-skills729 stars
38
Run it yourself

Use when building schema-driven prototypes with nuxt-protokit (@websideproject/nuxt-protokit) - provides definePrototype, usePrototype, ProtoTool, collections, derived values, and visualizations for rapid SaaS tool prototyping.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/nuxt-protokit

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescomponents.md

≈1.7k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Components Reference

All components are auto-imported when @websideproject/nuxt-protokit is registered in nuxt.config.ts.


<ProtoTool> — Main Wrapper

The top-level container for a prototype. Handles isReady lifecycle (shows skeleton while IndexedDB loads) and renders the full tool UI from schema + prototype data.

<template>
  <ProtoTool :schema="schema" :prototype="proto" />
</template>

<script setup>
const proto = usePrototype(schema)
</script>

Props:

  • :schema — PrototypeSchema
  • :prototype — return value of usePrototype(schema)

When schema.layout is defined, renders <ProtoDashboard>. Otherwise auto-renders form + results.


<ProtoDashboard> — Dashboard with Layout/Tabs

Renders a full dashboard driven by schema.layout. Handles tabs, rows, and all LayoutItem types.

<ProtoDashboard :schema="schema" :prototype="proto" />

Usually used indirectly via <ProtoTool>. Use directly if you need to embed the dashboard inside a custom wrapper.


<ProtoForm> — Field Renderer

Renders all fields from schema.fields (or a specific SectionDef) as form inputs.

<ProtoForm :schema="schema" :state="proto.state" />
<!-- Render specific section only -->
<ProtoForm :schema="schema" :state="proto.state" :sectionIndex="0" />

<ProtoSection> — Field Group Container

Renders a labelled group of fields. Used inside custom layouts.

<ProtoSection title="Revenue" icon="i-heroicons-currency-dollar">
  <ProtoForm :schema="schema" :state="proto.state" :sectionIndex="0" />
</ProtoSection>

<ProtoCard> / <ProtoDetailCard> — Stat Cards

<ProtoCard :def="schema.cards[0]" :ctx="proto.computeContext.value" />

<ProtoCrudModal> — Collection Editor (Modal)

Full CRUD modal for a collection. Triggered by an "Add" button + edit/delete actions per row.

<ProtoCrudModal
  :schema="schema"
  :collection-key="'competitors'"
  :collection="proto.collections.competitors"
/>

Props:

  • :schema — parent PrototypeSchema
  • :collection-key — key in schema.collections
  • :collection — UseProtoListReturn (from proto.collections[key])

Renders in 'modal' editMode (default). Switch to 'inline' in CollectionSchema.editMode for inline editing.


<ProtoCrudTable> — Table View

Renders collection items as a sortable table. Uses schema.collections[key].tableColumns.

<ProtoCrudTable
  :schema="schema"
  :collection-key="'items'"
  :collection="proto.collections.items"
/>

<ProtoCrudList> — List View

Renders collection items as a searchable list. Uses schema.collections[key].listDisplay.

<ProtoCrudList
  :schema="schema"
  :collection-key="'items'"
  :collection="proto.collections.items"
/>

<ProtoCalendar> / <ProtoCalendarView> — Calendar

Day / week / infinite month calendar (from the Nuxt UI calendar template): drag to create, move and resize, inline event form, quick natural-language events. Needs @nuxt/ui >= 4.5.

<!-- Y.js-backed, persists itself -->
<ProtoCalendar doc-key="my-calendar" class="h-screen" />

<!-- Bring your own data: events in, changes out -->
<ProtoCalendarView
  v-model:view="view"
  :events="events"
  :calendars="[{ id: 'work', name: 'Work', color: 'primary' }]"
  sidebar
  @create="onCreate"
  @update="onUpdate"
  @remove="onRemove"
  @event-click="onClick"
/>
  • CalendarViewEvent (#protokit/calendar): { id, title, start, end, allDay?, calendarId?, color?, description?, location?, editable? } — floating local YYYY-MM-DDTHH:mm:ss, end EXCLUSIVE
  • Flags: editable (move/resize), creatable (draw new), popover (inline form), droppable (@external-drop), sidebar, toolbar, shortcuts, weekStartsOn, views, loading
  • A plain view="month" pins the view; use v-model:view when offering several
  • ProtoCalendar passes every view prop/listener through; converts stored ⇄ view with fromStoredEvent / toStoredPatch

<VizCollectionCalendar> — Collection on a Calendar

Renders collection items as calendar events; dragging one writes the new date/time back via onUpdate.

<VizCollectionCalendar
  :items="proto.collections.events.items.value"
  :config="{
    dateField: 'date',
    titleField: 'title',
    timeField: 'startTime',
    endTimeField: 'endTime',
    statusColorMap: { scheduled: 'blue', done: 'green' },
    defaultColor: 'neutral',
  }"
  :on-update="(idx, val) => proto.collections.events.update(idx, val)"
/>

CollectionCalendarConfig props:

  • dateField — required, primary date field key
  • titleField — required, field key for event title
  • idField? — defaults to _id
  • endDateField? — end date for multi-day events
  • timeField? — HH:mm time field
  • endTimeField? — HH:mm end time
  • allDayField? — boolean field; when absent, events default to all-day
  • statusColorMap? — Record<statusValue, CalendarColor>
  • defaultColor? — fallback color (default: 'neutral')

Or use via DashboardLayout:

layout: {
  rows: [{ cols: 1, items: [{
    type: 'collection', collectionKey: 'events', view: 'calendar',
    calendarConfig: { dateField: 'date', titleField: 'title' }
  }]}]
}

<ProtoViz> — Visualization Dispatcher

Renders any visualization type by dispatching to the correct viz component.

<ProtoViz :def="schema.visualizations[0]" :ctx="proto.computeContext.value" />

Usually rendered automatically by <ProtoTool> / <ProtoDashboard>. Use directly when building custom layouts.


<ProtoActionBar> — Action Buttons

Renders the schema.actions array as buttons (copy-text, export-markdown, reset).

<ProtoActionBar :schema="schema" :ctx="proto.computeContext.value" />

<ProtoDebugPanel> — Development Tool

Shows raw Y.js state for debugging. Dev-only, renders nothing in production.

<ProtoDebugPanel :prototype="proto" />

<ProtoCorruptionModal> — Corruption Recovery

Monitors for IndexedDB corruption and presents a recovery UI when detected. Add once per page or in the root layout.

<ProtoCorruptionModal />

No props needed — it uses useProtoCorruption() internally.


Field Input Components (internal)

These render automatically inside <ProtoForm> based on field type. They can also be used standalone:

Component Field type
<ProtoFieldText> text
<ProtoFieldTextarea> textarea
<ProtoFieldNumber> number
<ProtoFieldSelect> select
<ProtoFieldSegmented> segmented
<ProtoFieldToggle> toggle
<ProtoFieldRange> range
<ProtoFieldRating> rating
<ProtoFieldColor> color
<ProtoFieldDate> date
<ProtoFieldTags> tags
<ProtoFieldLinkedResponses> linked-responses

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts18d3 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    This skill provides a framework for building schema-driven prototypes in Nuxt 4. It handles data persistence using local browser storage and optional server synchronization. It follows secure practices such as offering AES-GCM encryption for local data and using standard framework protections against data injection. No malicious code or security threats were detected.

  • Socket18d

    No alerts

  • Snyk18d

    Risk: LOW · No issues

Signed by skilld at b4e1a3f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated 3 weeks ago

README badge

README badge for onmax/nuxt-skills/nuxt-protokit