Browse Source

Added htmlwidget

master
Bob Rudis 7 years ago
parent
commit
fe2739c1b1
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 29
      DESCRIPTION
  2. 11
      NAMESPACE
  3. 1
      NEWS.md
  4. 14
      R/htmltidy-package.r
  5. 2
      R/response.r
  6. 28
      R/shiny-tree-view.R
  7. 21
      R/shiny.R
  8. 56
      R/xmltreeview.R
  9. 120
      R/xmlview.R
  10. 12
      README.Rmd
  11. 10
      inst/COPYRIGHTS
  12. 13
      inst/examples/examples-xml_tree_view.R
  13. 11
      inst/examples/rss-example.R
  14. 1507
      inst/extdata/dwml.xml
  15. 2767
      inst/extdata/getHistory.xml
  16. 24
      inst/extdata/input.xml
  17. 24
      inst/htmlwidgets/lib/highlightjs/LICENSE
  18. 21
      inst/htmlwidgets/lib/highlightjs/Makefile
  19. 11
      inst/htmlwidgets/lib/highlightjs/README.md
  20. 14
      inst/htmlwidgets/lib/highlightjs/bower.json
  21. 12
      inst/htmlwidgets/lib/highlightjs/component.json
  22. 26
      inst/htmlwidgets/lib/highlightjs/composer.json
  23. 13797
      inst/htmlwidgets/lib/highlightjs/highlight.pack.js
  24. 11
      inst/htmlwidgets/lib/highlightjs/highlight.pack.min.js
  25. 108
      inst/htmlwidgets/lib/highlightjs/styles/agate.css
  26. 66
      inst/htmlwidgets/lib/highlightjs/styles/androidstudio.css
  27. 73
      inst/htmlwidgets/lib/highlightjs/styles/arta.css
  28. 45
      inst/htmlwidgets/lib/highlightjs/styles/ascetic.css
  29. 83
      inst/htmlwidgets/lib/highlightjs/styles/atelier-cave-dark.css
  30. 85
      inst/htmlwidgets/lib/highlightjs/styles/atelier-cave-light.css
  31. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-cave.dark.css
  32. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-cave.light.css
  33. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-dune-dark.css
  34. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-dune-light.css
  35. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-dune.dark.css
  36. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-dune.light.css
  37. 84
      inst/htmlwidgets/lib/highlightjs/styles/atelier-estuary-dark.css
  38. 84
      inst/htmlwidgets/lib/highlightjs/styles/atelier-estuary-light.css
  39. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-estuary.dark.css
  40. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-estuary.light.css
  41. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-forest-dark.css
  42. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-forest-light.css
  43. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-forest.dark.css
  44. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-forest.light.css
  45. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-heath-dark.css
  46. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-heath-light.css
  47. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-heath.dark.css
  48. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-heath.light.css
  49. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-lakeside-dark.css
  50. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-lakeside-light.css
  51. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-lakeside.dark.css
  52. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-lakeside.light.css
  53. 84
      inst/htmlwidgets/lib/highlightjs/styles/atelier-plateau-dark.css
  54. 84
      inst/htmlwidgets/lib/highlightjs/styles/atelier-plateau-light.css
  55. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-plateau.dark.css
  56. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-plateau.light.css
  57. 84
      inst/htmlwidgets/lib/highlightjs/styles/atelier-savanna-dark.css
  58. 84
      inst/htmlwidgets/lib/highlightjs/styles/atelier-savanna-light.css
  59. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-savanna.dark.css
  60. 113
      inst/htmlwidgets/lib/highlightjs/styles/atelier-savanna.light.css
  61. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-seaside-dark.css
  62. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-seaside-light.css
  63. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-seaside.dark.css
  64. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-seaside.light.css
  65. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-sulphurpool-dark.css
  66. 69
      inst/htmlwidgets/lib/highlightjs/styles/atelier-sulphurpool-light.css
  67. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-sulphurpool.dark.css
  68. 94
      inst/htmlwidgets/lib/highlightjs/styles/atelier-sulphurpool.light.css
  69. 64
      inst/htmlwidgets/lib/highlightjs/styles/brown-paper.css
  70. BIN
      inst/htmlwidgets/lib/highlightjs/styles/brown-papersq.png
  71. 103
      inst/htmlwidgets/lib/highlightjs/styles/brown_paper.css
  72. BIN
      inst/htmlwidgets/lib/highlightjs/styles/brown_papersq.png
  73. 60
      inst/htmlwidgets/lib/highlightjs/styles/codepen-embed.css
  74. 71
      inst/htmlwidgets/lib/highlightjs/styles/color-brewer.css
  75. 63
      inst/htmlwidgets/lib/highlightjs/styles/dark.css
  76. 74
      inst/htmlwidgets/lib/highlightjs/styles/darkula.css
  77. 77
      inst/htmlwidgets/lib/highlightjs/styles/default.css
  78. 97
      inst/htmlwidgets/lib/highlightjs/styles/docco.css
  79. 71
      inst/htmlwidgets/lib/highlightjs/styles/far.css
  80. 88
      inst/htmlwidgets/lib/highlightjs/styles/foundation.css
  81. 71
      inst/htmlwidgets/lib/highlightjs/styles/github-gist.css
  82. 99
      inst/htmlwidgets/lib/highlightjs/styles/github.css
  83. 89
      inst/htmlwidgets/lib/highlightjs/styles/googlecode.css
  84. 101
      inst/htmlwidgets/lib/highlightjs/styles/grayscale.css
  85. 83
      inst/htmlwidgets/lib/highlightjs/styles/hopscotch.css
  86. 102
      inst/htmlwidgets/lib/highlightjs/styles/hybrid.css
  87. 97
      inst/htmlwidgets/lib/highlightjs/styles/idea.css
  88. 73
      inst/htmlwidgets/lib/highlightjs/styles/ir-black.css
  89. 106
      inst/htmlwidgets/lib/highlightjs/styles/ir_black.css
  90. 74
      inst/htmlwidgets/lib/highlightjs/styles/kimbie.dark.css
  91. 74
      inst/htmlwidgets/lib/highlightjs/styles/kimbie.light.css
  92. 70
      inst/htmlwidgets/lib/highlightjs/styles/magula.css
  93. 59
      inst/htmlwidgets/lib/highlightjs/styles/mono-blue.css
  94. 83
      inst/htmlwidgets/lib/highlightjs/styles/monokai-sublime.css
  95. 70
      inst/htmlwidgets/lib/highlightjs/styles/monokai.css
  96. 154
      inst/htmlwidgets/lib/highlightjs/styles/monokai_sublime.css
  97. 88
      inst/htmlwidgets/lib/highlightjs/styles/obsidian.css
  98. 72
      inst/htmlwidgets/lib/highlightjs/styles/paraiso-dark.css
  99. 72
      inst/htmlwidgets/lib/highlightjs/styles/paraiso-light.css
  100. 96
      inst/htmlwidgets/lib/highlightjs/styles/paraiso.dark.css

29
DESCRIPTION

@ -1,5 +1,5 @@
Package: htmltidy
Title: Clean Up or Pretty Print Gnarly HTML and XHTML
Title: Tidy Up and Test XPath Queries on HTML and XML Content
Version: 0.3.0
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre")),
@ -7,7 +7,16 @@ Authors@R: c(
comment="Original HTML Tidy library"),
person("Charles", "Reitzel", role = c("ctb", "aut"),
comment="Modern HTML Tidy library"),
person("Bjรถrn", "Hรถhrmann", role = c("ctb", "aut"), comment="HTML5 Support")
person("Bjรถrn", "Hรถhrmann", role = c("ctb", "aut"), comment="HTML5 Support"),
person("Kenton","Russell", role = c("aut", "ctb"),
comment = "xml-viewer integration",
email = "kent.russell@timelyportfolio.com"),
person("Vadim", "Kiryukhin", role = c("ctb", "cph"),
comment = "vkbeautify library"),
person("Ivan", "Sagalaev", role = c("ctb", "cph"),
comment = "highlight.js library"),
person("Julian", "Gruber", role = c("ctb", "cph"),
comment = "xml-viewer library")
)
Maintainer: Bob Rudis <bob@rud.is>
Description: HTML documents can be beautiful and pristine. They can also be
@ -16,13 +25,21 @@ Description: HTML documents can be beautiful and pristine. They can also be
the limited tidying that 'libxml2' affords in the 'XML' and 'xml2' packages and
taming even the ugliest HTML code generated by the likes of Google Docs and Microsoft
Word. It's also possible to use the functions provided to format or "pretty print"
HTML content as it is being tidied.
HTML content as it is being tidied. Utilities are also included that make it
possible to view formatted and "pretty printed" HTML/XML
content from HTML/XML document objects, nodes, node sets and plain character HTML/XML
using 'vkbeautify' (by Vadim Kiryukhin) and 'highlight.js' (by Ivan Sagalaev).
Also (optionally) enables filtering of nodes via XPath or viewing an HTML/XML document
in "tree" view using 'xml-viewer' (by Julian Gruber). See
<https://github.com/vkiryukhin/vkBeautify> and
<https://github.com/juliangruber/xml-viewer> for more information about 'vkbeautify'
and 'xml-viewer', respectively.
Copyright: file inst/COPYRIGHTS
URL: https://github.com/hrbrmstr/htmltidy
BugReports: https://github.com/hrbrmstr/htmltidy/issues
Depends:
R (>= 3.2.0)
License: AGPL + file LICENSE
License: MIT + file LICENSE
LazyData: true
NeedsCompilation: yes
Suggests:
@ -33,5 +50,7 @@ LinkingTo: Rcpp
Imports:
Rcpp,
xml2,
XML
XML,
htmlwidgets,
htmltools
RoxygenNote: 5.0.1

11
NAMESPACE

@ -7,8 +7,19 @@ S3method(tidy_html,default)
S3method(tidy_html,raw)
S3method(tidy_html,response)
S3method(tidy_html,xml_document)
export(highlight_styles)
export(html_tree_view)
export(html_view)
export(renderXmltreeview)
export(renderXmlview)
export(tidy_html)
export(xml_tree_view)
export(xml_view)
export(xmltreeviewOutput)
export(xmlviewOutput)
import(XML)
import(htmltools)
import(htmlwidgets)
import(xml2)
importFrom(Rcpp,sourceCpp)
useDynLib(htmltidy)

1
NEWS.md

@ -3,6 +3,7 @@
* Better error handling (fixed crashing bug in #1)
* New option to display document errors
* Support for directly tidying httr::response objects
* Added XML/HTML viewer & XPath query widgets
# htmltidy 0.2.0

14
R/htmltidy-package.r

@ -1,4 +1,4 @@
#' Clean Up or Pretty Print Gnarly HTML and XHTML
#' Tidy Up and Test XPath Queries on HTML and XML Content
#'
#' HTML documents can be beautiful and pristine. They can also be
#' wretched, evil, malformed demon-spawn. Now, you can tidy up that HTML and XHTML
@ -6,12 +6,20 @@
#' the limited tidying that 'libxml2' affords in the 'XML' and 'xml2' packages and
#' taming even the ugliest HTML code generated by the likes of Google Docs and Microsoft
#' Word. It's also possible to use the functions provided to format or "pretty print"
#' HTML content as it is being tidied.
#' HTML content as it is being tidied. Utilities are also included that make it
#' possible to view formatted and "pretty printed" HTML/XML
#' content from HTML/XML document objects, nodes, node sets and plain character HTML/XML
#' using 'vkbeautify' (by Vadim Kiryukhin) and 'highlight.js' (by Ivan Sagalaev).
#' Also (optionally) enables filtering of nodes via XPath or viewing an XML document
#' in "tree" view using 'xml-viewer' (by Julian Gruber). See
#' \url{https://github.com/vkiryukhin/vkBeautify} and
#' \url{https://github.com/juliangruber/xml-viewer} for more information about 'vkbeautify'
#' and 'xml-viewer', respectively.
#'
#' @name htmltidy
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @useDynLib htmltidy
#' @importFrom Rcpp sourceCpp
#' @import xml2 XML
#' @import xml2 XML htmlwidgets htmltools
NULL

2
R/response.r

@ -8,7 +8,7 @@ tidy_html.response <- function(content, options=list(TidyXhtmlOut=TRUE),
call.=FALSE)
}
html_txt <- httr::content(content, as="text", encoding=encoding)
html_txt <- suppressMessages(httr::content(content, as="text"))
tidy_html(html_txt)

28
R/shiny-tree-view.R

@ -0,0 +1,28 @@
#' Shiny bindings for xmltreeview
#'
#' Output and render functions for using xmltreeview within Shiny
#' applications and interactive Rmd documents.
#'
#' @param outputId output variable to read from
#' @param width,height Must be a valid CSS unit (like \\code{'100\%'},
#' \\code{'400px'}, \\code{'auto'}) or a number, which will be coerced to a
#' string and have \\code{'px'} appended.
#' @param expr An expression that generates a xmltreeview
#' @param env The environment in which to evaluate \\code{expr}.
#' @param quoted Is \\code{expr} a quoted expression (with \\code{quote()})? This
#' is useful if you want to save an expression in a variable.
#'
#' @name xmltreeview-shiny
#'
#' @export
xmltreeviewOutput <- function(outputId, width = '100%', height = '400px'){
htmlwidgets::shinyWidgetOutput(outputId, 'xmltreeview', width, height,
package = 'xmlview')
}
#' @rdname xmltreeview-shiny
#' @export
renderXmltreeview <- function(expr, env = parent.frame(), quoted = FALSE) {
if (!quoted) { expr <- substitute(expr) } # force quoted
htmlwidgets::shinyRenderWidget(expr, xmltreeviewOutput, env, quoted = TRUE)
}

21
R/shiny.R

@ -0,0 +1,21 @@
#' Widget output function for use in Shiny
#'
#' @param outputId outputId
#' @param width width
#' @param height height
#' @export
xmlviewOutput <- function(outputId, width = '100%', height = '400px'){
htmlwidgets::shinyWidgetOutput(outputId, 'xmlview', width, height,
package = 'xmlview')
}
#' Widget render function for use in Shiny
#'
#' @param expr expr
#' @param env env
#' @param quoted quoted
#' @export
renderXmlview <- function(expr, env = parent.frame(), quoted = FALSE) {
if (!quoted) { expr <- substitute(expr) } # force quoted
htmlwidgets::shinyRenderWidget(expr, xmlviewOutput, env, quoted = TRUE)
}

56
R/xmltreeview.R

@ -0,0 +1,56 @@
#' HTML/XML tree viewer
#'
#' This uses the \code{xml-viewer} JavaScript module to provide a simple collapsible
#' tree viewer for HTML/XML documents, nodes, node sets and plain character
#' HTML/XML in an \code{htmlwidget} pane.
#'
#' @param doc \code{xml2} document/node/nodeset, an \code{HTMLInternalDocument}/
#' \code{XMLInternalDocument} or atomic character vector of HTML/XML content
#' @param scroll should the \code{<div>} holding the HTML/XML content scroll
#' (\code{TRUE}) or take up the full viewer/browser window (\code{FALSE}).
#' Default is \code{FALSE} (take up the full viewer/browser window). If
#' this is set to \code{TRUE}, \code{height} should be set to a value
#' other than \code{NULL}.
#' @param elementId element id
#' @param width widget \code{div} width
#' @param height widget \code{div} height
#' @note Large HTML or XML content may take some time to render properly. It is suggested
#' that this function be used on as minimal of a subset of HTML/XML as possible
#' or used in a browser context vs an IDE viewer context.
#' @export
#' @references \href{https://github.com/juliangruber/xml-viewer}{xml-viewer}
#' @example inst/examples/examples-xml_tree_view.R
xml_tree_view <- function(doc=NULL, scroll=FALSE,
elementId=NULL, width="100%", height=NULL) {
if (inherits(doc, "character")) {
doc <- paste0(doc, collapse="")
} else if (inherits(doc, "xml_nodeset")) {
doc <- paste0(as.character(doc), collapse="")
} else if (inherits(doc, "xml_document") | inherits(doc, "xml_node")) {
doc <- as.character(doc)
} else if (inherits(doc, "HTMLInternalDocument") |
inherits(doc, "XMLInternalDocument")) {
doc <- XML::saveXML(doc)
}
params <- list(
xmlDoc = doc,
scroll = scroll
)
# create widget
htmlwidgets::createWidget(
name = 'xmltreeview',
x = params,
width = width,
height = height,
package = 'xmlview',
elementId = elementId
)
}
#' @rdname xml_tree_view
#' @export
html_tree_view <- xml_tree_view

120
R/xmlview.R

@ -0,0 +1,120 @@
#' HTML/XML pretty printer and viewer
#'
#' This uses the \code{vkbeautify} and \code{highlight.js} javascript modules to format and
#' "pretty print" HTML/XML documents, nodes, node sets and plain character
#' HTML/XML in an \code{htmlwidget} pane.
#'
#' @param doc \code{xml2} document/node/nodeset, an \code{HTMLInternalDocument}/
#' \code{XMLInternalDocument} or atomic character vector of HTML/XML content
#' @param style CSS stylesheet to use (see \code{higlight_styles()})
#' @param scroll should the \code{<div>} holding the HTML/XML content scroll
#' (\code{TRUE}) or take up the full viewer/browser window (\code{FALSE}).
#' Default is \code{FALSE} (take up the full viewer/browser window). If
#' this is set to \code{TRUE}, \code{height} should be set to a value
#' other than \code{NULL}.
#' @param add_filter show an XPath input box to enable live filtering?
#' (default: \code{FALSE})
#' @param apply_xpath Add and apply an XPath query string to the view. If
#' \code{add_filter} is \code{TRUE} then this query string will
#' appear in the filter box and be applied to the passed in document.
#' @param elementId element id
#' @param width widget width (best to keep it at 100\%)
#' @param height widget height (kinda only useful for knitting since this is
#' meant to be an interactive tool).
#' @note Large HTML or XML content may take some time to render properly. It is suggested
#' that this function be used on as minimal of a subset of HTML/XML as possible
#' or used in a browser context vs an IDE viewer context.
#' @export
#' @references \href{https://highlightjs.org/}{highlight.js},
#' \href{http://www.eslinstructor.net/vkbeautify/}{vkbeautify}
#' @examples
#' library(xml2)
#'
#' # plain text
#' txt <- paste0("<note><to>Tove</to><from>Jani</from><heading>Reminder</heading>",
#' "<body>Don't forget me this weekend!</body></note>")
#' xml_view(txt)
#'
#' # xml object
#' doc <- read_xml(txt)
#' xml_view(doc, style="obsidian")
#'
#' # different style
#' xml_view(xml_find_all(doc, ".//to"), style="github-gist")
#'
#' # some more complex daata
#' xml_view(read_xml(system.file("extdata/dwml.xml", package="xmlview")))
#' xml_view(read_xml(system.file("extdata/getHistory.xml", package="xmlview")),
#' "androidstudio")
#' xml_view(read_xml(system.file("extdata/input.xml", package="xmlview")),
#' "sunburst")
#'
#' # filter + apply an initial XPath query string
#' xml_view(read_xml(system.file("extdata/dwml.xml", package="xmlview")),
#' add_filter=TRUE, apply_xpath=".//temperature")
xml_view <- function(doc, style="default", scroll=FALSE, add_filter=FALSE,
apply_xpath=NULL, elementId=NULL,
width="100%", height=NULL) {
xml_doc_name <- "doc"
if (!inherits(doc, "character") &
inherits(substitute(doc), "name")) {
xml_doc_name <- deparse(substitute(doc))
}
style <- trimws(tolower(style))
if (!style %in% highlight_styles()) {
style <- "default"
warning(sprintf("Style '%s' not found, using 'default'", style))
}
if (inherits(doc, "character")) {
doc <- paste0(doc, collapse="")
} else if (inherits(doc, "xml_nodeset")) {
doc <- paste0(as.character(doc), collapse="")
} else if (inherits(doc, "xml_document") | inherits(doc, "xml_node")) {
doc <- as.character(doc)
}
params <- list(
xmlDoc = doc,
styleSheet = style,
addFilter = add_filter,
applyXPath = apply_xpath,
scroll=scroll,
xmlDocName=xml_doc_name
)
htmlwidgets::createWidget(
name = 'xmlview',
params,
width = width,
height = height,
package = 'xmlview',
elementId = elementId
)
}
#' @rdname xml_view
#' @export
html_view <- xml_view
#' List available HTML/XML highlight styles
#'
#' Returns a character vector of available style sheets to use when displaying
#' an XML document.
#'
#' @references See \url{https://highlightjs.org/static/demo/} for a demo of all
#' highlight.js styles
#' @export
#' @examples
#' highlight_styles()
highlight_styles <- function() {
gsub("\\.css$", "",
grep("\\.css$",
list.files(system.file("htmlwidgets/lib/highlightjs/styles", package="xmlview")),
value=TRUE))
}

12
README.Rmd

@ -18,15 +18,21 @@ knitr::opts_chunk$set(
)
```
`htmltidy` โ€” Clean up gnarly HTML/XHTML
`htmltidy` โ€” Tidy Up and Test XPath Queries on HTML and XML Content
Inspired by [this SO question](http://stackoverflow.com/questions/37061873/identify-a-weblink-in-bold-in-r) and because there's a great deal of cruddy HTML out there that needs fixing to use properly when scraping data.
Partly inspired by [this SO question](http://stackoverflow.com/questions/37061873/identify-a-weblink-in-bold-in-r) and because there's a great deal of cruddy HTML out there that needs fixing to use properly when scraping data.
It relies on a locally included version of [`libtidy`](http://www.html-tidy.org/) and works on macOS, Linux & Windows.
It also incorporates an `htmlwidget` to view and test XPath queries on HTML/XML content.
The following functions are implemented:
- `tidy_html` : Tidy or "Pretty Print" HTML/XHTML Documents
- `tidy_html`: Tidy or "Pretty Print" HTML/XHTML Documents
- `html_view`: HTML/XML pretty printer and viewer
- `xml_view`: HTML/XML pretty printer and viewer
- `html_tree_view`: HTML/XML tree viewer
- `xml_tree_view`: HTML/XML tree viewer
### Installation

10
inst/COPYRIGHTS

@ -1,5 +1,7 @@
All R source code and source file src/htmltidy.cpp are released under the GNU AGPL license.
----
As per https://github.com/htacg/tidy-html5/blob/master/README/LICENSE.md, libtidy source
code is:
@ -20,3 +22,11 @@ this package:
- src/sprtf.cpp
Both of those files have been marked as modified in the license copyright header.
------
xml-viewer is MIT licensed
------
vkbeautify is MIT licensed

13
inst/examples/examples-xml_tree_view.R

@ -0,0 +1,13 @@
library(htmltidy)
# from ?xml2::read_xml
cd <- xml2::read_xml("http://www.xmlfiles.com/examples/cd_catalog.xml")
xml_tree_view(cd)
htmltools::browsable(
htmltools::tagList(
xml_tree_view(cd, width = "100%", height = "300px"),
xml_view(cd)
)
)

11
inst/examples/rss-example.R

@ -0,0 +1,11 @@
library(xml2)
doc <- read_xml("http://www.npr.org/rss/rss.php?id=1001")
str(doc)
xml_view(doc, add_filter=TRUE)
xml2::xml_find_all(doc, './/dc:creator', ns=xml2::xml_ns(doc))
xml_text(xml2::xml_find_all(doc, './/link[contains(., "soccer")]', ns=xml2::xml_ns(doc)))

1507
inst/extdata/dwml.xml

File diff suppressed because it is too large

2767
inst/extdata/getHistory.xml

File diff suppressed because it is too large

24
inst/extdata/input.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : test_createCity1.xml
Created on : March 27, 2007, 10:34 PM
Author : Colin P
Description:
Purpose of the document follows.
-->
<commands xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='http://www.cs.umd.edu/users/meesh/420/spr07/part1/part1in.xsd'
spatialWidth="512" spatialHeight="512">
<!-- Valid statement -->
<createCity name="Los_Angeles" x="118" y="33" radius="80" color="black"/>
<!-- Valid statement, lower case city name -->
<createCity name="los_Angeles" x="100" y="300" radius="80" color="black"/>
<!-- duplicateCityName error -->
<createCity name="los_Angeles" x="500" y="300" radius="80" color="black"/>
<!-- duplicateCityCoordinates -->
<createCity name="Miami" x="100" y="300" radius="80" color="black"/>
<!-- duplicateCityName - higher priority -->
<createCity name="los_Angeles" x="500" y="300" radius="80" color="black"/>
</commands>

24
inst/htmlwidgets/lib/highlightjs/LICENSE

@ -0,0 +1,24 @@
Copyright (c) 2006, Ivan Sagalaev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

21
inst/htmlwidgets/lib/highlightjs/Makefile

@ -0,0 +1,21 @@
VERSION=9.0.0
default: build
@cp -f build/highlight.* .
@cp -f highlight/src/styles/* styles
@du -hs highlight.*
build: highlight
@cd highlight && git fetch && git checkout $(VERSION)
@cd highlight && npm install
@mkdir -p build
@cd highlight && node tools/build.js && cp build/highlight.pack.js ../build/highlight.pack.min.js
@cd highlight && node tools/build.js -n && cp build/highlight.pack.js ../build/highlight.pack.js
highlight:
@git clone git://github.com/isagalaev/highlight.js.git $@
clean:
@rm -rf build
.PHONY: default

11
inst/htmlwidgets/lib/highlightjs/README.md

@ -0,0 +1,11 @@
Highlight.js
============
Shim repository for [Highlight.js](http://highlightjs.org/).
Package Managers
----------------
* [Bower](http://bower.io): `highlightjs`
* [Composer](http://packagist.org/packages/components/highlightjs): `components/highlightjs`
* [Component](http://component.io): `components/highlightjs`

14
inst/htmlwidgets/lib/highlightjs/bower.json

@ -0,0 +1,14 @@
{
"name": "highlightjs",
"version": "9.0.0",
"main": [
"highlight.pack.js",
"styles/default.css"
],
"ignore": [
"**/.*",
"node_modules",
"vendor",
"components"
]
}

12
inst/htmlwidgets/lib/highlightjs/component.json

@ -0,0 +1,12 @@
{
"name": "highlightjs",
"repo": "components/highlightjs",
"version": "9.0.0",
"main": "highlight.pack.min.js",
"scripts": [
"highlight.pack.min.js"
],
"files": [
"styles/default.css"
]
}

26
inst/htmlwidgets/lib/highlightjs/composer.json

@ -0,0 +1,26 @@
{
"name": "components/highlightjs",
"description": "Highlight.js highlights syntax in code examples on blogs, forums and in fact on any web pages.",
"type": "component",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Ivan Sagalaev",
"email": "maniac@softwaremaniacs.org",
"homepage": "http://softwaremaniacs.org"
}
],
"extra": {
"component": {
"scripts": [
"highlight.pack.min.js"
],
"files": [
"styles/*"
],
"shim": {
"exports": "hljs"
}
}
}
}

13797
inst/htmlwidgets/lib/highlightjs/highlight.pack.js

File diff suppressed because one or more lines are too long

11
inst/htmlwidgets/lib/highlightjs/highlight.pack.min.js

File diff suppressed because one or more lines are too long

108
inst/htmlwidgets/lib/highlightjs/styles/agate.css

@ -0,0 +1,108 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
*
* #ade5fc
* #a2fca2
* #c6b4f0
* #d36363
* #fcc28c
* #fc9b9b
* #ffa
* #fff
* #333
* #62c8f3
* #888
*
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #333;
color: white;
}
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-code,
.hljs-emphasis {
font-style: italic;
}
.hljs-tag {
color: #62c8f3;
}
.hljs-variable,
.hljs-template-variable,
.hljs-selector-id,
.hljs-selector-class {
color: #ade5fc;
}
.hljs-string,
.hljs-bullet {
color: #a2fca2;
}
.hljs-type,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-quote,
.hljs-built_in,
.hljs-builtin-name {
color: #ffa;
}
.hljs-number,
.hljs-symbol,
.hljs-bullet {
color: #d36363;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color: #fcc28c;
}
.hljs-comment,
.hljs-deletion,
.hljs-code {
color: #888;
}
.hljs-regexp,
.hljs-link {
color: #c6b4f0;
}
.hljs-meta {
color: #fc9b9b;
}
.hljs-deletion {
background-color: #fc9b9b;
color: #333;
}
.hljs-addition {
background-color: #a2fca2;
color: #333;
}
.hljs a {
color: inherit;
}
.hljs a:focus,
.hljs a:hover {
color: inherit;
text-decoration: underline;
}

66
inst/htmlwidgets/lib/highlightjs/styles/androidstudio.css

@ -0,0 +1,66 @@
/*
Date: 24 Fev 2015
Author: Pedro Oliveira <kanytu@gmail . com>
*/
.hljs {
color: #a9b7c6;
background: #282b2e;
display: block;
overflow-x: auto;
padding: 0.5em;
}
.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
color: #6897BB;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-deletion {
color: #cc7832;
}
.hljs-variable,
.hljs-template-variable,
.hljs-link {
color: #629755;
}
.hljs-comment,
.hljs-quote {
color: #808080;
}
.hljs-meta {
color: #bbb529;
}
.hljs-string,
.hljs-attribute,
.hljs-addition {
color: #6A8759;
}
.hljs-section,
.hljs-title,
.hljs-type {
color: #ffc66d;
}
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e8bf6a;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

73
inst/htmlwidgets/lib/highlightjs/styles/arta.css

@ -0,0 +1,73 @@
/*
Date: 17.V.2011
Author: pumbur <pumbur@pumbur.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #222;
}
.hljs,
.hljs-subst {
color: #aaa;
}
.hljs-section {
color: #fff;
}
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #444;
}
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-regexp {
color: #ffcc33;
}
.hljs-number,
.hljs-addition {
color: #00cc66;
}
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-template-variable,
.hljs-attribute,
.hljs-link {
color: #32aaee;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #6644aa;
}
.hljs-title,
.hljs-variable,
.hljs-deletion,
.hljs-template-tag {
color: #bb1166;
}
.hljs-section,
.hljs-doctag,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

45
inst/htmlwidgets/lib/highlightjs/styles/ascetic.css

@ -0,0 +1,45 @@
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: white;
color: black;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-symbol,
.hljs-bullet,
.hljs-section,
.hljs-addition,
.hljs-attribute,
.hljs-link {
color: #888;
}
.hljs-comment,
.hljs-quote,
.hljs-meta,
.hljs-deletion {
color: #ccc;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-name,
.hljs-type,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

83
inst/htmlwidgets/lib/highlightjs/styles/atelier-cave-dark.css

@ -0,0 +1,83 @@
/* Base16 Atelier Cave Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment,
.hljs-quote {
color: #7e7887;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-regexp,
.hljs-link,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #aa573c;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #2a9292;
}
/* Atelier-Cave Blue */
.hljs-title,
.hljs-section {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #955ae7;
}
.hljs-deletion,
.hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #be4678;
}
.hljs-addition {
background-color: #2a9292;
}
.hljs {
display: block;
overflow-x: auto;
background: #19171c;
color: #8b8792;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

85
inst/htmlwidgets/lib/highlightjs/styles/atelier-cave-light.css

@ -0,0 +1,85 @@
/* Base16 Atelier Cave Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment,
.hljs-quote {
color: #655f6d;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #aa573c;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #2a9292;
}
/* Atelier-Cave Blue */
.hljs-title,
.hljs-section {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #955ae7;
}
.hljs-deletion,
.hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #be4678;
}
.hljs-addition {
background-color: #2a9292;
}
.hljs {
display: block;
overflow-x: auto;
background: #efecf4;
color: #585260;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

113
inst/htmlwidgets/lib/highlightjs/styles/atelier-cave.dark.css

@ -0,0 +1,113 @@
/* Base16 Atelier Cave Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment {
color: #7e7887;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-attribute,
.hljs-tag,
.hljs-regexp,
.hljs-name,
.ruby .hljs-constant,
.xml .hljs-tag .hljs-title,
.xml .hljs-pi,
.xml .hljs-doctype,
.html .hljs-doctype,
.css .hljs-id,
.css .hljs-class,
.css .hljs-pseudo {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-preprocessor,
.hljs-built_in,
.hljs-literal,
.hljs-params,
.hljs-constant {
color: #aa573c;
}
/* Atelier-Cave Yellow */
.ruby .hljs-class .hljs-title,
.css .hljs-rule .hljs-attribute {
color: #a06e3b;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-value,
.hljs-inheritance,
.hljs-header,
.ruby .hljs-symbol,
.xml .hljs-cdata {
color: #2a9292;
}
/* Atelier-Cave Aqua */
.hljs-title,
.css .hljs-hexcolor {
color: #398bc6;
}
/* Atelier-Cave Blue */
.hljs-function,
.python .hljs-decorator,
.python .hljs-title,
.ruby .hljs-function .hljs-title,
.ruby .hljs-title .hljs-keyword,
.perl .hljs-sub,
.javascript .hljs-title,
.coffeescript .hljs-title {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.javascript .hljs-function {
color: #955ae7;
}
.diff .hljs-deletion,
.diff .hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.diff .hljs-deletion {
background-color: #be4678;
}
.diff .hljs-addition {
background-color: #2a9292;
}
.diff .hljs-change {
color: #576ddb;
}
.hljs {
display: block;
overflow-x: auto;
background: #19171c;
color: #8b8792;
padding: 0.5em;
-webkit-text-size-adjust: none;
}
.coffeescript .javascript,
.javascript .xml,
.tex .hljs-formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .hljs-cdata {
opacity: 0.5;
}

113
inst/htmlwidgets/lib/highlightjs/styles/atelier-cave.light.css

@ -0,0 +1,113 @@
/* Base16 Atelier Cave Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment {
color: #655f6d;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-attribute,
.hljs-tag,
.hljs-regexp,
.hljs-name,
.ruby .hljs-constant,
.xml .hljs-tag .hljs-title,
.xml .hljs-pi,
.xml .hljs-doctype,
.html .hljs-doctype,
.css .hljs-id,
.css .hljs-class,
.css .hljs-pseudo {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-preprocessor,
.hljs-built_in,
.hljs-literal,
.hljs-params,
.hljs-constant {
color: #aa573c;
}
/* Atelier-Cave Yellow */
.ruby .hljs-class .hljs-title,
.css .hljs-rule .hljs-attribute {
color: #a06e3b;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-value,
.hljs-inheritance,
.hljs-header,
.ruby .hljs-symbol,
.xml .hljs-cdata {
color: #2a9292;
}
/* Atelier-Cave Aqua */
.hljs-title,
.css .hljs-hexcolor {
color: #398bc6;
}
/* Atelier-Cave Blue */
.hljs-function,
.python .hljs-decorator,
.python .hljs-title,
.ruby .hljs-function .hljs-title,
.ruby .hljs-title .hljs-keyword,
.perl .hljs-sub,
.javascript .hljs-title,
.coffeescript .hljs-title {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.javascript .hljs-function {
color: #955ae7;
}
.diff .hljs-deletion,
.diff .hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.diff .hljs-deletion {
background-color: #be4678;
}
.diff .hljs-addition {
background-color: #2a9292;
}
.diff .hljs-change {
color: #576ddb;
}
.hljs {
display: block;
overflow-x: auto;
background: #efecf4;
color: #585260;
padding: 0.5em;
-webkit-text-size-adjust: none;
}
.coffeescript .javascript,
.javascript .xml,
.tex .hljs-formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .hljs-cdata {
opacity: 0.5;
}

69
inst/htmlwidgets/lib/highlightjs/styles/atelier-dune-dark.css

@ -0,0 +1,69 @@
/* Base16 Atelier Dune Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment,
.hljs-quote {
color: #999580;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
}
/* Atelier-Dune Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #20201d;
color: #a6a28c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

69
inst/htmlwidgets/lib/highlightjs/styles/atelier-dune-light.css

@ -0,0 +1,69 @@
/* Base16 Atelier Dune Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment,
.hljs-quote {
color: #7d7a68;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
}
/* Atelier-Dune Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #fefbec;
color: #6e6b5e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

94
inst/htmlwidgets/lib/highlightjs/styles/atelier-dune.dark.css

@ -0,0 +1,94 @@
/* Base16 Atelier Dune Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment {
color: #999580;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-attribute,
.hljs-tag,
.hljs-regexp,
.hljs-name,
.ruby .hljs-constant,
.xml .hljs-tag .hljs-title,
.xml .hljs-pi,
.xml .hljs-doctype,
.html .hljs-doctype,
.css .hljs-id,
.css .hljs-class,
.css .hljs-pseudo {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-preprocessor,
.hljs-built_in,
.hljs-literal,
.hljs-params,
.hljs-constant {
color: #b65611;
}
/* Atelier-Dune Yellow */
.ruby .hljs-class .hljs-title,
.css .hljs-rule .hljs-attribute {
color: #ae9513;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-value,
.hljs-inheritance,
.hljs-header,
.ruby .hljs-symbol,
.xml .hljs-cdata {
color: #60ac39;
}
/* Atelier-Dune Aqua */
.hljs-title,
.css .hljs-hexcolor {
color: #1fad83;
}
/* Atelier-Dune Blue */
.hljs-function,
.python .hljs-decorator,
.python .hljs-title,
.ruby .hljs-function .hljs-title,
.ruby .hljs-title .hljs-keyword,
.perl .hljs-sub,
.javascript .hljs-title,
.coffeescript .hljs-title {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.javascript .hljs-function {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #20201d;
color: #a6a28c;
padding: 0.5em;
-webkit-text-size-adjust: none;
}
.coffeescript .javascript,
.javascript .xml,
.tex .hljs-formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .hljs-cdata {
opacity: 0.5;
}

94
inst/htmlwidgets/lib/highlightjs/styles/atelier-dune.light.css

@ -0,0 +1,94 @@
/* Base16 Atelier Dune Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment {
color: #7d7a68;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-attribute,
.hljs-tag,
.hljs-regexp,
.hljs-name,
.ruby .hljs-constant,
.xml .hljs-tag .hljs-title,
.xml .hljs-pi,
.xml .hljs-doctype,
.html .hljs-doctype,
.css .hljs-id,
.css .hljs-class,
.css .hljs-pseudo {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-preprocessor,
.hljs-built_in,
.hljs-literal,
.hljs-params,
.hljs-constant {
color: #b65611;
}
/* Atelier-Dune Yellow */
.ruby .hljs-class .hljs-title,
.css .hljs-rule .hljs-attribute {
color: #ae9513;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-value,
.hljs-inheritance,
.hljs-header,
.ruby .hljs-symbol,
.xml .hljs-cdata {
color: #60ac39;
}
/* Atelier-Dune Aqua */
.hljs-title,
.css .hljs-hexcolor {
color: #1fad83;
}
/* Atelier-Dune Blue */
.hljs-function,
.python .hljs-decorator,
.python .hljs-title,
.ruby .hljs-function .hljs-title,
.ruby .hljs-title .hljs-keyword,
.perl .hljs-sub,
.javascript .hljs-title,
.coffeescript .hljs-title {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.javascript .hljs-function {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #fefbec;
color: #6e6b5e;
padding: 0.5em;
-webkit-text-size-adjust: none;
}
.coffeescript .javascript,
.javascript .xml,
.tex .hljs-formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .hljs-cdata {
opacity: 0.5;
}

84
inst/htmlwidgets/lib/highlightjs/styles/atelier-estuary-dark.css

@ -0,0 +1,84 @@
/* Base16 Atelier Estuary Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Estuary Comment */
.hljs-comment,
.hljs-quote {
color: #878573;
}
/* Atelier-Estuary Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ba6236;
}
<