Giter VIP home page Giter VIP logo

svelte-json-view's People

Contributors

rlisowski-maystreet avatar zerodevx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

svelte-json-view's Issues

Svelte 4

npm ERR! Found: [email protected]
npm ERR! node_modules/svelte
npm ERR!   dev svelte@"^4.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer svelte@"^3.55.1" from @zerodevx/[email protected]
npm ERR! node_modules/@zerodevx/svelte-json-view
npm ERR!   @zerodevx/svelte-json-view@"^1.0.5" from the root project

Passing dynamic object not working

Writen below code using this as child component. getting error as " was created with unknown prop 'app'"

<script> import { JsonView } from '@zerodevx/svelte-json-view'; export let data; const app = data; console.log(app.trace); </script>

<JsonView {app} />

[Suggestion] Documentation on API for changing state

Great package! Super easy to use.

The only thing is, there isn't any documentation on an API for the buttons you are using in your demo link. I think it would be helpful to add that. Unless those buttons are not part of the package and you're simply transforming the JSON and it's being reflected.

I am digging through the code trying to find and might submit a PR updating the docs if I do.

Separate colors for braces and brackets

Would it be possible to make colors for braces and brackets separately configurable? Arrays and objects are quite different, and we have a use case where we want to make it visually clearer.

Add option for rendering escaped JSON as-is

For something like this, I would expect to see the escaping correctly (as jq does it).

โžœ echo '{"foo": "\""}' | jq
{
  "foo": "\""
}

However, this library shows the following
image

Can we have a configuration option for that?

--jsonPaddingLeft doesn't seem to be working?

Hey! I tried following the README and using --jsonPaddingLeft but it doesn't seem to have any affect. I got --jsonBorderLeft to work but that's not exactly what I want

<div class="myJsonWrapper">
  <JsonView json={my_data} />
</div>

<style>
  .myJsonWrapper {
    --jsonPaddingLeft: 10px;
    /* --jsonBorderLeft: 10px dotted white; */
  }
</style>

What it normally looks like (and still can't get it to work)
Screenshot 2024-01-09 at 17 52 47

What it looks like if I add --jsonBorderLeft:
Screenshot 2024-01-09 at 17 53 11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.