{"_id":"@contensu/directus-extension-masked-value-interface","_rev":"2-fa6a3d11864034458fe90feb20205160","name":"@contensu/directus-extension-masked-value-interface","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@contensu/directus-extension-masked-value-interface","version":"1.0.0","keywords":["directus","directus-extension","directus-custom-interface","mask","masked","sensitive","redact"],"author":{"name":"contensu-dev"},"license":"MIT","_id":"@contensu/directus-extension-masked-value-interface@1.0.0","maintainers":[{"name":"contensu-dev","email":"contact@contensu.com"}],"homepage":"https://github.com/contensu/directus-extension-masked-value-interface","bugs":{"url":"https://github.com/contensu/directus-extension-masked-value-interface/issues"},"dist":{"shasum":"b18824e202563bf344ecfaca140e358fa37ff092","tarball":"https://registry.npmjs.org/@contensu/directus-extension-masked-value-interface/-/directus-extension-masked-value-interface-1.0.0.tgz","fileCount":6,"integrity":"sha512-0ZuqZlADb1cDqjib2tK5RXvrV/i2obJxtsaWrGcb5Vpb2oI6x28yUAgRWESi/4q6z26iUokgGHjPItUo82XNig==","signatures":[{"sig":"MEUCIQCJ0NZ6QSi6+l49w2XN98LSNHVRg7xHcKSnij2i71yPzAIgSaCJW9eV+u2uxyJj/4t5u/tCuqXb1tCMVipnPx8nQ7E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16099},"icon":"password","type":"module","gitHead":"b392c04b3e971cb63f7dcd956d5f68f3ae64fd0f","scripts":{"dev":"directus-extension build -w --no-minify","link":"directus-extension link","build":"directus-extension build","validate":"directus-extension validate","typecheck":"vue-tsc --noEmit","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"contensu-dev","email":"contact@contensu.com"},"repository":{"url":"git+https://github.com/contensu/directus-extension-masked-value-interface.git","type":"git"},"_npmVersion":"10.9.7","description":"A Directus interface that masks a stored value in the form (e.g. *****786), with a configurable number of visible characters, mask character, and an optional reveal toggle.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.24","vue-tsc":"3.3.9","vue-i18n":"11.1.12","typescript":"5.9.3","@directus/extensions-sdk":"18.0.2"},"directus:extension":{"host":"^10.10.0 || ^11.0.0","path":"dist/index.js","type":"interface","source":"src/index.ts"},"_npmOperationalInternal":{"tmp":"tmp/directus-extension-masked-value-interface_1.0.0_1785942645522_0.48981440072103033","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@contensu/directus-extension-masked-value-interface","description":"A Directus interface that masks a stored value in the form (e.g. *****786), with a configurable number of visible characters, mask character, and an optional reveal toggle.","author":{"name":"contensu-dev"},"license":"MIT","icon":"password","version":"1.0.1","keywords":["directus","directus-extension","directus-custom-interface","mask","masked","sensitive","redact"],"type":"module","directus:extension":{"type":"interface","path":"dist/index.js","source":"src/index.ts","host":"^10.10.0 || ^11.0.0"},"scripts":{"build":"directus-extension build","dev":"directus-extension build -w --no-minify","link":"directus-extension link","validate":"directus-extension validate","typecheck":"vue-tsc --noEmit","prepublishOnly":"pnpm run build","add":"directus-extension add"},"devDependencies":{"@directus/extensions-sdk":"18.0.2","typescript":"5.9.3","vue":"3.5.24","vue-i18n":"11.1.12","vue-tsc":"3.3.9"},"homepage":"https://github.com/contensu/directus-extension-masked-value-interface","repository":{"type":"git","url":"git+https://github.com/contensu/directus-extension-masked-value-interface.git"},"bugs":{"url":"https://github.com/contensu/directus-extension-masked-value-interface/issues"},"_id":"@contensu/directus-extension-masked-value-interface@1.0.1","gitHead":"30554c1ab5f29f8cda0c77bab064cbd25085ba62","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-RqfNE/IfFS0cbTVJGAcygkMO1ZS9/NaLEW4LUYzge0x/AZTLX2ifA3n6wumWDehcE25Ina62G8soqwKA5a4lxA==","shasum":"416c0c0bd6422c08cbd80118d42dade521f17cbe","tarball":"https://registry.npmjs.org/@contensu/directus-extension-masked-value-interface/-/directus-extension-masked-value-interface-1.0.1.tgz","fileCount":4,"unpackedSize":11251,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDm8IuORXX7RXDRn5cB5zljRR9kmhXduH8em2rbhJfCeAIgeZ9XtJyjSJXdEiMG1hil+BK53pXdHsBWL5oSWQQFF3s="}]},"_npmUser":{"name":"contensu-dev","email":"contact@contensu.com"},"directories":{},"maintainers":[{"name":"contensu-dev","email":"contact@contensu.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/directus-extension-masked-value-interface_1.0.1_1785944239301_0.3916883724542517"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-05T15:10:45.352Z","modified":"2026-08-05T15:37:19.640Z","1.0.0":"2026-08-05T15:10:45.708Z","1.0.1":"2026-08-05T15:37:19.447Z"},"bugs":{"url":"https://github.com/contensu/directus-extension-masked-value-interface/issues"},"author":{"name":"contensu-dev"},"license":"MIT","homepage":"https://github.com/contensu/directus-extension-masked-value-interface","keywords":["directus","directus-extension","directus-custom-interface","mask","masked","sensitive","redact"],"repository":{"type":"git","url":"git+https://github.com/contensu/directus-extension-masked-value-interface.git"},"description":"A Directus interface that masks a stored value in the form (e.g. *****786), with a configurable number of visible characters, mask character, and an optional reveal toggle.","maintainers":[{"name":"contensu-dev","email":"contact@contensu.com"}],"readme":"# @contensu/directus-extension-masked-value-interface\n\nA Directus interface for **string / text** fields that masks the stored value in the form — e.g. `*****786` — while keeping the real value untouched in the database.\n\n![The field at rest, masked to the last three characters](https://raw.githubusercontent.com/contensu/directus-extension-masked-value-interface/main/docs/images/masked.png)\n\n![The same field after clicking the reveal toggle](https://raw.githubusercontent.com/contensu/directus-extension-masked-value-interface/main/docs/images/revealed.png)\n\n## Install\n\nOpen **Settings → Marketplace** in Directus, search for `@contensu/directus-extension-masked-value-interface`, and press **Install**. Directus unpacks the extension and reloads on its own — no restart required.\n\nIf a self-hosted instance refuses the install, it is running the default `MARKETPLACE_TRUST=sandbox`; set `MARKETPLACE_TRUST=all` to allow it.\n\nThen create or edit a field and pick **Masked Value** under *Interface*.\n\n## Behavior\n\n- At rest the input shows the masked value.\n- **Focusing the input reveals the real value** (editing a mask would corrupt the data), and blurring masks it again.\n- The optional eye icon toggles a persistent reveal without focusing.\n- Edits are only emitted while the real value is shown, so the mask can never be written back.\n\n## Options\n\n| Option | Default | Description |\n| --- | --- | --- |\n| Visible Characters | `4` | How many characters stay readable |\n| Visible Position | `end` | `end` → `*****786`, `start` → `786*****` |\n| Mask Character | `*` | First character is used |\n| Preserve Length | `true` | Off: fixed 5-character mask, hides the real length |\n| Allow Reveal Toggle | `true` | Show the eye icon |\n| Monospace Font | `false` | Render the value in a monospace font |\n| Placeholder | — | Translated string — literal text, or a `$t:` reference to a custom translation string, exactly like core's Input interface |\n\n## Notes\n\n- This is **presentation-level masking only** — anyone with read permission on the field can still see the raw value via the API or a different interface. For real secrecy use Directus's `hash` special or field-level permissions.\n- List views are unaffected; masking values in layouts would require a companion *display* extension.\n\n## Versions\n\nEvery dependency is pinned to an exact version — no `^` ranges. Two of them are\nload-bearing:\n\n- **`vue` must match the copy `@directus/extensions-sdk` resolves internally**\n  (3.5.24 for SDK 18.0.2). A caret lets a newer vue in alongside it, and\n  `vue-tsc` then compares component types across the two instances and crashes\n  mid-elaboration instead of reporting an error. `pnpm why vue` must say\n  *Found 1 version*.\n- **`typescript` stays on 5.x** — `vue-tsc` 3.x cannot drive TS 6 (internal tsc\n  crash) or TS 7 (no `./lib/tsc` export). The extension build itself uses\n  esbuild and does not care; only `pnpm typecheck` does.\n\nThe `directus:extension.host` field is deliberately still a range: it declares\nwhich Directus versions this extension supports, not a dependency to install.\n\n## Development\n\nA Docker Compose stack runs the extension inside a real Directus while you build it:\n\n```sh\npnpm install\npnpm dev            # rebuilds dist/ on every save\ndocker compose up   # http://localhost:8055 — admin@example.com / d1r3ctu5\n```\n\n`dist/` and `package.json` are mounted into the container's extensions folder and\n`EXTENSIONS_AUTO_RELOAD` is on, so saving a file rebuilds the bundle and Directus\nreloads it — refresh the browser to see the change.\n\nThen create a field using the **Masked Value** interface to try it out.\n\n```sh\npnpm typecheck      # vue-tsc\npnpm validate       # directus-extension validate\n```\n\n---\n\n## CI & Releases\n\nEvery push runs typecheck, build, and extension validation via GitHub Actions.\nReleases are published to npm manually:\n\n```sh\npnpm build\nnpm publish --access public\n```\n\n---\n\n## Contributing\n\nPull requests are welcome. Please open an issue first to discuss what you would like to change.\n\n---\n\n## License\n\nMIT © Contensu\n","readmeFilename":"README.md"}