@wordpress/preferences-persistence 1.0.0

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE.md +788 -0
  3. package/README.md +59 -0
  4. package/build/create/debounce-async.js +80 -0
  5. package/build/create/debounce-async.js.map +1 -0
  6. package/build/create/index.js +115 -0
  7. package/build/create/index.js.map +1 -0
  8. package/build/index.js +61 -0
  9. package/build/index.js.map +1 -0
  10. package/build/migrations/legacy-local-storage-data/convert-edit-post-panels.js +60 -0
  11. package/build/migrations/legacy-local-storage-data/convert-edit-post-panels.js.map +1 -0
  12. package/build/migrations/legacy-local-storage-data/index.js +111 -0
  13. package/build/migrations/legacy-local-storage-data/index.js.map +1 -0
  14. package/build/migrations/legacy-local-storage-data/move-feature-preferences.js +135 -0
  15. package/build/migrations/legacy-local-storage-data/move-feature-preferences.js.map +1 -0
  16. package/build/migrations/legacy-local-storage-data/move-individual-preference.js +91 -0
  17. package/build/migrations/legacy-local-storage-data/move-individual-preference.js.map +1 -0
  18. package/build/migrations/legacy-local-storage-data/move-interface-enable-items.js +114 -0
  19. package/build/migrations/legacy-local-storage-data/move-interface-enable-items.js.map +1 -0
  20. package/build/migrations/legacy-local-storage-data/move-third-party-feature-preferences.js +99 -0
  21. package/build/migrations/legacy-local-storage-data/move-third-party-feature-preferences.js.map +1 -0
  22. package/build-module/create/debounce-async.js +73 -0
  23. package/build-module/create/debounce-async.js.map +1 -0
  24. package/build-module/create/index.js +104 -0
  25. package/build-module/create/index.js.map +1 -0
  26. package/build-module/index.js +45 -0
  27. package/build-module/index.js.map +1 -0
  28. package/build-module/migrations/legacy-local-storage-data/convert-edit-post-panels.js +53 -0
  29. package/build-module/migrations/legacy-local-storage-data/convert-edit-post-panels.js.map +1 -0
  30. package/build-module/migrations/legacy-local-storage-data/index.js +95 -0
  31. package/build-module/migrations/legacy-local-storage-data/index.js.map +1 -0
  32. package/build-module/migrations/legacy-local-storage-data/move-feature-preferences.js +128 -0
  33. package/build-module/migrations/legacy-local-storage-data/move-feature-preferences.js.map +1 -0
  34. package/build-module/migrations/legacy-local-storage-data/move-individual-preference.js +84 -0
  35. package/build-module/migrations/legacy-local-storage-data/move-individual-preference.js.map +1 -0
  36. package/build-module/migrations/legacy-local-storage-data/move-interface-enable-items.js +107 -0
  37. package/build-module/migrations/legacy-local-storage-data/move-interface-enable-items.js.map +1 -0
  38. package/build-module/migrations/legacy-local-storage-data/move-third-party-feature-preferences.js +92 -0
  39. package/build-module/migrations/legacy-local-storage-data/move-third-party-feature-preferences.js.map +1 -0
  40. package/package.json +37 -0
  41. package/src/create/debounce-async.js +75 -0
  42. package/src/create/index.js +112 -0
  43. package/src/create/test/debounce-async.js +129 -0
  44. package/src/create/test/index.js +178 -0
  45. package/src/index.js +49 -0
  46. package/src/migrations/legacy-local-storage-data/README.md +42 -0
  47. package/src/migrations/legacy-local-storage-data/convert-edit-post-panels.js +50 -0
  48. package/src/migrations/legacy-local-storage-data/index.js +102 -0
  49. package/src/migrations/legacy-local-storage-data/move-feature-preferences.js +135 -0
  50. package/src/migrations/legacy-local-storage-data/move-individual-preference.js +90 -0
  51. package/src/migrations/legacy-local-storage-data/move-interface-enable-items.js +120 -0
  52. package/src/migrations/legacy-local-storage-data/move-third-party-feature-preferences.js +98 -0
  53. package/src/migrations/legacy-local-storage-data/test/convert-edit-post-panels.js +47 -0
  54. package/src/migrations/legacy-local-storage-data/test/index.js +229 -0
  55. package/src/migrations/legacy-local-storage-data/test/move-feature-preferences.js +260 -0
  56. package/src/migrations/legacy-local-storage-data/test/move-individual-preference.js +188 -0
  57. package/src/migrations/legacy-local-storage-data/test/move-interface-enable-items.js +118 -0
  58. package/src/migrations/legacy-local-storage-data/test/move-third-party-feature-preferences.js +107 -0
package/LICENSE.md ADDED
@@ -0,0 +1,788 @@
1
+ ## Gutenberg
2
+
3
+ Copyright 2016-2022 by the contributors
4
+
5
+ **License for Contributions (on and after April 15, 2021)**
6
+
7
+ All code contributed to the Gutenberg project is dual-licensed,
8
+ and released under both of the following licenses:
9
+
10
+ the GNU General Public License as published by the Free Software Foundation;
11
+ either version 2 of the License or (at your option) any later version (the “GPL”)
12
+ and the Mozilla Public License, Version 2.0 (the “MPL”).
13
+
14
+ **Project License**
15
+
16
+ The Gutenberg project license is not affected by the License for Contributions (as
17
+ discussed in the [Dual License section](#dual-license) below). The Gutenberg project
18
+ continues to be free software; you can redistribute it and/or modify it
19
+ under the terms of the GNU General Public License as published by the Free
20
+ Software Foundation; either version 2 of the License or (at your option) any
21
+ later version (the “GPL”).
22
+
23
+ This program incorporates work covered by the following copyright and
24
+ permission notices:
25
+
26
+ b2 is (c) 2001, 2002 Michel Valdrighi - m@tidakada.com -
27
+ http://tidakada.com
28
+
29
+ Wherever third party code has been used, credit has been given in the code's
30
+ comments.
31
+
32
+ b2 is released under the GPL
33
+
34
+ and
35
+
36
+ WordPress - Web publishing software
37
+
38
+ Copyright 2003-2010 by the contributors
39
+
40
+ WordPress is released under the GPL
41
+
42
+ ### Dual License
43
+
44
+ **We are currently in the process of changing Gutenberg’s software license from
45
+ GPL to a dual license: GPL and MPL.**
46
+
47
+ **This process involves two independent steps (1) obtaining permission for dual
48
+ licensing from contributors of already contributed Gutenberg code and (2)
49
+ dual licensing of all contributions to Gutenberg that are made on or after
50
+ April 15, 2021.**
51
+
52
+ **For part (1): We’re reaching out to everyone who has contributed code, prior
53
+ to April 15, 2021, and asking that they agree to dual license their
54
+ contribution to the project. We expect this process to be completed by
55
+ mid-year, 2021.**
56
+
57
+ **For part (2): We have changed the license for contributed code to this
58
+ repository to make clear that all contributions on or after April 15, 2021
59
+ will be made under the dual-license.**
60
+
61
+ **When we have received all necessary rights and permissions to dual license
62
+ the pre-April 15, 2021 code of the Gutenberg project (Part 1 above), you will
63
+ have the option to use and distribute all of the Gutenberg project under
64
+ either the GPL or MPL license. At this time we will change the “Project
65
+ License” to the following:**
66
+
67
+ The Gutenberg project is free software; you can redistribute it and/or modify
68
+ it under the terms of either of the following licenses:
69
+
70
+ 1. the GNU General Public License as published by the Free Software Foundation;
71
+ either version 2 of the License or (at your option) any later version (the
72
+ “GPL”) OR
73
+
74
+ 2. the Mozilla Public License Version 2.0 (the “MPL”).
75
+
76
+ ---
77
+
78
+ ## Full Text of Referenced Licenses
79
+
80
+ 1. [GNU General Public License, Version 2](#gnu-general-public-license-version-2)
81
+ 2. [Mozilla Public License, Version 2.0](#mozilla-public-license-version-20)
82
+
83
+ ## GNU General Public License, Version 2
84
+
85
+ ### GNU GENERAL PUBLIC LICENSE
86
+
87
+ Version 2, June 1991
88
+
89
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
90
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
91
+
92
+ Everyone is permitted to copy and distribute verbatim copies
93
+ of this license document, but changing it is not allowed.
94
+
95
+ ### Preamble
96
+
97
+ The licenses for most software are designed to take away your freedom
98
+ to share and change it. By contrast, the GNU General Public License is
99
+ intended to guarantee your freedom to share and change free
100
+ software--to make sure the software is free for all its users. This
101
+ General Public License applies to most of the Free Software
102
+ Foundation's software and to any other program whose authors commit to
103
+ using it. (Some other Free Software Foundation software is covered by
104
+ the GNU Lesser General Public License instead.) You can apply it to
105
+ your programs, too.
106
+
107
+ When we speak of free software, we are referring to freedom, not
108
+ price. Our General Public Licenses are designed to make sure that you
109
+ have the freedom to distribute copies of free software (and charge for
110
+ this service if you wish), that you receive source code or can get it
111
+ if you want it, that you can change the software or use pieces of it
112
+ in new free programs; and that you know you can do these things.
113
+
114
+ To protect your rights, we need to make restrictions that forbid
115
+ anyone to deny you these rights or to ask you to surrender the rights.
116
+ These restrictions translate to certain responsibilities for you if
117
+ you distribute copies of the software, or if you modify it.
118
+
119
+ For example, if you distribute copies of such a program, whether
120
+ gratis or for a fee, you must give the recipients all the rights that
121
+ you have. You must make sure that they, too, receive or can get the
122
+ source code. And you must show them these terms so they know their
123
+ rights.
124
+
125
+ We protect your rights with two steps: (1) copyright the software, and
126
+ (2) offer you this license which gives you legal permission to copy,
127
+ distribute and/or modify the software.
128
+
129
+ Also, for each author's protection and ours, we want to make certain
130
+ that everyone understands that there is no warranty for this free
131
+ software. If the software is modified by someone else and passed on,
132
+ we want its recipients to know that what they have is not the
133
+ original, so that any problems introduced by others will not reflect
134
+ on the original authors' reputations.
135
+
136
+ Finally, any free program is threatened constantly by software
137
+ patents. We wish to avoid the danger that redistributors of a free
138
+ program will individually obtain patent licenses, in effect making the
139
+ program proprietary. To prevent this, we have made it clear that any
140
+ patent must be licensed for everyone's free use or not licensed at
141
+ all.
142
+
143
+ The precise terms and conditions for copying, distribution and
144
+ modification follow.
145
+
146
+ ### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
147
+
148
+ **0.** This License applies to any program or other work which
149
+ contains a notice placed by the copyright holder saying it may be
150
+ distributed under the terms of this General Public License. The
151
+ "Program", below, refers to any such program or work, and a "work
152
+ based on the Program" means either the Program or any derivative work
153
+ under copyright law: that is to say, a work containing the Program or
154
+ a portion of it, either verbatim or with modifications and/or
155
+ translated into another language. (Hereinafter, translation is
156
+ included without limitation in the term "modification".) Each licensee
157
+ is addressed as "you".
158
+
159
+ Activities other than copying, distribution and modification are not
160
+ covered by this License; they are outside its scope. The act of
161
+ running the Program is not restricted, and the output from the Program
162
+ is covered only if its contents constitute a work based on the Program
163
+ (independent of having been made by running the Program). Whether that
164
+ is true depends on what the Program does.
165
+
166
+ **1.** You may copy and distribute verbatim copies of the Program's
167
+ source code as you receive it, in any medium, provided that you
168
+ conspicuously and appropriately publish on each copy an appropriate
169
+ copyright notice and disclaimer of warranty; keep intact all the
170
+ notices that refer to this License and to the absence of any warranty;
171
+ and give any other recipients of the Program a copy of this License
172
+ along with the Program.
173
+
174
+ You may charge a fee for the physical act of transferring a copy, and
175
+ you may at your option offer warranty protection in exchange for a
176
+ fee.
177
+
178
+ **2.** You may modify your copy or copies of the Program or any
179
+ portion of it, thus forming a work based on the Program, and copy and
180
+ distribute such modifications or work under the terms of Section 1
181
+ above, provided that you also meet all of these conditions:
182
+
183
+ **a)** You must cause the modified files to carry prominent notices
184
+ stating that you changed the files and the date of any change.
185
+
186
+ **b)** You must cause any work that you distribute or publish, that in
187
+ whole or in part contains or is derived from the Program or any part
188
+ thereof, to be licensed as a whole at no charge to all third parties
189
+ under the terms of this License.
190
+
191
+ **c)** If the modified program normally reads commands interactively
192
+ when run, you must cause it, when started running for such interactive
193
+ use in the most ordinary way, to print or display an announcement
194
+ including an appropriate copyright notice and a notice that there is
195
+ no warranty (or else, saying that you provide a warranty) and that
196
+ users may redistribute the program under these conditions, and telling
197
+ the user how to view a copy of this License. (Exception: if the
198
+ Program itself is interactive but does not normally print such an
199
+ announcement, your work based on the Program is not required to print
200
+ an announcement.)
201
+
202
+ These requirements apply to the modified work as a whole. If
203
+ identifiable sections of that work are not derived from the Program,
204
+ and can be reasonably considered independent and separate works in
205
+ themselves, then this License, and its terms, do not apply to those
206
+ sections when you distribute them as separate works. But when you
207
+ distribute the same sections as part of a whole which is a work based
208
+ on the Program, the distribution of the whole must be on the terms of
209
+ this License, whose permissions for other licensees extend to the
210
+ entire whole, and thus to each and every part regardless of who wrote
211
+ it.
212
+
213
+ Thus, it is not the intent of this section to claim rights or contest
214
+ your rights to work written entirely by you; rather, the intent is to
215
+ exercise the right to control the distribution of derivative or
216
+ collective works based on the Program.
217
+
218
+ In addition, mere aggregation of another work not based on the Program
219
+ with the Program (or with a work based on the Program) on a volume of
220
+ a storage or distribution medium does not bring the other work under
221
+ the scope of this License.
222
+
223
+ **3.** You may copy and distribute the Program (or a work based on it,
224
+ under Section 2) in object code or executable form under the terms of
225
+ Sections 1 and 2 above provided that you also do one of the following:
226
+
227
+ **a)** Accompany it with the complete corresponding machine-readable
228
+ source code, which must be distributed under the terms of Sections 1
229
+ and 2 above on a medium customarily used for software interchange; or,
230
+
231
+ **b)** Accompany it with a written offer, valid for at least three
232
+ years, to give any third party, for a charge no more than your cost of
233
+ physically performing source distribution, a complete machine-readable
234
+ copy of the corresponding source code, to be distributed under the
235
+ terms of Sections 1 and 2 above on a medium customarily used for
236
+ software interchange; or,
237
+
238
+ **c)** Accompany it with the information you received as to the offer
239
+ to distribute corresponding source code. (This alternative is allowed
240
+ only for noncommercial distribution and only if you received the
241
+ program in object code or executable form with such an offer, in
242
+ accord with Subsection b above.)
243
+
244
+ The source code for a work means the preferred form of the work for
245
+ making modifications to it. For an executable work, complete source
246
+ code means all the source code for all modules it contains, plus any
247
+ associated interface definition files, plus the scripts used to
248
+ control compilation and installation of the executable. However, as a
249
+ special exception, the source code distributed need not include
250
+ anything that is normally distributed (in either source or binary
251
+ form) with the major components (compiler, kernel, and so on) of the
252
+ operating system on which the executable runs, unless that component
253
+ itself accompanies the executable.
254
+
255
+ If distribution of executable or object code is made by offering
256
+ access to copy from a designated place, then offering equivalent
257
+ access to copy the source code from the same place counts as
258
+ distribution of the source code, even though third parties are not
259
+ compelled to copy the source along with the object code.
260
+
261
+ **4.** You may not copy, modify, sublicense, or distribute the Program
262
+ except as expressly provided under this License. Any attempt otherwise
263
+ to copy, modify, sublicense or distribute the Program is void, and
264
+ will automatically terminate your rights under this License. However,
265
+ parties who have received copies, or rights, from you under this
266
+ License will not have their licenses terminated so long as such
267
+ parties remain in full compliance.
268
+
269
+ **5.** You are not required to accept this License, since you have not
270
+ signed it. However, nothing else grants you permission to modify or
271
+ distribute the Program or its derivative works. These actions are
272
+ prohibited by law if you do not accept this License. Therefore, by
273
+ modifying or distributing the Program (or any work based on the
274
+ Program), you indicate your acceptance of this License to do so, and
275
+ all its terms and conditions for copying, distributing or modifying
276
+ the Program or works based on it.
277
+
278
+ **6.** Each time you redistribute the Program (or any work based on
279
+ the Program), the recipient automatically receives a license from the
280
+ original licensor to copy, distribute or modify the Program subject to
281
+ these terms and conditions. You may not impose any further
282
+ restrictions on the recipients' exercise of the rights granted herein.
283
+ You are not responsible for enforcing compliance by third parties to
284
+ this License.
285
+
286
+ **7.** If, as a consequence of a court judgment or allegation of
287
+ patent infringement or for any other reason (not limited to patent
288
+ issues), conditions are imposed on you (whether by court order,
289
+ agreement or otherwise) that contradict the conditions of this
290
+ License, they do not excuse you from the conditions of this License.
291
+ If you cannot distribute so as to satisfy simultaneously your
292
+ obligations under this License and any other pertinent obligations,
293
+ then as a consequence you may not distribute the Program at all. For
294
+ example, if a patent license would not permit royalty-free
295
+ redistribution of the Program by all those who receive copies directly
296
+ or indirectly through you, then the only way you could satisfy both it
297
+ and this License would be to refrain entirely from distribution of the
298
+ Program.
299
+
300
+ If any portion of this section is held invalid or unenforceable under
301
+ any particular circumstance, the balance of the section is intended to
302
+ apply and the section as a whole is intended to apply in other
303
+ circumstances.
304
+
305
+ It is not the purpose of this section to induce you to infringe any
306
+ patents or other property right claims or to contest validity of any
307
+ such claims; this section has the sole purpose of protecting the
308
+ integrity of the free software distribution system, which is
309
+ implemented by public license practices. Many people have made
310
+ generous contributions to the wide range of software distributed
311
+ through that system in reliance on consistent application of that
312
+ system; it is up to the author/donor to decide if he or she is willing
313
+ to distribute software through any other system and a licensee cannot
314
+ impose that choice.
315
+
316
+ This section is intended to make thoroughly clear what is believed to
317
+ be a consequence of the rest of this License.
318
+
319
+ **8.** If the distribution and/or use of the Program is restricted in
320
+ certain countries either by patents or by copyrighted interfaces, the
321
+ original copyright holder who places the Program under this License
322
+ may add an explicit geographical distribution limitation excluding
323
+ those countries, so that distribution is permitted only in or among
324
+ countries not thus excluded. In such case, this License incorporates
325
+ the limitation as if written in the body of this License.
326
+
327
+ **9.** The Free Software Foundation may publish revised and/or new
328
+ versions of the General Public License from time to time. Such new
329
+ versions will be similar in spirit to the present version, but may
330
+ differ in detail to address new problems or concerns.
331
+
332
+ Each version is given a distinguishing version number. If the Program
333
+ specifies a version number of this License which applies to it and
334
+ "any later version", you have the option of following the terms and
335
+ conditions either of that version or of any later version published by
336
+ the Free Software Foundation. If the Program does not specify a
337
+ version number of this License, you may choose any version ever
338
+ published by the Free Software Foundation.
339
+
340
+ **10.** If you wish to incorporate parts of the Program into other
341
+ free programs whose distribution conditions are different, write to
342
+ the author to ask for permission. For software which is copyrighted by
343
+ the Free Software Foundation, write to the Free Software Foundation;
344
+ we sometimes make exceptions for this. Our decision will be guided by
345
+ the two goals of preserving the free status of all derivatives of our
346
+ free software and of promoting the sharing and reuse of software
347
+ generally.
348
+
349
+ **NO WARRANTY**
350
+
351
+ **11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
352
+ WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
353
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
354
+ OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
355
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
356
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
357
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
358
+ PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
359
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
360
+
361
+ **12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
362
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
363
+ AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
364
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
365
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
366
+ PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
367
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
368
+ FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
369
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
370
+ DAMAGES.
371
+
372
+ ### END OF TERMS AND CONDITIONS
373
+
374
+ ### How to Apply These Terms to Your New Programs
375
+
376
+ If you develop a new program, and you want it to be of the greatest
377
+ possible use to the public, the best way to achieve this is to make it
378
+ free software which everyone can redistribute and change under these
379
+ terms.
380
+
381
+ To do so, attach the following notices to the program. It is safest to
382
+ attach them to the start of each source file to most effectively
383
+ convey the exclusion of warranty; and each file should have at least
384
+ the "copyright" line and a pointer to where the full notice is found.
385
+
386
+ one line to give the program's name and an idea of what it does.
387
+ Copyright (C) yyyy name of author
388
+
389
+ This program is free software; you can redistribute it and/or
390
+ modify it under the terms of the GNU General Public License
391
+ as published by the Free Software Foundation; either version 2
392
+ of the License, or (at your option) any later version.
393
+
394
+ This program is distributed in the hope that it will be useful,
395
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
396
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
397
+ GNU General Public License for more details.
398
+
399
+ You should have received a copy of the GNU General Public License
400
+ along with this program; if not, write to the Free Software
401
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
402
+
403
+ Also add information on how to contact you by electronic and paper
404
+ mail.
405
+
406
+ If the program is interactive, make it output a short notice like this
407
+ when it starts in an interactive mode:
408
+
409
+ Gnomovision version 69, Copyright (C) year name of author
410
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
411
+ type `show w'. This is free software, and you are welcome
412
+ to redistribute it under certain conditions; type `show c'
413
+ for details.
414
+
415
+ The hypothetical commands \`show w' and \`show c' should show the
416
+ appropriate parts of the General Public License. Of course, the
417
+ commands you use may be called something other than \`show w' and
418
+ \`show c'; they could even be mouse-clicks or menu items--whatever
419
+ suits your program.
420
+
421
+ You should also get your employer (if you work as a programmer) or
422
+ your school, if any, to sign a "copyright disclaimer" for the program,
423
+ if necessary. Here is a sample; alter the names:
424
+
425
+ Yoyodyne, Inc., hereby disclaims all copyright
426
+ interest in the program `Gnomovision'
427
+ (which makes passes at compilers) written
428
+ by James Hacker.
429
+
430
+ signature of Ty Coon, 1 April 1989
431
+ Ty Coon, President of Vice
432
+
433
+ This General Public License does not permit incorporating your program
434
+ into proprietary programs. If your program is a subroutine library,
435
+ you may consider it more useful to permit linking proprietary
436
+ applications with the library. If this is what you want to do, use the
437
+ [GNU Lesser General Public
438
+ License](http://www.gnu.org/licenses/lgpl.html) instead of this
439
+ License.
440
+
441
+ ---
442
+
443
+ ## Mozilla Public License, Version 2.0
444
+
445
+ ### 1. Definitions
446
+
447
+ **1.1. “Contributor”**
448
+ means each individual or legal entity that creates, contributes to
449
+ the creation of, or owns Covered Software.
450
+
451
+ **1.2. “Contributor Version”**
452
+ means the combination of the Contributions of others (if any) used
453
+ by a Contributor and that particular Contributor's Contribution.
454
+
455
+ **1.3. “Contribution”**
456
+ means Covered Software of a particular Contributor.
457
+
458
+ **1.4. “Covered Software”**
459
+ means Source Code Form to which the initial Contributor has attached
460
+ the notice in Exhibit A, the Executable Form of such Source Code
461
+ Form, and Modifications of such Source Code Form, in each case
462
+ including portions thereof.
463
+
464
+ **1.5. “Incompatible With Secondary Licenses”**
465
+ means
466
+
467
+ - **(a)** that the initial Contributor has attached the notice described
468
+ in Exhibit B to the Covered Software; or
469
+ - **(b)** that the Covered Software was made available under the terms of
470
+ version 1.1 or earlier of the License, but not also under the
471
+ terms of a Secondary License.
472
+
473
+ **1.6. “Executable Form”**
474
+ means any form of the work other than Source Code Form.
475
+
476
+ **1.7. “Larger Work”**
477
+ means a work that combines Covered Software with other material, in
478
+ a separate file or files, that is not Covered Software.
479
+
480
+ **1.8. “License”**
481
+ means this document.
482
+
483
+ **1.9. “Licensable”**
484
+ means having the right to grant, to the maximum extent possible,
485
+ whether at the time of the initial grant or subsequently, any and
486
+ all of the rights conveyed by this License.
487
+
488
+ **1.10. “Modifications”**
489
+ means any of the following:
490
+
491
+ - **(a)** any file in Source Code Form that results from an addition to,
492
+ deletion from, or modification of the contents of Covered
493
+ Software; or
494
+ - **(b)** any new file in Source Code Form that contains any Covered
495
+ Software.
496
+
497
+ **1.11. “Patent Claims” of a Contributor**
498
+ means any patent claim(s), including without limitation, method,
499
+ process, and apparatus claims, in any patent Licensable by such
500
+ Contributor that would be infringed, but for the grant of the
501
+ License, by the making, using, selling, offering for sale, having
502
+ made, import, or transfer of either its Contributions or its
503
+ Contributor Version.
504
+
505
+ **1.12. “Secondary License”**
506
+ means either the GNU General Public License, Version 2.0, the GNU
507
+ Lesser General Public License, Version 2.1, the GNU Affero General
508
+ Public License, Version 3.0, or any later versions of those
509
+ licenses.
510
+
511
+ **1.13. “Source Code Form”**
512
+ means the form of the work preferred for making modifications.
513
+
514
+ **1.14. “You” (or “Your”)**
515
+ means an individual or a legal entity exercising rights under this
516
+ License. For legal entities, “You” includes any entity that
517
+ controls, is controlled by, or is under common control with You. For
518
+ purposes of this definition, “control” means **(a)** the power, direct
519
+ or indirect, to cause the direction or management of such entity,
520
+ whether by contract or otherwise, or **(b)** ownership of more than
521
+ fifty percent (50%) of the outstanding shares or beneficial
522
+ ownership of such entity.
523
+
524
+ ### 2. License Grants and Conditions
525
+
526
+ #### 2.1. Grants
527
+
528
+ Each Contributor hereby grants You a world-wide, royalty-free,
529
+ non-exclusive license:
530
+
531
+ - **(a)** under intellectual property rights (other than patent or trademark)
532
+ Licensable by such Contributor to use, reproduce, make available,
533
+ modify, display, perform, distribute, and otherwise exploit its
534
+ Contributions, either on an unmodified basis, with Modifications, or
535
+ as part of a Larger Work; and
536
+ - **(b)** under Patent Claims of such Contributor to make, use, sell, offer
537
+ for sale, have made, import, and otherwise transfer either its
538
+ Contributions or its Contributor Version.
539
+
540
+ #### 2.2. Effective Date
541
+
542
+ The licenses granted in Section 2.1 with respect to any Contribution
543
+ become effective for each Contribution on the date the Contributor first
544
+ distributes such Contribution.
545
+
546
+ #### 2.3. Limitations on Grant Scope
547
+
548
+ The licenses granted in this Section 2 are the only rights granted under
549
+ this License. No additional rights or licenses will be implied from the
550
+ distribution or licensing of Covered Software under this License.
551
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
552
+ Contributor:
553
+
554
+ - **(a)** for any code that a Contributor has removed from Covered Software;
555
+ or
556
+ - **(b)** for infringements caused by: **(i)** Your and any other third party's
557
+ modifications of Covered Software, or **(ii)** the combination of its
558
+ Contributions with other software (except as part of its Contributor
559
+ Version); or
560
+ - **(c)** under Patent Claims infringed by Covered Software in the absence of
561
+ its Contributions.
562
+
563
+ This License does not grant any rights in the trademarks, service marks,
564
+ or logos of any Contributor (except as may be necessary to comply with
565
+ the notice requirements in Section 3.4).
566
+
567
+ #### 2.4. Subsequent Licenses
568
+
569
+ No Contributor makes additional grants as a result of Your choice to
570
+ distribute the Covered Software under a subsequent version of this
571
+ License (see Section 10.2) or under the terms of a Secondary License (if
572
+ permitted under the terms of Section 3.3).
573
+
574
+ #### 2.5. Representation
575
+
576
+ Each Contributor represents that the Contributor believes its
577
+ Contributions are its original creation(s) or it has sufficient rights
578
+ to grant the rights to its Contributions conveyed by this License.
579
+
580
+ #### 2.6. Fair Use
581
+
582
+ This License is not intended to limit any rights You have under
583
+ applicable copyright doctrines of fair use, fair dealing, or other
584
+ equivalents.
585
+
586
+ #### 2.7. Conditions
587
+
588
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
589
+ in Section 2.1.
590
+
591
+ ### 3. Responsibilities
592
+
593
+ #### 3.1. Distribution of Source Form
594
+
595
+ All distribution of Covered Software in Source Code Form, including any
596
+ Modifications that You create or to which You contribute, must be under
597
+ the terms of this License. You must inform recipients that the Source
598
+ Code Form of the Covered Software is governed by the terms of this
599
+ License, and how they can obtain a copy of this License. You may not
600
+ attempt to alter or restrict the recipients' rights in the Source Code
601
+ Form.
602
+
603
+ #### 3.2. Distribution of Executable Form
604
+
605
+ If You distribute Covered Software in Executable Form then:
606
+
607
+ - **(a)** such Covered Software must also be made available in Source Code
608
+ Form, as described in Section 3.1, and You must inform recipients of
609
+ the Executable Form how they can obtain a copy of such Source Code
610
+ Form by reasonable means in a timely manner, at a charge no more
611
+ than the cost of distribution to the recipient; and
612
+
613
+ - **(b)** You may distribute such Executable Form under the terms of this
614
+ License, or sublicense it under different terms, provided that the
615
+ license for the Executable Form does not attempt to limit or alter
616
+ the recipients' rights in the Source Code Form under this License.
617
+
618
+ #### 3.3. Distribution of a Larger Work
619
+
620
+ You may create and distribute a Larger Work under terms of Your choice,
621
+ provided that You also comply with the requirements of this License for
622
+ the Covered Software. If the Larger Work is a combination of Covered
623
+ Software with a work governed by one or more Secondary Licenses, and the
624
+ Covered Software is not Incompatible With Secondary Licenses, this
625
+ License permits You to additionally distribute such Covered Software
626
+ under the terms of such Secondary License(s), so that the recipient of
627
+ the Larger Work may, at their option, further distribute the Covered
628
+ Software under the terms of either this License or such Secondary
629
+ License(s).
630
+
631
+ #### 3.4. Notices
632
+
633
+ You may not remove or alter the substance of any license notices
634
+ (including copyright notices, patent notices, disclaimers of warranty,
635
+ or limitations of liability) contained within the Source Code Form of
636
+ the Covered Software, except that You may alter any license notices to
637
+ the extent required to remedy known factual inaccuracies.
638
+
639
+ #### 3.5. Application of Additional Terms
640
+
641
+ You may choose to offer, and to charge a fee for, warranty, support,
642
+ indemnity or liability obligations to one or more recipients of Covered
643
+ Software. However, You may do so only on Your own behalf, and not on
644
+ behalf of any Contributor. You must make it absolutely clear that any
645
+ such warranty, support, indemnity, or liability obligation is offered by
646
+ You alone, and You hereby agree to indemnify every Contributor for any
647
+ liability incurred by such Contributor as a result of warranty, support,
648
+ indemnity or liability terms You offer. You may include additional
649
+ disclaimers of warranty and limitations of liability specific to any
650
+ jurisdiction.
651
+
652
+ ### 4. Inability to Comply Due to Statute or Regulation
653
+
654
+ If it is impossible for You to comply with any of the terms of this
655
+ License with respect to some or all of the Covered Software due to
656
+ statute, judicial order, or regulation then You must: **(a)** comply with
657
+ the terms of this License to the maximum extent possible; and **(b)**
658
+ describe the limitations and the code they affect. Such description must
659
+ be placed in a text file included with all distributions of the Covered
660
+ Software under this License. Except to the extent prohibited by statute
661
+ or regulation, such description must be sufficiently detailed for a
662
+ recipient of ordinary skill to be able to understand it.
663
+
664
+ ### 5. Termination
665
+
666
+ **5.1.** The rights granted under this License will terminate automatically
667
+ if You fail to comply with any of its terms. However, if You become
668
+ compliant, then the rights granted under this License from a particular
669
+ Contributor are reinstated **(a)** provisionally, unless and until such
670
+ Contributor explicitly and finally terminates Your grants, and **(b)** on an
671
+ ongoing basis, if such Contributor fails to notify You of the
672
+ non-compliance by some reasonable means prior to 60 days after You have
673
+ come back into compliance. Moreover, Your grants from a particular
674
+ Contributor are reinstated on an ongoing basis if such Contributor
675
+ notifies You of the non-compliance by some reasonable means, this is the
676
+ first time You have received notice of non-compliance with this License
677
+ from such Contributor, and You become compliant prior to 30 days after
678
+ Your receipt of the notice.
679
+
680
+ **5.2.** If You initiate litigation against any entity by asserting a patent
681
+ infringement claim (excluding declaratory judgment actions,
682
+ counter-claims, and cross-claims) alleging that a Contributor Version
683
+ directly or indirectly infringes any patent, then the rights granted to
684
+ You by any and all Contributors for the Covered Software under Section
685
+ 2.1 of this License shall terminate.
686
+
687
+ **5.3.** In the event of termination under Sections 5.1 or 5.2 above, all
688
+ end user license agreements (excluding distributors and resellers) which
689
+ have been validly granted by You or Your distributors under this License
690
+ prior to termination shall survive termination.
691
+
692
+ ### 6. Disclaimer of Warranty
693
+
694
+ > Covered Software is provided under this License on an “as is”
695
+ > basis, without warranty of any kind, either expressed, implied, or
696
+ > statutory, including, without limitation, warranties that the
697
+ > Covered Software is free of defects, merchantable, fit for a
698
+ > particular purpose or non-infringing. The entire risk as to the
699
+ > quality and performance of the Covered Software is with You.
700
+ > Should any Covered Software prove defective in any respect, You
701
+ > (not any Contributor) assume the cost of any necessary servicing,
702
+ > repair, or correction. This disclaimer of warranty constitutes an
703
+ > essential part of this License. No use of any Covered Software is
704
+ > authorized under this License except under this disclaimer.
705
+
706
+ ### 7. Limitation of Liability
707
+
708
+ > Under no circumstances and under no legal theory, whether tort
709
+ > (including negligence), contract, or otherwise, shall any
710
+ > Contributor, or anyone who distributes Covered Software as
711
+ > permitted above, be liable to You for any direct, indirect,
712
+ > special, incidental, or consequential damages of any character
713
+ > including, without limitation, damages for lost profits, loss of
714
+ > goodwill, work stoppage, computer failure or malfunction, or any
715
+ > and all other commercial damages or losses, even if such party
716
+ > shall have been informed of the possibility of such damages. This
717
+ > limitation of liability shall not apply to liability for death or
718
+ > personal injury resulting from such party's negligence to the
719
+ > extent applicable law prohibits such limitation. Some
720
+ > jurisdictions do not allow the exclusion or limitation of
721
+ > incidental or consequential damages, so this exclusion and
722
+ > limitation may not apply to You.
723
+
724
+ ### 8. Litigation
725
+
726
+ Any litigation relating to this License may be brought only in the
727
+ courts of a jurisdiction where the defendant maintains its principal
728
+ place of business and such litigation shall be governed by laws of that
729
+ jurisdiction, without reference to its conflict-of-law provisions.
730
+ Nothing in this Section shall prevent a party's ability to bring
731
+ cross-claims or counter-claims.
732
+
733
+ ### 9. Miscellaneous
734
+
735
+ This License represents the complete agreement concerning the subject
736
+ matter hereof. If any provision of this License is held to be
737
+ unenforceable, such provision shall be reformed only to the extent
738
+ necessary to make it enforceable. Any law or regulation which provides
739
+ that the language of a contract shall be construed against the drafter
740
+ shall not be used to construe this License against a Contributor.
741
+
742
+ ### 10. Versions of the License
743
+
744
+ #### 10.1. New Versions
745
+
746
+ Mozilla Foundation is the license steward. Except as provided in Section
747
+ 10.3, no one other than the license steward has the right to modify or
748
+ publish new versions of this License. Each version will be given a
749
+ distinguishing version number.
750
+
751
+ #### 10.2. Effect of New Versions
752
+
753
+ You may distribute the Covered Software under the terms of the version
754
+ of the License under which You originally received the Covered Software,
755
+ or under the terms of any subsequent version published by the license
756
+ steward.
757
+
758
+ #### 10.3. Modified Versions
759
+
760
+ If you create software not governed by this License, and you want to
761
+ create a new license for such software, you may create and use a
762
+ modified version of this License if you rename the license and remove
763
+ any references to the name of the license steward (except to note that
764
+ such modified license differs from this License).
765
+
766
+ #### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
767
+
768
+ If You choose to distribute Source Code Form that is Incompatible With
769
+ Secondary Licenses under the terms of this version of the License, the
770
+ notice described in Exhibit B of this License must be attached.
771
+
772
+ ## Exhibit A - Source Code Form License Notice
773
+
774
+ This Source Code Form is subject to the terms of the Mozilla Public
775
+ License, v. 2.0. If a copy of the MPL was not distributed with this
776
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
777
+
778
+ If it is not possible or desirable to put the notice in a particular
779
+ file, then You may include the notice in a location (such as a LICENSE
780
+ file in a relevant directory) where a recipient would be likely to look
781
+ for such a notice.
782
+
783
+ You may add additional accurate notices of copyright ownership.
784
+
785
+ ## Exhibit B - “Incompatible With Secondary Licenses” Notice
786
+
787
+ This Source Code Form is "Incompatible With Secondary Licenses", as
788
+ defined by the Mozilla Public License, v. 2.0.