pax_global_header00006660000000000000000000000064141222710540014510gustar00rootroot0000000000000052 comment=ce7c68cb9e4d0ae1f042ec00d0f35e4daa3d2610 prosemirror-schema-list-1.1.6/000077500000000000000000000000001412227105400163075ustar00rootroot00000000000000prosemirror-schema-list-1.1.6/.gitignore000066400000000000000000000000731412227105400202770ustar00rootroot00000000000000/node_modules .tern-port /dist /notes.txt webpack.config.jsprosemirror-schema-list-1.1.6/.npmignore000066400000000000000000000000371412227105400203060ustar00rootroot00000000000000/node_modules .tern-port /test prosemirror-schema-list-1.1.6/.tern-project000066400000000000000000000001571412227105400207270ustar00rootroot00000000000000{ "libs": ["browser"], "plugins": { "node": {}, "complete_strings": {}, "es_modules": {} } } prosemirror-schema-list-1.1.6/CHANGELOG.md000066400000000000000000000046221412227105400201240ustar00rootroot00000000000000## 1.1.6 (2021-09-21) ### Bug fixes Fix a crash in `liftListItem` that happens when list items that can't be merged are lifted together. ## 1.1.5 (2021-07-06) ### Bug fixes Fix an issue where `splitListItem` would delete content when activated in a sublist that had content directly after it. ## 1.1.4 (2020-08-11) ### Bug fixes Fix a regression where `liftListItem` couldn't lift a paragraph from the end of a composite list item. ## 1.1.3 (2020-08-04) ### Bug fixes Fix an issue where `splitListItem` could delete other content in the item when pressing enter in an empty paragraph that had other content below it in a list item. ## 1.1.2 (2019-11-20) ### Bug fixes Rename ES module files to use a .js extension, since Webpack gets confused by .mjs ## 1.1.1 (2019-11-19) ### Bug fixes The file referred to in the package's `module` field now is compiled down to ES5. ## 1.1.0 (2019-11-08) ### New features Add a `module` field to package json file. ## 1.0.4 (2019-10-08) ### Bug fixes Fix regression where `splitListItem` doesn't work at the end of an item when the content for list items has different first and non-first allowed nodes. ## 1.0.3 (2019-04-19) ### Bug fixes `sinkListItem` will no longer copy the attributes of the parent list when creating an inner list. ## 1.0.2 (2019-01-31) ### Bug fixes `sinkListItem` no longer preserves marks from the outer list when creating an inner list. ## 1.0.1 (2018-03-16) ### Bug fixes Fixes a bug that caused [`wrapInList`](https://prosemirror.net/docs/ref/#schema-list.wrapInList) to split list items in the wrong place. ## 0.23.0 (2017-09-13) ### Bug fixes The [`splitListItem` command](https://prosemirror.net/docs/ref/version/0.23.0.html#schema-list.splitListItem) now splits the parent list item when executed in a (trailing) empty list item in a nested list. ## 0.20.0 (2017-04-03) ### New features The [`liftListItem`](https://prosemirror.net/docs/ref/version/0.20.0.html#schema-list.liftListItem) command can now lift items out of a list entirely, when the parent node isn't another list. ## 0.11.0 (2016-09-21) ### Breaking changes New module combining the node [specs](https://prosemirror.net/docs/ref/version/0.11.0.html#model.NodeSpec) from [schema-basic](https://prosemirror.net/docs/ref/version/0.11.0.html#schema-basic), and the list-related [commands](https://prosemirror.net/docs/ref/version/0.11.0.html#commands) from the commands module. prosemirror-schema-list-1.1.6/CONTRIBUTING.md000066400000000000000000000072051412227105400205440ustar00rootroot00000000000000# How to contribute - [Getting help](#getting-help) - [Submitting bug reports](#submitting-bug-reports) - [Contributing code](#contributing-code) ## Getting help Community discussion, questions, and informal bug reporting is done on the [discuss.ProseMirror forum](http://discuss.prosemirror.net). ## Submitting bug reports Report bugs on the [GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues). Before reporting a bug, please read these pointers. - The issue tracker is for *bugs*, not requests for help. Questions should be asked on the [forum](http://discuss.prosemirror.net). - Include information about the version of the code that exhibits the problem. For browser-related issues, include the browser and browser version on which the problem occurred. - Mention very precisely what went wrong. "X is broken" is not a good bug report. What did you expect to happen? What happened instead? Describe the exact steps a maintainer has to take to make the problem occur. A screencast can be useful, but is no substitute for a textual description. - A great way to make it easy to reproduce your problem, if it can not be trivially reproduced on the website demos, is to submit a script that triggers the issue. ## Contributing code - Make sure you have a [GitHub Account](https://github.com/signup/free) - Fork the relevant repository ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) - Create a local checkout of the code. You can use the [main repository](https://github.com/prosemirror/prosemirror) to easily check out all core modules. - Make your changes, and commit them - Follow the code style of the rest of the project (see below). Run `npm run lint` (in the main repository checkout) to make sure that the linter is happy. - If your changes are easy to test or likely to regress, add tests in the relevant `test/` directory. Either put them in an existing `test-*.js` file, if they fit there, or add a new file. - Make sure all tests pass. Run `npm run test` to verify tests pass (you will need Node.js v6+). - Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)). Don't put more than one feature/fix in a single pull request. By contributing code to ProseMirror you - Agree to license the contributed code under the project's [MIT license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE). - Confirm that you have the right to contribute and license the code in question. (Either you hold all rights on the code, or the rights holder has explicitly granted the right to use it like this, through a compatible open source license or through a direct agreement with you.) ### Coding standards - ES6 syntax, targeting an ES5 runtime (i.e. don't use library elements added by ES6, don't use ES7/ES.next syntax). - 2 spaces per indentation level, no tabs. - No semicolons except when necessary. - Follow the surrounding code when it comes to spacing, brace placement, etc. - Brace-less single-statement bodies are encouraged (whenever they don't impact readability). - [getdocs](https://github.com/marijnh/getdocs)-style doc comments above items that are part of the public API. - When documenting non-public items, you can put the type after a single colon, so that getdocs doesn't pick it up and add it to the API reference. - The linter (`npm run lint`) complains about unused variables and functions. Prefix their names with an underscore to muffle it. - ProseMirror does *not* follow JSHint or JSLint prescribed style. Patches that try to 'fix' code to pass one of these linters will not be accepted. prosemirror-schema-list-1.1.6/LICENSE000066400000000000000000000021131412227105400173110ustar00rootroot00000000000000Copyright (C) 2015-2017 by Marijn Haverbeke and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. prosemirror-schema-list-1.1.6/README.md000066400000000000000000000026531412227105400175740ustar00rootroot00000000000000# prosemirror-schema-list [ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-schema-list/blob/master/CHANGELOG.md) ] This is a [schema module](https://prosemirror.net/docs/ref/#schema-list) for [ProseMirror](https://prosemirror.net). ProseMirror is a well-behaved rich semantic content editor based on contentEditable, with support for collaborative editing and custom document schemas. This [module](https://prosemirror.net/docs/ref/#schema-list) exports schema elements and commands for including lists in a ProseMirror editor. The [project page](https://prosemirror.net) has more information, a number of [examples](https://prosemirror.net/examples/) and the [documentation](https://prosemirror.net/docs/). This code is released under an [MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE). There's a [forum](http://discuss.prosemirror.net) for general discussion and support requests, and the [Github bug tracker](https://github.com/prosemirror/prosemirror/issues) is the place to report issues. We aim to be an inclusive, welcoming community. To make that explicit, we have a [code of conduct](http://contributor-covenant.org/version/1/1/0/) that applies to communication around the project. prosemirror-schema-list-1.1.6/package.json000066400000000000000000000016421412227105400206000ustar00rootroot00000000000000{ "name": "prosemirror-schema-list", "version": "1.1.6", "description": "List-related schema elements and commands for ProseMirror", "main": "dist/index.js", "module": "dist/index.es.js", "license": "MIT", "maintainers": [ { "name": "Marijn Haverbeke", "email": "marijnh@gmail.com", "web": "http://marijnhaverbeke.nl" } ], "repository": { "type": "git", "url": "git://github.com/prosemirror/prosemirror-schema-list.git" }, "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" }, "devDependencies": { "ist": "^1.0.0", "mocha": "^3.0.2", "prosemirror-state": "^1.0.0", "prosemirror-test-builder": "^1.0.0", "rollup": "^2.26.3", "@rollup/plugin-buble": "^0.21.3" }, "scripts": { "test": "mocha test/test-*.js", "build": "rollup -c", "watch": "rollup -c -w", "prepare": "npm run build" } } prosemirror-schema-list-1.1.6/rollup.config.js000066400000000000000000000005201412227105400214230ustar00rootroot00000000000000module.exports = { input: './src/schema-list.js', output: [{ file: 'dist/index.js', format: 'cjs', sourcemap: true }, { file: 'dist/index.es.js', format: 'es', sourcemap: true }], plugins: [require('@rollup/plugin-buble')()], external(id) { return id[0] != "." && !require("path").isAbsolute(id) } } prosemirror-schema-list-1.1.6/src/000077500000000000000000000000001412227105400170765ustar00rootroot00000000000000prosemirror-schema-list-1.1.6/src/README.md000066400000000000000000000011101412227105400203460ustar00rootroot00000000000000This module exports list-related schema elements and commands. The commands assume lists to be nestable, with the restriction that the first child of a list item is a plain paragraph. These are the node specs: @orderedList @bulletList @listItem @addListNodes Using this would look something like this: ```javascript const mySchema = new Schema({ nodes: addListNodes(baseSchema.spec.nodes, "paragraph block*", "block"), marks: baseSchema.spec.marks }) ``` The following functions are [commands](/docs/guide/#commands): @wrapInList @splitListItem @liftListItem @sinkListItem prosemirror-schema-list-1.1.6/src/schema-list.js000066400000000000000000000255021412227105400216510ustar00rootroot00000000000000import {findWrapping, liftTarget, canSplit, ReplaceAroundStep} from "prosemirror-transform" import {Slice, Fragment, NodeRange} from "prosemirror-model" const olDOM = ["ol", 0], ulDOM = ["ul", 0], liDOM = ["li", 0] // :: NodeSpec // An ordered list [node spec](#model.NodeSpec). Has a single // attribute, `order`, which determines the number at which the list // starts counting, and defaults to 1. Represented as an `
    ` // element. export const orderedList = { attrs: {order: {default: 1}}, parseDOM: [{tag: "ol", getAttrs(dom) { return {order: dom.hasAttribute("start") ? +dom.getAttribute("start") : 1} }}], toDOM(node) { return node.attrs.order == 1 ? olDOM : ["ol", {start: node.attrs.order}, 0] } } // :: NodeSpec // A bullet list node spec, represented in the DOM as `