@directus/app 9.17.4 → 9.18.1
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/dist/assets/{@directus_extensions-sdk.3ef017de.entry.js → @directus_extensions-sdk.f3a2059d.entry.js} +1 -1
- package/dist/assets/{accounts.e4c64fb1.js → accounts.002bd72e.js} +0 -0
- package/dist/assets/{active-line.fbfa7096.js → active-line.44c2c3c5.js} +1 -1
- package/dist/assets/{activity-log.147dd93e.js → activity-log.1c7f3e06.js} +0 -0
- package/dist/assets/{activity.dd401932.js → activity.534ba5a0.js} +0 -0
- package/dist/assets/{apl.d7fc5843.js → apl.36994584.js} +1 -1
- package/dist/assets/ar-SA.3a51ad1e.js +2 -0
- package/dist/assets/{architecture.aaf5c296.js → architecture.e09979e0.js} +0 -0
- package/dist/assets/{asciiarmor.261d1336.js → asciiarmor.8962c9ce.js} +1 -1
- package/dist/assets/{asn.1.8b3b2498.js → asn.1.75e20b35.js} +1 -1
- package/dist/assets/{asterisk.6bcad720.js → asterisk.21e90360.js} +1 -1
- package/dist/assets/{authentication.61c42dda.js → authentication.33ce9896.js} +7 -6
- package/dist/assets/{autorefresh.f988014c.js → autorefresh.1f962b9b.js} +1 -1
- package/dist/assets/{aws.55405db9.js → aws.5360d8ec.js} +0 -0
- package/dist/assets/{backing-directus.bd29d5e2.js → backing-directus.ad58f051.js} +0 -0
- package/dist/assets/{bg-BG.e76ce10c.js → bg-BG.dc59cd9f.js} +1 -1
- package/dist/assets/{brainfuck.23ac0a88.js → brainfuck.2b25ddb4.js} +1 -1
- package/dist/assets/{cli.b2fbc62f.js → cli.47102c97.js} +0 -0
- package/dist/assets/{cli.ca0055cb.js → cli.e3008115.js} +0 -0
- package/dist/assets/{clike.280eef18.js → clike.da7f5f11.js} +1 -1
- package/dist/assets/{clojure.9a1da697.js → clojure.73ed4071.js} +1 -1
- package/dist/assets/{cloudron.8200e84b.js → cloudron.928609a6.js} +0 -0
- package/dist/assets/{cmake.afb772c6.js → cmake.59bf5961.js} +1 -1
- package/dist/assets/{cobol.f714109a.js → cobol.3edaa33b.js} +1 -1
- package/dist/assets/{codebase-overview.7f69e795.js → codebase-overview.ac0bd87d.js} +0 -0
- package/dist/assets/{coffeescript.05e123df.js → coffeescript.9075c6dc.js} +1 -1
- package/dist/assets/collections.2960f480.js +2 -0
- package/dist/assets/{collections.18cc2518.js → collections.a8c011ab.js} +0 -0
- package/dist/assets/{collections.b7aafbfb.js → collections.bcd6046c.js} +0 -0
- package/dist/assets/{commonlisp.4737092d.js → commonlisp.48fee8bf.js} +1 -1
- package/dist/assets/{conditions.281a6ed5.js → conditions.b5325328.js} +0 -0
- package/dist/assets/{config-options.d33aab72.js → config-options.0c6ec658.js} +10 -10
- package/dist/assets/{content.f9b34bf7.js → content.bde7d9ca.js} +0 -0
- package/dist/assets/{creating-extensions.4533b8ed.js → creating-extensions.f3c9db55.js} +0 -0
- package/dist/assets/{crystal.8c7beab4.js → crystal.ab682442.js} +1 -1
- package/dist/assets/{css.a9eb588e.js → css.73e17222.js} +1 -1
- package/dist/assets/{cypher.6ba17bcf.js → cypher.7f30c953.js} +1 -1
- package/dist/assets/{d.45eb46ff.js → d.52c58e38.js} +1 -1
- package/dist/assets/da-DK.abcfac65.js +1 -0
- package/dist/assets/{dart.106e5bf9.js → dart.a73604ce.js} +1 -1
- package/dist/assets/{data-model.dbce1366.js → data-model.7f2f203b.js} +0 -0
- package/dist/assets/{diff.3a98de01.js → diff.888115c8.js} +1 -1
- package/dist/assets/{digitalocean-app-platform.b046ae55.js → digitalocean-app-platform.36a9196f.js} +0 -0
- package/dist/assets/{display-templates.91e34e9f.js → display-templates.9e814e6d.js} +0 -0
- package/dist/assets/{display.494b7d1f.js → display.859d6b7a.js} +0 -0
- package/dist/assets/{displays.54ddeb10.js → displays.ebb70240.js} +0 -0
- package/dist/assets/{django.3efad4c5.js → django.9b7e7773.js} +1 -1
- package/dist/assets/{docker.36215dae.js → docker.ad2c3727.js} +0 -0
- package/dist/assets/{dockerfile.bac37bc8.js → dockerfile.8ceb659c.js} +1 -1
- package/dist/assets/{documentation.cb5bf843.js → documentation.dfc93b34.js} +0 -0
- package/dist/assets/{dtd.659738f9.js → dtd.479b75a6.js} +1 -1
- package/dist/assets/{dylan.d05d958a.js → dylan.c65351c4.js} +1 -1
- package/dist/assets/{ebnf.42ccc1d5.js → ebnf.59276582.js} +1 -1
- package/dist/assets/{ecl.1a1f67b1.js → ecl.ff12f334.js} +1 -1
- package/dist/assets/{eiffel.ad6bd3fc.js → eiffel.b83ce5bb.js} +1 -1
- package/dist/assets/{elm.a13bdb25.js → elm.e71db7ef.js} +1 -1
- package/dist/assets/{email-templates.b0b82036.js → email-templates.a1e2dd48.js} +0 -0
- package/dist/assets/{endpoints.1ba44e66.js → endpoints.a0bd90c0.js} +0 -0
- package/dist/assets/{erlang.bec38999.js → erlang.e93623cc.js} +1 -1
- package/dist/assets/{es-419.9ec18edd.js → es-419.3ca058bc.js} +1 -1
- package/dist/assets/{es-CL.4c3eb1b0.js → es-CL.b6c9c341.js} +1 -1
- package/dist/assets/{es-ES.4a8f0217.js → es-ES.a15ef5b2.js} +1 -1
- package/dist/assets/{es-MX.76f4e344.js → es-MX.02d43725.js} +1 -1
- package/dist/assets/{extensions.b4c93ce0.js → extensions.5362505c.js} +0 -0
- package/dist/assets/{factor.df8645f1.js → factor.2bfb963b.js} +1 -1
- package/dist/assets/{faq.4ca4b467.js → faq.e1e36fe1.js} +0 -0
- package/dist/assets/{fcl.a85c2db8.js → fcl.426ac9ce.js} +1 -1
- package/dist/assets/fi-FI.0ed8a854.js +1 -0
- package/dist/assets/{field-types.ed85836e.js → field-types.35c21ddc.js} +0 -0
- package/dist/assets/{field.fb2213dd.js → field.ccfc8bf9.js} +0 -0
- package/dist/assets/{fields.f3868bd3.js → fields.099f67ef.js} +0 -0
- package/dist/assets/{fields.057754cf.js → fields.3f97e0f6.js} +1 -1
- package/dist/assets/{file-library.5d646392.js → file-library.1eab74ed.js} +0 -0
- package/dist/assets/{files.e0ad4209.js → files.1cb7ba05.js} +0 -0
- package/dist/assets/{filter-rules.22fc9a6d.js → filter-rules.c59724be.js} +0 -0
- package/dist/assets/{filters.5cf9b5c5.js → filters.4055be70.js} +0 -0
- package/dist/assets/{flows.eec58d0b.js → flows.63a8281d.js} +0 -0
- package/dist/assets/{flows.79e56304.js → flows.d7db6a17.js} +0 -0
- package/dist/assets/{folders.83d5bb9d.js → folders.cd14efcd.js} +0 -0
- package/dist/assets/{forth.13eab470.js → forth.c4ae0a06.js} +1 -1
- package/dist/assets/{fortran.6a75e100.js → fortran.3c2b0bf9.js} +1 -1
- package/dist/assets/{fr-CA.e0e0ef26.js → fr-CA.73d6b39a.js} +1 -1
- package/dist/assets/{fr-FR.f3315fda.js → fr-FR.9f3565f2.js} +1 -1
- package/dist/assets/{gas.01307f71.js → gas.24c6bdd5.js} +1 -1
- package/dist/assets/{gcp.60b49ff2.js → gcp.76d40b9a.js} +0 -0
- package/dist/assets/{gfm.e90be61c.js → gfm.a577fb28.js} +1 -1
- package/dist/assets/{gherkin.82d7de5c.js → gherkin.63e55ae1.js} +1 -1
- package/dist/assets/{github-ci.b23bbe2d.js → github-ci.26f28be3.js} +0 -0
- package/dist/assets/{glossary.db37b807.js → glossary.26346b90.js} +1 -1
- package/dist/assets/{glossary.238763c8.js → glossary.6eff59c7.js} +0 -0
- package/dist/assets/{go.272a3171.js → go.a23442ba.js} +1 -1
- package/dist/assets/{groovy.74501d7e.js → groovy.2bfd19be.js} +1 -1
- package/dist/assets/{haml.f5486c4d.js → haml.bb6c0352.js} +1 -1
- package/dist/assets/{handlebars.c447e17d.js → handlebars.094006a4.js} +1 -1
- package/dist/assets/{haskell-literate.375cb4a1.js → haskell-literate.d6b25c52.js} +1 -1
- package/dist/assets/{haskell.7ebf7c39.js → haskell.cce5aa96.js} +1 -1
- package/dist/assets/{haxe.187863d1.js → haxe.852344cb.js} +1 -1
- package/dist/assets/{hooks.7b1e235e.js → hooks.73af06b4.js} +0 -0
- package/dist/assets/hr-HR.d14d6a05.js +1 -0
- package/dist/assets/{htmlembedded.7351fce9.js → htmlembedded.72d2afc0.js} +1 -1
- package/dist/assets/{htmlmixed.6fb30409.js → htmlmixed.200b6fde.js} +1 -1
- package/dist/assets/{http.ebe12ed0.js → http.108d5433.js} +1 -1
- package/dist/assets/{idl.2373e3e7.js → idl.e6664f1d.js} +1 -1
- package/dist/assets/iis.a81119d3.js +27 -0
- package/dist/assets/{import-export.92aee031.js → import-export.0fd71d78.js} +0 -0
- package/dist/assets/{index.322dc6a4.js → index.032c22ec.js} +1 -1
- package/dist/assets/{index.7dfe02f2.js → index.07d870df.js} +1 -1
- package/dist/assets/{index.5713cf94.js → index.0c623812.js} +1 -1
- package/dist/assets/{index.a981939a.js → index.0f7054d7.js} +1 -1
- package/dist/assets/{index.b7016c72.js → index.196f5525.js} +1 -1
- package/dist/assets/{index.fd0568fe.js → index.1a68aa4d.js} +1 -1
- package/dist/assets/{index.7ce1e572.js → index.20364919.js} +1 -1
- package/dist/assets/{index.e22e6eb6.js → index.210d9f50.js} +1 -1
- package/dist/assets/{index.b07b6c71.js → index.21be64e2.js} +1 -1
- package/dist/assets/{index.0645834a.js → index.26580e4e.js} +1 -1
- package/dist/assets/{index.5b507941.js → index.276c8805.js} +1 -1
- package/dist/assets/{index.87b80a1b.js → index.27a67bc2.js} +1 -1
- package/dist/assets/{index.e18ed1ac.js → index.2959978f.js} +1 -1
- package/dist/assets/{index.b8bc9ce9.js → index.348d338a.js} +1 -1
- package/dist/assets/{index.a4be7bd2.js → index.368a6e18.js} +1 -1
- package/dist/assets/{index.22f2ba3c.js → index.3a776dd0.js} +1 -1
- package/dist/assets/{index.7e2708ed.js → index.3b2ea880.js} +1 -1
- package/dist/assets/{index.b7eac46d.js → index.3ba53467.js} +1 -1
- package/dist/assets/{index.9ea39797.js → index.3f4fdce5.js} +1 -1
- package/dist/assets/{index.9f6f893d.js → index.41055340.js} +1 -1
- package/dist/assets/{index.81aae858.js → index.4327f671.js} +1 -1
- package/dist/assets/{index.0eaf700c.js → index.46a9fa81.js} +1 -1
- package/dist/assets/{index.bb9b3d77.js → index.491c19fd.js} +1 -1
- package/dist/assets/{index.3907fbe9.js → index.4c4e9d66.js} +1 -1
- package/dist/assets/{index.197b17c1.js → index.588d61ea.js} +1 -1
- package/dist/assets/{index.28a0ece3.js → index.597d81c9.js} +1 -1
- package/dist/assets/{index.32e3af07.js → index.5ca9038c.js} +1 -1
- package/dist/assets/{index.9728d28b.js → index.5e18f426.js} +1 -1
- package/dist/assets/{index.54ef22f3.js → index.5fbfec66.js} +1 -1
- package/dist/assets/{index.2e9e634f.js → index.643ee7ea.js} +1 -1
- package/dist/assets/{index.4a82f998.js → index.66b9d144.js} +1 -1
- package/dist/assets/{index.84f0c372.js → index.67d04694.js} +1 -1
- package/dist/assets/{index.34878ac2.js → index.67f9d07d.js} +1 -1
- package/dist/assets/{index.6c88db6e.js → index.6c8a51dd.js} +1 -1
- package/dist/assets/index.6f2d1754.css +1 -0
- package/dist/assets/{index.c210d71e.js → index.766e425a.js} +1 -1
- package/dist/assets/{index.ef505888.js → index.7ed656af.js} +1 -1
- package/dist/assets/{index.46908e35.js → index.83fd7f94.js} +1 -1
- package/dist/assets/{index.83e516d5.js → index.86303850.js} +1 -1
- package/dist/assets/{index.f32b69c8.js → index.86cc8b97.js} +1 -1
- package/dist/assets/{index.57954ae2.js → index.8b247735.js} +1 -1
- package/dist/assets/{index.0d2e59f7.js → index.8c05fe55.js} +0 -0
- package/dist/assets/{index.c378895c.js → index.8e3a9380.js} +1 -1
- package/dist/assets/{index.620380a7.js → index.8f247229.js} +1 -1
- package/dist/assets/{index.26419dc6.js → index.98ccc0d9.js} +1 -1
- package/dist/assets/{index.ba4d69a6.js → index.9ab5d3e8.js} +1 -1
- package/dist/assets/{index.bcef0184.js → index.9f30361e.js} +1 -1
- package/dist/assets/{index.556512f9.js → index.a01c9164.js} +0 -0
- package/dist/assets/{index.a84a7598.js → index.a25ffd9a.js} +1 -1
- package/dist/assets/{index.d73d6a9d.js → index.a6fb2cb1.js} +4 -4
- package/dist/assets/{index.7eae9d5a.js → index.aa069895.js} +1 -1
- package/dist/assets/{index.bf489604.js → index.aa9f79b1.js} +1 -1
- package/dist/assets/{index.78f834f7.js → index.ac410c01.js} +1 -1
- package/dist/assets/{index.1cd3d5ba.js → index.accd24e1.js} +1 -1
- package/dist/assets/{index.b4f005cc.js → index.af358a60.js} +1 -1
- package/dist/assets/{index.594e4655.js → index.af4e1070.js} +1 -1
- package/dist/assets/{index.1a3f31c4.js → index.b058949d.js} +1 -1
- package/dist/assets/{index.92f081c8.js → index.ba1f80e7.js} +1 -1
- package/dist/assets/{index.babc408d.js → index.babda74c.js} +1 -1
- package/dist/assets/{index.e3c74acd.js → index.bba05300.js} +1 -1
- package/dist/assets/{index.686784f1.js → index.befd42d9.js} +1 -1
- package/dist/assets/{index.5af46380.js → index.c0c5e740.js} +1 -1
- package/dist/assets/{index.db3bc6a7.js → index.ca535a42.js} +1 -1
- package/dist/assets/{index.39c3868e.js → index.ca8d3cdf.js} +1 -1
- package/dist/assets/{index.d7318062.js → index.cbf7d7a3.js} +1 -1
- package/dist/assets/{index.1bbfd138.js → index.cfb1e263.js} +1 -1
- package/dist/assets/{index.ad382721.js → index.d14783e3.js} +1 -1
- package/dist/assets/{index.27f67d42.js → index.d17d2ac1.js} +1 -1
- package/dist/assets/{index.a4f50556.js → index.d18ddb96.js} +1 -1
- package/dist/assets/{index.e5ffe5fd.js → index.d6dd2b98.js} +1 -1
- package/dist/assets/{index.66b6c68b.js → index.d865e2ac.js} +1 -1
- package/dist/assets/{index.1b249d21.entry.js → index.dfa694ae.entry.js} +214 -214
- package/dist/assets/{index.7e4713d2.js → index.e26f7fe8.js} +1 -1
- package/dist/assets/{index.b440ccbe.js → index.e29f23a0.js} +1 -1
- package/dist/assets/{index.a07c2783.js → index.e3e931b4.js} +1 -1
- package/dist/assets/{index.38794fb2.js → index.eb8546e0.js} +1 -1
- package/dist/assets/{index.b73fc9df.js → index.efd2aed2.js} +1 -1
- package/dist/assets/{index.29c0adc9.css → index.f08e0c06.css} +1 -1
- package/dist/assets/{index.a1938c4c.js → index.f1571284.js} +1 -1
- package/dist/assets/{index.4a4f8949.js → index.f3091871.js} +1 -1
- package/dist/assets/{index.86670575.js → index.f3115a10.js} +1 -1
- package/dist/assets/{index.a1e36825.js → index.f55e7fdf.js} +1 -1
- package/dist/assets/{index.5b4bffdb.js → index.f7bc5425.js} +1 -1
- package/dist/assets/{index.f7c78032.js → index.f984d0ff.js} +1 -1
- package/dist/assets/{index.c7c5db2b.js → index.f9c67777.js} +1 -1
- package/dist/assets/{index.6120d483.js → index.fbf23276.js} +1 -1
- package/dist/assets/{input-rich-text-html.ca73b169.js → input-rich-text-html.637e8640.js} +1 -1
- package/dist/assets/{insights.c3df1bb3.js → insights.55832652.js} +0 -0
- package/dist/assets/{installation.4ab6ce97.js → installation.55c40cca.js} +0 -0
- package/dist/assets/{interface.1195a442.js → interface.6af3f0c3.js} +0 -0
- package/dist/assets/{interfaces.0dddec2f.js → interfaces.8b25f2b8.js} +0 -0
- package/dist/assets/{introduction.daef5dfe.js → introduction.179fc6f0.js} +0 -0
- package/dist/assets/{introduction.201b3a46.js → introduction.a5c73793.js} +0 -0
- package/dist/assets/{introduction.2a49238f.js → introduction.b39c0bf0.js} +0 -0
- package/dist/assets/{introduction.569a3b41.js → introduction.c8fe3420.js} +0 -0
- package/dist/assets/it-IT.4acbbbb5.js +1 -0
- package/dist/assets/{items.207153dc.js → items.11af6dd9.js} +0 -0
- package/dist/assets/items.72939caa.js +1 -0
- package/dist/assets/{javascript-hint.8a5046c8.js → javascript-hint.2b703177.js} +1 -1
- package/dist/assets/{javascript.5a10626d.js → javascript.1e4b5b08.js} +1 -1
- package/dist/assets/{jinja2.bf0bec73.js → jinja2.61a3a06b.js} +1 -1
- package/dist/assets/{jsx.4d0616c2.js → jsx.a1531da1.js} +1 -1
- package/dist/assets/{julia.2041d3bd.js → julia.dc72717c.js} +1 -1
- package/dist/assets/{layouts.6d10b629.js → layouts.2cf51c33.js} +0 -0
- package/dist/assets/{layouts.39ffa712.js → layouts.d87e5697.js} +0 -0
- package/dist/assets/{livescript.3c990853.js → livescript.91619674.js} +1 -1
- package/dist/assets/{lua.8eaea235.js → lua.76ab8f9d.js} +1 -1
- package/dist/assets/{manual.edc6cff6.js → manual.b847f364.js} +0 -0
- package/dist/assets/{mark-selection.0b9ecc98.js → mark-selection.b066d01b.js} +1 -1
- package/dist/assets/{match-highlighter.119cecf3.js → match-highlighter.45109f5a.js} +1 -1
- package/dist/assets/{mathematica.6952fb97.js → mathematica.78ca1f38.js} +1 -1
- package/dist/assets/{mbox.3fb545ac.js → mbox.64bc9cf2.js} +1 -1
- package/dist/assets/{migrations.ecdb3334.js → migrations.b782db32.js} +0 -0
- package/dist/assets/{mirc.28ed39f5.js → mirc.7b4432ed.js} +1 -1
- package/dist/assets/{mllike.29007830.js → mllike.c200099a.js} +1 -1
- package/dist/assets/{modelica.2a1413cc.js → modelica.5bbc10af.js} +1 -1
- package/dist/assets/{modules.0dab0325.js → modules.babcc27d.js} +0 -0
- package/dist/assets/{mscgen.823f11e9.js → mscgen.7061db02.js} +1 -1
- package/dist/assets/{multiplex.4fc10389.js → multiplex.28b8f5a7.js} +1 -1
- package/dist/assets/{mumps.a675cbaa.js → mumps.c17bf9e5.js} +1 -1
- package/dist/assets/{nginx.06f224e2.js → nginx.7bc9c5fd.js} +1 -1
- package/dist/assets/nl-NL.c97e00b5.js +1 -0
- package/dist/assets/{notifications.5b10ad0b.js → notifications.41678f2a.js} +0 -0
- package/dist/assets/{nsis.6bbf5fbd.js → nsis.dcc603ea.js} +1 -1
- package/dist/assets/{ntriples.436a7adf.js → ntriples.92628b22.js} +1 -1
- package/dist/assets/{octave.414991ef.js → octave.9700568b.js} +1 -1
- package/dist/assets/{operations.296e9710.js → operations.0604115b.js} +0 -0
- package/dist/assets/{operations.30fc2625.js → operations.24ca10f6.js} +0 -0
- package/dist/assets/{operations.c5ee7367.js → operations.6c45c92d.js} +0 -0
- package/dist/assets/{overlay.3ee90c11.js → overlay.9e525c81.js} +1 -1
- package/dist/assets/{overview.eb55d14f.js → overview.183d15f2.js} +0 -0
- package/dist/assets/overview.957d902b.js +1 -0
- package/dist/assets/{overview.211898b7.js → overview.f4b2ca5a.js} +0 -0
- package/dist/assets/{oz.e9e8390b.js → oz.5b16249b.js} +1 -1
- package/dist/assets/{panels.9b48e2ab.js → panels.bac11d64.js} +0 -0
- package/dist/assets/{pascal.e9ba9604.js → pascal.bf9984b1.js} +1 -1
- package/dist/assets/{pegjs.ed73ce97.js → pegjs.d657bef5.js} +1 -1
- package/dist/assets/{perl.086b7ac4.js → perl.cdac9699.js} +1 -1
- package/dist/assets/{permissions.66ecdced.js → permissions.2a3a0797.js} +0 -0
- package/dist/assets/{php.8bec88a5.js → php.a184592c.js} +1 -1
- package/dist/assets/{pig.d8504a52.js → pig.2be11423.js} +1 -1
- package/dist/assets/pl-PL.22d07c6b.js +1 -0
- package/dist/assets/{plesk.0a2c4855.js → plesk.3cb191e3.js} +0 -0
- package/dist/assets/{powershell.d7b771b4.js → powershell.ee3295b5.js} +1 -1
- package/dist/assets/{presets-bookmarks.0a83b030.js → presets-bookmarks.3ee30c75.js} +0 -0
- package/dist/assets/{presets.198afe35.js → presets.77036328.js} +0 -0
- package/dist/assets/{project-settings.eebfbd8c.js → project-settings.20e3e90d.js} +0 -0
- package/dist/assets/{projects.398642da.js → projects.eb358a96.js} +0 -0
- package/dist/assets/{properties.7ac8abc3.js → properties.fd169d83.js} +1 -1
- package/dist/assets/{protobuf.0eb12c0f.js → protobuf.ec446f2c.js} +1 -1
- package/dist/assets/pt-PT.956e70ed.js +1 -0
- package/dist/assets/{pug.656b2711.js → pug.3def0926.js} +1 -1
- package/dist/assets/{puppet.723512ac.js → puppet.edd85fe3.js} +1 -1
- package/dist/assets/{python.4210f40f.js → python.7ad80e36.js} +1 -1
- package/dist/assets/{q.7b23505e.js → q.8ea2b87e.js} +1 -1
- package/dist/assets/{query.8ccae3a9.js → query.06e852c0.js} +1 -1
- package/dist/assets/{quickstart.de9843d9.js → quickstart.32ded9dd.js} +0 -0
- package/dist/assets/{quickstart.a567dd49.js → quickstart.af8e8736.js} +0 -0
- package/dist/assets/{r.95be9ff0.js → r.a0811921.js} +1 -1
- package/dist/assets/{readme.1996f39f.js → readme.7025b81e.js} +0 -0
- package/dist/assets/{relations.ad6c2398.js → relations.6ee9ce9f.js} +0 -0
- package/dist/assets/{relationship.32af0bee.js → relationship.64556fd6.js} +0 -0
- package/dist/assets/{relationships.1cd9b5d9.js → relationships.d2f6778f.js} +0 -0
- package/dist/assets/{resources.f947272a.js → resources.5d271ab4.js} +0 -0
- package/dist/assets/{revisions.c13b66e0.js → revisions.daaa161e.js} +0 -0
- package/dist/assets/{roles.e767878c.js → roles.f6764b96.js} +0 -0
- package/dist/assets/{rpm.b2d3e538.js → rpm.fd4d4c2f.js} +1 -1
- package/dist/assets/{rst.a45f8f69.js → rst.1fa996b0.js} +1 -1
- package/dist/assets/ru-RU.79696a97.js +1 -0
- package/dist/assets/{ruby.2fbc1416.js → ruby.bfb78149.js} +1 -1
- package/dist/assets/{running-locally.6bdbd71e.js → running-locally.04510a25.js} +8 -11
- package/dist/assets/{rust.612f9f94.js → rust.937b3011.js} +1 -1
- package/dist/assets/{sas.bf8451c0.js → sas.283bf6a6.js} +1 -1
- package/dist/assets/{sass.055fb61a.js → sass.e2226201.js} +1 -1
- package/dist/assets/{schema.7eb35ba9.js → schema.3d63691c.js} +0 -0
- package/dist/assets/{scheme.f9a1817a.js → scheme.0b9bf780.js} +1 -1
- package/dist/assets/{sdk.d1cc970a.js → sdk.164e8e29.js} +52 -52
- package/dist/assets/{security.0f4880b1.js → security.d2b3ee17.js} +0 -0
- package/dist/assets/{server.bcf6175e.js → server.665f7fc5.js} +0 -0
- package/dist/assets/{settings.25cab07d.js → settings.359b2c2f.js} +0 -0
- package/dist/assets/{settings.f21d244b.js → settings.a5d95e00.js} +0 -0
- package/dist/assets/{shares.cc7ce751.js → shares.8e2f899f.js} +0 -0
- package/dist/assets/{shell.1dff9d9d.js → shell.45fdc311.js} +1 -1
- package/dist/assets/{show-hint.0c7509b8.js → show-hint.a9a96af2.js} +1 -1
- package/dist/assets/{sieve.ff160b73.js → sieve.af694fa4.js} +1 -1
- package/dist/assets/{slim.799e84ba.js → slim.c4f5c572.js} +1 -1
- package/dist/assets/{smalltalk.22f1ae27.js → smalltalk.24c87344.js} +1 -1
- package/dist/assets/{smarty.6229542d.js → smarty.0573be3e.js} +1 -1
- package/dist/assets/{solr.9ad22542.js → solr.2fa44e70.js} +1 -1
- package/dist/assets/{soy.0f449596.js → soy.0cc76308.js} +1 -1
- package/dist/assets/{sparql.dac6fdb0.js → sparql.c3173654.js} +1 -1
- package/dist/assets/{spreadsheet.7137677d.js → spreadsheet.782585e1.js} +1 -1
- package/dist/assets/{sql.df486940.js → sql.a6374984.js} +1 -1
- package/dist/assets/{sso-examples.0b7c81f4.js → sso-examples.16508b47.js} +0 -0
- package/dist/assets/{sso.49e87f3a.js → sso.d864beab.js} +0 -0
- package/dist/assets/{stex.3be20516.js → stex.7ad89553.js} +1 -1
- package/dist/assets/{stylus.594bbe35.js → stylus.9946bfbc.js} +1 -1
- package/dist/assets/{support.55199a3e.js → support.7663419d.js} +0 -0
- package/dist/assets/{swift.7d9fe59a.js → swift.54a9c95b.js} +1 -1
- package/dist/assets/{tcl.ff2cb3cc.js → tcl.b7a78bf6.js} +1 -1
- package/dist/assets/{teams.541d1f0c.js → teams.a82a9891.js} +0 -0
- package/dist/assets/{textile.f35f5a74.js → textile.ccaad89e.js} +1 -1
- package/dist/assets/{themes.47d63f74.js → themes.d1c43c85.js} +0 -0
- package/dist/assets/{tiddlywiki.b5bd6438.js → tiddlywiki.1f6e9724.js} +1 -1
- package/dist/assets/{tiki.35dd4f3c.js → tiki.e563e2fe.js} +1 -1
- package/dist/assets/{toml.d545623c.js → toml.d8ffc03c.js} +1 -1
- package/dist/assets/{tornado.88b58687.js → tornado.e56be2d0.js} +1 -1
- package/dist/assets/tr-TR.1d37f3a3.js +1 -0
- package/dist/assets/{translation-strings.6f6737a7.js → translation-strings.817aa829.js} +0 -0
- package/dist/assets/{translations.7e97efc3.js → translations.2bd44244.js} +0 -0
- package/dist/assets/{translations.4a2d59ad.js → translations.ccd22f7d.js} +0 -0
- package/dist/assets/{triggers.6baf300f.js → triggers.27d1ac9d.js} +0 -0
- package/dist/assets/{troff.eb8c9df7.js → troff.8969e17b.js} +1 -1
- package/dist/assets/{ttcn-cfg.5b1c3cd7.js → ttcn-cfg.c39e18bd.js} +1 -1
- package/dist/assets/{ttcn.806b67fb.js → ttcn.d9aa218d.js} +1 -1
- package/dist/assets/{turtle.e048ce1c.js → turtle.0f986361.js} +1 -1
- package/dist/assets/{twig.a05a77e8.js → twig.7b1c7eed.js} +1 -1
- package/dist/assets/{ubuntu.14eb3ea1.js → ubuntu.4dbcd1ec.js} +0 -0
- package/dist/assets/{upgrades-migrations.a9a9ca7c.js → upgrades-migrations.427c056e.js} +0 -0
- package/dist/assets/{use-sync.3af8e920.js → use-sync.2916bc02.js} +1 -1
- package/dist/assets/{user-directory.59b8470a.js → user-directory.9f141cda.js} +0 -0
- package/dist/assets/{users-roles-permissions.ed9e814c.js → users-roles-permissions.2cd3107d.js} +0 -0
- package/dist/assets/{users.de050e21.js → users.b10bd9b8.js} +1 -1
- package/dist/assets/{utilities.99f7a370.js → utilities.c2b860c0.js} +0 -0
- package/dist/assets/{validation.10b8a2f3.js → validation.41f2b055.js} +0 -0
- package/dist/assets/{vb.072a7aef.js → vb.366e82d0.js} +1 -1
- package/dist/assets/{vbscript.38e867b9.js → vbscript.b2c0aa1c.js} +1 -1
- package/dist/assets/{velocity.90080f69.js → velocity.9565ee76.js} +1 -1
- package/dist/assets/{verilog.4d15fdd0.js → verilog.dceddfdd.js} +1 -1
- package/dist/assets/{vhdl.56d4f455.js → vhdl.ef4e169a.js} +1 -1
- package/dist/assets/{vue.90a7a58b.js → vue.e1dd1e87.js} +1 -1
- package/dist/assets/{wast.42f6871c.js → wast.ff819a1d.js} +1 -1
- package/dist/assets/{webhooks.a7e035b7.js → webhooks.181676a2.js} +0 -0
- package/dist/assets/{webhooks.53b2215e.js → webhooks.755a1b1d.js} +0 -0
- package/dist/assets/{webidl.0e691256.js → webidl.85bf246b.js} +1 -1
- package/dist/assets/{xquery.c741e1c6.js → xquery.0886a550.js} +1 -1
- package/dist/assets/{yacas.a96ebfed.js → yacas.4b0493cd.js} +1 -1
- package/dist/assets/{yaml-frontmatter.c5444bf1.js → yaml-frontmatter.8bb24d07.js} +1 -1
- package/dist/assets/{yaml.f75d6003.js → yaml.67357436.js} +1 -1
- package/dist/assets/{z80.4d61f0f8.js → z80.c04eab83.js} +1 -1
- package/dist/assets/{zh-CN.96c0a25c.js → zh-CN.7317a551.js} +1 -1
- package/dist/assets/zh-TW.b34294b3.js +1 -0
- package/dist/index.html +3 -3
- package/package.json +3 -3
- package/dist/assets/ar-SA.a723a027.js +0 -1
- package/dist/assets/collections.2fa0dd8e.js +0 -2
- package/dist/assets/da-DK.f9d9d6ca.js +0 -1
- package/dist/assets/fi-FI.38180e94.js +0 -1
- package/dist/assets/hr-HR.649970ba.js +0 -1
- package/dist/assets/iis.67a83939.js +0 -24
- package/dist/assets/index.9a7a1dcc.css +0 -1
- package/dist/assets/it-IT.b5b391d8.js +0 -1
- package/dist/assets/items.cc802753.js +0 -1
- package/dist/assets/localization.6486db5d.js +0 -1
- package/dist/assets/nl-NL.57220fbc.js +0 -1
- package/dist/assets/overview.91ec2552.js +0 -1
- package/dist/assets/pl-PL.25397b47.js +0 -1
- package/dist/assets/pt-PT.2233fb43.js +0 -1
- package/dist/assets/ru-RU.71121ae2.js +0 -1
- package/dist/assets/tr-TR.f894f4bf.js +0 -1
- package/dist/assets/zh-TW.7333a9ec.js +0 -1
|
@@ -108,7 +108,7 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
108
108
|
`)])],-1),x=s("h2",{id:"reference",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#reference"},"#"),a(" Reference")],-1),S=s("h3",{id:"constructor",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#constructor"},"#"),a(" Constructor")],-1),D=s("p",null,[a("This is the starting point to use the SDK. You need to create an instance and invoke methods from it. In most cases a single instance is sufficient, but in case you need more, you need to define "),s("a",{href:"#options.storage.prefix"},[s("code",null,"options.storage.prefix")]),a(".")],-1),T=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),a(" { "),s("span",{class:"hljs-title class_"},"Directus"),a(" } "),s("span",{class:"hljs-keyword"},"from"),a(),s("span",{class:"hljs-string"},"'@directus/sdk'"),a(`;
|
|
109
109
|
|
|
110
110
|
`),s("span",{class:"hljs-keyword"},"const"),a(" directus = "),s("span",{class:"hljs-keyword"},"new"),a(),s("span",{class:"hljs-title class_"},"Directus"),a(`(url, init);
|
|
111
|
-
`)])],-1),I=s("ul",null,[s("li",null,[s("p",null,[s("code",null,"url"),a(" [required] "),s("em",null,"String"),a(" - A string pointing to your Directus instance. E.g. "),s("code",null,"https://admin.directus.io")]),s("a",{name:"options"})]),s("li",null,[s("p",null,[s("code",null,"init"),a(" [optional] "),s("em",null,"Object"),a(" - Define settings that you want to customize .The possible options are:")]),s("a",{name:"options.auth"}),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"auth"),a(" [optional] "),s("em",null,"Object"),a(" - Defines settings you want to customize regarding "),s("a",{href:"#auth"},"authentication"),a(". The possible options are:")]),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"mode"),a(" [optional] "),s("em",null,"String"),a(" - Defines the mode you want to use for authentication. It can be "),s("code",null,"'cookie'"),a(" for cookies or "),s("code",null,"'json'"),a(" for JWT. Defaults to "),s("code",null,"'cookie'"),a(" on browsers and "),s("code",null,"'json'"),a(" otherwise. We recommend using cookies when possible to prevent any kind of attacks, mostly XSS.")]),s("a",{name:"options.auth.autoRefresh"})]),s("li",null,[s("p",null,[s("code",null,"autoRefresh"),a(" [optional] "),s("em",null,"Boolean"),a(" - Tells SDK if it should handle refresh tokens automatically. Defaults to "),s("code",null,"true"),a(".")])]),s("li",null,[s("p",null,[s("code",null,"msRefreshBeforeExpires"),a(" [optional] "),s("em",null,"Number"),a(" - When "),s("code",null,"autoRefresh"),a(" is enabled, this tells how many milliseconds before the refresh token expires and needs to be refreshed. Defaults to "),s("code",null,"30000"),a(".")])]),s("li",null,[s("p",null,[s("code",null,"staticToken"),a(" [optional] "),s("em",null,"String"),a(" - Defines the static token to use. It is not compatible with the options above since it does not refresh. Defaults to "),s("code",null,"''"),a(" (no static token).")])])])])]),s("a",{name:"options.storage"}),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"storage"),a(" [optional] "),s("em",null,"Object"),a(" - Defines settings you want to customize regarding "),s("a",{href:"#storage"},"storage"),a(".")]),s("a",{name:"options.storage.prefix"}),s("ul",null,[s("li",null,[s("code",null,"prefix"),a(" [optional] "),s("em",null,"String"),a(" - Defines the tokens prefix tokens that are saved. This should be fulfilled with different values when using multiple instances of SDK. Defaults to "),s("code",null,"''"),a(" (no prefix).")]),s("li",null,[s("code",null,"mode"),a(" [optional] "),s("em",null,"String"),a(" - Defines the storage location to be used to save tokens. Allowed values are "),s("code",null,"LocalStorage"),a(" and "),s("code",null,"MemoryStorage"),a(". Defaults to "),s("code",null,"LocalStorage"),a(" on browsers and "),s("code",null,"MemoryStorage"),a(" on Node.js. The mode "),s("code",null,"LocalStorage"),a(" is not compatible with Node.js.")])])])]),s("a",{name:"options.transport"}),s("ul",null,[s("li",null,[s("code",null,"transport"),a(" [optional] "),s("em",null,"Object"),a(" - Defines settings you want to customize regarding "),s("a",{href:"#transport"},"transport"),a(". "),s("ul",null,[s("li",null,[s("code",null,"params"),a(" [optional] "),s("em",null,"Object"),a(" - Defines an object with keys and values to be passed as additional query string.")]),s("li",null,[s("code",null,"headers"),a(" [optional] "),s("em",null,"Object"),a(" - Defines an object with keys and values to be passed as additional headers.")]),s("li",null,[s("code",null,"onUploadProgress"),a(" [optional] "),s("em",null,[a("(event: "),s("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent",target:"_blank",rel:"noopener noreferrer"},"ProgressEvent"),a(" => void)")]),a(" - Defines a callback function to indicate the upload progress.")])])])])])],-1),A=s("h2",{id:"auth",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#auth"},"#"),a(" Auth")],-1),
|
|
111
|
+
`)])],-1),I=s("ul",null,[s("li",null,[s("p",null,[s("code",null,"url"),a(" [required] "),s("em",null,"String"),a(" - A string pointing to your Directus instance. E.g. "),s("code",null,"https://admin.directus.io")]),s("a",{name:"options"})]),s("li",null,[s("p",null,[s("code",null,"init"),a(" [optional] "),s("em",null,"Object"),a(" - Define settings that you want to customize .The possible options are:")]),s("a",{name:"options.auth"}),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"auth"),a(" [optional] "),s("em",null,"Object"),a(" - Defines settings you want to customize regarding "),s("a",{href:"#auth"},"authentication"),a(". The possible options are:")]),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"mode"),a(" [optional] "),s("em",null,"String"),a(" - Defines the mode you want to use for authentication. It can be "),s("code",null,"'cookie'"),a(" for cookies or "),s("code",null,"'json'"),a(" for JWT. Defaults to "),s("code",null,"'cookie'"),a(" on browsers and "),s("code",null,"'json'"),a(" otherwise. We recommend using cookies when possible to prevent any kind of attacks, mostly XSS.")]),s("a",{name:"options.auth.autoRefresh"})]),s("li",null,[s("p",null,[s("code",null,"autoRefresh"),a(" [optional] "),s("em",null,"Boolean"),a(" - Tells SDK if it should handle refresh tokens automatically. Defaults to "),s("code",null,"true"),a(".")])]),s("li",null,[s("p",null,[s("code",null,"msRefreshBeforeExpires"),a(" [optional] "),s("em",null,"Number"),a(" - When "),s("code",null,"autoRefresh"),a(" is enabled, this tells how many milliseconds before the refresh token expires and needs to be refreshed. Defaults to "),s("code",null,"30000"),a(".")])]),s("li",null,[s("p",null,[s("code",null,"staticToken"),a(" [optional] "),s("em",null,"String"),a(" - Defines the static token to use. It is not compatible with the options above since it does not refresh. Defaults to "),s("code",null,"''"),a(" (no static token).")])])])])]),s("a",{name:"options.storage"}),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"storage"),a(" [optional] "),s("em",null,"Object"),a(" - Defines settings you want to customize regarding "),s("a",{href:"#storage"},"storage"),a(".")]),s("a",{name:"options.storage.prefix"}),s("ul",null,[s("li",null,[s("code",null,"prefix"),a(" [optional] "),s("em",null,"String"),a(" - Defines the tokens prefix tokens that are saved. This should be fulfilled with different values when using multiple instances of SDK. Defaults to "),s("code",null,"''"),a(" (no prefix).")]),s("li",null,[s("code",null,"mode"),a(" [optional] "),s("em",null,"String"),a(" - Defines the storage location to be used to save tokens. Allowed values are "),s("code",null,"LocalStorage"),a(" and "),s("code",null,"MemoryStorage"),a(". Defaults to "),s("code",null,"LocalStorage"),a(" on browsers and "),s("code",null,"MemoryStorage"),a(" on Node.js. The mode "),s("code",null,"LocalStorage"),a(" is not compatible with Node.js.")])])])]),s("a",{name:"options.transport"}),s("ul",null,[s("li",null,[s("code",null,"transport"),a(" [optional] "),s("em",null,"Object"),a(" - Defines settings you want to customize regarding "),s("a",{href:"#transport"},"transport"),a(". "),s("ul",null,[s("li",null,[s("code",null,"params"),a(" [optional] "),s("em",null,"Object"),a(" - Defines an object with keys and values to be passed as additional query string.")]),s("li",null,[s("code",null,"headers"),a(" [optional] "),s("em",null,"Object"),a(" - Defines an object with keys and values to be passed as additional headers.")]),s("li",null,[s("code",null,"onUploadProgress"),a(" [optional] "),s("em",null,[a("(event: "),s("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent",target:"_blank",rel:"noopener noreferrer"},"ProgressEvent"),a(" => void)")]),a(" - Defines a callback function to indicate the upload progress.")])])])])])],-1),A=s("h2",{id:"auth",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#auth"},"#"),a(" Auth")],-1),q=s("p",null,"Defines how authentication is handled by the SDK.",-1),R=s("h3",{id:"custom-implementation",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#custom-implementation"},"#"),a(" Custom Implementation")],-1),B=s("p",null,[a("It is possible to provide a custom implementation by extending "),s("code",null,"IAuth"),a(". While this could be useful for advanced usage, most use-cases do not need it.")],-1),M=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),a(" { "),s("span",{class:"hljs-title class_"},"IAuth"),a(", "),s("span",{class:"hljs-title class_"},"Directus"),a(" } "),s("span",{class:"hljs-keyword"},"from"),a(),s("span",{class:"hljs-string"},"'@directus/sdk'"),a(`;
|
|
112
112
|
|
|
113
113
|
`),s("span",{class:"hljs-keyword"},"class"),a(),s("span",{class:"hljs-title class_"},"MyAuth"),a(),s("span",{class:"hljs-keyword"},"extends"),a(),s("span",{class:"hljs-title class_ inherited__"},"IAuth"),a(` {
|
|
114
114
|
`),s("span",{class:"hljs-keyword"},"async"),a(),s("span",{class:"hljs-title function_"},"login"),a("("),s("span",{class:"hljs-params"}),a(`) {
|
|
@@ -195,13 +195,13 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
195
195
|
`),s("span",{class:"hljs-keyword"},"const"),a(" directus = "),s("span",{class:"hljs-keyword"},"new"),a(),s("span",{class:"hljs-title class_"},"Directus"),a("("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),a(`, {
|
|
196
196
|
`),s("span",{class:"hljs-attr"},"storage"),a(": "),s("span",{class:"hljs-keyword"},"new"),a(),s("span",{class:"hljs-title class_"},"SessionStorage"),a(`(),
|
|
197
197
|
});
|
|
198
|
-
`)])],-1),bs=s("h3",{id:"directus-implementation-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#directus-implementation-2"},"#"),a(" Directus Implementation")],-1),ks=s("p",null,[a("By default, Directus creates an instance of "),s("code",null,"Storage"),a(" which handles store information automatically. Check "),s("a",{href:"#options.storage"},[s("code",null,"options.storage")]),a(" to see the available settings.")],-1),vs=s("p",null,[a("SDK uses "),s("code",null,"localStorage"),a(" on browsers and the memory itself on Node.js to save tokens. This behavior can be configured in "),s("a",{href:"#options.storage.mode"},[s("code",null,"options.storage.mode")]),a(". The "),s("code",null,"LocalStorage"),a(" is only available on browsers and the "),s("code",null,"MemoryStorage"),a(" is not persistent, i.e., once you leave the tab or quit the process, you will need to authenticate again.")],-1),xs=s("p",null,[a("If you want to use multiple instances of the SDK you should set a different "),s("a",{href:"#options.storage.prefix"},[s("code",null,"prefix")]),a(" for each one.")],-1),Ss=s("h2",{id:"items",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#items"},"#"),a(" Items")],-1),
|
|
198
|
+
`)])],-1),bs=s("h3",{id:"directus-implementation-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#directus-implementation-2"},"#"),a(" Directus Implementation")],-1),ks=s("p",null,[a("By default, Directus creates an instance of "),s("code",null,"Storage"),a(" which handles store information automatically. Check "),s("a",{href:"#options.storage"},[s("code",null,"options.storage")]),a(" to see the available settings.")],-1),vs=s("p",null,[a("SDK uses "),s("code",null,"localStorage"),a(" on browsers and the memory itself on Node.js to save tokens. This behavior can be configured in "),s("a",{href:"#options.storage.mode"},[s("code",null,"options.storage.mode")]),a(". The "),s("code",null,"LocalStorage"),a(" is only available on browsers and the "),s("code",null,"MemoryStorage"),a(" is not persistent, i.e., once you leave the tab or quit the process, you will need to authenticate again.")],-1),xs=s("p",null,[a("If you want to use multiple instances of the SDK you should set a different "),s("a",{href:"#options.storage.prefix"},[s("code",null,"prefix")]),a(" for each one.")],-1),Ss=s("div",{class:"tip hint"},[s("p",null,[a("The axios instance can be used for custom requests by calling "),s("code",null,"await directus.transport.<method>('/path/to/endpoint', { /* body, params, ... */ })")])],-1),Ds=s("h2",{id:"items",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#items"},"#"),a(" Items")],-1),Ts=s("p",null,[a("You can get an instance of the item handler by providing the collection (and type, in the case of TypeScript) to the "),s("code",null,"items"),a(" function. The following examples will use the "),s("code",null,"Article"),a(" type.")],-1),Is=s("blockquote",null,[s("p",null,"JavaScript")],-1),As=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-comment"},"// import { Directus, ID } from '@directus/sdk';"),a(`
|
|
199
199
|
`),s("span",{class:"hljs-keyword"},"const"),a(" { "),s("span",{class:"hljs-title class_"},"Directus"),a(" } = "),s("span",{class:"hljs-built_in"},"require"),a("("),s("span",{class:"hljs-string"},"'@directus/sdk'"),a(`);
|
|
200
200
|
|
|
201
201
|
`),s("span",{class:"hljs-keyword"},"const"),a(" directus = "),s("span",{class:"hljs-keyword"},"new"),a(),s("span",{class:"hljs-title class_"},"Directus"),a("("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),a(`);
|
|
202
202
|
|
|
203
203
|
`),s("span",{class:"hljs-keyword"},"const"),a(" articles = directus."),s("span",{class:"hljs-title function_"},"items"),a("("),s("span",{class:"hljs-string"},"'articles'"),a(`);
|
|
204
|
-
`)])],-1),
|
|
204
|
+
`)])],-1),qs=s("blockquote",null,[s("p",null,"TypeScript")],-1),Rs=s("pre",null,[s("code",{class:"language-ts"},[s("span",{class:"hljs-keyword"},"import"),a(" { "),s("span",{class:"hljs-title class_"},"Directus"),a(", "),s("span",{class:"hljs-variable constant_"},"ID"),a(" } "),s("span",{class:"hljs-keyword"},"from"),a(),s("span",{class:"hljs-string"},"'@directus/sdk'"),a(`;
|
|
205
205
|
|
|
206
206
|
`),s("span",{class:"hljs-comment"},"// Map your collection structure based on its fields."),a(`
|
|
207
207
|
`),s("span",{class:"hljs-keyword"},"type"),a(),s("span",{class:"hljs-title class_"},"Article"),a(` = {
|
|
@@ -233,10 +233,10 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
233
233
|
|
|
234
234
|
`),s("span",{class:"hljs-comment"},'// Error TS2322: "hello" is not assignable to type "boolean".'),a(`
|
|
235
235
|
`),s("span",{class:"hljs-comment"},"// post.published = 'hello';"),a(`
|
|
236
|
-
`)])],-1),
|
|
236
|
+
`)])],-1),Bs=s("h3",{id:"create-single-item",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#create-single-item"},"#"),a(" Create Single Item")],-1),Ms=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"createOne"),a(`({
|
|
237
237
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'My New Article'"),a(`,
|
|
238
238
|
});
|
|
239
|
-
`)])],-1),
|
|
239
|
+
`)])],-1),Os=s("h3",{id:"create-multiple-items",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#create-multiple-items"},"#"),a(" Create Multiple Items")],-1),Cs=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"createMany"),a(`([
|
|
240
240
|
{
|
|
241
241
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'My First Article'"),a(`,
|
|
242
242
|
},
|
|
@@ -244,7 +244,7 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
244
244
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'My Second Article'"),a(`,
|
|
245
245
|
},
|
|
246
246
|
]);
|
|
247
|
-
`)])],-1),
|
|
247
|
+
`)])],-1),Ps=s("h3",{id:"read-by-query",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#read-by-query"},"#"),a(" Read By Query")],-1),Es=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"readByQuery"),a(`({
|
|
248
248
|
`),s("span",{class:"hljs-attr"},"search"),a(": "),s("span",{class:"hljs-string"},"'Directus'"),a(`,
|
|
249
249
|
`),s("span",{class:"hljs-attr"},"filter"),a(`: {
|
|
250
250
|
`),s("span",{class:"hljs-attr"},"date_published"),a(`: {
|
|
@@ -252,24 +252,24 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
252
252
|
},
|
|
253
253
|
},
|
|
254
254
|
});
|
|
255
|
-
`)])],-1),
|
|
255
|
+
`)])],-1),Ns=s("h3",{id:"read-all",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#read-all"},"#"),a(" Read All")],-1),Us=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"readByQuery"),a(`({
|
|
256
256
|
`),s("span",{class:"hljs-comment"},"// By default API limits results to 100."),a(`
|
|
257
257
|
`),s("span",{class:"hljs-comment"},"// With -1, it will return all results, but it may lead to performance degradation"),a(`
|
|
258
258
|
`),s("span",{class:"hljs-comment"},"// for large result sets."),a(`
|
|
259
259
|
`),s("span",{class:"hljs-attr"},"limit"),a(": -"),s("span",{class:"hljs-number"},"1"),a(`,
|
|
260
260
|
});
|
|
261
|
-
`)])],-1),
|
|
262
|
-
`)])],-1),
|
|
261
|
+
`)])],-1),Ks=s("h3",{id:"read-single-item",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#read-single-item"},"#"),a(" Read Single Item")],-1),Fs=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"readOne"),a("("),s("span",{class:"hljs-number"},"15"),a(`);
|
|
262
|
+
`)])],-1),Ls=s("p",null,"Supports optional query:",-1),Js=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"readOne"),a("("),s("span",{class:"hljs-number"},"15"),a(`, {
|
|
263
263
|
`),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'title'"),a(`],
|
|
264
264
|
});
|
|
265
|
-
`)])],-1),
|
|
266
|
-
`)])],-1),
|
|
265
|
+
`)])],-1),Ws=s("h3",{id:"read-multiple-items",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#read-multiple-items"},"#"),a(" Read Multiple Items")],-1),Hs=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"readMany"),a("(["),s("span",{class:"hljs-number"},"15"),a(", "),s("span",{class:"hljs-number"},"16"),a(", "),s("span",{class:"hljs-number"},"17"),a(`]);
|
|
266
|
+
`)])],-1),Vs=s("p",null,"Supports optional query:",-1),zs=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"readMany"),a("(["),s("span",{class:"hljs-number"},"15"),a(", "),s("span",{class:"hljs-number"},"16"),a(", "),s("span",{class:"hljs-number"},"17"),a(`], {
|
|
267
267
|
`),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'title'"),a(`],
|
|
268
268
|
});
|
|
269
|
-
`)])],-1),
|
|
269
|
+
`)])],-1),Gs=s("h3",{id:"update-single-item",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#update-single-item"},"#"),a(" Update Single Item")],-1),Ys=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"updateOne"),a("("),s("span",{class:"hljs-number"},"15"),a(`, {
|
|
270
270
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'This articles now has a different title'"),a(`,
|
|
271
271
|
});
|
|
272
|
-
`)])],-1),
|
|
272
|
+
`)])],-1),Qs=s("p",null,"Supports optional query:",-1),$s=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"updateOne"),a(`(
|
|
273
273
|
`),s("span",{class:"hljs-number"},"42"),a(`,
|
|
274
274
|
{
|
|
275
275
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'This articles now has a similar title'"),a(`,
|
|
@@ -278,10 +278,10 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
278
278
|
`),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'title'"),a(`],
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
|
-
`)])],-1)
|
|
281
|
+
`)])],-1),Xs=s("h3",{id:"update-multiple-items",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#update-multiple-items"},"#"),a(" Update Multiple Items")],-1),Zs=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"updateMany"),a("(["),s("span",{class:"hljs-number"},"15"),a(", "),s("span",{class:"hljs-number"},"42"),a(`], {
|
|
282
282
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'Both articles now have the same title'"),a(`,
|
|
283
283
|
});
|
|
284
|
-
`)])],-1),
|
|
284
|
+
`)])],-1),sa=s("p",null,"Supports optional query:",-1),aa=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"updateMany"),a(`(
|
|
285
285
|
[`),s("span",{class:"hljs-number"},"15"),a(", "),s("span",{class:"hljs-number"},"42"),a(`],
|
|
286
286
|
{
|
|
287
287
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'Both articles now have the same title'"),a(`,
|
|
@@ -290,12 +290,12 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
290
290
|
`),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'title'"),a(`],
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
|
-
`)])],-1),
|
|
293
|
+
`)])],-1),ta=s("h3",{id:"delete",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#delete"},"#"),a(" Delete")],-1),ea=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-comment"},"// One"),a(`
|
|
294
294
|
`),s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"deleteOne"),a("("),s("span",{class:"hljs-number"},"15"),a(`);
|
|
295
295
|
|
|
296
296
|
`),s("span",{class:"hljs-comment"},"// Multiple"),a(`
|
|
297
297
|
`),s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"deleteMany"),a("(["),s("span",{class:"hljs-number"},"15"),a(", "),s("span",{class:"hljs-number"},"42"),a(`]);
|
|
298
|
-
`)])],-1),
|
|
298
|
+
`)])],-1),na=s("h3",{id:"request-parameter-overrides",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#request-parameter-overrides"},"#"),a(" Request Parameter Overrides")],-1),la=s("p",null,[a("To override any of the axios request parameters, provide an additional parameter with a "),s("code",null,"requestOptions"),a(" object:")],-1),oa=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" articles."),s("span",{class:"hljs-title function_"},"createOne"),a(`(
|
|
299
299
|
{ `),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'example'"),a(` },
|
|
300
300
|
{ `),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'id'"),a(`] },
|
|
301
301
|
{
|
|
@@ -306,12 +306,12 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
306
306
|
},
|
|
307
307
|
}
|
|
308
308
|
);
|
|
309
|
-
`)])],-1),
|
|
310
|
-
`)])],-1),
|
|
311
|
-
`)])],-1),
|
|
312
|
-
`)])],-1),
|
|
313
|
-
`)])],-1),
|
|
314
|
-
`)])],-1),
|
|
309
|
+
`)])],-1),ca=s("h2",{id:"activity",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#activity"},"#"),a(" Activity")],-1),ia=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"activity"),a(`;
|
|
310
|
+
`)])],-1),ra=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_activity")'),a(".")],-1),ha=s("h2",{id:"comments",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#comments"},"#"),a(" Comments")],-1),pa=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"comments"),a(`;
|
|
311
|
+
`)])],-1),da=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_comments")'),a(".")],-1),ua=s("h2",{id:"collections",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#collections"},"#"),a(" Collections")],-1),ja=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"collections"),a(`;
|
|
312
|
+
`)])],-1),_a=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_collections")'),a(".")],-1),ma=s("h2",{id:"fields",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fields"},"#"),a(" Fields")],-1),ga=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"fields"),a(`;
|
|
313
|
+
`)])],-1),fa=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_fields")'),a(".")],-1),ya=s("h2",{id:"files",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#files"},"#"),a(" Files")],-1),wa=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"files"),a(`;
|
|
314
|
+
`)])],-1),ba=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_files")'),a(".")],-1),ka=s("h3",{id:"uploading-a-file",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#uploading-a-file"},"#"),a(" Uploading a file")],-1),va=s("p",null,[a("To upload a file you will need to send a "),s("code",null,"multipart/form-data"),a(" as body. On browser side you do so:")],-1),xa=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-comment"},"/* index.js */"),a(`
|
|
315
315
|
`),s("span",{class:"hljs-keyword"},"import"),a(" { "),s("span",{class:"hljs-title class_"},"Directus"),a(" } "),s("span",{class:"hljs-keyword"},"from"),a(),s("span",{class:"hljs-string"},"'https://unpkg.com/@directus/sdk@latest/dist/sdk.esm.min.js'"),a(`;
|
|
316
316
|
|
|
317
317
|
`),s("span",{class:"hljs-keyword"},"const"),a(" directus = "),s("span",{class:"hljs-keyword"},"new"),a(),s("span",{class:"hljs-title class_"},"Directus"),a("("),s("span",{class:"hljs-string"},"'http://localhost:8055'"),a(`, {
|
|
@@ -332,7 +332,7 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
332
332
|
`),s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"files"),a("."),s("span",{class:"hljs-title function_"},"createOne"),a(`(form);
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
|
-
`)])],-1),
|
|
335
|
+
`)])],-1),Sa=s("pre",null,[s("code",{class:"language-html"},[s("span",{class:"hljs-comment"},"<!-- index.html -->"),a(`
|
|
336
336
|
`),s("span",{class:"hljs-tag"},[a("<"),s("span",{class:"hljs-name"},"head"),a(">")]),s("span",{class:"hljs-tag"},[a("</"),s("span",{class:"hljs-name"},"head"),a(">")]),a(`
|
|
337
337
|
`),s("span",{class:"hljs-tag"},[a("<"),s("span",{class:"hljs-name"},"body"),a(">")]),a(`
|
|
338
338
|
`),s("span",{class:"hljs-tag"},[a("<"),s("span",{class:"hljs-name"},"form"),a(),s("span",{class:"hljs-attr"},"id"),a("="),s("span",{class:"hljs-string"},'"upload-file"'),a(">")]),a(`
|
|
@@ -343,7 +343,7 @@ me.`),s("span",{class:"hljs-property"},"experience"),a(" = "),s("span",{class:"h
|
|
|
343
343
|
`),s("span",{class:"hljs-tag"},[a("<"),s("span",{class:"hljs-name"},"script"),a(),s("span",{class:"hljs-attr"},"src"),a("="),s("span",{class:"hljs-string"},'"/index.js"'),a(),s("span",{class:"hljs-attr"},"type"),a("="),s("span",{class:"hljs-string"},'"module"'),a(">")]),s("span",{class:"hljs-tag"},[a("</"),s("span",{class:"hljs-name"},"script"),a(">")]),a(`
|
|
344
344
|
`),s("span",{class:"hljs-tag"},[a("</"),s("span",{class:"hljs-name"},"body"),a(">")]),a(`
|
|
345
345
|
`),s("span",{class:"hljs-tag"},[a("</"),s("span",{class:"hljs-name"},"html"),a(">")]),a(`
|
|
346
|
-
`)])],-1),
|
|
346
|
+
`)])],-1),Da=s("h4",{id:"nodejs-usage",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#nodejs-usage"},"#"),a(" NodeJS usage")],-1),Ta=s("p",null,"When uploading a file from a NodeJS environment, you\u2019ll have to override the headers to ensure the correct boundary is set:",-1),Ia=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),a(" { "),s("span",{class:"hljs-title class_"},"Directus"),a(" } "),s("span",{class:"hljs-keyword"},"from"),a(),s("span",{class:"hljs-string"},"'https://unpkg.com/@directus/sdk@latest/dist/sdk.esm.min.js'"),a(`;
|
|
347
347
|
|
|
348
348
|
`),s("span",{class:"hljs-keyword"},"const"),a(" directus = "),s("span",{class:"hljs-keyword"},"new"),a(),s("span",{class:"hljs-title class_"},"Directus"),a("("),s("span",{class:"hljs-string"},"'http://localhost:8055'"),a(`, {
|
|
349
349
|
`),s("span",{class:"hljs-attr"},"auth"),a(`: {
|
|
@@ -361,39 +361,39 @@ form.`),s("span",{class:"hljs-title function_"},"append"),a("("),s("span",{class
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
);
|
|
364
|
-
`)])],-1),
|
|
364
|
+
`)])],-1),Aa=s("h3",{id:"importing-a-file",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#importing-a-file"},"#"),a(" Importing a file")],-1),qa=a("Example of "),Ra=a("importing a file from a URL"),Ba=a(":"),Ma=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"files"),a("."),s("span",{class:"hljs-title function_"},"import"),a(`({
|
|
365
365
|
`),s("span",{class:"hljs-attr"},"url"),a(": "),s("span",{class:"hljs-string"},"'http://www.example.com/example-image.jpg'"),a(`,
|
|
366
366
|
});
|
|
367
|
-
`)])],-1),
|
|
367
|
+
`)])],-1),Oa=s("p",null,"Example of importing file with custom data:",-1),Ca=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"files"),a("."),s("span",{class:"hljs-title function_"},"import"),a(`({
|
|
368
368
|
`),s("span",{class:"hljs-attr"},"url"),a(": "),s("span",{class:"hljs-string"},"'http://www.example.com/example-image.jpg'"),a(`,
|
|
369
369
|
`),s("span",{class:"hljs-attr"},"data"),a(`: {
|
|
370
370
|
`),s("span",{class:"hljs-attr"},"title"),a(": "),s("span",{class:"hljs-string"},"'My Custom File'"),a(`,
|
|
371
371
|
},
|
|
372
372
|
});
|
|
373
|
-
`)])],-1),
|
|
374
|
-
`)])],-1),
|
|
375
|
-
`)])],-1),
|
|
376
|
-
`)])],-1),
|
|
377
|
-
`)])],-1),
|
|
378
|
-
`)])],-1),
|
|
379
|
-
`)])],-1),
|
|
380
|
-
`)])],-1),
|
|
381
|
-
`)])],-1),
|
|
382
|
-
`)])],-1),
|
|
383
|
-
`)])],-1),
|
|
384
|
-
`)])],-1),
|
|
385
|
-
`)])],-1),
|
|
386
|
-
`)])],-1),
|
|
387
|
-
`)])],-1),
|
|
388
|
-
`)])],-1),
|
|
373
|
+
`)])],-1),Pa=s("h2",{id:"folders",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#folders"},"#"),a(" Folders")],-1),Ea=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"folders"),a(`;
|
|
374
|
+
`)])],-1),Na=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_folders")'),a(".")],-1),Ua=s("h2",{id:"permissions",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#permissions"},"#"),a(" Permissions")],-1),Ka=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"permissions"),a(`;
|
|
375
|
+
`)])],-1),Fa=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_permissions")'),a(".")],-1),La=s("h2",{id:"presets",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#presets"},"#"),a(" Presets")],-1),Ja=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"presets"),a(`;
|
|
376
|
+
`)])],-1),Wa=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_presets")'),a(".")],-1),Ha=s("h2",{id:"relations",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#relations"},"#"),a(" Relations")],-1),Va=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"relations"),a(`;
|
|
377
|
+
`)])],-1),za=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_relations")'),a(".")],-1),Ga=s("h2",{id:"revisions",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#revisions"},"#"),a(" Revisions")],-1),Ya=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"revisions"),a(`;
|
|
378
|
+
`)])],-1),Qa=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_revisions")'),a(".")],-1),$a=s("h2",{id:"roles",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#roles"},"#"),a(" Roles")],-1),Xa=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"roles"),a(`;
|
|
379
|
+
`)])],-1),Za=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_roles")'),a(".")],-1),st=s("h2",{id:"settings",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#settings"},"#"),a(" Settings")],-1),at=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"settings"),a(`;
|
|
380
|
+
`)])],-1),tt=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_settings")'),a(".")],-1),et=s("h2",{id:"server",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#server"},"#"),a(" Server")],-1),nt=s("h3",{id:"ping-the-server",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#ping-the-server"},"#"),a(" Ping the Server")],-1),lt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"server"),a("."),s("span",{class:"hljs-title function_"},"ping"),a(`();
|
|
381
|
+
`)])],-1),ot=s("h3",{id:"get-server%2Fproject-info",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#get-server%2Fproject-info"},"#"),a(" Get Server/Project Info")],-1),ct=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"server"),a("."),s("span",{class:"hljs-title function_"},"info"),a(`();
|
|
382
|
+
`)])],-1),it=s("h2",{id:"users",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#users"},"#"),a(" Users")],-1),rt=s("pre",null,[s("code",{class:"language-js"},[a("directus."),s("span",{class:"hljs-property"},"users"),a(`;
|
|
383
|
+
`)])],-1),ht=s("p",null,[a("Same methods as "),s("code",null,'directus.items("directus_users")'),a(", and:")],-1),pt=s("h3",{id:"invite-a-new-user",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#invite-a-new-user"},"#"),a(" Invite a New User")],-1),dt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"invites"),a("."),s("span",{class:"hljs-title function_"},"send"),a("("),s("span",{class:"hljs-string"},"'admin@example.com'"),a(", "),s("span",{class:"hljs-string"},"'fe38136e-52f7-4622-8498-112b8a32a1e2'"),a(`);
|
|
384
|
+
`)])],-1),ut=s("p",null,"The second parameter is the role of the user",-1),jt=s("h3",{id:"accept-a-user-invite",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#accept-a-user-invite"},"#"),a(" Accept a User Invite")],-1),_t=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"invites"),a("."),s("span",{class:"hljs-title function_"},"accept"),a("("),s("span",{class:"hljs-string"},"'<accept-token>'"),a(", "),s("span",{class:"hljs-string"},"'n3w-p455w0rd'"),a(`);
|
|
385
|
+
`)])],-1),mt=s("p",null,"The provided token is sent to the user\u2019s email",-1),gt=s("h3",{id:"enable-two-factor-authentication",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#enable-two-factor-authentication"},"#"),a(" Enable Two-Factor Authentication")],-1),ft=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"tfa"),a("."),s("span",{class:"hljs-title function_"},"enable"),a("("),s("span",{class:"hljs-string"},"'my-password'"),a(`);
|
|
386
|
+
`)])],-1),yt=s("h3",{id:"disable-two-factor-authentication",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#disable-two-factor-authentication"},"#"),a(" Disable Two-Factor Authentication")],-1),wt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"tfa"),a("."),s("span",{class:"hljs-title function_"},"disable"),a("("),s("span",{class:"hljs-string"},"'691402'"),a(`);
|
|
387
|
+
`)])],-1),bt=s("h3",{id:"get-the-current-user",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#get-the-current-user"},"#"),a(" Get the Current User")],-1),kt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"me"),a("."),s("span",{class:"hljs-title function_"},"read"),a(`();
|
|
388
|
+
`)])],-1),vt=s("p",null,"Supports optional query:",-1),xt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"me"),a("."),s("span",{class:"hljs-title function_"},"read"),a(`({
|
|
389
389
|
`),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'last_access'"),a(`],
|
|
390
390
|
});
|
|
391
|
-
`)])],-1),
|
|
392
|
-
`)])],-1),
|
|
393
|
-
`)])],-1),
|
|
394
|
-
`)])],-1),
|
|
395
|
-
`)])],-1),
|
|
396
|
-
`)])],-1),
|
|
397
|
-
`)])],-1),
|
|
398
|
-
`)])],-1),
|
|
399
|
-
`)])],-1),
|
|
391
|
+
`)])],-1),St=s("h3",{id:"update-the-current-users",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#update-the-current-users"},"#"),a(" Update the Current Users")],-1),Dt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"me"),a("."),s("span",{class:"hljs-title function_"},"update"),a("({ "),s("span",{class:"hljs-attr"},"first_name"),a(": "),s("span",{class:"hljs-string"},"'Admin'"),a(` });
|
|
392
|
+
`)])],-1),Tt=s("p",null,"Supports optional query:",-1),It=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"users"),a("."),s("span",{class:"hljs-property"},"me"),a("."),s("span",{class:"hljs-title function_"},"update"),a("({ "),s("span",{class:"hljs-attr"},"first_name"),a(": "),s("span",{class:"hljs-string"},"'Admin'"),a(" }, { "),s("span",{class:"hljs-attr"},"fields"),a(": ["),s("span",{class:"hljs-string"},"'last_access'"),a(`] });
|
|
393
|
+
`)])],-1),At=s("h2",{id:"utils",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#utils"},"#"),a(" Utils")],-1),qt=s("h3",{id:"get-a-random-string",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#get-a-random-string"},"#"),a(" Get a Random String")],-1),Rt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"utils"),a("."),s("span",{class:"hljs-property"},"random"),a("."),s("span",{class:"hljs-title function_"},"string"),a(`();
|
|
394
|
+
`)])],-1),Bt=s("p",null,[a("Supports an optional "),s("code",null,"length"),a(" (defaults to 32):")],-1),Mt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"utils"),a("."),s("span",{class:"hljs-property"},"random"),a("."),s("span",{class:"hljs-title function_"},"string"),a("("),s("span",{class:"hljs-number"},"50"),a(`);
|
|
395
|
+
`)])],-1),Ot=s("h3",{id:"generate-a-hash-for-a-given-value",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#generate-a-hash-for-a-given-value"},"#"),a(" Generate a Hash for a Given Value")],-1),Ct=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"utils"),a("."),s("span",{class:"hljs-property"},"hash"),a("."),s("span",{class:"hljs-title function_"},"generate"),a("("),s("span",{class:"hljs-string"},"'My String'"),a(`);
|
|
396
|
+
`)])],-1),Pt=s("h3",{id:"verify-if-a-hash-is-valid",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#verify-if-a-hash-is-valid"},"#"),a(" Verify if a Hash is Valid")],-1),Et=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"utils"),a("."),s("span",{class:"hljs-property"},"hash"),a("."),s("span",{class:"hljs-title function_"},"verify"),a("("),s("span",{class:"hljs-string"},"'My String'"),a(", "),s("span",{class:"hljs-string"},"'$argon2i$v=19$m=4096,t=3,p=1$A5uogJh'"),a(`);
|
|
397
|
+
`)])],-1),Nt=s("h3",{id:"sort-items-in-a-collection",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#sort-items-in-a-collection"},"#"),a(" Sort Items in a Collection")],-1),Ut=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"utils"),a("."),s("span",{class:"hljs-title function_"},"sort"),a("("),s("span",{class:"hljs-string"},"'articles'"),a(", "),s("span",{class:"hljs-number"},"15"),a(", "),s("span",{class:"hljs-number"},"42"),a(`);
|
|
398
|
+
`)])],-1),Kt=s("p",null,[a("This will move item "),s("code",null,"15"),a(" to the position of item "),s("code",null,"42"),a(", and move everything in between one \u201Cslot\u201D up.")],-1),Ft=s("h3",{id:"revert-to-a-previous-revision",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#revert-to-a-previous-revision"},"#"),a(" Revert to a Previous Revision")],-1),Lt=s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),a(" directus."),s("span",{class:"hljs-property"},"utils"),a("."),s("span",{class:"hljs-title function_"},"revert"),a("("),s("span",{class:"hljs-number"},"451"),a(`);
|
|
399
|
+
`)])],-1),Jt=s("p",null,"Note: The key passed is the primary key of the revision you\u2019d like to apply.",-1),Wt=s("hr",null,null,-1),Yt="JavaScript SDK",Qt=!1,$t="The JS SDK provides an intuitive interface for the Directus API from within a JavaScript-powered project (browsers and Node.js). The default implementation uses [Axios](https://npmjs.com/axios) for transport and `localStorage` for storing state.",Xt="14 min read",Zt={name:"sdk",setup(Ht,{expose:c}){const e={title:"JavaScript SDK",modularExtension:!1,description:"The JS SDK provides an intuitive interface for the Directus API from within a JavaScript-powered project (browsers and Node.js). The default implementation uses [Axios](https://npmjs.com/axios) for transport and `localStorage` for storing state.",readTime:"14 min read"};return c({frontmatter:e}),(Vt,zt)=>{const n=l("router-link"),i=l("docs-wrapper");return r(),h(i,{frontmatter:e},{default:t(()=>[s("div",p,[d,u,j,_,m,g,f,y,w,b,k,v,x,S,D,T,I,A,q,R,B,M,O,C,P,E,N,U,K,F,L,J,W,H,V,s("div",z,[G,s("p",null,[Y,o(n,{to:"/docs/self-hosted/config-options#security"},{default:t(()=>[Q]),_:1}),$])]),X,Z,ss,as,ts,es,ns,ls,os,cs,is,rs,hs,ps,ds,us,js,_s,ms,gs,fs,ys,ws,bs,ks,vs,xs,Ss,Ds,Ts,Is,As,qs,Rs,Bs,Ms,Os,Cs,Ps,Es,Ns,Us,Ks,Fs,Ls,Js,Ws,Hs,Vs,zs,Gs,Ys,Qs,$s,Xs,Zs,sa,aa,ta,ea,na,la,oa,ca,ia,ra,ha,pa,da,ua,ja,_a,ma,ga,fa,ya,wa,ba,ka,va,xa,Sa,Da,Ta,Ia,Aa,s("p",null,[qa,o(n,{to:"/docs/reference/files#import-a-file"},{default:t(()=>[Ra]),_:1}),Ba]),Ma,Oa,Ca,Pa,Ea,Na,Ua,Ka,Fa,La,Ja,Wa,Ha,Va,za,Ga,Ya,Qa,$a,Xa,Za,st,at,tt,et,nt,lt,ot,ct,it,rt,ht,pt,dt,ut,jt,_t,mt,gt,ft,yt,wt,bt,kt,vt,xt,St,Dt,Tt,It,At,qt,Rt,Bt,Mt,Ot,Ct,Pt,Et,Nt,Ut,Kt,Ft,Lt,Jt,Wt])]),_:1})}}};export{Zt as default,$t as description,Qt as modularExtension,Xt as readTime,Yt as title};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as E}from"./index.
|
|
1
|
+
import{y as E}from"./index.dfa694ae.entry.js";function O(h,a){return a.forEach(function(o){o&&typeof o!="string"&&!Array.isArray(o)&&Object.keys(o).forEach(function(f){if(f!=="default"&&!(f in h)){var c=Object.getOwnPropertyDescriptor(o,f);Object.defineProperty(h,f,c.get?c:{enumerable:!0,get:function(){return o[f]}})}})}),Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(h,a){(function(o){o(E.exports)})(function(o){o.defineMode("shell",function(){var f={};function c(e,n){for(var r=0;r<n.length;r++)f[n[r]]=e}var k=["true","false"],d=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],g=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];o.registerHelper("hintWords","shell",k.concat(d,g)),c("atom",k),c("keyword",d),c("builtin",g);function b(e,n){if(e.eatSpace())return null;var r=e.sol(),t=e.next();if(t==="\\")return e.next(),null;if(t==="'"||t==='"'||t==="`")return n.tokens.unshift(p(t,t==="`"?"quote":"string")),s(e,n);if(t==="#")return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if(t==="$")return n.tokens.unshift(v),s(e,n);if(t==="+"||t==="=")return"operator";if(t==="-")return e.eat("-"),e.eatWhile(/\w/),"attribute";if(t=="<"){if(e.match("<<"))return"operator";var u=e.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(u)return n.tokens.unshift(y(u[1])),"string-2"}if(/\d/.test(t)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var i=e.current();return e.peek()==="="&&/\w+/.test(i)?"def":f.hasOwnProperty(i)?f[i]:null}function p(e,n){var r=e=="("?")":e=="{"?"}":e;return function(t,u){for(var i,l=!1;(i=t.next())!=null;){if(i===r&&!l){u.tokens.shift();break}else if(i==="$"&&!l&&e!=="'"&&t.peek()!=r){l=!0,t.backUp(1),u.tokens.unshift(v);break}else{if(!l&&e!==r&&i===e)return u.tokens.unshift(p(e,n)),s(t,u);if(!l&&/['"]/.test(i)&&!/['"]/.test(e)){u.tokens.unshift(x(i,"string")),t.backUp(1);break}}l=!l&&i==="\\"}return n}}function x(e,n){return function(r,t){return t.tokens[0]=p(e,n),r.next(),s(r,t)}}var v=function(e,n){n.tokens.length>1&&e.eat("$");var r=e.next();return/['"({]/.test(r)?(n.tokens[0]=p(r,r=="("?"quote":r=="{"?"def":"string"),s(e,n)):(/\d/.test(r)||e.eatWhile(/\w/),n.tokens.shift(),"def")};function y(e){return function(n,r){return n.sol()&&n.string==e&&r.tokens.shift(),n.skipToEnd(),"string-2"}}function s(e,n){return(n.tokens[0]||b)(e,n)}return{startState:function(){return{tokens:[]}},token:function(e,n){return s(e,n)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),o.defineMIME("text/x-sh","shell"),o.defineMIME("application/x-sh","shell")})})();var S=w.exports,j=O({__proto__:null,default:S},[w.exports]);export{j as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as ot}from"./index.1b249d21.entry.js";function rt(A,L){return L.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(v){if(v!=="default"&&!(v in A)){var y=Object.getOwnPropertyDescriptor(r,v);Object.defineProperty(A,v,y.get?y:{enumerable:!0,get:function(){return r[v]}})}})}),Object.freeze(Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}))}var X={exports:{}};(function(A,L){(function(r){r(ot.exports)})(function(r){var v="CodeMirror-hint",y="CodeMirror-hint-active";r.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var s in i)n[s]=i[s];return t.showHint(n)},r.defineExtension("showHint",function(t){t=Q(this,this.getCursor("start"),t);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<e.length;i++)if(e[i].head.line!=e[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new P(this,t);!n.options.hint||(r.signal(this,"startCompletion",this),n.update(!0))}}),r.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function P(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}var G=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},J=window.cancelAnimationFrame||clearTimeout;P.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&r.signal(this.data,"close"),this.widget&&this.widget.close(),r.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,e){var i=t.list[e],n=this;this.cm.operation(function(){i.hint?i.hint(n.cm,t,i):n.cm.replaceRange(R(i),i.from||t.from,i.to||t.to,"complete"),r.signal(t,"pick",i),n.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(J(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=G(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(t){if(this.tick!=null){var e=this,i=++this.tick;K(this.options.hint,this.cm,this.options,function(n){e.tick==i&&e.finishUpdate(n,t)})}},finishUpdate:function(t,e){this.data&&r.signal(this.data,"update");var i=this.widget&&this.widget.picked||e&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(i&&t.list.length==1?this.pick(t,0):(this.widget=new B(this,t),r.signal(t,"shown")))}};function Q(t,e,i){var n=t.options.hintOptions,s={};for(var c in U)s[c]=U[c];if(n)for(var c in n)n[c]!==void 0&&(s[c]=n[c]);if(i)for(var c in i)i[c]!==void 0&&(s[c]=i[c]);return s.hint.resolve&&(s.hint=s.hint.resolve(t,e)),s}function R(t){return typeof t=="string"?t:t.text}function Z(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(-e.menuSize()+1,!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close},n=/Mac/.test(navigator.platform);n&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var s=t.options.customKeys,c=s?{}:i;function o(u,l){var h;typeof l!="string"?h=function(w){return l(w,e)}:i.hasOwnProperty(l)?h=i[l]:h=l,c[u]=h}if(s)for(var f in s)s.hasOwnProperty(f)&&o(f,s[f]);var a=t.options.extraKeys;if(a)for(var f in a)a.hasOwnProperty(f)&&o(f,a[f]);return c}function _(t,e){for(;e&&e!=t;){if(e.nodeName.toUpperCase()==="LI"&&e.parentNode==t)return e;e=e.parentNode}}function B(t,e){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=e,this.picked=!1;var i=this,n=t.cm,s=n.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,o=this.hints=s.createElement("ul");o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.id=this.id;var f=t.cm.options.theme;o.className="CodeMirror-hints "+f,this.selectedHint=e.selectedHint||0;for(var a=e.list,u=0;u<a.length;++u){var l=o.appendChild(s.createElement("li")),h=a[u],w=v+(u!=this.selectedHint?"":" "+y);h.className!=null&&(w=h.className+" "+w),l.className=w,u==this.selectedHint&&l.setAttribute("aria-selected","true"),l.id=this.id+"-"+u,l.setAttribute("role","option"),h.render?h.render(l,e,h):l.appendChild(s.createTextNode(h.displayText||R(h))),l.hintId=u}var H=t.options.container||s.body,m=n.cursorCoords(t.options.alignWithWord?e.from:null),S=m.left,x=m.bottom,D=!0,T=0,O=0;if(H!==s.body){var it=["absolute","relative","fixed"].indexOf(c.getComputedStyle(H).position)!==-1,N=it?H:H.offsetParent,j=N.getBoundingClientRect(),M=s.body.getBoundingClientRect();T=j.left-M.left-N.scrollLeft,O=j.top-M.top-N.scrollTop}o.style.left=S-T+"px",o.style.top=x-O+"px";var k=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),I=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);H.appendChild(o),n.getInputField().setAttribute("aria-autocomplete","list"),n.getInputField().setAttribute("aria-owns",this.id),n.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var g=t.options.moveOnOverlap?o.getBoundingClientRect():new DOMRect,z=t.options.paddingForScrollbar?o.scrollHeight>o.clientHeight+1:!1,b;setTimeout(function(){b=n.getScrollInfo()});var nt=g.bottom-I;if(nt>0){var C=g.bottom-g.top,st=m.top-(m.bottom-g.top);if(st-C>0)o.style.top=(x=m.top-C-O)+"px",D=!1;else if(C>I){o.style.height=I-5+"px",o.style.top=(x=m.bottom-g.top-O)+"px";var V=n.getCursor();e.from.ch!=V.ch&&(m=n.cursorCoords(V),o.style.left=(S=m.left-T)+"px",g=o.getBoundingClientRect())}}var F=g.right-k;if(z&&(F+=n.display.nativeBarWidth),F>0&&(g.right-g.left>k&&(o.style.width=k-5+"px",F-=g.right-g.left-k),o.style.left=(S=m.left-F-T)+"px"),z)for(var E=o.firstChild;E;E=E.nextSibling)E.style.paddingRight=n.display.nativeBarWidth+"px";if(n.addKeyMap(this.keyMap=Z(t,{moveFocus:function(p,d){i.changeActive(i.selectedHint+p,d)},setFocus:function(p){i.changeActive(p)},menuSize:function(){return i.screenAmount()},length:a.length,close:function(){t.close()},pick:function(){i.pick()},data:e})),t.options.closeOnUnfocus){var q;n.on("blur",this.onBlur=function(){q=setTimeout(function(){t.close()},100)}),n.on("focus",this.onFocus=function(){clearTimeout(q)})}n.on("scroll",this.onScroll=function(){var p=n.getScrollInfo(),d=n.getWrapperElement().getBoundingClientRect();b||(b=n.getScrollInfo());var $=x+b.top-p.top,W=$-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(D||(W+=o.offsetHeight),W<=d.top||W>=d.bottom)return t.close();o.style.top=$+"px",o.style.left=S+b.left-p.left+"px"}),r.on(o,"dblclick",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),i.pick())}),r.on(o,"click",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),t.options.completeOnSingleClick&&i.pick())}),r.on(o,"mousedown",function(){setTimeout(function(){n.focus()},20)});var Y=this.getSelectedHintRange();return(Y.from!==0||Y.to!==0)&&this.scrollToActive(),r.signal(e,"select",a[this.selectedHint],o.childNodes[this.selectedHint]),!0}B.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,e){if(t>=this.data.list.length?t=e?this.data.list.length-1:0:t<0&&(t=e?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+y,""),i.removeAttribute("aria-selected")),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+y,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),r.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}};function tt(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function K(t,e,i,n){if(t.async)t(e,n,i);else{var s=t(e,i);s&&s.then?s.then(n):n(s)}}function et(t,e){var i=t.getHelpers(e,"hint"),n;if(i.length){var s=function(c,o,f){var a=tt(c,i);function u(l){if(l==a.length)return o(null);K(a[l],c,f,function(h){h&&h.list.length>0?o(h):u(l+1)})}u(0)};return s.async=!0,s.supportsSelection=!0,s}else return(n=t.getHelper(t.getCursor(),"hintWords"))?function(c){return r.hint.fromList(c,{words:n})}:r.hint.anyword?function(c,o){return r.hint.anyword(c,o)}:function(){}}r.registerHelper("hint","auto",{resolve:et}),r.registerHelper("hint","fromList",function(t,e){var i=t.getCursor(),n=t.getTokenAt(i),s,c=r.Pos(i.line,n.start),o=i;n.start<i.ch&&/\w/.test(n.string.charAt(i.ch-n.start-1))?s=n.string.substr(0,i.ch-n.start):(s="",c=i);for(var f=[],a=0;a<e.words.length;a++){var u=e.words[a];u.slice(0,s.length)==s&&f.push(u)}if(f.length)return{list:f,from:c,to:o}}),r.commands.autocomplete=r.showHint;var U={hint:r.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};r.defineOption("hintOptions",null)})})();var ct=X.exports,at=rt({__proto__:null,default:ct},[X.exports]);export{at as s};
|
|
1
|
+
import{y as ot}from"./index.dfa694ae.entry.js";function rt(A,L){return L.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(v){if(v!=="default"&&!(v in A)){var y=Object.getOwnPropertyDescriptor(r,v);Object.defineProperty(A,v,y.get?y:{enumerable:!0,get:function(){return r[v]}})}})}),Object.freeze(Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}))}var X={exports:{}};(function(A,L){(function(r){r(ot.exports)})(function(r){var v="CodeMirror-hint",y="CodeMirror-hint-active";r.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var s in i)n[s]=i[s];return t.showHint(n)},r.defineExtension("showHint",function(t){t=Q(this,this.getCursor("start"),t);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<e.length;i++)if(e[i].head.line!=e[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new P(this,t);!n.options.hint||(r.signal(this,"startCompletion",this),n.update(!0))}}),r.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function P(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}var G=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},J=window.cancelAnimationFrame||clearTimeout;P.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&r.signal(this.data,"close"),this.widget&&this.widget.close(),r.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,e){var i=t.list[e],n=this;this.cm.operation(function(){i.hint?i.hint(n.cm,t,i):n.cm.replaceRange(R(i),i.from||t.from,i.to||t.to,"complete"),r.signal(t,"pick",i),n.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(J(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=G(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(t){if(this.tick!=null){var e=this,i=++this.tick;K(this.options.hint,this.cm,this.options,function(n){e.tick==i&&e.finishUpdate(n,t)})}},finishUpdate:function(t,e){this.data&&r.signal(this.data,"update");var i=this.widget&&this.widget.picked||e&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(i&&t.list.length==1?this.pick(t,0):(this.widget=new B(this,t),r.signal(t,"shown")))}};function Q(t,e,i){var n=t.options.hintOptions,s={};for(var c in U)s[c]=U[c];if(n)for(var c in n)n[c]!==void 0&&(s[c]=n[c]);if(i)for(var c in i)i[c]!==void 0&&(s[c]=i[c]);return s.hint.resolve&&(s.hint=s.hint.resolve(t,e)),s}function R(t){return typeof t=="string"?t:t.text}function Z(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(-e.menuSize()+1,!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close},n=/Mac/.test(navigator.platform);n&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var s=t.options.customKeys,c=s?{}:i;function o(u,l){var h;typeof l!="string"?h=function(w){return l(w,e)}:i.hasOwnProperty(l)?h=i[l]:h=l,c[u]=h}if(s)for(var f in s)s.hasOwnProperty(f)&&o(f,s[f]);var a=t.options.extraKeys;if(a)for(var f in a)a.hasOwnProperty(f)&&o(f,a[f]);return c}function _(t,e){for(;e&&e!=t;){if(e.nodeName.toUpperCase()==="LI"&&e.parentNode==t)return e;e=e.parentNode}}function B(t,e){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=e,this.picked=!1;var i=this,n=t.cm,s=n.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,o=this.hints=s.createElement("ul");o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.id=this.id;var f=t.cm.options.theme;o.className="CodeMirror-hints "+f,this.selectedHint=e.selectedHint||0;for(var a=e.list,u=0;u<a.length;++u){var l=o.appendChild(s.createElement("li")),h=a[u],w=v+(u!=this.selectedHint?"":" "+y);h.className!=null&&(w=h.className+" "+w),l.className=w,u==this.selectedHint&&l.setAttribute("aria-selected","true"),l.id=this.id+"-"+u,l.setAttribute("role","option"),h.render?h.render(l,e,h):l.appendChild(s.createTextNode(h.displayText||R(h))),l.hintId=u}var H=t.options.container||s.body,m=n.cursorCoords(t.options.alignWithWord?e.from:null),S=m.left,x=m.bottom,D=!0,T=0,O=0;if(H!==s.body){var it=["absolute","relative","fixed"].indexOf(c.getComputedStyle(H).position)!==-1,N=it?H:H.offsetParent,j=N.getBoundingClientRect(),M=s.body.getBoundingClientRect();T=j.left-M.left-N.scrollLeft,O=j.top-M.top-N.scrollTop}o.style.left=S-T+"px",o.style.top=x-O+"px";var k=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),I=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);H.appendChild(o),n.getInputField().setAttribute("aria-autocomplete","list"),n.getInputField().setAttribute("aria-owns",this.id),n.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var g=t.options.moveOnOverlap?o.getBoundingClientRect():new DOMRect,z=t.options.paddingForScrollbar?o.scrollHeight>o.clientHeight+1:!1,b;setTimeout(function(){b=n.getScrollInfo()});var nt=g.bottom-I;if(nt>0){var C=g.bottom-g.top,st=m.top-(m.bottom-g.top);if(st-C>0)o.style.top=(x=m.top-C-O)+"px",D=!1;else if(C>I){o.style.height=I-5+"px",o.style.top=(x=m.bottom-g.top-O)+"px";var V=n.getCursor();e.from.ch!=V.ch&&(m=n.cursorCoords(V),o.style.left=(S=m.left-T)+"px",g=o.getBoundingClientRect())}}var F=g.right-k;if(z&&(F+=n.display.nativeBarWidth),F>0&&(g.right-g.left>k&&(o.style.width=k-5+"px",F-=g.right-g.left-k),o.style.left=(S=m.left-F-T)+"px"),z)for(var E=o.firstChild;E;E=E.nextSibling)E.style.paddingRight=n.display.nativeBarWidth+"px";if(n.addKeyMap(this.keyMap=Z(t,{moveFocus:function(p,d){i.changeActive(i.selectedHint+p,d)},setFocus:function(p){i.changeActive(p)},menuSize:function(){return i.screenAmount()},length:a.length,close:function(){t.close()},pick:function(){i.pick()},data:e})),t.options.closeOnUnfocus){var q;n.on("blur",this.onBlur=function(){q=setTimeout(function(){t.close()},100)}),n.on("focus",this.onFocus=function(){clearTimeout(q)})}n.on("scroll",this.onScroll=function(){var p=n.getScrollInfo(),d=n.getWrapperElement().getBoundingClientRect();b||(b=n.getScrollInfo());var $=x+b.top-p.top,W=$-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(D||(W+=o.offsetHeight),W<=d.top||W>=d.bottom)return t.close();o.style.top=$+"px",o.style.left=S+b.left-p.left+"px"}),r.on(o,"dblclick",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),i.pick())}),r.on(o,"click",function(p){var d=_(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),t.options.completeOnSingleClick&&i.pick())}),r.on(o,"mousedown",function(){setTimeout(function(){n.focus()},20)});var Y=this.getSelectedHintRange();return(Y.from!==0||Y.to!==0)&&this.scrollToActive(),r.signal(e,"select",a[this.selectedHint],o.childNodes[this.selectedHint]),!0}B.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,e){if(t>=this.data.list.length?t=e?this.data.list.length-1:0:t<0&&(t=e?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+y,""),i.removeAttribute("aria-selected")),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+y,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),r.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}};function tt(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function K(t,e,i,n){if(t.async)t(e,n,i);else{var s=t(e,i);s&&s.then?s.then(n):n(s)}}function et(t,e){var i=t.getHelpers(e,"hint"),n;if(i.length){var s=function(c,o,f){var a=tt(c,i);function u(l){if(l==a.length)return o(null);K(a[l],c,f,function(h){h&&h.list.length>0?o(h):u(l+1)})}u(0)};return s.async=!0,s.supportsSelection=!0,s}else return(n=t.getHelper(t.getCursor(),"hintWords"))?function(c){return r.hint.fromList(c,{words:n})}:r.hint.anyword?function(c,o){return r.hint.anyword(c,o)}:function(){}}r.registerHelper("hint","auto",{resolve:et}),r.registerHelper("hint","fromList",function(t,e){var i=t.getCursor(),n=t.getTokenAt(i),s,c=r.Pos(i.line,n.start),o=i;n.start<i.ch&&/\w/.test(n.string.charAt(i.ch-n.start-1))?s=n.string.substr(0,i.ch-n.start):(s="",c=i);for(var f=[],a=0;a<e.words.length;a++){var u=e.words[a];u.slice(0,s.length)==s&&f.push(u)}if(f.length)return{list:f,from:c,to:o}}),r.commands.autocomplete=r.showHint;var U={hint:r.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};r.defineOption("hintOptions",null)})})();var ct=X.exports,at=rt({__proto__:null,default:ct},[X.exports]);export{at as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as _}from"./index.
|
|
1
|
+
import{y as _}from"./index.dfa694ae.entry.js";function b(l,p){return p.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(o){if(o!=="default"&&!(o in l)){var u=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(l,o,u.get?u:{enumerable:!0,get:function(){return t[o]}})}})}),Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}var a={exports:{}};(function(l,p){(function(t){t(_.exports)})(function(t){t.defineMode("sieve",function(o){function u(n){for(var e={},r=n.split(" "),i=0;i<r.length;++i)e[r[i]]=!0;return e}var v=u("if elsif else stop require"),k=u("true false not"),s=o.indentUnit;function f(n,e){var r=n.next();if(r=="/"&&n.eat("*"))return e.tokenize=d,d(n,e);if(r==="#")return n.skipToEnd(),"comment";if(r=='"')return e.tokenize=h(r),e.tokenize(n,e);if(r=="(")return e._indent.push("("),e._indent.push("{"),null;if(r==="{")return e._indent.push("{"),null;if(r==")"&&(e._indent.pop(),e._indent.pop()),r==="}")return e._indent.pop(),null;if(r==","||r==";"||/[{}\(\),;]/.test(r))return null;if(/\d/.test(r))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(r==":")return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var i=n.current();return i=="text"&&n.eat(":")?(e.tokenize=g,"string"):v.propertyIsEnumerable(i)?"keyword":k.propertyIsEnumerable(i)?"atom":null}function g(n,e){return e._multiLineString=!0,n.sol()?(n.next()=="."&&n.eol()&&(e._multiLineString=!1,e.tokenize=f),"string"):(n.eatSpace(),n.peek()=="#"?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function d(n,e){for(var r=!1,i;(i=n.next())!=null;){if(r&&i=="/"){e.tokenize=f;break}r=i=="*"}return"comment"}function h(n){return function(e,r){for(var i=!1,c;(c=e.next())!=null&&!(c==n&&!i);)i=!i&&c=="\\";return i||(r.tokenize=f),"string"}}return{startState:function(n){return{tokenize:f,baseIndent:n||0,_indent:[]}},token:function(n,e){return n.eatSpace()?null:(e.tokenize||f)(n,e)},indent:function(n,e){var r=n._indent.length;return e&&e[0]=="}"&&r--,r<0&&(r=0),r*s},electricChars:"}"}}),t.defineMIME("application/sieve","sieve")})})();var y=a.exports,x=b({__proto__:null,default:y},[a.exports]);export{x as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as pn}from"./index.
|
|
1
|
+
import{y as pn}from"./index.dfa694ae.entry.js";import{a as an}from"./htmlmixed.200b6fde.js";import{a as xn}from"./ruby.bfb78149.js";function zn(h,L){return L.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(l){if(l!=="default"&&!(l in h)){var d=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(h,l,d.get?d:{enumerable:!0,get:function(){return t[l]}})}})}),Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var s={exports:{}};(function(h,L){(function(t){t(pn.exports,an.exports,xn.exports)})(function(t){t.defineMode("slim",function(l){var d=t.getMode(l,{name:"htmlmixed"}),p=t.getMode(l,"ruby"),g={html:d,ruby:p},R={ruby:"ruby",javascript:"javascript",css:"text/css",sass:"text/x-sass",scss:"text/x-scss",less:"text/x-less",styl:"text/x-styl",coffee:"coffeescript",asciidoc:"text/x-asciidoc",markdown:"text/x-markdown",textile:"text/x-textile",creole:"text/x-creole",wiki:"text/x-wiki",mediawiki:"text/x-mediawiki",rdoc:"text/x-rdoc",builder:"text/x-builder",nokogiri:"text/x-nokogiri",erb:"application/x-erb"},C=function(n){var e=[];for(var i in n)e.push(i);return new RegExp("^("+e.join("|")+"):")}(R),D={commentLine:"comment",slimSwitch:"operator special",slimTag:"tag",slimId:"attribute def",slimClass:"attribute qualifier",slimAttribute:"attribute",slimSubmode:"keyword special",closeAttributeTag:null,slimDoctype:null,lineContinuation:null},N={"{":"}","[":"]","(":")"},y="_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",m=y+"\\-0-9\xB7\u0300-\u036F\u203F-\u2040",Q=new RegExp("^[:"+y+"](?::["+m+"]|["+m+"]*)"),V=new RegExp("^[:"+y+"][:\\."+m+"]*(?=\\s*=)"),W=new RegExp("^[:"+y+"][:\\."+m+"]*"),Z=/^\.-?[_a-zA-Z]+[\w\-]*/,q=/^#[_a-zA-Z]+[\w\-]*/;function B(n,e,i){var u=function(r,o){return o.tokenize=e,r.pos<n?(r.pos=n,i):o.tokenize(r,o)};return function(r,o){return o.tokenize=u,e(r,o)}}function H(n,e,i,u,r){var o=n.current(),c=o.search(i);return c>-1&&(e.tokenize=B(n.pos,e.tokenize,r),n.backUp(o.length-c-u)),r}function w(n,e){n.stack={parent:n.stack,style:"continuation",indented:e,tokenize:n.line},n.line=n.tokenize}function F(n){n.line==n.tokenize&&(n.line=n.stack.tokenize,n.stack=n.stack.parent)}function G(n,e){return function(i,u){if(F(u),i.match(/^\\$/))return w(u,n),"lineContinuation";var r=e(i,u);return i.eol()&&i.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&i.backUp(1),r}}function J(n,e){return function(i,u){F(u);var r=e(i,u);return i.eol()&&i.current().match(/,$/)&&w(u,n),r}}function A(n,e){return function(i,u){var r=i.peek();return r==n&&u.rubyState.tokenize.length==1?(i.next(),u.tokenize=e,"closeAttributeTag"):a(i,u)}}function f(n){var e,i=function(u,r){if(r.rubyState.tokenize.length==1&&!r.rubyState.context.prev){if(u.backUp(1),u.eatSpace())return r.rubyState=e,r.tokenize=n,n(u,r);u.next()}return a(u,r)};return function(u,r){return e=r.rubyState,r.rubyState=t.startState(p),r.tokenize=i,a(u,r)}}function a(n,e){return p.token(n,e.rubyState)}function K(n,e){return n.match(/^\\$/)?"lineContinuation":O(n,e)}function O(n,e){return n.match(/^#\{/)?(e.tokenize=A("}",e.tokenize),null):H(n,e,/[^\\]#\{/,1,d.token(n,e.htmlState))}function X(n){return function(e,i){var u=K(e,i);return e.eol()&&(i.tokenize=n),u}}function T(n,e,i){return e.stack={parent:e.stack,style:"html",indented:n.column()+i,tokenize:e.line},e.line=e.tokenize=O,null}function _(n,e){return n.skipToEnd(),e.stack.style}function Y(n,e){return e.stack={parent:e.stack,style:"comment",indented:e.indented+1,tokenize:e.line},e.line=_,_(n,e)}function b(n,e){return n.eat(e.stack.endQuote)?(e.line=e.stack.line,e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,null):n.match(W)?(e.tokenize=nn,"slimAttribute"):(n.next(),null)}function nn(n,e){return n.match(/^==?/)?(e.tokenize=en,null):b(n,e)}function en(n,e){var i=n.peek();return i=='"'||i=="'"?(e.tokenize=P(i,"string",!0,!1,b),n.next(),e.tokenize(n,e)):i=="["?f(b)(n,e):n.match(/^(true|false|nil)\b/)?(e.tokenize=b,"keyword"):f(b)(n,e)}function un(n,e,i){return n.stack={parent:n.stack,style:"wrapper",indented:n.indented+1,tokenize:i,line:n.line,endQuote:e},n.line=n.tokenize=b,null}function rn(n,e){if(n.match(/^#\{/))return e.tokenize=A("}",e.tokenize),null;var i=new t.StringStream(n.string.slice(e.stack.indented),n.tabSize);i.pos=n.pos-e.stack.indented,i.start=n.start-e.stack.indented,i.lastColumnPos=n.lastColumnPos-e.stack.indented,i.lastColumnValue=n.lastColumnValue-e.stack.indented;var u=e.subMode.token(i,e.subState);return n.pos=i.pos+e.stack.indented,u}function tn(n,e){return e.stack.indented=n.column(),e.line=e.tokenize=rn,e.tokenize(n,e)}function on(n){var e=R[n],i=t.mimeModes[e];if(i)return t.getMode(l,i);var u=t.modes[e];return u?u(l,{name:e}):t.getMode(l,"null")}function ln(n){return g.hasOwnProperty(n)?g[n]:g[n]=on(n)}function cn(n,e){var i=ln(n),u=t.startState(i);return e.subMode=i,e.subState=u,e.stack={parent:e.stack,style:"sub",indented:e.indented+1,tokenize:e.line},e.line=e.tokenize=tn,"slimSubmode"}function fn(n,e){return n.skipToEnd(),"slimDoctype"}function kn(n,e){var i=n.peek();if(i=="<")return(e.tokenize=X(e.tokenize))(n,e);if(n.match(/^[|']/))return T(n,e,1);if(n.match(/^\/(!|\[\w+])?/))return Y(n,e);if(n.match(/^(-|==?[<>]?)/))return e.tokenize=G(n.column(),J(n.column(),a)),"slimSwitch";if(n.match(/^doctype\b/))return e.tokenize=fn,"keyword";var u=n.match(C);return u?cn(u[1],e):E(n,e)}function M(n,e){return e.startOfLine?kn(n,e):E(n,e)}function E(n,e){return n.eat("*")?(e.tokenize=f($),null):n.match(Q)?(e.tokenize=$,"slimTag"):x(n,e)}function $(n,e){return n.match(/^(<>?|><?)/)?(e.tokenize=x,null):x(n,e)}function x(n,e){return n.match(q)?(e.tokenize=x,"slimId"):n.match(Z)?(e.tokenize=x,"slimClass"):k(n,e)}function k(n,e){return n.match(/^([\[\{\(])/)?un(e,N[RegExp.$1],k):n.match(V)?(e.tokenize=dn,"slimAttribute"):n.peek()=="*"?(n.next(),e.tokenize=f(I),null):I(n,e)}function dn(n,e){return n.match(/^==?/)?(e.tokenize=bn,null):k(n,e)}function bn(n,e){var i=n.peek();return i=='"'||i=="'"?(e.tokenize=P(i,"string",!0,!1,k),n.next(),e.tokenize(n,e)):i=="["?f(k)(n,e):i==":"?f(j)(n,e):n.match(/^(true|false|nil)\b/)?(e.tokenize=k,"keyword"):f(k)(n,e)}function j(n,e){return n.backUp(1),n.match(/^[^\s],(?=:)/)?(e.tokenize=f(j),null):(n.next(),k(n,e))}function P(n,e,i,u,r){return function(o,c){F(c);var S=o.current().length==0;if(o.match(/^\\$/,S))return S?(w(c,c.indented),"lineContinuation"):e;if(o.match(/^#\{/,S))return S?(c.tokenize=A("}",c.tokenize),null):e;for(var z=!1,v;(v=o.next())!=null;){if(v==n&&(u||!z)){c.tokenize=r;break}if(i&&v=="#"&&!z&&o.eat("{")){o.backUp(2);break}z=!z&&v=="\\"}return o.eol()&&z&&o.backUp(1),e}}function I(n,e){return n.match(/^==?/)?(e.tokenize=a,"slimSwitch"):n.match(/^\/$/)?(e.tokenize=M,null):n.match(/^:/)?(e.tokenize=E,"slimSwitch"):(T(n,e,0),e.tokenize(n,e))}var U={startState:function(){var n=t.startState(d),e=t.startState(p);return{htmlState:n,rubyState:e,stack:null,last:null,tokenize:M,line:M,indented:0}},copyState:function(n){return{htmlState:t.copyState(d,n.htmlState),rubyState:t.copyState(p,n.rubyState),subMode:n.subMode,subState:n.subMode&&t.copyState(n.subMode,n.subState),stack:n.stack,last:n.last,tokenize:n.tokenize,line:n.line}},token:function(n,e){if(n.sol())for(e.indented=n.indentation(),e.startOfLine=!0,e.tokenize=e.line;e.stack&&e.stack.indented>e.indented&&e.last!="slimSubmode";)e.line=e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,e.subMode=null,e.subState=null;if(n.eatSpace())return null;var i=e.tokenize(n,e);return e.startOfLine=!1,i&&(e.last=i),D.hasOwnProperty(i)?D[i]:i},blankLine:function(n){if(n.subMode&&n.subMode.blankLine)return n.subMode.blankLine(n.subState)},innerMode:function(n){return n.subMode?{state:n.subState,mode:n.subMode}:{state:n,mode:U}}};return U},"htmlmixed","ruby"),t.defineMIME("text/x-slim","slim"),t.defineMIME("application/x-slim","slim")})})();var hn=s.exports,vn=zn({__proto__:null,default:hn},[s.exports]);export{vn as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y}from"./index.
|
|
1
|
+
import{y}from"./index.dfa694ae.entry.js";function k(s,c){return c.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(l){if(l!=="default"&&!(l in s)){var o=Object.getOwnPropertyDescriptor(a,l);Object.defineProperty(s,l,o.get?o:{enumerable:!0,get:function(){return a[l]}})}})}),Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var b={exports:{}};(function(s,c){(function(a){a(y.exports)})(function(a){a.defineMode("smalltalk",function(l){var o=/[+\-\/\\*~<>=@%|&?!.,:;^]/,w=/true|false|nil|self|super|thisContext/,u=function(e,n){this.next=e,this.parent=n},f=function(e,n,t){this.name=e,this.context=n,this.eos=t},p=function(){this.context=new u(h,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};p.prototype.userIndent=function(e){this.userIndentationDelta=e>0?e/l.indentUnit-this.indentation:0};var h=function(e,n,t){var i=new f(null,n,!1),r=e.next();return r==='"'?i=x(e,new u(x,n)):r==="'"?i=d(e,new u(d,n)):r==="#"?e.peek()==="'"?(e.next(),i=v(e,new u(v,n))):e.eatWhile(/[^\s.{}\[\]()]/)?i.name="string-2":i.name="meta":r==="$"?(e.next()==="<"&&(e.eatWhile(/[^\s>]/),e.next()),i.name="string-2"):r==="|"&&t.expectVariable?i.context=new u(m,n):/[\[\]{}()]/.test(r)?(i.name="bracket",i.eos=/[\[{(]/.test(r),r==="["?t.indentation++:r==="]"&&(t.indentation=Math.max(0,t.indentation-1))):o.test(r)?(e.eatWhile(o),i.name="operator",i.eos=r!==";"):/\d/.test(r)?(e.eatWhile(/[\w\d]/),i.name="number"):/[\w_]/.test(r)?(e.eatWhile(/[\w\d_]/),i.name=t.expectVariable?w.test(e.current())?"keyword":"variable":null):i.eos=t.expectVariable,i},x=function(e,n){return e.eatWhile(/[^"]/),new f("comment",e.eat('"')?n.parent:n,!0)},d=function(e,n){return e.eatWhile(/[^']/),new f("string",e.eat("'")?n.parent:n,!1)},v=function(e,n){return e.eatWhile(/[^']/),new f("string-2",e.eat("'")?n.parent:n,!1)},m=function(e,n){var t=new f(null,n,!1),i=e.next();return i==="|"?(t.context=n.parent,t.eos=!0):(e.eatWhile(/[^|]/),t.name="variable"),t};return{startState:function(){return new p},token:function(e,n){if(n.userIndent(e.indentation()),e.eatSpace())return null;var t=n.context.next(e,n.context,n);return n.context=t.context,n.expectVariable=t.eos,t.name},blankLine:function(e){e.userIndent(0)},indent:function(e,n){var t=e.context.next===h&&n&&n.charAt(0)==="]"?-1:e.userIndentationDelta;return(e.indentation+t)*l.indentUnit},electricChars:"]"}}),a.defineMIME("text/x-stsrc",{name:"smalltalk"})})})();var g=b.exports,I=k({__proto__:null,default:g},[b.exports]);export{I as s};
|