mechanica 2.0.1 → 2.0.2

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.
package/README.md CHANGED
@@ -30,6 +30,37 @@ npm run export
30
30
 
31
31
  Prefer Bun? `bun create mechanica my-site`, then `bun install` and `bun run dev`.
32
32
 
33
+ ### With an AI coding agent
34
+
35
+ Claude Code, Codex and similar agents can set the site up and build it for you. Open an empty folder in the agent and paste:
36
+
37
+ ```text
38
+ Create a Mechanica site in this folder.
39
+
40
+ 1. Check for Node.js 20.19+ (`node -v`) or Bun (`bun -v`). If neither is
41
+ installed, ask me before installing Bun from https://bun.sh.
42
+ 2. Run `npm create mechanica@latest .` (or `bun create mechanica .`), install
43
+ the dependencies, and start the dev server in the background.
44
+ 3. Read AGENTS.md in the project and follow it for everything else.
45
+
46
+ Then build: <describe your site>
47
+ ```
48
+
49
+ To skip the pasting, install the skill once. It does the same setup and also handles a machine with no Node.js.
50
+
51
+ Claude Code:
52
+
53
+ ```bash
54
+ claude plugin marketplace add den59k/mechanica
55
+ claude plugin install mechanica@mechanica
56
+ ```
57
+
58
+ Codex: save [SKILL.md](https://github.com/den59k/mechanica/blob/main/plugins/mechanica/skills/create-mechanica-site/SKILL.md) as `~/.agents/skills/create-mechanica-site/SKILL.md`.
59
+
60
+ Then ask the agent to create a Mechanica site.
61
+
62
+ The starter's `AGENTS.md` teaches the agent how to write blocks and pages and how to check its work with screenshots, and points it at the documentation of the installed version. Run the agent on your own machine: the editor opens in your browser from the local dev server.
63
+
33
64
  ## A Mechanica project
34
65
 
35
66
  ```text
@@ -6,7 +6,7 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
6
6
  return target;
7
7
  };
8
8
  //#endregion
9
- //#region \0svg-glob:C:\Users\Den\Desktop\CURVES\mechanica\packages\mechanica\src\editor\icons
9
+ //#region \0svg-glob:/home/runner/work/mechanica/mechanica/packages/mechanica/src/editor/icons
10
10
  var contents = {
11
11
  "align-center": `<path d="M4 6h16M7 12h10M6 18h12"/>`,
12
12
  "align-left": `<path d="M4 6h16M4 12h10M4 18h13"/>`,
@@ -1,4 +1,4 @@
1
- import { a as renderCrop, c as useDialog, d as _plugin_vue_export_helper_default, i as readImageSize, l as VIcon_default, n as VDialog_default, r as analyzeImageFile, s as dialogKey, t as ImagePickerDialog_default } from "./ImagePickerDialog-6skSAzJh.js";
1
+ import { a as renderCrop, c as useDialog, d as _plugin_vue_export_helper_default, i as readImageSize, l as VIcon_default, n as VDialog_default, r as analyzeImageFile, s as dialogKey, t as ImagePickerDialog_default } from "./ImagePickerDialog-DJGhtW3r.js";
2
2
  import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onErrorCaptured, onMounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import { deepEqual, getDefaultValue } from "mechanica-shared";
4
4
  import { unfoldSchema } from "compact-json-schema";
package/dist/composer.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import './editor.css';
2
2
  import { a as renderBlocks, l as ANCHOR_H, t as createMechanica, u as ANCHOR_V } from "./chunks/create-mechanica-CYaKXuQd.js";
3
- import { C as placeBlock, D as registerBuiltinFieldEditors, E as uid, M as SmartLinkField_default, R as VSelect_default, S as moveBlock, T as removeBlock, _ as duplicateBlock, b as findParentList, c as shortcutChar, g as cloneBlock, h as humanize, i as normalizeTemplate, m as toBlockMeta, n as createSaveQueue, o as SchemaField_default, s as FieldControl_default, t as SaveConflictError, v as ensureSlotList, w as relocateBlock, x as findParentSlot, y as findBlock, z as VPopover_default } from "./chunks/editor-B0r4EOIM.js";
4
- import { d as _plugin_vue_export_helper_default, l as VIcon_default, u as contents } from "./chunks/ImagePickerDialog-6skSAzJh.js";
3
+ import { C as placeBlock, D as registerBuiltinFieldEditors, E as uid, M as SmartLinkField_default, R as VSelect_default, S as moveBlock, T as removeBlock, _ as duplicateBlock, b as findParentList, c as shortcutChar, g as cloneBlock, h as humanize, i as normalizeTemplate, m as toBlockMeta, n as createSaveQueue, o as SchemaField_default, s as FieldControl_default, t as SaveConflictError, v as ensureSlotList, w as relocateBlock, x as findParentSlot, y as findBlock, z as VPopover_default } from "./chunks/editor-JV0Nhfw4.js";
4
+ import { d as _plugin_vue_export_helper_default, l as VIcon_default, u as contents } from "./chunks/ImagePickerDialog-DJGhtW3r.js";
5
5
  import { Fragment, Teleport, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, toDisplayString, unref, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
6
6
  import { buildPreviewData, getDefaultValue, isBinding, lookupBinding, registerFieldSchemas, resolveBindings, walkTree } from "mechanica-shared";
7
7
  import { unfoldSchema } from "compact-json-schema";
package/dist/editor.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import './editor.css';
2
2
  import { _ as mechanicaKey, a as renderBlocks, c as registerElements, i as createComposedComponent, m as createRouter, n as pushStateUpdate, r as runtimeLayoutNames } from "./chunks/create-mechanica-CYaKXuQd.js";
3
3
  import { i as getDataEntries, t as buildPreviewContent } from "./chunks/preview-CbUxh2gL.js";
4
- import { A as createContextMenu, C as placeBlock, D as registerBuiltinFieldEditors, E as uid, F as groupPagesByFolder, I as pageThumbUrl, L as pathFromName, N as fetchPages, O as registerRichTextWidgets, P as filterPages, R as VSelect_default, S as moveBlock, T as removeBlock, _ as duplicateBlock, a as SchemaForm_default, c as shortcutChar, d as compareBlocks, f as createContentBlock, g as cloneBlock, h as humanize, j as VSegmented_default, k as contextMenuKey, l as blockAvailableForLayout, m as toBlockMeta, n as createSaveQueue, p as isUnderFolder, r as createRootFrame, t as SaveConflictError, u as blockAvailableIn, w as relocateBlock, x as findParentSlot, y as findBlock, z as VPopover_default } from "./chunks/editor-B0r4EOIM.js";
5
- import { c as useDialog, d as _plugin_vue_export_helper_default, l as VIcon_default, n as VDialog_default, o as createDialogStore, s as dialogKey } from "./chunks/ImagePickerDialog-6skSAzJh.js";
4
+ import { A as createContextMenu, C as placeBlock, D as registerBuiltinFieldEditors, E as uid, F as groupPagesByFolder, I as pageThumbUrl, L as pathFromName, N as fetchPages, O as registerRichTextWidgets, P as filterPages, R as VSelect_default, S as moveBlock, T as removeBlock, _ as duplicateBlock, a as SchemaForm_default, c as shortcutChar, d as compareBlocks, f as createContentBlock, g as cloneBlock, h as humanize, j as VSegmented_default, k as contextMenuKey, l as blockAvailableForLayout, m as toBlockMeta, n as createSaveQueue, p as isUnderFolder, r as createRootFrame, t as SaveConflictError, u as blockAvailableIn, w as relocateBlock, x as findParentSlot, y as findBlock, z as VPopover_default } from "./chunks/editor-JV0Nhfw4.js";
5
+ import { c as useDialog, d as _plugin_vue_export_helper_default, l as VIcon_default, n as VDialog_default, o as createDialogStore, s as dialogKey } from "./chunks/ImagePickerDialog-DJGhtW3r.js";
6
6
  import { Fragment, Teleport, Transition, TransitionGroup, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onErrorCaptured, onMounted, onScopeDispose, openBlock, provide, reactive, ref, renderList, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, unref, useTemplateRef, vModelCheckbox, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
7
7
  import { getDefaultValue, localeLabel, localePath, parseLocalePath, registerFieldSchemas } from "mechanica-shared";
8
8
  import { blocksList } from "virtual:mechanica/blocks";
package/dist/widgets.js CHANGED
@@ -1,4 +1,4 @@
1
- import { s as dialogKey, t as ImagePickerDialog_default } from "./chunks/ImagePickerDialog-6skSAzJh.js";
1
+ import { s as dialogKey, t as ImagePickerDialog_default } from "./chunks/ImagePickerDialog-DJGhtW3r.js";
2
2
  import { inject } from "vue";
3
3
  //#region src/editor/widget-api.ts
4
4
  /**
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "mechanica",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Build Vue 3 websites with a visual block editor",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://gitlab.letary.ru/den59k/mechanica.git"
8
+ "url": "git+https://github.com/den59k/mechanica.git",
9
+ "directory": "packages/mechanica"
9
10
  },
10
11
  "keywords": [
11
12
  "vue",
@@ -57,7 +58,7 @@
57
58
  "prepublishOnly": "bun ../../scripts/ensure-bun-publish.js && bun run build"
58
59
  },
59
60
  "dependencies": {
60
- "mechanica-shared": "2.0.1",
61
+ "mechanica-shared": "2.0.2",
61
62
  "@vue/compiler-sfc": "^3.5.38",
62
63
  "compact-json-schema": "^0.1.5",
63
64
  "estree-walker": "^3.0.3",