diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..b7ca95b5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# JS files must always use LF for tools to work +*.js eol=lf diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..aa2f7456 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + + # Group all dependabot version update PRs into one + groups: + github-actions: + applies-to: version-updates + patterns: + - "*" diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..e9d2fe6c --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + pull_request: + push: + branches-ignore: "dependabot/**" + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install xmllint + run: sudo apt-get install -y libxml2-utils + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm test diff --git a/.gitignore b/.gitignore index b5a693a5..633f1bde 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -dist -node_modules -config.json -.project -*~ -*.diff -*.patch -.DS_Store -.settings \ No newline at end of file +/dist/ +/node_modules/ +config.js* diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..3c032078 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..fa66dfde --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,46 @@ +module.exports = function( grunt ) { + +grunt.loadNpmTasks( "grunt-jquery-content" ); + +grunt.initConfig({ + xmllint: { + all: [ + "entries/**", + "includes/**", + "categories.xml", + "entries2html.xsl", + "notes.xsl" + ] + }, + "build-posts": { + page: "pages/**" + }, + "build-xml-entries": { + all: "entries/**" + }, + "build-resources": { + all: "resources/**" + }, + wordpress: (function() { + + // There's no config for CI, but we don't need one for basic testing + var config = {}; + try { + config = require( "./config" ); + } catch ( error ) {} + config.dir = "dist/wordpress"; + return config; + })() +}); + +grunt.registerTask( "lint", [ "xmllint" ] ); + +grunt.registerTask( "build", [ + "build-posts", + "build-resources", + "build-xml-entries", + "build-xml-categories", + "build-xml-full" +]); + +}; diff --git a/LICENSE-MIT.txt b/LICENSE.txt similarity index 62% rename from LICENSE-MIT.txt rename to LICENSE.txt index b2a404dd..a49ceb5d 100644 --- a/LICENSE-MIT.txt +++ b/LICENSE.txt @@ -1,8 +1,13 @@ -Copyright (c) 2014 jQuery Foundation, http://jquery.org/ +Copyright jQuery Foundation and other contributors, https://jquery.org/ This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history -and logs, available at https://github.com/jquery/api.jqueryui.com +available at https://github.com/jquery/api.jqueryui.com + +The following license applies to all parts of this software except as +documented below: + +==== Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -22,3 +27,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation and all examples and demos. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules directory are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/README.md b/README.md index 87b689e5..2381691f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ -api.jqueryui.com -================ +# api.jqueryui.com -## Building +## Building and Deploying -### Requirements -* libxml2 -* libxslt +To build and deploy your changes for previewing in a [`jquery-wp-content`](https://github.com/jquery/jquery-wp-content) instance, follow the [workflow instructions](http://contribute.jquery.org/web-sites/#workflow) from our documentation on [contributing to jQuery Foundation web sites](http://contribute.jquery.org/web-sites/). -The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from GnuWin32. +### Requirements -### Build +* [libxml2](http://xmlsoft.org/) +* [libxslt](http://xmlsoft.org/libxslt/) -To build and deploy your changes for previewing in a [`jquery-wp-content`](https://github.com/jquery/jquery-wp-content) instance, follow the [workflow instructions](http://contribute.jquery.org/web-sites/#workflow) from our documentation on [contributing to jQuery Foundation web sites](http://contribute.jquery.org/web-sites/). +The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from GnuWin32. diff --git a/categories.xml b/categories.xml index c0ed6b44..3869a7a1 100644 --- a/categories.xml +++ b/categories.xml @@ -2,7 +2,7 @@ @@ -29,12 +29,12 @@ diff --git a/config-sample.json b/config-sample.json index 52861f73..12d17855 100644 --- a/config-sample.json +++ b/config-sample.json @@ -1,5 +1,5 @@ { - "url": "local.api.jqueryui.com", + "url": "vagrant.api.jqueryui.com", "username": "admin", "password": "secret" } diff --git a/entries/accordion.xml b/entries/accordion.xml index 05eb123b..629bb1f1 100644 --- a/entries/accordion.xml +++ b/entries/accordion.xml @@ -21,16 +21,16 @@

When focus is on a header, the following key commands are available:

When focus is in a panel:

@@ -39,8 +39,13 @@
  • ui-accordion: The outer container of the accordion.
      -
    • ui-accordion-header: The headers of the accordion. The headers will additionally have a ui-accordion-icons class if they contain icons.
    • -
    • ui-accordion-content: The content panels of the accordion.
    • +
    • + ui-accordion-header: The headers of the accordion. The active header will additionally have a ui-accordion-header-active class, the inactive headers will have a ui-accordion-header-collapsed class. The headers will also have a ui-accordion-icons class if they contain icons. +
        +
      • ui-accordion-header-icon: Icon elements within each accordion header.
      • +
      +
    • +
    • ui-accordion-content: The content panels of the accordion. The active content panel will additionally have a ui-accordion-content-active class.
  • @@ -66,7 +71,7 @@ The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel. - -