diff --git a/docs/components/api-item.js b/docs/components/api-item.js index 33f0ac78b15..a5ef44217d2 100644 --- a/docs/components/api-item.js +++ b/docs/components/api-item.js @@ -6,7 +6,8 @@ import {highlightJavascript} from '../components/prism_highlight.js'; import docs from '../components/api.json'; // eslint-disable-line import/no-unresolved import ApiItemMember from './api-item-member'; import IconText from '@mapbox/mr-ui/icon-text'; - +import Feedback from '@mapbox/dr-ui/feedback'; +import constants from '../constants'; const linkerStack = new LinkerStack({}) .namespaceResolver(docs, (namespace) => { @@ -18,6 +19,21 @@ const formatters = createFormatters(linkerStack.link); class ApiItem extends React.Component { + constructor(props) { + super(props); + this.state = { + userName: undefined + }; + } + + componentDidMount() { + MapboxPageShell.afterUserCheck(() => { + this.setState({ userName: MapboxPageShell.getUser() ? + MapboxPageShell.getUser().id : + undefined}); + }); + } + md = (ast, inline) => { if (inline && ast && ast.children.length && ast.children[0].type === 'paragraph') { ast = { @@ -161,6 +177,17 @@ class ApiItem extends React.Component {
For platform-appropriate documentation of style-related features, developers using the Mapbox Maps SDK for iOS should consult the iOS SDK API reference, and developers using the Mapbox Maps SDK for macOS should consult the macOS SDK API reference.
-Root level properties of a Mapbox style specify the map's layers, tile sources and other resources, and default values for the initial camera position when not specified elsewhere.
@@ -276,7 +304,7 @@ export default class extends React.Component {
A style's light
property provides global light source for that style.
Sources supply data to be shown on the map. The type of source is specified by the
"type"
property, and must be one of {sourceTypes.map((t, i) => {t}).reduce((prev, curr) => [prev, ', ', curr])}.
@@ -562,7 +590,7 @@ export default class extends React.Component {
A style's sprite
property supplies a URL template for loading small images to use in
rendering background-pattern
, fill-pattern
, line-pattern
,
@@ -619,7 +647,7 @@ export default class extends React.Component {
A style's glyphs
property provides a URL template for loading signed-distance-field glyph sets in PBF format.
A transition
property controls timing for the interpolation between a transitionable style
property's previous value and new value. A style's
@@ -660,7 +688,7 @@ export default class extends React.Component {
A style's layers
property lists all of the layers available in that style. The type of
layer is specified by the "type"
property, and must be one of {layerTypes.map((t, i) => {t}).reduce((prev, curr) => [prev, ', ', curr])}.
@@ -701,7 +729,7 @@ export default class extends React.Component {
A Mapbox style contains values of various types, most commonly as values for the style properties of a layer.
@@ -765,7 +793,7 @@ export default class extends React.Component {
The value for any layout property, paint property, or filter may be specified as an expression. An expression defines a formula for computing the @@ -1039,7 +1067,7 @@ export default class extends React.Component {
The value for any layout or paint property may be specified as a function. Functions allow you to make the appearance of a map feature @@ -1276,7 +1304,7 @@ export default class extends React.Component {
In previous versions of the style specification, filters were defined using the deprecated syntax documented below. Though filters defined with this syntax will continue to work, we recommend using the more flexible expression syntax instead. Expression syntax and the deprecated syntax below cannot be mixed in a single filter definition.
diff --git a/package.json b/package.json index a31552d10dd..bb6c125b938 100644 --- a/package.json +++ b/package.json @@ -42,13 +42,13 @@ "@mapbox/appropriate-images": "^2.0.0", "@mapbox/appropriate-images-react": "^1.0.0", "@mapbox/batfish": "1.9.8", - "@mapbox/dr-ui": "0.16.2", + "@mapbox/dr-ui": "0.19.0", "@mapbox/flow-remove-types": "^1.3.0-await.upstream.2", "@mapbox/gazetteer": "^3.1.2", "@mapbox/mapbox-gl-rtl-text": "^0.2.1", "@mapbox/mapbox-gl-test-suite": "file:test/integration", "@mapbox/mbx-assembly": "^0.28.2", - "@mapbox/mr-ui": "0.7.1", + "@mapbox/mr-ui": "0.7.2", "@octokit/rest": "^15.15.1", "babel-eslint": "^10.0.1", "benchmark": "^2.1.4", diff --git a/yarn.lock b/yarn.lock index 20bccfe7f10..6f96e843c5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -839,14 +839,6 @@ "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/polyfill@^7.2.5": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.4.tgz#78801cf3dbe657844eeabf31c1cae3828051e893" - integrity sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.2" - "@babel/preset-env@^7.1.0": version "7.3.1" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.3.1.tgz#389e8ca6b17ae67aaf9a2111665030be923515db" @@ -927,6 +919,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.5.4": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" + integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ== + dependencies: + regenerator-runtime "^0.13.2" + "@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" @@ -1014,45 +1013,41 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" -"@elastic/react-search-ui-views@0.10.0", "@elastic/react-search-ui-views@^0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@elastic/react-search-ui-views/-/react-search-ui-views-0.10.0.tgz#4ae423e0a10592d11c1083ee9875b40fec040a09" - integrity sha512-g2BZDa1XLVSZJf6bqeMXsrufaxUQyTfzxFvVhvMUn7IumkXXsZISqu0CvGT5esDoV9m8ipaB6hgZjA28+t1D5A== +"@elastic/react-search-ui-views@1.0.0", "@elastic/react-search-ui-views@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@elastic/react-search-ui-views/-/react-search-ui-views-1.0.0.tgz#b170d68685048031abb92df73fe9ee41cf663c06" + integrity sha512-kcIGvxqs4AFtQ8J8mxoJHwV9AkYJE3DX5Jc+LDoKzp8GXi55WqtcO9jPCbTBvK9spZicYyA3WUhA2438lQe20w== dependencies: - "@babel/polyfill" "^7.2.5" + "@babel/runtime" "^7.5.4" autoprefixer "^9.4.7" - core-js "^2.6.9" deep-equal "^1.0.1" downshift "^3.2.7" rc-pagination "^1.17.3" react-select "^2.1.1" -"@elastic/react-search-ui@^0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@elastic/react-search-ui/-/react-search-ui-0.10.0.tgz#c65343f44d84d9af83876d15047e5bfa7140bab9" - integrity sha512-YfSqLND2OqQw37OiEk3ugKptvQ0TRpTVTO2mKpwctRWs9HQMMfdTZf21PkLe8mowylWqz1VH7wCqsV87Xg5Rnw== +"@elastic/react-search-ui@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@elastic/react-search-ui/-/react-search-ui-1.0.0.tgz#e3c48ef021362c643fe1b25800a3f4b8b5aaf978" + integrity sha512-r2oLZL8mhT5xNZNXB7mV8a2QwAJuOHTa76Lgb10Kob9fD1fM1BfRCS+ffM7klx4IcJ3L43OF5KXo6GwrGcGZyA== dependencies: - "@babel/polyfill" "^7.2.5" - "@elastic/react-search-ui-views" "0.10.0" - "@elastic/search-ui" "0.10.0" - core-js "^2.6.9" + "@babel/runtime" "^7.5.4" + "@elastic/react-search-ui-views" "1.0.0" + "@elastic/search-ui" "1.0.0" debounce-fn "^1.0.0" -"@elastic/search-ui-site-search-connector@^0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@elastic/search-ui-site-search-connector/-/search-ui-site-search-connector-0.10.0.tgz#b3b705214a7bc690c45cdd4ed4a20608554b74fa" - integrity sha512-ZTxV57vhrGRdIQc3B/fjJJu9kh9JFLW3GVgNT5pn/CAg9q1TGO/+6/AMqBNWBrGWQNEY8x5qHobqbDTrea09HQ== +"@elastic/search-ui-site-search-connector@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@elastic/search-ui-site-search-connector/-/search-ui-site-search-connector-1.0.0.tgz#0a221e7214f68e828962dc8c149437313963817a" + integrity sha512-I8uQL7uo2bnCft/7ruvMov0zqlM2tmMIAD3scs21P6wmiUUjG9UUX6Hv7GygcmTA/0gAVTEracjgqLH1CKDWSA== dependencies: - "@babel/polyfill" "^7.2.5" - core-js "^2.6.9" + "@babel/runtime" "^7.5.4" -"@elastic/search-ui@0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@elastic/search-ui/-/search-ui-0.10.0.tgz#bcf86faaa12f5c16655397cf64f93056bf618a0a" - integrity sha512-5pMbeY/sodixMXh8aaJjUcey8FM7iV5I7gtRbXHjz9VY2mb3MdO88gHxKVYYb4PWzNQn+s2tzsaYiw2Cvgkkaw== +"@elastic/search-ui@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@elastic/search-ui/-/search-ui-1.0.0.tgz#90b202676215937c86707b5125e1b9bd8e75f27c" + integrity sha512-Dg5xtfIxAHNWNYyW2jI1Mda4llleVBp3Yise3zTdGhNhzP30Ewgb3idaCFdxbd28WNEL/sHCI8reTxZA3itLsQ== dependencies: - "@babel/polyfill" "^7.2.5" - core-js "^2.6.9" + "@babel/runtime" "^7.5.4" date-fns "^1.29.0" debounce-fn "^1.0.0" deep-equal "^1.0.1" @@ -1246,22 +1241,24 @@ webpack-merge "^4.1.2" worker-farm "^1.6.0" -"@mapbox/dr-ui@0.16.2": - version "0.16.2" - resolved "https://registry.yarnpkg.com/@mapbox/dr-ui/-/dr-ui-0.16.2.tgz#82e3f69bc0fa59a7a514ca8747b4845a7adcf688" - integrity sha512-Wsio/ieF5OZ91lrHjZ0hCpjALiMRXFj8KkMmjaI+E3voZ8bFZZPySHfJQT75NZG66OHBhH1klsJMKnZUpql38A== +"@mapbox/dr-ui@0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@mapbox/dr-ui/-/dr-ui-0.19.0.tgz#cd5a89f91370633e1eda697b9f6147d8991b1141" + integrity sha512-bRA6dQUtJ582Eja9cfJ10oM4C+Kb9rT7KYYcT2yku/QsqchSMceW7eJekzG4fffU7PL49+7Iwnzxa0QiMLmxKQ== dependencies: - "@elastic/react-search-ui" "^0.10.0" - "@elastic/react-search-ui-views" "^0.10.0" - "@elastic/search-ui-site-search-connector" "^0.10.0" + "@elastic/react-search-ui" "^1.0.0" + "@elastic/react-search-ui-views" "^1.0.0" + "@elastic/search-ui-site-search-connector" "^1.0.0" "@mapbox/mr-ui" "^0.7.0" classnames "^2.2.6" + compare-versions "^3.4.0" debounce "^1.2.0" downshift "^3.2.7" hastscript "^5.0.0" react-html-parser "^2.0.2" react-stickynode "^2.1.1" rehype-sectionize-headings "^1.0.0-rc.1" + uuid "^3.3.2" "@mapbox/flow-remove-types@^1.3.0-await.upstream.2": version "1.3.0-await.upstream.2" @@ -1396,7 +1393,29 @@ postcss-custom-media "^6.0.0" postcss-custom-properties "^7.0.0" -"@mapbox/mr-ui@0.7.1", "@mapbox/mr-ui@^0.7.0": +"@mapbox/mr-ui@0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@mapbox/mr-ui/-/mr-ui-0.7.2.tgz#32ce7f7777890a8efd91f6593ac458ff9ee30c73" + integrity sha512-gBUaM3Tr3ORirkNuuDt64FCTHOtVAT/tmEfxMOWvOmdEAH6YzOOm2ZzD+w1A88NhXsI/QAqWxx3d7xuIIOLelA== + dependencies: + "@mapbox/query-selector-contains-node" "^1.0.0" + classnames "^2.2.6" + clipboard "^2.0.0" + debounce "^1.1.0" + focus-trap "^3.0.0" + hoverintent "^2.0.0" + os-key "^1.0.0" + prefix "^1.0.0" + react-aria-modal "^4.0.0" + react-datepicker "^0.60.2" + react-displace "^2.3.0" + react-submittable "^2.0.0" + select "^1.1.2" + shallow-equal "^1.0.0" + tabbable "^3.1.1" + xtend "^4.0.0" + +"@mapbox/mr-ui@^0.7.0": version "0.7.1" resolved "https://registry.yarnpkg.com/@mapbox/mr-ui/-/mr-ui-0.7.1.tgz#832974fc2984a0af8678992d64ab11edeec18d44" integrity sha512-ii3jiWjq4pCzXN9u+HxjyhLVR06lGt3bA9iMcxK5JwuWk+/qgDwUTZKsfKMij/MHyVKoucLxTk/DxxC8O1rPIA== @@ -4128,6 +4147,11 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" +compare-versions@^3.4.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.5.0.tgz#85fc22a1ae9612ff730d77fb092295acd056d311" + integrity sha512-hX+4kt2Rcwu+x1U0SsEFCn1quURjEjPEGH/cPBlpME/IidGimAdwfMU+B+xDr7et/KTR7VH2+ZqWGerv4NGs2w== + component-bind@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" @@ -4293,11 +4317,6 @@ core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0: version "2.5.3" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" -core-js@^2.6.5, core-js@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" - integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -6604,6 +6623,13 @@ focus-trap-react@^4.0.0: dependencies: focus-trap "^3.0.0" +focus-trap-react@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/focus-trap-react/-/focus-trap-react-6.0.0.tgz#3f5a9f68447dd374d22388fb4c50018be83e74a5" + integrity sha512-mvEYxmP75PMx0vOqoIAmJHO/qUEvdTAdz6gLlEZyxxODnuKQdnKea2RWTYxghAPrV+ibiIq2o/GTSgQycnAjcw== + dependencies: + focus-trap "^4.0.2" + focus-trap@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-3.0.0.tgz#4d2ee044ae66bf7eb6ebc6c93bd7a1039481d7dc" @@ -6611,6 +6637,14 @@ focus-trap@^3.0.0: tabbable "^3.1.0" xtend "^4.0.1" +focus-trap@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-4.0.2.tgz#4ee2b96547c9ea0e4252a2d4b2cca68944194663" + integrity sha512-HtLjfAK7Hp2qbBtLS6wEznID1mPT+48ZnP2nkHzgjpL4kroYHg0CdqJ5cTXk+UO5znAxF5fRUkhdyfgrhh8Lzw== + dependencies: + tabbable "^3.1.2" + xtend "^4.0.1" + follow-redirects@^1.2.5: version "1.6.1" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.6.1.tgz#514973c44b5757368bad8bddfe52f81f015c94cb" @@ -11667,6 +11701,15 @@ react-aria-modal@^3.0.0: no-scroll "^2.1.1" react-displace "^2.3.0" +react-aria-modal@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/react-aria-modal/-/react-aria-modal-4.0.0.tgz#b195e9ad6bd360b628c1853381ab4e7466d2328c" + integrity sha512-crdEAIHc5xXi6YqZeUgRDJN1uromSehU1XSEegVPU8/okmf1tEDwnzb6ULl+PJy4aS6sb6fUiWEdMNTLAX2HBA== + dependencies: + focus-trap-react "^6.0.0" + no-scroll "^2.1.1" + react-displace "^2.3.0" + react-attr-converter@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/react-attr-converter/-/react-attr-converter-0.3.1.tgz#4a2abf6d907b7ddae4d862dfec80e489ce41ad6e" @@ -13830,7 +13873,7 @@ syntax-error@^1.1.1: dependencies: acorn-node "^1.2.0" -tabbable@^3.1.0, tabbable@^3.1.1: +tabbable@^3.1.0, tabbable@^3.1.1, tabbable@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-3.1.2.tgz#f2d16cccd01f400e38635c7181adfe0ad965a4a2"