Beispiel
@tiptap/extension-underline 3.11.0: Underline
Verifiziertes Beispiel für npm @tiptap/extension-underline 3.11.0: Underline. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand.
sha256:83792f978c186a7fd3fbbb34d735855e4a91aa542842c48d0bbdb8b9c25d9c1a
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
linux 24 · ubuntu · glibc 2.39 x64 npm
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-17 |
Fall
HOW- Ziel
- verify @tiptap/extension-underline.Underline in pkg:npm/%40tiptap/extension-underline@3.11.0
- Symbole
-
- @tiptap/extension-underline.Underline
- Erstellt
- 2026-09-17T00:29:31Z
Contract
- Underline extension is exported as a mark named underline with default and named export equality
- Underline extension options can be configured with HTMLAttributes
- Underline compiles into a ProseMirror schema and generates underline marks
- Underline mark defines parseHTML rules and renderHTML tag and attributes
- Underline defines setUnderline, toggleUnderline, and unsetUnderline commands
- Underline defines Mod-u and Mod-U keyboard shortcuts
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Quelltext
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify @tiptap/extension-underline.Underline in pkg:npm/%40tiptap/extension-underline@3.11.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40tiptap/extension-underline@3.11.0
Demonstrate these symbols/APIs:
- @tiptap/extension-underline.Underline
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:1ac43f0497fdc538c8d864ad4fe5ffca02213b17df4cd0ad5aa98ccbe0456487","contract":["Underline extension is exported as a mark named underline with default and named export equality","Underline extension options can be configured with HTMLAttributes","Underline compiles into a ProseMirror schema and generates underline marks","Underline mark defines parseHTML rules and renderHTML tag and attributes","Underline defines setUnderline, toggleUnderline, and unsetUnderline commands","Underline defines Mod-u and Mod-U keyboard shortcuts"],"goal":"verify @tiptap/extension-underline.Underline in pkg:npm/%40tiptap/extension-underline@3.11.0","kind":"HOW","packages":["pkg:npm/%40tiptap/extension-underline@3.11.0"],"schemaVersion":1,"symbols":["@tiptap/extension-underline.Underline"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40tiptap/extension-underline@3.11.0"],"schemaVersion":1,"subject":"pkg:npm/%40tiptap/extension-underline@3.11.0","symbols":["@tiptap/extension-underline.Underline"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@tiptap/core": "3.11.0",
"@tiptap/extension-underline": "3.11.0"
}
},
"node_modules/@tiptap/core": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.11.0.tgz",
"integrity": "sha512-kmS7ZVpHm1EMnW1Wmft9H5ZLM7E0G0NGBx+aGEHGDcNxZBXD2ZUa76CuWjIhOGpwsPbELp684ZdpF2JWoNi4Dg==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/ueberdosis"
},
"peerDependencies": {
"@tiptap/pm": "^3.11.0"
}
},
"node_modules/@tiptap/extension-underline": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.11.0.tgz",
"integrity": "sha512-D3PsS/84RlQKFjd5eerMIUioC0mNh4yy1RRV/WbXx6ugu+6T+0hT42gNk9Ap8pDsVQZCk0SHfDyBEUFC2KOwKw==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/ueberdosis"
},
"peerDependencies": {
"@tiptap/core": "^3.11.0"
}
},
"node_modules/@tiptap/pm": {
"version": "3.31.3",
"resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.31.3.tgz",
"integrity": "sha512-sZime0SWsz/k62W2WvHx5Ig7G2h7kVhrrmnqy+wEgIHfDwEfOlelRjaWCiBCFlF7dxGUntJusCh9FxlLhni0Ag==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-changeset": "^2.4.1",
"prosemirror-commands": "^1.7.1",
"prosemirror-dropcursor": "^1.8.2",
"prosemirror-gapcursor": "^1.4.1",
"prosemirror-history": "^1.5.0",
"prosemirror-inputrules": "^1.5.1",
"prosemirror-keymap": "^1.2.3",
"prosemirror-model": "^1.25.11",
"prosemirror-schema-list": "^1.5.1",
"prosemirror-state": "^1.4.4",
"prosemirror-tables": "^1.8.5",
"prosemirror-transform": "^1.12.0",
"prosemirror-view": "^1.42.3"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/ueberdosis"
}
},
"node_modules/orderedmap": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz",
"integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==",
"license": "MIT",
"peer": true
},
"node_modules/prosemirror-changeset": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.4.2.tgz",
"integrity": "sha512-ViYrjMSg3YFiXwIhKaluu+/mi3Yrxt6AR8ri14ulTaGcZtXO1CThl7A2gv79qx5fQnOw8woKwyBU2u+9PVCm3w==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-transform": "^1.0.0"
}
},
"node_modules/prosemirror-commands": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.2.tgz",
"integrity": "sha512-q6Q6szxqdu9Xd6EcdKsqXghu5nQdZTpB4Q9yd04WRc7/jt763e/rT60Owh0L1GYY+T46o5rD+9lEN36dZS43tw==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-model": "^1.0.0",
"prosemirror-state": "^1.0.0",
"prosemirror-transform": "^1.10.2"
}
},
"node_modules/prosemirror-dropcursor": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.3.tgz",
"integrity": "sha512-FoYbsJR8gK+DGlqhNoE29Loa38eIZPzQRIb1VMaDNBoo4OLP6vVof/jR8qFY/6XvUd6Dhug8MDCHl2a/h8RTfQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-state": "^1.0.0",
"prosemirror-transform": "^1.1.0",
"prosemirror-view": "^1.1.0"
}
},
"node_modules/prosemirror-gapcursor": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.4.1.tgz",
"integrity": "sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-keymap": "^1.0.0",
"prosemirror-model": "^1.0.0",
"prosemirror-state": "^1.0.0",
"prosemirror-view": "^1.0.0"
}
},
"node_modules/prosemirror-history": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.5.0.tgz",
"integrity": "sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-state": "^1.2.2",
"prosemirror-transform": "^1.0.0",
"prosemirror-view": "^1.31.0",
"rope-sequence": "^1.3.0"
}
},
"node_modules/prosemirror-inputrules": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.1.tgz",
"integrity": "sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-state": "^1.0.0",
"prosemirror-transform": "^1.0.0"
}
},
"node_modules/prosemirror-keymap": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.3.tgz",
"integrity": "sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-state": "^1.0.0",
"w3c-keyname": "^2.2.0"
}
},
"node_modules/prosemirror-model": {
"version": "1.25.11",
"resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.11.tgz",
"integrity": "sha512-QWg9RhnpLlogAmp3p96uEFrE5txQpFynd4vhBAELkwgOCWQs/X0yCzB3/hrHqiPwf91RG5KyWq6553zs9JqIOQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"orderedmap": "^2.0.0"
}
},
"node_modules/prosemirror-schema-list": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz",
"integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-model": "^1.0.0",
"prosemirror-state": "^1.0.0",
"prosemirror-transform": "^1.7.3"
}
},
"node_modules/prosemirror-state": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.4.tgz",
"integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-model": "^1.0.0",
"prosemirror-transform": "^1.0.0",
"prosemirror-view": "^1.27.0"
}
},
"node_modules/prosemirror-tables": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.5.tgz",
"integrity": "sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-keymap": "^1.2.3",
"prosemirror-model": "^1.25.4",
"prosemirror-state": "^1.4.4",
"prosemirror-transform": "^1.10.5",
"prosemirror-view": "^1.41.4"
}
},
"node_modules/prosemirror-transform": {
"version": "1.12.1",
"resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.12.1.tgz",
"integrity": "sha512-t4F5615FycnCqsX7ShTUs8+jfnwcf46kuFRvSl/3qFx2QTZ4DjgowesLHQXcFP7G//TjesqZG3WtgL7vdyVJyA==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-model": "^1.21.0"
}
},
"node_modules/prosemirror-view": {
"version": "1.42.3",
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.42.3.tgz",
"integrity": "sha512-oTN7EtH+CpwxU9NrwEYWd0UZ4JUx7l048l5A2Xppm4p/60isZYLnth9QVQmC3VRIvdrIWCxwZSd+Uz791G31/w==",
"license": "MIT",
"peer": true,
"dependencies": {
"prosemirror-model": "^1.25.8",
"prosemirror-state": "^1.0.0",
"prosemirror-transform": "^1.1.0"
}
},
"node_modules/rope-sequence": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz",
"integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==",
"license": "MIT",
"peer": true
},
"node_modules/w3c-keyname": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
"integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",
"license": "MIT",
"peer": true
}
}
}
{
"name": "sample",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT-0",
"dependencies": {
"@tiptap/core": "3.11.0",
"@tiptap/extension-underline": "3.11.0"
}
}
{
"schemaVersion": 1,
"goal": "verify @tiptap/extension-underline.Underline in pkg:npm/%40tiptap/extension-underline@3.11.0",
"kind": "HOW",
"packages": [
"pkg:npm/%40tiptap/extension-underline@3.11.0"
],
"symbols": [
"@tiptap/extension-underline.Underline"
]
}
import assert from "node:assert/strict";
import { Node, getSchema } from "@tiptap/core";
import DefaultUnderline, { Underline } from "@tiptap/extension-underline";
// Assertion 1: Underline extension is exported as a mark named underline with default and named export equality
assert.strictEqual(typeof Underline, "object", "Underline must be an object");
assert.strictEqual(Underline.name, "underline", "Underline extension name must be 'underline'");
assert.strictEqual(Underline.type, "mark", "Underline extension type must be 'mark'");
assert.strictEqual(DefaultUnderline, Underline, "Default export must equal named export Underline");
assert.strictEqual(typeof Underline.configure, "function", "Underline must have configure function");
assert.strictEqual(typeof Underline.extend, "function", "Underline must have extend function");
// Assertion 2: Underline extension options can be configured with HTMLAttributes
const defaultOptions = Underline.options;
assert.deepStrictEqual(defaultOptions.HTMLAttributes, {}, "Default HTMLAttributes should be empty object");
const configured = Underline.configure({
HTMLAttributes: { class: "custom-underline", "data-test": "underline-mark" },
});
assert.strictEqual(configured.name, "underline");
assert.strictEqual(configured.type, "mark");
assert.strictEqual(configured.options.HTMLAttributes.class, "custom-underline");
assert.strictEqual(configured.options.HTMLAttributes["data-test"], "underline-mark");
// Assertion 3: Underline compiles into a ProseMirror schema and generates underline marks
const Doc = Node.create({ name: "doc", topNode: true, content: "block+" });
const Paragraph = Node.create({ name: "paragraph", group: "block", content: "inline*" });
const Text = Node.create({ name: "text", group: "inline" });
const schema = getSchema([Doc, Paragraph, Text, Underline]);
assert.ok(schema.marks.underline, "Schema must include underline mark");
assert.strictEqual(schema.marks.underline.name, "underline");
const mark = schema.marks.underline.create();
assert.strictEqual(mark.type.name, "underline");
const textWithMark = schema.text("underlined text", [mark]);
assert.strictEqual(textWithMark.text, "underlined text");
assert.strictEqual(textWithMark.marks.length, 1);
assert.strictEqual(textWithMark.marks[0].type.name, "underline");
// Assertion 4: Underline mark defines parseHTML rules and renderHTML tag and attributes
const parseRules = Underline.config.parseHTML.call({ options: { HTMLAttributes: {} } });
assert.ok(Array.isArray(parseRules), "parseHTML must return an array of rules");
assert.strictEqual(parseRules[0].tag, "u", "First parse rule tag should be 'u'");
const rendered = Underline.config.renderHTML.call(
{ options: { HTMLAttributes: { class: "rendered-underline" } } },
{ HTMLAttributes: { id: "u-1" } }
);
assert.deepStrictEqual(
rendered,
["u", { class: "rendered-underline", id: "u-1" }, 0],
"renderHTML must produce expected tag, merged attributes, and hole index"
);
// Assertion 5: Underline defines setUnderline, toggleUnderline, and unsetUnderline commands
assert.strictEqual(typeof Underline.config.addCommands, "function", "addCommands must be defined");
const commands = Underline.config.addCommands.call({
name: "underline",
type: Underline.type,
options: { HTMLAttributes: {} },
});
assert.strictEqual(typeof commands.setUnderline, "function", "setUnderline command must exist");
assert.strictEqual(typeof commands.toggleUnderline, "function", "toggleUnderline command must exist");
assert.strictEqual(typeof commands.unsetUnderline, "function", "unsetUnderline command must exist");
// Assertion 6: Underline defines Mod-u and Mod-U keyboard shortcuts
assert.strictEqual(typeof Underline.config.addKeyboardShortcuts, "function", "addKeyboardShortcuts must be defined");
const shortcuts = Underline.config.addKeyboardShortcuts.call({
name: "underline",
type: Underline.type,
options: { HTMLAttributes: {} },
});
assert.strictEqual(typeof shortcuts["Mod-u"], "function", "Mod-u shortcut must exist");
assert.strictEqual(typeof shortcuts["Mod-U"], "function", "Mod-U shortcut must exist");
console.log("PASS: @tiptap/extension-underline contract verified");
Ursprungs-Seeder
anonym