@versatiles/style 5.2.6 → 5.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +274 -14
- package/dist/index.js +3650 -11
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/color/abstract.ts +83 -0
- package/src/color/hsl.test.ts +182 -0
- package/src/color/hsl.ts +122 -0
- package/src/color/hsv.test.ts +174 -0
- package/src/color/hsv.ts +100 -0
- package/src/color/index.test.ts +119 -0
- package/src/color/index.ts +38 -0
- package/src/color/random.test.ts +35 -0
- package/src/color/random.ts +165 -0
- package/src/color/rgb.test.ts +227 -0
- package/src/color/rgb.ts +248 -0
- package/src/color/utils.test.ts +86 -0
- package/src/color/utils.ts +13 -0
- package/src/guess_style/guess_style.test.ts +134 -0
- package/src/guess_style/guess_style.ts +166 -0
- package/{dist/guess_style/index.d.ts → src/guess_style/index.ts} +1 -0
- package/src/index.test.ts +77 -0
- package/src/index.ts +18 -0
- package/src/lib/utils.test.ts +197 -0
- package/src/lib/utils.ts +134 -0
- package/{dist/shortbread/index.d.ts → src/shortbread/index.ts} +1 -0
- package/src/shortbread/layers.test.ts +36 -0
- package/src/shortbread/layers.ts +564 -0
- package/src/shortbread/properties.test.ts +44 -0
- package/src/shortbread/properties.ts +142 -0
- package/src/shortbread/template.test.ts +43 -0
- package/src/shortbread/template.ts +343 -0
- package/src/style_builder/decorator.test.ts +67 -0
- package/src/style_builder/decorator.ts +135 -0
- package/src/style_builder/recolor.test.ts +306 -0
- package/src/style_builder/recolor.ts +110 -0
- package/src/style_builder/style_builder.test.ts +103 -0
- package/src/style_builder/style_builder.ts +134 -0
- package/src/style_builder/types.ts +141 -0
- package/src/styles/LICENSE.md +41 -0
- package/src/styles/colorful.ts +1041 -0
- package/src/styles/eclipse.ts +11 -0
- package/{dist/styles/empty.d.ts → src/styles/empty.ts} +7 -3
- package/src/styles/graybeard.ts +11 -0
- package/src/styles/index.ts +33 -0
- package/src/styles/neutrino.ts +429 -0
- package/{dist/types/index.d.ts → src/types/index.ts} +1 -0
- package/{dist/types/maplibre.d.ts → src/types/maplibre.ts} +3 -0
- package/src/types/tilejson.test.ts +94 -0
- package/src/types/tilejson.ts +125 -0
- package/src/types/vector_layer.test.ts +64 -0
- package/src/types/vector_layer.ts +69 -0
- package/dist/color/abstract.d.ts +0 -34
- package/dist/color/abstract.js +0 -53
- package/dist/color/abstract.js.map +0 -1
- package/dist/color/hsl.d.ts +0 -23
- package/dist/color/hsl.js +0 -98
- package/dist/color/hsl.js.map +0 -1
- package/dist/color/hsv.d.ts +0 -20
- package/dist/color/hsv.js +0 -100
- package/dist/color/hsv.js.map +0 -1
- package/dist/color/index.d.ts +0 -6
- package/dist/color/index.js +0 -29
- package/dist/color/index.js.map +0 -1
- package/dist/color/random.d.ts +0 -9
- package/dist/color/random.js +0 -134
- package/dist/color/random.js.map +0 -1
- package/dist/color/rgb.d.ts +0 -28
- package/dist/color/rgb.js +0 -195
- package/dist/color/rgb.js.map +0 -1
- package/dist/color/utils.d.ts +0 -3
- package/dist/color/utils.js +0 -10
- package/dist/color/utils.js.map +0 -1
- package/dist/guess_style/guess_style.d.ts +0 -8
- package/dist/guess_style/guess_style.js +0 -147
- package/dist/guess_style/guess_style.js.map +0 -1
- package/dist/guess_style/index.js +0 -2
- package/dist/guess_style/index.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -6
- package/dist/lib/utils.js +0 -126
- package/dist/lib/utils.js.map +0 -1
- package/dist/shortbread/index.js +0 -3
- package/dist/shortbread/index.js.map +0 -1
- package/dist/shortbread/layers.d.ts +0 -5
- package/dist/shortbread/layers.js +0 -521
- package/dist/shortbread/layers.js.map +0 -1
- package/dist/shortbread/properties.d.ts +0 -7
- package/dist/shortbread/properties.js +0 -125
- package/dist/shortbread/properties.js.map +0 -1
- package/dist/shortbread/template.d.ts +0 -4
- package/dist/shortbread/template.js +0 -339
- package/dist/shortbread/template.js.map +0 -1
- package/dist/style_builder/decorator.d.ts +0 -4
- package/dist/style_builder/decorator.js +0 -127
- package/dist/style_builder/decorator.js.map +0 -1
- package/dist/style_builder/recolor.d.ts +0 -22
- package/dist/style_builder/recolor.js +0 -89
- package/dist/style_builder/recolor.js.map +0 -1
- package/dist/style_builder/style_builder.d.ts +0 -15
- package/dist/style_builder/style_builder.js +0 -106
- package/dist/style_builder/style_builder.js.map +0 -1
- package/dist/style_builder/types.d.ts +0 -122
- package/dist/style_builder/types.js +0 -3
- package/dist/style_builder/types.js.map +0 -1
- package/dist/styles/colorful.d.ts +0 -11
- package/dist/styles/colorful.js +0 -956
- package/dist/styles/colorful.js.map +0 -1
- package/dist/styles/eclipse.d.ts +0 -5
- package/dist/styles/eclipse.js +0 -9
- package/dist/styles/eclipse.js.map +0 -1
- package/dist/styles/empty.js +0 -8
- package/dist/styles/empty.js.map +0 -1
- package/dist/styles/graybeard.d.ts +0 -5
- package/dist/styles/graybeard.js +0 -9
- package/dist/styles/graybeard.js.map +0 -1
- package/dist/styles/index.d.ts +0 -11
- package/dist/styles/index.js +0 -20
- package/dist/styles/index.js.map +0 -1
- package/dist/styles/neutrino.d.ts +0 -11
- package/dist/styles/neutrino.js +0 -401
- package/dist/styles/neutrino.js.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/types/maplibre.js +0 -2
- package/dist/types/maplibre.js.map +0 -1
- package/dist/types/tilejson.d.ts +0 -32
- package/dist/types/tilejson.js +0 -87
- package/dist/types/tilejson.js.map +0 -1
- package/dist/types/vector_layer.d.ts +0 -14
- package/dist/types/vector_layer.js +0 -51
- package/dist/types/vector_layer.js.map +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Color } from '../color/index.js';
|
|
2
|
+
import { getShortbreadTemplate, getShortbreadLayers } from '../shortbread/index.js';
|
|
3
|
+
import { decorate } from './decorator.js';
|
|
4
|
+
import { CachedRecolor, getDefaultRecolorFlags } from './recolor.js';
|
|
5
|
+
import { basename, deepClone, resolveUrl } from '../lib/utils.js';
|
|
6
|
+
import type { MaplibreLayer, MaplibreLayerDefinition, StyleSpecification } from '../types/maplibre.js';
|
|
7
|
+
import type { StyleBuilderColors, StyleBuilderColorsEnsured, StyleBuilderFonts, StyleBuilderOptions } from './types.js';
|
|
8
|
+
import type { StyleRules, StyleRulesOptions } from './types.js';
|
|
9
|
+
import { SpriteSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
// StyleBuilder class definition
|
|
14
|
+
export abstract class StyleBuilder {
|
|
15
|
+
readonly #sourceName = 'versatiles-shortbread';
|
|
16
|
+
|
|
17
|
+
public abstract readonly name: string;
|
|
18
|
+
|
|
19
|
+
public abstract readonly defaultColors: StyleBuilderColors;
|
|
20
|
+
|
|
21
|
+
public abstract readonly defaultFonts: StyleBuilderFonts;
|
|
22
|
+
|
|
23
|
+
public build(options?: StyleBuilderOptions): StyleSpecification {
|
|
24
|
+
|
|
25
|
+
options ??= {};
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const baseUrl = options.baseUrl ?? globalThis?.document?.location?.origin ?? 'https://tiles.versatiles.org';
|
|
29
|
+
const glyphs = options.glyphs ?? '/assets/glyphs/{fontstack}/{range}.pbf';
|
|
30
|
+
|
|
31
|
+
const sprite: SpriteSpecification = options.sprite ?? [{ id: 'basics', url: '/assets/sprites/basics/sprites' }];
|
|
32
|
+
const tiles = options.tiles ?? ['/tiles/osm/{z}/{x}/{y}'];
|
|
33
|
+
const hideLabels = options.hideLabels ?? false;
|
|
34
|
+
const language = options.language ?? null;
|
|
35
|
+
const recolorOptions = options.recolor ?? getDefaultRecolorFlags();
|
|
36
|
+
|
|
37
|
+
const colors = this.getColors(this.defaultColors);
|
|
38
|
+
if (options.colors) {
|
|
39
|
+
let key: keyof StyleBuilderColorsEnsured;
|
|
40
|
+
for (key in options.colors) {
|
|
41
|
+
const value = options.colors[key];
|
|
42
|
+
if (value != null) colors[key] = Color.parse(value);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const fonts = deepClone(this.defaultFonts);
|
|
47
|
+
if (options.fonts) {
|
|
48
|
+
let key: keyof StyleBuilderFonts;
|
|
49
|
+
for (key in options.fonts) {
|
|
50
|
+
const fontName = options.fonts[key];
|
|
51
|
+
if (fontName != null) fonts[key] = fontName;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// get empty shortbread style
|
|
56
|
+
const style = getShortbreadTemplate();
|
|
57
|
+
|
|
58
|
+
const styleRuleOptions: StyleRulesOptions = {
|
|
59
|
+
colors,
|
|
60
|
+
fonts,
|
|
61
|
+
language,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// get layer style rules from child class
|
|
65
|
+
const layerStyleRules = this.getStyleRules(styleRuleOptions);
|
|
66
|
+
|
|
67
|
+
// get shortbread layers
|
|
68
|
+
const layerDefinitions: MaplibreLayerDefinition[] = getShortbreadLayers({ language });
|
|
69
|
+
let layers: MaplibreLayer[] = layerDefinitions.map(layer => {
|
|
70
|
+
switch (layer.type) {
|
|
71
|
+
case 'background':
|
|
72
|
+
return layer;
|
|
73
|
+
case 'fill':
|
|
74
|
+
case 'line':
|
|
75
|
+
case 'symbol':
|
|
76
|
+
return {
|
|
77
|
+
source: this.#sourceName,
|
|
78
|
+
...layer,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
throw Error('unknown layer type');
|
|
82
|
+
});
|
|
83
|
+
// apply layer rules
|
|
84
|
+
layers = decorate(layers, layerStyleRules, new CachedRecolor(recolorOptions));
|
|
85
|
+
|
|
86
|
+
// hide labels, if wanted
|
|
87
|
+
if (hideLabels) layers = layers.filter(l => l.type !== 'symbol');
|
|
88
|
+
|
|
89
|
+
style.layers = layers;
|
|
90
|
+
style.name = 'versatiles-' + this.name.toLowerCase();
|
|
91
|
+
style.glyphs = resolveUrl(baseUrl, glyphs);
|
|
92
|
+
|
|
93
|
+
if (typeof sprite == 'string') {
|
|
94
|
+
style.sprite = [{ id: basename(sprite), url: resolveUrl(baseUrl, sprite) }];
|
|
95
|
+
} else {
|
|
96
|
+
style.sprite = sprite.map(({ id, url }) => ({ id, url: resolveUrl(baseUrl, url) }));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const source = style.sources[this.#sourceName];
|
|
100
|
+
if ('tiles' in source) source.tiles = tiles.map(url => resolveUrl(baseUrl, url));
|
|
101
|
+
|
|
102
|
+
return style;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
public getColors(colors: StyleBuilderColors): StyleBuilderColorsEnsured {
|
|
106
|
+
const entriesString = Object.entries(colors) as [keyof StyleBuilderColors, string | Color][];
|
|
107
|
+
const result = Object.fromEntries(entriesString.map(([key, value]) => [key, Color.parse(value)])) as StyleBuilderColorsEnsured;
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public getDefaultOptions(): StyleBuilderOptions {
|
|
112
|
+
return {
|
|
113
|
+
baseUrl: '',
|
|
114
|
+
glyphs: '',
|
|
115
|
+
sprite: '',
|
|
116
|
+
tiles: [],
|
|
117
|
+
hideLabels: false,
|
|
118
|
+
language: undefined,
|
|
119
|
+
colors: deepClone(this.defaultColors),
|
|
120
|
+
fonts: deepClone(this.defaultFonts),
|
|
121
|
+
recolor: getDefaultRecolorFlags(),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
protected transformDefaultColors(callback: (color: Color) => Color): void {
|
|
126
|
+
const colors = this.getColors(this.defaultColors);
|
|
127
|
+
let key: keyof StyleBuilderColorsEnsured;
|
|
128
|
+
for (key in colors) {
|
|
129
|
+
this.defaultColors[key] = callback(colors[key]);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
protected abstract getStyleRules(options: StyleRulesOptions): StyleRules;
|
|
134
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { Color } from '../color/index.js';
|
|
2
|
+
import type { RecolorOptions } from './recolor.js';
|
|
3
|
+
import { SpriteSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
4
|
+
|
|
5
|
+
/** Represents language suffixes used in map styles. */
|
|
6
|
+
export type Language = 'de' | 'en' | null;
|
|
7
|
+
|
|
8
|
+
/** Options for configuring a style builder. */
|
|
9
|
+
export interface StyleBuilderOptions {
|
|
10
|
+
/**
|
|
11
|
+
* The base URL for loading external resources like tiles, sprites, and fonts.
|
|
12
|
+
* Default: document.location.origin (in the browser), or 'https://tiles.versatiles.org'
|
|
13
|
+
*/
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The URL template for loading font glyphs, formatted with '{fontstack}' and '{range}' placeholders.
|
|
18
|
+
* Default: '/assets/glyphs/{fontstack}/{range}.pbf'
|
|
19
|
+
*/
|
|
20
|
+
glyphs?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The URL for loading sprite images and metadata.
|
|
24
|
+
* Default: [{ id: 'basics', url: '/assets/sprites/basics/sprites' }]
|
|
25
|
+
*/
|
|
26
|
+
sprite?: SpriteSpecification;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An array of URL templates for loading map tiles, using '{z}', '{x}', and '{y}' placeholders.
|
|
30
|
+
* Default: ['/tiles/osm/{z}/{x}/{y}']
|
|
31
|
+
*/
|
|
32
|
+
tiles?: string[];
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* If set to true, hides all map labels.
|
|
36
|
+
* Default: false
|
|
37
|
+
*/
|
|
38
|
+
hideLabels?: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Set the language ('en', 'de') of all map labels.
|
|
42
|
+
* A null value means that the language of the country in which the label is drawn will be used.
|
|
43
|
+
* Default: null
|
|
44
|
+
*/
|
|
45
|
+
language?: Language;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* An object specifying overrides for default color values, keyed by the color names.
|
|
49
|
+
*/
|
|
50
|
+
colors?: Partial<StyleBuilderColors>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* An object specifying overrides for default font names, keyed by the font names.
|
|
54
|
+
*/
|
|
55
|
+
fonts?: Partial<StyleBuilderFonts>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Options for color adjustments and transformations applied to the entire style.
|
|
59
|
+
*/
|
|
60
|
+
recolor?: RecolorOptions;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Records string values for color properties in a style builder. */
|
|
64
|
+
export interface StyleBuilderColors {
|
|
65
|
+
agriculture: Color | string;
|
|
66
|
+
boundary: Color | string;
|
|
67
|
+
building: Color | string;
|
|
68
|
+
buildingbg: Color | string;
|
|
69
|
+
burial: Color | string;
|
|
70
|
+
commercial: Color | string;
|
|
71
|
+
construction: Color | string;
|
|
72
|
+
cycle: Color | string;
|
|
73
|
+
danger: Color | string;
|
|
74
|
+
disputed: Color | string;
|
|
75
|
+
education: Color | string;
|
|
76
|
+
foot: Color | string;
|
|
77
|
+
glacier: Color | string;
|
|
78
|
+
grass: Color | string;
|
|
79
|
+
hospital: Color | string;
|
|
80
|
+
industrial: Color | string;
|
|
81
|
+
label: Color | string;
|
|
82
|
+
labelHalo: Color | string;
|
|
83
|
+
land: Color | string;
|
|
84
|
+
leisure: Color | string;
|
|
85
|
+
motorway: Color | string;
|
|
86
|
+
motorwaybg: Color | string;
|
|
87
|
+
park: Color | string;
|
|
88
|
+
parking: Color | string;
|
|
89
|
+
poi: Color | string;
|
|
90
|
+
prison: Color | string;
|
|
91
|
+
rail: Color | string;
|
|
92
|
+
residential: Color | string;
|
|
93
|
+
rock: Color | string;
|
|
94
|
+
sand: Color | string;
|
|
95
|
+
shield: Color | string;
|
|
96
|
+
street: Color | string;
|
|
97
|
+
streetbg: Color | string;
|
|
98
|
+
subway: Color | string;
|
|
99
|
+
symbol: Color | string;
|
|
100
|
+
trunk: Color | string;
|
|
101
|
+
trunkbg: Color | string;
|
|
102
|
+
waste: Color | string;
|
|
103
|
+
water: Color | string;
|
|
104
|
+
wetland: Color | string;
|
|
105
|
+
wood: Color | string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type StyleBuilderColorsEnsured = Record<keyof StyleBuilderColors, Color>;
|
|
109
|
+
|
|
110
|
+
/** Records string values for font properties in a style builder. */
|
|
111
|
+
export type StyleBuilderFonts = {
|
|
112
|
+
regular: string;
|
|
113
|
+
bold: string;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/** Defines options for style rules in a style builder. */
|
|
117
|
+
export interface StyleRulesOptions {
|
|
118
|
+
/**
|
|
119
|
+
* The set of colors used in the style builder.
|
|
120
|
+
*/
|
|
121
|
+
colors: StyleBuilderColorsEnsured;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The set of fonts used in the style builder.
|
|
125
|
+
*/
|
|
126
|
+
fonts: StyleBuilderFonts;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The language used for map labels.
|
|
130
|
+
*/
|
|
131
|
+
language: Language;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Defines the value type for a style rule. */
|
|
135
|
+
export type StyleRuleValue = boolean | number | object | string;
|
|
136
|
+
|
|
137
|
+
/** Defines the structure of a style rule, which is a record of properties to style values. */
|
|
138
|
+
export type StyleRule = Record<string, StyleRuleValue | undefined>;
|
|
139
|
+
|
|
140
|
+
/** Defines the structure of style rules, which is a record of selectors to style rules. */
|
|
141
|
+
export type StyleRules = Record<string, StyleRule | undefined>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Creative Commons CC0 1.0 Universal
|
|
2
|
+
|
|
3
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
|
|
4
|
+
|
|
5
|
+
## Statement of Purpose
|
|
6
|
+
|
|
7
|
+
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
|
|
8
|
+
|
|
9
|
+
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
|
|
10
|
+
|
|
11
|
+
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
|
|
12
|
+
|
|
13
|
+
1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
|
|
14
|
+
|
|
15
|
+
i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
|
|
16
|
+
|
|
17
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
18
|
+
|
|
19
|
+
iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
|
|
20
|
+
|
|
21
|
+
iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
|
|
22
|
+
|
|
23
|
+
v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
|
|
24
|
+
|
|
25
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
|
|
26
|
+
|
|
27
|
+
vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
|
|
28
|
+
|
|
29
|
+
2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
|
|
30
|
+
|
|
31
|
+
3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
|
|
32
|
+
|
|
33
|
+
4. __Limitations and Disclaimers.__
|
|
34
|
+
|
|
35
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
|
|
36
|
+
|
|
37
|
+
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
|
|
38
|
+
|
|
39
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
|
|
40
|
+
|
|
41
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
|