diff --git a/refs/biblio.json b/refs/biblio.json index f2985b112..70d7bae5f 100644 --- a/refs/biblio.json +++ b/refs/biblio.json @@ -478,9 +478,6 @@ "CSS-PAGE-TEMPLATE-1": { "aliasOf": "css3-page-template" }, - "CSS-SHAPES": { - "aliasOf": "css-shapes-1" - }, "CSS-SPEECH-1": { "aliasOf": "css3-speech" }, diff --git a/refs/w3c.json b/refs/w3c.json index efe28f02f..f207f7b1a 100644 --- a/refs/w3c.json +++ b/refs/w3c.json @@ -19234,6 +19234,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-align": { + "aliasOf": "css-align-3" + }, "css-align-3": { "authors": [ "Elika Etemad", @@ -19435,6 +19438,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-animation-worklet": { + "aliasOf": "css-animation-worklet-1" + }, "css-animation-worklet-1": { "authors": [ "Majid Valipour", @@ -19470,6 +19476,9 @@ } } }, + "css-animations": { + "aliasOf": "css-animations-1" + }, "css-animations-1": { "authors": [ "Dean Jackson", @@ -19555,6 +19564,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-backgrounds": { + "aliasOf": "css-backgrounds-3" + }, "css-backgrounds-3": { "authors": [ "Bert Bos", @@ -19761,6 +19773,9 @@ ], "isRetired": true }, + "css-box": { + "aliasOf": "css-box-3" + }, "css-box-3": { "authors": [ "Elika Etemad" @@ -19848,6 +19863,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-break": { + "aliasOf": "css-break-4" + }, "css-break-3": { "authors": [ "Rossen Atanassov", @@ -19997,6 +20015,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-cascade": { + "aliasOf": "css-cascade-4" + }, "css-cascade-3": { "authors": [ "Elika Etemad", @@ -20206,6 +20227,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-color": { + "aliasOf": "css-color-4" + }, "css-color-3": { "authors": [ "Tantek Çelik", @@ -20390,6 +20414,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-color-adjust": { + "aliasOf": "css-color-adjust-1" + }, "css-color-adjust-1": { "authors": [ "Elika Etemad", @@ -20443,6 +20470,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-contain": { + "aliasOf": "css-contain-2" + }, "css-contain-1": { "authors": [ "Tab Atkins Jr.", @@ -20600,6 +20630,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-content": { + "aliasOf": "css-content-3" + }, "css-content-3": { "authors": [ "Elika Etemad", @@ -20678,6 +20711,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-counter-styles": { + "aliasOf": "css-counter-styles-3" + }, "css-counter-styles-3": { "authors": [ "Tab Atkins Jr." @@ -20855,6 +20891,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-display": { + "aliasOf": "css-display-3" + }, "css-display-3": { "authors": [ "Tab Atkins Jr.", @@ -21021,6 +21060,9 @@ "edDraft": "https://drafts.csswg.org/css-display/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-easing": { + "aliasOf": "css-easing-1" + }, "css-easing-1": { "authors": [ "Brian Birtles", @@ -21306,6 +21348,9 @@ "edDraft": "https://drafts.csswg.org/css-flexbox-1/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-font-loading": { + "aliasOf": "css-font-loading-3" + }, "css-font-loading-3": { "authors": [ "Tab Atkins Jr." @@ -21352,6 +21397,9 @@ "edDraft": "https://drafts.csswg.org/css-font-loading/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-fonts": { + "aliasOf": "css-fonts-4" + }, "css-fonts-3": { "authors": [ "John Daggett", @@ -21586,6 +21634,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-gcpm": { + "aliasOf": "css-gcpm-3" + }, "css-gcpm-3": { "authors": [ "Dave Cramer" @@ -21662,6 +21713,9 @@ "edDraft": "https://drafts.csswg.org/css-gcpm/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-grid": { + "aliasOf": "css-grid-1" + }, "css-grid-1": { "authors": [ "Tab Atkins Jr.", @@ -21979,6 +22033,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-images": { + "aliasOf": "css-images-4" + }, "css-images-3": { "authors": [ "Tab Atkins Jr.", @@ -22117,6 +22174,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-inline": { + "aliasOf": "css-inline-3" + }, "css-inline-3": { "authors": [ "Dave Cramer", @@ -22220,6 +22280,9 @@ ], "repository": "https://github.com/w3c/csswg-drafts" }, + "css-layout-api": { + "aliasOf": "css-layout-api-1" + }, "css-layout-api-1": { "authors": [ "Greg Whitworth", @@ -22261,6 +22324,9 @@ } } }, + "css-line-grid": { + "aliasOf": "css-line-grid-1" + }, "css-line-grid-1": { "authors": [ "Elika Etemad", @@ -22313,6 +22379,9 @@ "edDraft": "https://drafts.csswg.org/css-line-grid/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-lists": { + "aliasOf": "css-lists-3" + }, "css-lists-3": { "authors": [ "Elika Etemad", @@ -22402,6 +22471,9 @@ "edDraft": "https://drafts.csswg.org/css-lists-3/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-logical": { + "aliasOf": "css-logical-1" + }, "css-logical-1": { "authors": [ "Rossen Atanassov", @@ -22659,6 +22731,9 @@ "source": "https://www.w3.org/2002/01/tr-automation/tr.rdf", "isRetired": true }, + "css-multicol": { + "aliasOf": "css-multicol-1" + }, "css-multicol-1": { "authors": [ "Håkon Wium Lie", @@ -22776,6 +22851,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-namespaces": { + "aliasOf": "css-namespaces-3" + }, "css-namespaces-3": { "authors": [ "Elika Etemad" @@ -22855,6 +22933,9 @@ "hasErrata": "https://www.w3.org/Style/2011/REC-css3-color-20110607-errata.html", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-nav": { + "aliasOf": "css-nav-1" + }, "css-nav-1": { "authors": [ "Jihye Hong", @@ -22889,6 +22970,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-overflow": { + "aliasOf": "css-overflow-4" + }, "css-overflow-3": { "authors": [ "David Baron", @@ -22988,6 +23072,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-overscroll": { + "aliasOf": "css-overscroll-1" + }, "css-overscroll-1": { "authors": [ "Majid Valipour" @@ -23020,6 +23107,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-page": { + "aliasOf": "css-page-3" + }, "css-page-3": { "authors": [ "Elika Etemad", @@ -23107,6 +23197,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-page-floats": { + "aliasOf": "css-page-floats-3" + }, "css-page-floats-3": { "authors": [ "Johannes Wilm" @@ -23139,6 +23232,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-paint-api": { + "aliasOf": "css-paint-api-1" + }, "css-paint-api-1": { "authors": [ "Ian Kilpatrick", @@ -23206,6 +23302,9 @@ } } }, + "css-position": { + "aliasOf": "css-position-3" + }, "css-position-3": { "authors": [ "Rossen Atanassov", @@ -23327,6 +23426,9 @@ "source": "https://www.w3.org/2002/01/tr-automation/tr.rdf", "isRetired": true }, + "css-properties-values-api": { + "aliasOf": "css-properties-values-api-1" + }, "css-properties-values-api-1": { "authors": [ "Tab Atkins Jr.", @@ -23407,6 +23509,9 @@ } } }, + "css-pseudo": { + "aliasOf": "css-pseudo-4" + }, "css-pseudo-4": { "authors": [ "Daniel Glazman", @@ -23475,6 +23580,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-regions": { + "aliasOf": "css-regions-1" + }, "css-regions-1": { "authors": [ "Rossen Atanassov", @@ -23571,6 +23679,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-rhythm": { + "aliasOf": "css-rhythm-1" + }, "css-rhythm-1": { "authors": [ "Koji Ishii", @@ -23605,6 +23716,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-round-display": { + "aliasOf": "css-round-display-1" + }, "css-round-display-1": { "authors": [ "Jihye Hong" @@ -23667,6 +23781,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-ruby": { + "aliasOf": "css-ruby-1" + }, "css-ruby-1": { "authors": [ "Elika Etemad", @@ -23749,6 +23866,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-scoping": { + "aliasOf": "css-scoping-1" + }, "css-scoping-1": { "authors": [ "Tab Atkins Jr.", @@ -23783,6 +23903,9 @@ "edDraft": "https://drafts.csswg.org/css-scoping/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-scroll-snap": { + "aliasOf": "css-scroll-snap-1" + }, "css-scroll-snap-1": { "authors": [ "Matt Rakow", @@ -23970,6 +24093,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-scrollbars": { + "aliasOf": "css-scrollbars-1" + }, "css-scrollbars-1": { "authors": [ "Tantek Çelik", @@ -24004,6 +24130,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-shadow-parts": { + "aliasOf": "css-shadow-parts-1" + }, "css-shadow-parts-1": { "authors": [ "Tab Atkins Jr.", @@ -24038,6 +24167,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-shapes": { + "aliasOf": "css-shapes-1" + }, "css-shapes-1": { "authors": [ "Vincent Hardy", @@ -24122,6 +24254,9 @@ "edDraft": "https://drafts.csswg.org/css-shapes/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-sizing": { + "aliasOf": "css-sizing-3" + }, "css-sizing-3": { "authors": [ "Tab Atkins Jr.", @@ -24230,6 +24365,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-snappoints": { + "aliasOf": "css-snappoints-1" + }, "css-snappoints-1": { "aliasOf": "css-scroll-snap-1" }, @@ -24321,6 +24459,9 @@ "edDraft": "https://drafts.csswg.org/css-style-attr/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-syntax": { + "aliasOf": "css-syntax-3" + }, "css-syntax-3": { "authors": [ "Tab Atkins Jr.", @@ -24414,6 +24555,9 @@ "edDraft": "https://drafts.csswg.org/css-syntax/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-tables": { + "aliasOf": "css-tables-3" + }, "css-tables-3": { "authors": [ "François Remy", @@ -24479,6 +24623,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-template": { + "aliasOf": "css-template-3" + }, "css-template-3": { "authors": [ "Bert Bos", @@ -24552,6 +24699,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-text": { + "aliasOf": "css-text-4" + }, "css-text-3": { "authors": [ "Elika Etemad", @@ -24802,6 +24952,9 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-text-decor": { + "aliasOf": "css-text-decor-4" + }, "css-text-decor-3": { "authors": [ "Elika Etemad", @@ -24921,9 +25074,15 @@ }, "repository": "https://github.com/w3c/csswg-drafts" }, + "css-timing": { + "aliasOf": "css-timing-1" + }, "css-timing-1": { "aliasOf": "css-easing-1" }, + "css-transforms": { + "aliasOf": "css-transforms-1" + }, "css-transforms-1": { "authors": [ "Simon Fraser", @@ -25049,6 +25208,9 @@ ], "repository": "https://github.com/w3c/csswg-drafts" }, + "css-transitions": { + "aliasOf": "css-transitions-1" + }, "css-transitions-1": { "authors": [ "David Baron", @@ -25229,6 +25391,9 @@ "source": "https://www.w3.org/2002/01/tr-automation/tr.rdf", "isRetired": true }, + "css-typed-om": { + "aliasOf": "css-typed-om-1" + }, "css-typed-om-1": { "authors": [ "Shane Stephens", @@ -25297,6 +25462,9 @@ } } }, + "css-ui": { + "aliasOf": "css-ui-4" + }, "css-ui-3": { "authors": [ "Tantek Çelik", @@ -25827,6 +25995,9 @@ "edDraft": "https://drafts.csswg.org/css-variables/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-will-change": { + "aliasOf": "css-will-change-1" + }, "css-will-change-1": { "authors": [ "Tab Atkins Jr." @@ -25873,6 +26044,9 @@ "edDraft": "https://drafts.csswg.org/css-will-change/", "repository": "https://github.com/w3c/csswg-drafts" }, + "css-writing-modes": { + "aliasOf": "css-writing-modes-4" + }, "css-writing-modes-3": { "authors": [ "Elika Etemad", diff --git a/refs/wicg.json b/refs/wicg.json index 0146838e3..821e5313a 100644 --- a/refs/wicg.json +++ b/refs/wicg.json @@ -47,14 +47,6 @@ "source": "https://wicg.github.io/admin/biblio.json", "repository": "https://github.com/wicg/cors-rfc1918" }, - "CSS-ANIMATION-WORKLET": { - "href": "https://wicg.github.io/animation-worklet/", - "title": "CSS Animation Worklet API", - "status": "cg-draft", - "publisher": "WICG", - "source": "https://wicg.github.io/admin/biblio.json", - "repository": "https://github.com/wicg/animation-worklet" - }, "CSS-OVERSCROLL-BEHAVIOR": { "href": "https://wicg.github.io/overscroll-behavior/", "title": "CSS Overscroll Behavior Module Level 1", @@ -330,7 +322,7 @@ "aliasOf": "CORS-RFC1918" }, "WICG-CSS-ANIMATION-WORKLET": { - "aliasOf": "CSS-ANIMATION-WORKLET" + "aliasOf": "css-animation-worklet" }, "WICG-CSS-OVERSCROLL-BEHAVIOR": { "aliasOf": "CSS-OVERSCROLL-BEHAVIOR" diff --git a/scripts/css-alias.js b/scripts/css-alias.js new file mode 100644 index 000000000..bd385f996 --- /dev/null +++ b/scripts/css-alias.js @@ -0,0 +1,58 @@ +/** + * Script creates alias for CSS specs + * see https://github.com/tobie/specref/issues/563 + */ +const helper = require("./helper"); +const FILENAME = "w3c.json"; +const obj = helper.readBiblio(FILENAME); + +// Some are delta specs, or not stable enough to +// be used as the canonical ones. +const overrides = new Map([ + ["css-grid", "css-grid-1"], + // temporary, while we figure out how to deal with aliasOf upgrades + ["css-values", "css-values-3"], +]); + +// Store the keys in canonical form as lowercase to make sure +// we don't override existing ones +const canonicalKeys = Object.keys(obj).reduce((map, key) => { + return map.set(key.toLowerCase(), key); +}, new Map()); + +// Find all the CSS WG specs that are not already aliased in "obj" +// by taking the "greater" level +const aliasMap = Object.keys(obj) + // Find css-what-ever-number + .filter(key => key.startsWith("css") && /-\d$/.test(key)) + .reduce((map, spec) => { + let key = spec.slice(0, -2); + // if this key already exists, potentially update it + // to latest spec + if (canonicalKeys.has(key.toLowerCase())) { + key = canonicalKeys.get(key.toLowerCase()); + } + if (overrides.has(key)) { + map.set(key, overrides.get(key)); + } else if (!map.has(key) || spec > map.get(key)) { + map.set(key, spec); + } + return map; + }, new Map()); + +// Create the "aliasOf" entries +Array.from(aliasMap.entries()).reduce((obj, [key, aliasOf]) => { + obj[key] = { aliasOf }; + return obj; +}, obj); + +// Insert the aliasOf entries in the right order +const sortedObj = Object.keys(obj) + .sort() + .reduce((sortedObj, key) => { + sortedObj[key] = obj[key]; + return sortedObj; + }, {}); + +// Write the file back out +helper.writeBiblio(FILENAME, sortedObj);