{"_id":"@ambers/domite","_rev":"6-ce2297f5f325614e410e964932f6f802","name":"@ambers/domite","dist-tags":{"latest":"0.10.0"},"versions":{"0.8.0":{"name":"@ambers/domite","version":"0.8.0","keywords":["Amber","Smalltalk"],"author":{"name":"Herbert Vojčík","email":"herby@mailbox.sk"},"_id":"@ambers/domite@0.8.0","maintainers":[{"name":"herby","email":"herby@mailbox.sk"},{"name":"johnnyt","email":"ubergeek3141@gmail.com"},{"name":"nicolaspetton","email":"petton.nicolas@gmail.com"}],"homepage":"https://lolg.it/herby/domite","bugs":{"url":"https://lolg.it/herby/domite/issues"},"dist":{"shasum":"6d773a09ada90bde6845283ebbdaa76a73bc642d","tarball":"https://registry.npmjs.org/@ambers/domite/-/domite-0.8.0.tgz","fileCount":15,"integrity":"sha512-ZwVnO6RpjyP0/NT45de3FEjF5KoMbprJUl5WQleSP83cs30v5/jbwvGa25rx6lO1TYiqyDpxlC+g4H3zEFlwNQ==","signatures":[{"sig":"MEUCIQD5ln5EGG1KEkLhZKshA1taWY6ZRV6KnJzCGmcnIG/HnAIgeb4IQgU0k4TG3iuJ9SHuzrLcwMZ/BY2An88std6gY7g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbd3vACRA9TVsSAnZWagAAI/8P/iR/3yKV1CwJ+S/ayrqn\n5IQx6mGad0VsiTVpnnkflWcrsU4X7tOc8u3WSSuJbeCXKtq4jxicoOl9GdwW\nQQ1O81utIxV8bQD6nfwAIyhtT+29Q6omGF2Ow0S0LV2+veJXh7aZk+KOFMBy\nuGenF9/gZX+0T1fH9hUUAcoH4U+B6Ziacw4TSAS+Rw7CkA1N/Tavg1ScCf9h\n4QZju5XUW1w3mLshLtlb4WcSGb9gOub9X43UPXE2NeNZMuN0Ozyg6thyVfl1\njQZ9vnm6YbilOvLkrxcyg/nfPkldQX1zF7+UHelq1C/4ImxRAvi20eHueu+3\nWgmsIlSvNrUmUOQH9EldIZA3TMTh5NwXGVBGbFgWYTIwuGa1pyVY0pNPHpIE\nA9/IJOE5Wp29fOBoIu2TgBAEb8h6i7gDOEq1AuNGl3UX4YyPQzZsVkKO/I1/\nc4uKZck8fqMDM7OC0ZHU9AJWZ2InUo4I49fqS/7FOv0VunfufRQqzSeWfCl5\nz0j0CBbEn1HbQixmIR0cEN35bzefa5S6ao3njUz2Ka3GnBGpI2s8W96nwHdP\nZ36SoPcCbtLitvUw30cWkaQDHD31ZNsZhFZjGkeJpU4GVZWbISjglhw95/Wx\n7fysraaYUzjGcCAslhJwRa2DZPvMI/aihifjnS29l1zPMnCR9vtfyULYEWB4\n/nNE\r\n=E8VG\r\n-----END PGP SIGNATURE-----\r\n"},"_from":".","title":"Lite mite wrapping basic DOM for Amber Smalltalk","_shasum":"6d773a09ada90bde6845283ebbdaa76a73bc642d","engines":{"node":">=4.0.0"},"gitHead":"fa3d1c1c8dc42bba89fe2d7cb4cc4172c0d601b1","scripts":{"init":"npm install && bower install && grunt default devel","test":"grunt test","clean":"(rm -rf bower_components || rd /s/q bower_components) && (rm -rf node_modules || rd /s/q node_modules)","reset":"npm run clean && npm run init"},"_npmUser":{"name":"herby","email":"herby@mailbox.sk"},"licenses":[{"url":"https://lolg.it/herby/domite/src/master/LICENSE-MIT","type":"MIT"}],"repository":{"url":"https://lolg.it/herby/domite.git","type":"git"},"_npmVersion":"3.10.3","description":"Lite mite wrapping basic DOM for Amber Smalltalk","directories":{},"_nodeVersion":"6.3.1","dependencies":{"es6-promise":"^4.2.4","@ambers/lang":">=0.22.2"},"_hasShrinkwrap":false,"devDependencies":{"grunt":"^1.0.3","requirejs":"^2.3.5","grunt-exec":"^3.0.0","@ambers/sdk":"^0.10.7","@ambers/helios":">=0.10.0","grunt-contrib-clean":"^1.1.0","@ambers/contrib-legacy":">=0.7.1","grunt-contrib-requirejs":"^1.0.0","@ambers/ide-starter-modal":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/domite_0.8.0_1534557120064_0.00745361080782736","host":"s3://npm-registry-packages"}},"0.8.1":{"name":"@ambers/domite","version":"0.8.1","keywords":["Amber","Smalltalk"],"author":{"name":"Herbert Vojčík","email":"herby@mailbox.sk"},"_id":"@ambers/domite@0.8.1","maintainers":[{"name":"herby","email":"herby@mailbox.sk"},{"name":"johnnyt","email":"ubergeek3141@gmail.com"},{"name":"nicolaspetton","email":"petton.nicolas@gmail.com"}],"homepage":"https://lolg.it/herby/domite","bugs":{"url":"https://lolg.it/herby/domite/issues"},"dist":{"shasum":"e158d438a51a64a79c81318ab0ba5b6854b27e38","tarball":"https://registry.npmjs.org/@ambers/domite/-/domite-0.8.1.tgz","fileCount":14,"integrity":"sha512-3y+sdR0IXpJQQhSS4Rh0ICW3uROXlBcqquPN3k0yPy8QGTOOnERLu4ZmeD24eZA/rBcjeVqeiHpiXbWE2pL8ew==","signatures":[{"sig":"MEYCIQDzZmKhF2/tQ7h8N/ccGrxAxpKinPQvrtva7DfS9X7GfwIhALC1XKng7Te/EUhnM3JEuH5upyunqBrqPUjsYxYPawE3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYIgrCRA9TVsSAnZWagAArsIP/iO37da3XcpGCbpeeM1y\niSBDIEReWrfKVV54+ALDIM4kttiFMIFOhjHJrV2eZRFAMSGli44VuNk9/f7M\nwyVHr5y8IdnBxzAnsx6W6hN9VJX5XLmaETRMQ7oAjF7Ab5bP3DPtXCkeFq5/\nALGCO8V9nEM9neEv525HOd45mjOuDV7weuH/IDx7zx2YspIIWF5c4otsfbLE\n6nPZBpEQMuOgxyJ9qeSMP4GPTDMVk7d5NP/xssCuCXLuh5uZ+mBmF9jcSWBc\njTEtWtvO5NynH5sgu+s+XE1+ia5oRNjb9ml1Gr4sGnROvfW2OXbczVYDr9BY\nYazSfSjCZIsWU6JEO5PUEid6fWbKJ3KLgI4GsrDAUZ0Iz/A7x5nC/KeYKbvZ\nJ39AhVYBQMG1Uw6z/my0r7Sro9oQhlOS0kfgpUn1O6LR0oTFYD9utXEoTW4F\n09K6qntYHC7bvHH7uFMrc6bvhRP1tIpCtECXA1lxlOBOfqagQ0pjtLm8st0p\n8wKxPyhLeYUxjhHU/796q5AVqEczDosoD9EwUnuF+pA8HInyBhEFWZeeduNw\nuhxjMuFcMtHfV5bkKsJatnKhonk3cmpTR4YfTo2RD+++o16+ktaQhi2R15ac\nE4+IK/smP+6oKBhvUZ54DICsm7ORoxz63cgeAgre54pMdu+yH4/i03VIXLSJ\nYWsE\r\n=VpnR\r\n-----END PGP SIGNATURE-----\r\n"},"title":"Lite mite wrapping basic DOM for Amber Smalltalk","engines":{"node":">=4.0.0"},"gitHead":"0965e17d54e6824e21dba3eaf2d55fc659781463","scripts":{"init":"npm install && bower install && grunt default devel","test":"grunt test","clean":"(rm -rf bower_components || rd /s/q bower_components) && (rm -rf node_modules || rd /s/q node_modules)","reset":"npm run clean && npm run init"},"_npmUser":{"name":"herby","email":"herby@mailbox.sk"},"licenses":[{"url":"https://lolg.it/herby/domite/src/master/LICENSE-MIT","type":"MIT"}],"repository":{"url":"https://lolg.it/herby/domite.git","type":"git"},"_npmVersion":"6.4.1","description":"Lite mite wrapping basic DOM for Amber Smalltalk","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@ambers/lang":">=0.22.2"},"_hasShrinkwrap":false,"devDependencies":{"grunt":"^1.0.3","requirejs":"^2.3.5","grunt-exec":"^3.0.0","@ambers/sdk":"^0.10.7","es6-promise":"^4.2.4","@ambers/helios":">=0.10.0","grunt-contrib-clean":"^1.1.0","@ambers/contrib-legacy":">=0.7.1","grunt-contrib-requirejs":"^1.0.0","@ambers/ide-starter-modal":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/domite_0.8.1_1549830186391_0.37584324749022624","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@ambers/domite","version":"0.9.0","keywords":["Amber","Smalltalk"],"author":{"name":"Herbert Vojčík","email":"herby@mailbox.sk"},"_id":"@ambers/domite@0.9.0","maintainers":[{"name":"herby","email":"herby@mailbox.sk"},{"name":"johnnyt","email":"ubergeek3141@gmail.com"},{"name":"nicolaspetton","email":"petton.nicolas@gmail.com"}],"homepage":"https://lolg.it/herby/domite","bugs":{"url":"https://lolg.it/herby/domite/issues"},"dist":{"shasum":"23a4412898c1e774010c7c18184947190cebc6ee","tarball":"https://registry.npmjs.org/@ambers/domite/-/domite-0.9.0.tgz","fileCount":14,"integrity":"sha512-Ai39VZIxFaJr8gomTI+1SDg6QBnELJMMJwP5R4YHFFanWE811miowGHai9kI21CzJlkoxG7LAdeEfvY10yrFCA==","signatures":[{"sig":"MEUCIQD69eqso8USVAwTt+5+QRMa03PkHocHUavgt2GMB0M/WgIgZK7I2o4sN5FPz6oLSy3zeilM1LGWaEIHz3lH5WnE3Ak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdHRYCRA9TVsSAnZWagAAY9AP/A9i7rK87KOKKIP0R5S/\nOlTw13QwBDS5Nt8fuhnqtBH5SrL3TM2OY6RoEyLt6t3j60OUGFukkraPFPC4\nvGAa+vhOBwXF8+px5m0OMo8amRAaRYRiKkZewlvV9xZYV1mNTAcoO5ZK9qGE\nDD516m1A3CJmOVbmpcdrJ0Ftsn63VQ7Ti0goRa0IDsNRYGUipWdwGHNjaZMN\nVIPdfiWdmqJ4rrISuPeKpBUvo1cya9asqkk0O1CnJcc0Bo+UVHjE2VDeeOQi\nKXNcfUmYQSFIftCL9jYYt1oh6wZj41uj0S7kG5ltZXN1GzmM1z+uZ1x+XnUE\nOsZyPHRoAw1Oaeegbil3KzQNQRj90mwYM0aFXVyG0h9CRo6k1so5U+TZtIjF\n43eNZlPj7HH0lasnC96kiBRQG1NdtQjDJWthckfd5SgD1SXBDG8xuRI+eK3I\nTK9SwAfy0pYTHNwPKtcbPWUat8heYm/LXXXRe/GYaGKY3rtxFvfq9jwz3D+W\ngUQ8ThwtBf3Yl/BY1w6ncD9CUHhJFPcUoguvOxvUuMvTZCX7YdFVJMRk9me/\nwaPg6+6DLY10QqMZY/6GV1I1jYPFFYCbdBFxg5Z918ntk6Nb0uC53BTa14hu\nEaiubXrjqCN9gP3ywwarWidvcqQ2pvMSBfAz8sLQfklqpchq8IKWtXjsqw8C\nmmAc\r\n=YcEw\r\n-----END PGP SIGNATURE-----\r\n"},"title":"Lite mite wrapping basic DOM for Amber Smalltalk","engines":{"node":">=4.0.0"},"gitHead":"c49201ef712d424f09b0dd0ddfe597c3978afac3","scripts":{"init":"npm install && bower install && grunt default devel","test":"grunt test","clean":"(rm -rf bower_components || rd /s/q bower_components) && (rm -rf node_modules || rd /s/q node_modules)","reset":"npm run clean && npm run init"},"_npmUser":{"name":"herby","email":"herby@mailbox.sk"},"licenses":[{"url":"https://lolg.it/herby/domite/src/master/LICENSE-MIT","type":"MIT"}],"repository":{"url":"https://lolg.it/herby/domite.git","type":"git"},"_npmVersion":"6.4.1","description":"Lite mite wrapping basic DOM for Amber Smalltalk","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@ambers/lang":">0.22.6"},"_hasShrinkwrap":false,"devDependencies":{"grunt":"^1.0.3","requirejs":"^2.3.5","grunt-exec":"^3.0.0","@ambers/sdk":"^0.12.0","es6-promise":"^4.2.4","@ambers/helios":">=0.10.0","grunt-contrib-clean":"^1.1.0","@ambers/contrib-legacy":">=0.7.1","grunt-contrib-requirejs":"^1.0.0","@ambers/ide-starter-modal":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/domite_0.9.0_1551135832263_0.9217656654700692","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@ambers/domite","title":"Lite mite wrapping basic DOM for Amber Smalltalk","description":"Lite mite wrapping basic DOM for Amber Smalltalk","version":"0.10.0","homepage":"https://lolg.it/herby/domite","author":{"name":"Herbert Vojčík","email":"herby@mailbox.sk"},"repository":{"type":"git","url":"https://lolg.it/herby/domite.git"},"bugs":{"url":"https://lolg.it/herby/domite/issues"},"licenses":[{"type":"MIT","url":"https://lolg.it/herby/domite/src/master/LICENSE-MIT"}],"engines":{"node":">=12.0.0"},"scripts":{"reset":"npm run clean && npm run init","clean":"rm -rf node_modules || rd /s/q node_modules","init":"npm install && grunt default devel","test":"grunt test"},"dependencies":{"@ambers/lang":">=0.31.0"},"devDependencies":{"@ambers/contrib-legacy":">=0.11.0","@ambers/helios":">=0.14.0","@ambers/ide-starter-modal":"^0.2.0","@ambers/sdk":"^0.13.0","grunt":"^1.0.3","grunt-contrib-clean":"^1.1.0","grunt-contrib-requirejs":"^1.0.0","grunt-exec":"^3.0.0","requirejs":"^2.3.5"},"keywords":["Amber","Smalltalk"],"gitHead":"a76a1ce99f19396a93f3f7c2b83178c448e49adf","_id":"@ambers/domite@0.10.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-h2DbVB/C9PKIY3eumWilMae5jaoHtDe/NnR9TmjQgJS/aVpvcq3DoscW71RbbZDT0x+64WeTePl9Q+YtisAUEA==","shasum":"db8838b5b42c37ae9698a582b26906efd4b501d7","tarball":"https://registry.npmjs.org/@ambers/domite/-/domite-0.10.0.tgz","fileCount":13,"unpackedSize":117767,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFZcZ9j7DF36NKCd/Xc9KzQdDgsb10oPMifSYrqQNLIeAiEAumixZaFFlDR1jUdNIPvB0NyqUVvD2OLQA1l4rnCfv7c="}]},"_npmUser":{"name":"herby","email":"herby@eleison.sk"},"directories":{},"maintainers":[{"name":"herby","email":"herby@eleison.sk"},{"name":"nicolaspetton","email":"petton.nicolas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/domite_0.10.0_1788981260270_0.8224932844483333"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-18T01:52:00.024Z","modified":"2026-09-09T19:14:20.697Z","0.8.0":"2018-08-18T01:52:00.157Z","0.8.1":"2019-02-10T20:23:06.558Z","0.9.0":"2019-02-25T23:03:52.433Z","0.10.0":"2026-09-09T19:14:20.431Z"},"bugs":{"url":"https://lolg.it/herby/domite/issues"},"author":{"name":"Herbert Vojčík","email":"herby@mailbox.sk"},"homepage":"https://lolg.it/herby/domite","keywords":["Amber","Smalltalk"],"repository":{"type":"git","url":"https://lolg.it/herby/domite.git"},"description":"Lite mite wrapping basic DOM for Amber Smalltalk","maintainers":[{"name":"herby","email":"herby@eleison.sk"},{"name":"nicolaspetton","email":"petton.nicolas@gmail.com"}],"readme":"# Lite mite wrapping basic DOM for Amber Smalltalk\r\n\r\n[![Join the chat at https://gitter.im/amber-smalltalk/domite](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/amber-smalltalk/amber-contrib-domite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\r\n\r\nLite mite wrapping basic DOM for Amber Smalltalk.\r\n\r\nIt uses a selection of raw DOM API to perform tasks;\r\nit does not use any cross-browser library.\r\nTo work on IE8 (or other non-compliant browser),\r\ninclude `amber-compat-es5` and also shim event API\r\n(https://github.com/jonathantneal/EventListener looks good).\r\n\r\n## Getting Started\r\n\r\n- Install Amber ([Instructions](http://docs.amber-lang.net/faq.html))\r\n- Do ``amber init``\r\n- ``npm install @ambers/domite --save``\r\n- ``grunt devel``\r\n- Start server with `amber serve` and go to `http://localhost:4000/`\r\n\r\nThis makes modules from `domite` namespace loadable.\r\n\r\nTo do so in the Helios IDE change the `imports:` section of your packages which use ``Domite`` to\r\n`imports: {'domite/DOMite'}`.\r\n\r\nOr you may add it to the `testing.js` / `devel.js` files.\r\nThe former is preferred because of an easier deployment process.\r\n\r\n## API (class doc of class Domite)\r\n\r\nI am (hopefully thin) wrapper around the notion of \"cursor in a page\".\r\nI represent a DOM node _and_ a point where\r\nto insert new content into it.\r\n\r\nSo I play both the role of a container that inserts\r\nas well as the role of an element being inserted.\r\n\r\nI inherit from `ProtoStream`.\r\n\r\nCreation API:\r\n\r\n - `Domite new` creates an insertion point at the bottom of `<body>`.\r\n - `Domite newStream` is unique way to create pieces of content. It creates an instance \"floating in thin air\" (wrapper around DOM DocumentFragment) that can be filled with any contents and then inserted in a page.\r\n - `Domite fromElement: aDomElement` wraps an element and set the cursor to its end.\r\n - `Domite newElement: 'div'` creates new `<div />` element (and returns it wrapped as a Domite).\r\n\r\nCSS selector API:\r\n\r\n - `Domite at: aSelector` wraps an element found by `document.querySelector(aSelector)`.\r\n - `aDomite at: aSelector` wraps an element found by `element.querySelector(aSelector)`.\r\n - `Domite allAt: aSelector` return collection of wrapped results of `document.querySelectorAll(aSelector)`.\r\n - `aDomite allAt: aSelector` return collection of wrapped results of `element.querySelectorAll(aSelector)`.\r\n\r\nManipulation API:\r\n\r\n - `aDomite << obj` inserts obj at the insertion point.\r\n - `aDomite resetContents` deletes contents of the wrapped element.\r\n - `aDomite cutUpTo: anotherDomite` removes contents between the two cursors (or up to the end of the receiver) and returns it collected in a wrapped DocumentFragment (IOW, you can `anotherPlace << theResult` to move the contents in the specified range).\r\n\r\n - `aDomite attrAt: aString` returns attribute of the wrapped element or nil.\r\n - `aDomite attrAt: aString put: anotherString` sets an attribute of the wrapped element.\r\n - `aDomite propAt: aString` returns JS property of the wrapped element or nil.\r\n - `aDomite propAt: aString put: anObject` sets JS property of the wrapped element.\r\n\r\nCursor moving API:\r\n\r\nTake this sample HTML, where `[n]` are just markers, not real content:\r\n\r\n```\r\n<body>\r\n  <h1>header</h1>\r\n  [4]<p>[2]Hello[1]world[3]</p>[5]\r\n  <small>footer</small>\r\n</body>\r\n```\r\n\r\nIf `d` is a `Domite` representing `[1]`, then:\r\n\r\n - `d setToStart` would move `d` to be at `[2]`,\r\n - `d setToEnd` would move `d` to be at `[3]`,\r\n - `d setToBefore` would move `d` to be at `[4]`, and\r\n - `d setToAfter` would move `d` to be at `[5]`.\r\n\r\nIt is not presumed one would use `setToXxx`\r\nto actually move around in a single instance.\r\nIt is envisioned this API will be used mostly\r\nin combination with `copy`, like\r\n`afterMe := self copy setToAfter`.\r\n\r\nEvent API:\r\n\r\n - `aDomite on: aString bind: [ :ev | ... ]` binds a block to process an event.\r\n - `aDomite off: aString unbind: aBlock` unbinds the block from processing an event.\r\n - `aDomite fire: aString [detail: anObject]` triggers a CustomEvent with specified type and, optionally, a detail object.\r\n - `aDomite fireEvent: anEvent` triggers existing DOM Event object!\r\n\r\n## Contributing\r\n\r\nTo bring project alive (for example after `git clone`):\r\n\r\n```sh\r\nnpm run init\r\n```\r\n\r\nDeveloping the project (after brought alive):\r\n\r\nStart server with `amber serve` and go to `http://localhost:4000/` in your browser and follow the instructions\r\n","readmeFilename":"README.md"}